catchup-library-web 1.5.3 → 1.5.4
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
CHANGED
|
@@ -3074,240 +3074,264 @@ var ShowBodyMediaByContentType = ({
|
|
|
3074
3074
|
const [showFullScreen, setShowFullScreen] = (0, import_react9.useState)(false);
|
|
3075
3075
|
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0, import_react9.useState)("");
|
|
3076
3076
|
const convertToPercentage = (size2) => {
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3077
|
+
switch (size2) {
|
|
3078
|
+
case "1/3":
|
|
3079
|
+
return "w-small-media";
|
|
3080
|
+
case "1/2":
|
|
3081
|
+
return "w-medium-media";
|
|
3082
|
+
case "1":
|
|
3083
|
+
return "w-large-media";
|
|
3084
|
+
default:
|
|
3085
|
+
return "";
|
|
3083
3086
|
}
|
|
3084
3087
|
};
|
|
3088
|
+
const renderSpecialExpressions = (inputPart, partIndex, parentKey) => {
|
|
3089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3090
|
+
"span",
|
|
3091
|
+
{
|
|
3092
|
+
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3093
|
+
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3094
|
+
},
|
|
3095
|
+
`${parentKey}-expr-${partIndex}`
|
|
3096
|
+
);
|
|
3097
|
+
};
|
|
3098
|
+
const balanceSpecialChars = (text) => {
|
|
3099
|
+
let result = text;
|
|
3100
|
+
if ((result.split("__").length - 1) % 2 === 1) {
|
|
3101
|
+
result = result + "__";
|
|
3102
|
+
}
|
|
3103
|
+
if ((result.split("**").length - 1) % 2 === 1) {
|
|
3104
|
+
result = result + "**";
|
|
3105
|
+
}
|
|
3106
|
+
if ((result.split("`").length - 1) % 2 === 1) {
|
|
3107
|
+
result = result + "`";
|
|
3108
|
+
}
|
|
3109
|
+
return result;
|
|
3110
|
+
};
|
|
3111
|
+
const renderTextContent = (text, itemKey) => {
|
|
3112
|
+
const balancedText = balanceSpecialChars(text);
|
|
3113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(balancedText).map(
|
|
3114
|
+
(inputPart, exprIndex) => renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
3115
|
+
) }, itemKey);
|
|
3116
|
+
};
|
|
3117
|
+
const handleOpenFullScreen = (imageSource) => {
|
|
3118
|
+
setSelectedFullScreenItem(imageSource);
|
|
3119
|
+
setShowFullScreen(true);
|
|
3120
|
+
};
|
|
3085
3121
|
const retrieveValueParts = (value2) => {
|
|
3086
3122
|
let currentIndex = 0;
|
|
3087
3123
|
const valuePartList = [];
|
|
3088
3124
|
let copyValue = JSON.parse(JSON.stringify(value2));
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3125
|
+
const processTextTags = () => {
|
|
3126
|
+
const checkText = "--TEXT--";
|
|
3127
|
+
while (copyValue.includes(checkText)) {
|
|
3128
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
3129
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3130
|
+
if (textBeforeTag.trim() !== "") {
|
|
3131
|
+
const balancedText = balanceSpecialChars(textBeforeTag);
|
|
3132
|
+
currentIndex++;
|
|
3133
|
+
const itemKey2 = `text-before-${index}-${currentIndex}`;
|
|
3134
|
+
valuePartList.push(renderTextContent(balancedText, itemKey2));
|
|
3099
3135
|
}
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3136
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3137
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
3138
|
+
if (secondIndex === -1) break;
|
|
3139
|
+
const textInsideTag = copyValue.substring(
|
|
3140
|
+
firstIndex + checkText.length,
|
|
3141
|
+
firstIndex + checkText.length + secondIndex
|
|
3142
|
+
);
|
|
3143
|
+
currentIndex++;
|
|
3144
|
+
const itemKey = `text-inside-${index}-${currentIndex}`;
|
|
3145
|
+
valuePartList.push(
|
|
3146
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-xl font-bold whitespace-pre-wrap", children: constructInputWithSpecialExpressionList(textInsideTag).map(
|
|
3147
|
+
(inputPart, exprIndex) => renderSpecialExpressions(inputPart, exprIndex, itemKey)
|
|
3148
|
+
) }, itemKey)
|
|
3149
|
+
);
|
|
3150
|
+
copyValue = copyValue.substring(
|
|
3151
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3152
|
+
);
|
|
3153
|
+
if ((copyValue.split("`").length - 1) % 2 === 1) {
|
|
3154
|
+
copyValue = "`" + copyValue;
|
|
3103
3155
|
}
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3156
|
+
}
|
|
3157
|
+
};
|
|
3158
|
+
const processImageTags = () => {
|
|
3159
|
+
const checkText = "--IMAGE--";
|
|
3160
|
+
while (copyValue.includes(checkText)) {
|
|
3161
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
3162
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3163
|
+
if (textBeforeTag.trim() !== "") {
|
|
3164
|
+
currentIndex++;
|
|
3165
|
+
valuePartList.push(
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3167
|
+
"p",
|
|
3168
|
+
{
|
|
3169
|
+
className: "text-xl",
|
|
3170
|
+
children: textBeforeTag
|
|
3171
|
+
},
|
|
3172
|
+
`text-before-img-${index}-${currentIndex}`
|
|
3173
|
+
)
|
|
3174
|
+
);
|
|
3107
3175
|
}
|
|
3176
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3177
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
3178
|
+
if (secondIndex === -1) break;
|
|
3179
|
+
const imageSource = copyValue.substring(
|
|
3180
|
+
firstIndex + checkText.length,
|
|
3181
|
+
firstIndex + checkText.length + secondIndex
|
|
3182
|
+
);
|
|
3183
|
+
currentIndex++;
|
|
3108
3184
|
valuePartList.push(
|
|
3109
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.
|
|
3110
|
-
"
|
|
3185
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3186
|
+
"div",
|
|
3111
3187
|
{
|
|
3112
|
-
className: "
|
|
3113
|
-
children:
|
|
3114
|
-
|
|
3115
|
-
|
|
3188
|
+
className: "relative w-[200px]",
|
|
3189
|
+
children: [
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3191
|
+
BaseImage_default,
|
|
3116
3192
|
{
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3193
|
+
src: imageSource,
|
|
3194
|
+
alt: "media",
|
|
3195
|
+
size: "custom",
|
|
3196
|
+
className: "rounded-catchup-xlarge"
|
|
3197
|
+
}
|
|
3198
|
+
),
|
|
3199
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3200
|
+
"div",
|
|
3201
|
+
{
|
|
3202
|
+
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3203
|
+
onClick: () => handleOpenFullScreen(imageSource),
|
|
3204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3205
|
+
BaseImage_default,
|
|
3206
|
+
{
|
|
3207
|
+
src: "/icons/arrow-up.webp",
|
|
3208
|
+
alt: "arrow-up",
|
|
3209
|
+
size: "custom",
|
|
3210
|
+
className: "w-full"
|
|
3211
|
+
}
|
|
3212
|
+
)
|
|
3213
|
+
}
|
|
3121
3214
|
)
|
|
3122
|
-
|
|
3215
|
+
]
|
|
3123
3216
|
},
|
|
3124
|
-
|
|
3217
|
+
`img-${index}-${currentIndex}`
|
|
3125
3218
|
)
|
|
3126
3219
|
);
|
|
3220
|
+
copyValue = copyValue.substring(
|
|
3221
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3222
|
+
);
|
|
3127
3223
|
}
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
"span",
|
|
3224
|
+
};
|
|
3225
|
+
const processVideoTags = () => {
|
|
3226
|
+
const checkText = "--VIDEO--";
|
|
3227
|
+
while (copyValue.includes(checkText)) {
|
|
3228
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
3229
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3230
|
+
if (textBeforeTag.trim() !== "") {
|
|
3231
|
+
currentIndex++;
|
|
3232
|
+
valuePartList.push(
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3234
|
+
"p",
|
|
3140
3235
|
{
|
|
3141
|
-
className:
|
|
3142
|
-
children:
|
|
3236
|
+
className: "text-xl",
|
|
3237
|
+
children: textBeforeTag
|
|
3143
3238
|
},
|
|
3144
|
-
|
|
3145
|
-
)
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
)
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
checkText = "--IMAGE--";
|
|
3156
|
-
while (copyValue.includes(checkText)) {
|
|
3157
|
-
const firstIndex = copyValue.indexOf(checkText);
|
|
3158
|
-
const textValue = copyValue.substring(0, firstIndex);
|
|
3159
|
-
if (textValue.trim() !== "") {
|
|
3239
|
+
`text-before-video-${index}-${currentIndex}`
|
|
3240
|
+
)
|
|
3241
|
+
);
|
|
3242
|
+
}
|
|
3243
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3244
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
3245
|
+
if (secondIndex === -1) break;
|
|
3246
|
+
const videoSource = copyValue.substring(
|
|
3247
|
+
firstIndex + checkText.length,
|
|
3248
|
+
firstIndex + checkText.length + secondIndex
|
|
3249
|
+
);
|
|
3160
3250
|
currentIndex++;
|
|
3161
3251
|
valuePartList.push(
|
|
3162
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xl", children: textValue }, `${index}_${currentIndex}`)
|
|
3163
|
-
);
|
|
3164
|
-
}
|
|
3165
|
-
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3166
|
-
const secondIndex = subValue.indexOf(checkText) + checkText.length + textValue.length;
|
|
3167
|
-
const imageSource = copyValue.substring(
|
|
3168
|
-
firstIndex + checkText.length,
|
|
3169
|
-
secondIndex
|
|
3170
|
-
);
|
|
3171
|
-
currentIndex++;
|
|
3172
|
-
valuePartList.push(
|
|
3173
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative w-[200px]", children: [
|
|
3174
3252
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3175
|
-
|
|
3253
|
+
"video",
|
|
3176
3254
|
{
|
|
3177
|
-
src:
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
}
|
|
3182
|
-
),
|
|
3183
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3184
|
-
"div",
|
|
3185
|
-
{
|
|
3186
|
-
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3187
|
-
onClick: (event) => {
|
|
3188
|
-
setShowFullScreen(true);
|
|
3189
|
-
setSelectedFullScreenItem(imageSource);
|
|
3190
|
-
},
|
|
3191
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3192
|
-
BaseImage_default,
|
|
3193
|
-
{
|
|
3194
|
-
src: "/icons/arrow-up.webp",
|
|
3195
|
-
alt: "arrow-up",
|
|
3196
|
-
size: "custom",
|
|
3197
|
-
className: "w-full"
|
|
3198
|
-
}
|
|
3199
|
-
)
|
|
3200
|
-
}
|
|
3255
|
+
src: videoSource,
|
|
3256
|
+
className: "w-[200px] rounded-catchup-xlarge",
|
|
3257
|
+
controls: true
|
|
3258
|
+
},
|
|
3259
|
+
`video-${index}-${currentIndex}`
|
|
3201
3260
|
)
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
}
|
|
3206
|
-
checkText = "--VIDEO--";
|
|
3207
|
-
while (copyValue.includes(checkText)) {
|
|
3208
|
-
const firstIndex = copyValue.indexOf(checkText);
|
|
3209
|
-
const textValue = copyValue.substring(0, firstIndex);
|
|
3210
|
-
if (textValue.trim() !== "") {
|
|
3211
|
-
currentIndex++;
|
|
3212
|
-
valuePartList.push(
|
|
3213
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-xl", children: textValue }, `${index}-${currentIndex}`)
|
|
3261
|
+
);
|
|
3262
|
+
copyValue = copyValue.substring(
|
|
3263
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3214
3264
|
);
|
|
3215
3265
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
const
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3266
|
+
};
|
|
3267
|
+
const processAudioTags = () => {
|
|
3268
|
+
const checkText = "--AUDIO--";
|
|
3269
|
+
while (copyValue.includes(checkText)) {
|
|
3270
|
+
const firstIndex = copyValue.indexOf(checkText);
|
|
3271
|
+
const textBeforeTag = copyValue.substring(0, firstIndex);
|
|
3272
|
+
if (textBeforeTag.trim() !== "") {
|
|
3273
|
+
currentIndex++;
|
|
3274
|
+
valuePartList.push(
|
|
3275
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3276
|
+
"p",
|
|
3277
|
+
{
|
|
3278
|
+
className: "text-xl",
|
|
3279
|
+
children: textBeforeTag
|
|
3280
|
+
},
|
|
3281
|
+
`text-before-audio-${index}-${currentIndex}`
|
|
3282
|
+
)
|
|
3283
|
+
);
|
|
3284
|
+
}
|
|
3285
|
+
const subValue = copyValue.substring(firstIndex + checkText.length);
|
|
3286
|
+
const secondIndex = subValue.indexOf(checkText);
|
|
3287
|
+
if (secondIndex === -1) break;
|
|
3288
|
+
const audioSource = copyValue.substring(
|
|
3289
|
+
firstIndex + checkText.length,
|
|
3290
|
+
firstIndex + checkText.length + secondIndex
|
|
3291
|
+
);
|
|
3240
3292
|
currentIndex++;
|
|
3241
3293
|
valuePartList.push(
|
|
3242
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3294
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3295
|
+
"audio",
|
|
3296
|
+
{
|
|
3297
|
+
src: audioSource,
|
|
3298
|
+
className: "w-[200px] rounded-catchup-xlarge",
|
|
3299
|
+
controls: true
|
|
3300
|
+
},
|
|
3301
|
+
`audio-${index}-${currentIndex}`
|
|
3302
|
+
)
|
|
3303
|
+
);
|
|
3304
|
+
copyValue = copyValue.substring(
|
|
3305
|
+
firstIndex + checkText.length + secondIndex + checkText.length
|
|
3243
3306
|
);
|
|
3244
3307
|
}
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
);
|
|
3251
|
-
currentIndex++;
|
|
3252
|
-
valuePartList.push(
|
|
3253
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3254
|
-
"audio",
|
|
3255
|
-
{
|
|
3256
|
-
src: audioSource,
|
|
3257
|
-
className: `w-[200px] rounded-catchup-xlarge`
|
|
3258
|
-
},
|
|
3259
|
-
`${index}-${currentIndex}`
|
|
3260
|
-
)
|
|
3261
|
-
);
|
|
3262
|
-
copyValue = copyValue.substring(secondIndex + checkText.length);
|
|
3263
|
-
}
|
|
3308
|
+
};
|
|
3309
|
+
processTextTags();
|
|
3310
|
+
processImageTags();
|
|
3311
|
+
processVideoTags();
|
|
3312
|
+
processAudioTags();
|
|
3264
3313
|
if (copyValue.trim() !== "") {
|
|
3265
3314
|
currentIndex++;
|
|
3266
|
-
|
|
3267
|
-
copyValue = "__" + copyValue;
|
|
3268
|
-
}
|
|
3269
|
-
if ((copyValue.split("**").length - 1) % 2 === 1) {
|
|
3270
|
-
copyValue = "**" + copyValue;
|
|
3271
|
-
}
|
|
3272
|
-
if ((copyValue.split("`").length - 1) % 2 === 1) {
|
|
3273
|
-
copyValue = "`" + copyValue;
|
|
3274
|
-
}
|
|
3315
|
+
copyValue = balanceSpecialChars(copyValue);
|
|
3275
3316
|
const regexMatchImageText = copyValue.match(/<image>([\s\S]*?)<\/image>/);
|
|
3276
3317
|
if (regexMatchImageText) {
|
|
3277
3318
|
const imageText = regexMatchImageText[1];
|
|
3278
3319
|
valuePartList.push(
|
|
3279
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3280
|
-
|
|
3281
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3282
|
-
"span",
|
|
3283
|
-
{
|
|
3284
|
-
className: "text-xl whitespace-pre-wrap ",
|
|
3285
|
-
children: imageText
|
|
3286
|
-
},
|
|
3287
|
-
`${index}-${currentIndex}`
|
|
3288
|
-
)
|
|
3289
|
-
] })
|
|
3290
|
-
);
|
|
3291
|
-
} else {
|
|
3292
|
-
valuePartList.push(
|
|
3293
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3294
|
-
"span",
|
|
3320
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3321
|
+
"div",
|
|
3295
3322
|
{
|
|
3296
|
-
className: "
|
|
3297
|
-
children:
|
|
3298
|
-
(
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
className: `${inputPart.isBold ? "font-bold" : ""} ${inputPart.isUnderline ? "underline" : ""}`,
|
|
3302
|
-
children: inputPart.isEquation ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_katex.InlineMath, { math: inputPart.value }) }) : inputPart.value
|
|
3303
|
-
},
|
|
3304
|
-
index2
|
|
3305
|
-
)
|
|
3306
|
-
)
|
|
3323
|
+
className: "bg-catchup-gray-50 relative px-4 py-4 rounded-catchup-small mt-2",
|
|
3324
|
+
children: [
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "absolute -top-3 bg-catchup-white border rounded-catchup-small px-2 left-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "font-bold", children: i18n_default.t("image_description") }) }),
|
|
3326
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-xl whitespace-pre-wrap", children: imageText })
|
|
3327
|
+
]
|
|
3307
3328
|
},
|
|
3308
|
-
|
|
3329
|
+
`img-desc-${index}-${currentIndex}`
|
|
3309
3330
|
)
|
|
3310
3331
|
);
|
|
3332
|
+
} else {
|
|
3333
|
+
const itemKey = `remaining-${index}-${currentIndex}`;
|
|
3334
|
+
valuePartList.push(renderTextContent(copyValue, itemKey));
|
|
3311
3335
|
}
|
|
3312
3336
|
}
|
|
3313
3337
|
return valuePartList;
|
|
@@ -3317,8 +3341,6 @@ var ShowBodyMediaByContentType = ({
|
|
|
3317
3341
|
import_react_modal2.default,
|
|
3318
3342
|
{
|
|
3319
3343
|
isOpen: showFullScreen,
|
|
3320
|
-
onAfterOpen: () => {
|
|
3321
|
-
},
|
|
3322
3344
|
onRequestClose: () => {
|
|
3323
3345
|
setShowFullScreen(false);
|
|
3324
3346
|
setSelectedFullScreenItem("");
|
|
@@ -3343,13 +3365,13 @@ var ShowBodyMediaByContentType = ({
|
|
|
3343
3365
|
background: "rgba(0, 0, 0, 0.6)"
|
|
3344
3366
|
}
|
|
3345
3367
|
},
|
|
3346
|
-
contentLabel: "",
|
|
3368
|
+
contentLabel: "Image Fullscreen View",
|
|
3347
3369
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
3348
3370
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ml-auto px-5 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3349
3371
|
BaseImage_default,
|
|
3350
3372
|
{
|
|
3351
3373
|
src: "/icons/cross-red.webp",
|
|
3352
|
-
alt: "
|
|
3374
|
+
alt: "close fullscreen",
|
|
3353
3375
|
size: "medium",
|
|
3354
3376
|
onClick: () => {
|
|
3355
3377
|
setShowFullScreen(false);
|
|
@@ -3361,7 +3383,7 @@ var ShowBodyMediaByContentType = ({
|
|
|
3361
3383
|
BaseImage_default,
|
|
3362
3384
|
{
|
|
3363
3385
|
src: selectedFullScreenItem,
|
|
3364
|
-
alt: "
|
|
3386
|
+
alt: "fullscreen image",
|
|
3365
3387
|
size: "custom",
|
|
3366
3388
|
className: "w-full"
|
|
3367
3389
|
}
|
|
@@ -3371,62 +3393,66 @@ var ShowBodyMediaByContentType = ({
|
|
|
3371
3393
|
);
|
|
3372
3394
|
};
|
|
3373
3395
|
const RenderMainContent = () => {
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
"div",
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3396
|
+
switch (type) {
|
|
3397
|
+
case "TEXT":
|
|
3398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mb-3 flex flex-row flex-wrap items-center mx-auto w-full", children: retrieveValueParts(value) });
|
|
3399
|
+
case "IMAGE":
|
|
3400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mb-3 flex flex-col items-center relative", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
3401
|
+
"div",
|
|
3402
|
+
{
|
|
3403
|
+
className: `${convertToPercentage(
|
|
3404
|
+
size || ""
|
|
3405
|
+
)} rounded-catchup-xlarge relative`,
|
|
3406
|
+
children: [
|
|
3407
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3408
|
+
BaseImage_default,
|
|
3409
|
+
{
|
|
3410
|
+
src: value,
|
|
3411
|
+
alt: "body image",
|
|
3412
|
+
size: "custom",
|
|
3413
|
+
className: "w-full rounded-catchup-xlarge"
|
|
3414
|
+
}
|
|
3415
|
+
),
|
|
3416
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3417
|
+
"div",
|
|
3418
|
+
{
|
|
3419
|
+
className: "absolute flex items-center justify-center top-2 right-2 h-6 w-6 cursor-pointer border rounded-catchup-xlarge border-catchup-blue p-1",
|
|
3420
|
+
onClick: () => handleOpenFullScreen(value),
|
|
3421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3422
|
+
BaseImage_default,
|
|
3423
|
+
{
|
|
3424
|
+
src: "/icons/arrow-up.webp",
|
|
3425
|
+
alt: "expand",
|
|
3426
|
+
size: "custom",
|
|
3427
|
+
className: "w-full"
|
|
3428
|
+
}
|
|
3429
|
+
)
|
|
3430
|
+
}
|
|
3431
|
+
)
|
|
3432
|
+
]
|
|
3433
|
+
}
|
|
3434
|
+
) });
|
|
3435
|
+
case "VIDEO":
|
|
3436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3437
|
+
"video",
|
|
3438
|
+
{
|
|
3439
|
+
src: value,
|
|
3440
|
+
className: `${convertToPercentage(
|
|
3441
|
+
size || ""
|
|
3442
|
+
)} rounded-catchup-xlarge`,
|
|
3443
|
+
controls: true
|
|
3444
|
+
}
|
|
3445
|
+
) });
|
|
3446
|
+
case "AUDIO":
|
|
3447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mb-3 flex flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("audio", { src: value, controls: true, className: "rounded-catchup-xlarge" }) });
|
|
3448
|
+
default:
|
|
3449
|
+
return null;
|
|
3424
3450
|
}
|
|
3425
3451
|
};
|
|
3426
3452
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "w-full", children: [
|
|
3427
3453
|
RenderShowFullScreenItem(),
|
|
3428
3454
|
RenderMainContent()
|
|
3429
|
-
] }, index);
|
|
3455
|
+
] }, `body-content-${index}`);
|
|
3430
3456
|
};
|
|
3431
3457
|
var ShowBodyMediaByContentType_default = ShowBodyMediaByContentType;
|
|
3432
3458
|
|
|
@@ -6275,7 +6301,7 @@ var ActivitySolutionContent = ({
|
|
|
6275
6301
|
return null;
|
|
6276
6302
|
}
|
|
6277
6303
|
const { value } = currentItem;
|
|
6278
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "my-3", children: constructInputWithSpecialExpressionList(value).map(
|
|
6304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "my-3 text-xl", children: constructInputWithSpecialExpressionList(value).map(
|
|
6279
6305
|
(inputPart, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6280
6306
|
"span",
|
|
6281
6307
|
{
|