catchup-library-web 1.20.2 → 1.20.3
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
|
@@ -4438,23 +4438,11 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4438
4438
|
const [showFullScreen, setShowFullScreen] = (0, import_react14.useState)(false);
|
|
4439
4439
|
const [selectedFullScreenItem, setSelectedFullScreenItem] = (0, import_react14.useState)(null);
|
|
4440
4440
|
const [isLoaded, setIsLoaded] = (0, import_react14.useState)(false);
|
|
4441
|
-
const [isFullHeight, setIsFullHeight] = (0, import_react14.useState)(false);
|
|
4442
4441
|
const imageRef = (0, import_react14.useRef)(null);
|
|
4442
|
+
const videoRef = (0, import_react14.useRef)(null);
|
|
4443
4443
|
(0, import_react14.useEffect)(() => {
|
|
4444
4444
|
setIsLoaded(false);
|
|
4445
4445
|
}, []);
|
|
4446
|
-
(0, import_react14.useEffect)(() => {
|
|
4447
|
-
if (!isLoaded) return;
|
|
4448
|
-
if (!imageRef) return;
|
|
4449
|
-
if (!imageRef.current) return;
|
|
4450
|
-
const w = imageRef.current.naturalWidth;
|
|
4451
|
-
const h = imageRef.current.naturalHeight;
|
|
4452
|
-
if (w >= h) {
|
|
4453
|
-
setIsFullHeight(false);
|
|
4454
|
-
} else {
|
|
4455
|
-
setIsFullHeight(true);
|
|
4456
|
-
}
|
|
4457
|
-
}, [isLoaded, key]);
|
|
4458
4446
|
const RenderShowFullScreenItem = () => {
|
|
4459
4447
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4460
4448
|
import_react_modal3.default,
|
|
@@ -4506,7 +4494,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4506
4494
|
src: selectedFullScreenItem,
|
|
4507
4495
|
alt: "selected-fullscreen-item",
|
|
4508
4496
|
size: "custom",
|
|
4509
|
-
className: "w-full"
|
|
4497
|
+
className: "w-full h-full object-contain"
|
|
4510
4498
|
}
|
|
4511
4499
|
) })
|
|
4512
4500
|
] })
|
|
@@ -4515,63 +4503,58 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4515
4503
|
};
|
|
4516
4504
|
return contentType === "IMAGE" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
4517
4505
|
RenderShowFullScreenItem(),
|
|
4518
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4506
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center relative", children: [
|
|
4507
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4508
|
+
BaseImage_default,
|
|
4509
|
+
{
|
|
4510
|
+
src,
|
|
4511
|
+
alt: "image",
|
|
4512
|
+
ref: imageRef,
|
|
4513
|
+
size: "custom",
|
|
4514
|
+
className: "max-h-full max-w-full object-contain rounded-catchup-xlarge",
|
|
4515
|
+
onLoad: () => {
|
|
4516
|
+
setIsLoaded(true);
|
|
4517
|
+
}
|
|
4518
|
+
}
|
|
4519
|
+
),
|
|
4520
|
+
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4521
|
+
"div",
|
|
4522
|
+
{
|
|
4523
|
+
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 bg-white bg-opacity-80",
|
|
4524
|
+
onMouseEnter: (e) => {
|
|
4525
|
+
e.preventDefault();
|
|
4526
|
+
},
|
|
4527
|
+
onClick: (e) => {
|
|
4528
|
+
e.preventDefault();
|
|
4529
|
+
setShowFullScreen(true);
|
|
4530
|
+
setSelectedFullScreenItem(src);
|
|
4531
|
+
},
|
|
4532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4524
4533
|
BaseImage_default,
|
|
4525
4534
|
{
|
|
4526
|
-
src,
|
|
4527
|
-
alt: "
|
|
4528
|
-
ref: imageRef,
|
|
4535
|
+
src: "/icons/arrow-up.webp",
|
|
4536
|
+
alt: "arrow-up",
|
|
4529
4537
|
size: "custom",
|
|
4530
|
-
className: "
|
|
4531
|
-
onLoad: () => {
|
|
4532
|
-
setIsLoaded(true);
|
|
4533
|
-
}
|
|
4534
|
-
}
|
|
4535
|
-
),
|
|
4536
|
-
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4537
|
-
"div",
|
|
4538
|
-
{
|
|
4539
|
-
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",
|
|
4540
|
-
onMouseEnter: (e) => {
|
|
4541
|
-
e.preventDefault();
|
|
4542
|
-
},
|
|
4543
|
-
onClick: (e) => {
|
|
4544
|
-
e.preventDefault();
|
|
4545
|
-
setShowFullScreen(true);
|
|
4546
|
-
setSelectedFullScreenItem(src);
|
|
4547
|
-
},
|
|
4548
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4549
|
-
BaseImage_default,
|
|
4550
|
-
{
|
|
4551
|
-
src: "/icons/arrow-up.webp",
|
|
4552
|
-
alt: "arrow-up",
|
|
4553
|
-
size: "custom",
|
|
4554
|
-
className: "w-full"
|
|
4555
|
-
}
|
|
4556
|
-
)
|
|
4538
|
+
className: "w-full"
|
|
4557
4539
|
}
|
|
4558
|
-
)
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
) }) })
|
|
4562
|
-
] }) : contentType === "VIDEO" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex
|
|
4540
|
+
)
|
|
4541
|
+
}
|
|
4542
|
+
) : null
|
|
4543
|
+
] }) }) })
|
|
4544
|
+
] }) : contentType === "VIDEO" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4563
4545
|
"video",
|
|
4564
4546
|
{
|
|
4565
|
-
|
|
4547
|
+
ref: videoRef,
|
|
4548
|
+
className: "max-h-full max-w-full rounded-catchup-xlarge object-contain",
|
|
4566
4549
|
src,
|
|
4567
4550
|
controls: true,
|
|
4568
4551
|
onClick: () => {
|
|
4569
4552
|
}
|
|
4570
4553
|
}
|
|
4571
|
-
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex
|
|
4554
|
+
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
4572
4555
|
"audio",
|
|
4573
4556
|
{
|
|
4574
|
-
className: "
|
|
4557
|
+
className: "w-full rounded-catchup-xlarge",
|
|
4575
4558
|
src,
|
|
4576
4559
|
controls: true,
|
|
4577
4560
|
onClick: () => {
|
|
@@ -6419,13 +6402,29 @@ var OrderingActivityMaterialContent = ({
|
|
|
6419
6402
|
};
|
|
6420
6403
|
const calculateMarginTop = (index) => {
|
|
6421
6404
|
if (index === 0) {
|
|
6422
|
-
|
|
6405
|
+
if (contentMap.type === "TEXT") {
|
|
6406
|
+
return 0;
|
|
6407
|
+
} else {
|
|
6408
|
+
return 0;
|
|
6409
|
+
}
|
|
6423
6410
|
} else if (index === 1) {
|
|
6424
|
-
|
|
6411
|
+
if (contentMap.type === "TEXT") {
|
|
6412
|
+
return 65;
|
|
6413
|
+
} else {
|
|
6414
|
+
return 130;
|
|
6415
|
+
}
|
|
6425
6416
|
} else if (index % 2 === 0) {
|
|
6426
|
-
|
|
6417
|
+
if (contentMap.type === "TEXT") {
|
|
6418
|
+
return -65;
|
|
6419
|
+
} else {
|
|
6420
|
+
return -130;
|
|
6421
|
+
}
|
|
6427
6422
|
} else if (index % 2 === 1) {
|
|
6428
|
-
|
|
6423
|
+
if (contentMap.type === "TEXT") {
|
|
6424
|
+
return 0;
|
|
6425
|
+
} else {
|
|
6426
|
+
return 0;
|
|
6427
|
+
}
|
|
6429
6428
|
}
|
|
6430
6429
|
return 0;
|
|
6431
6430
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -4222,23 +4222,11 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4222
4222
|
const [showFullScreen, setShowFullScreen] = useState14(false);
|
|
4223
4223
|
const [selectedFullScreenItem, setSelectedFullScreenItem] = useState14(null);
|
|
4224
4224
|
const [isLoaded, setIsLoaded] = useState14(false);
|
|
4225
|
-
const [isFullHeight, setIsFullHeight] = useState14(false);
|
|
4226
4225
|
const imageRef = useRef2(null);
|
|
4226
|
+
const videoRef = useRef2(null);
|
|
4227
4227
|
useEffect4(() => {
|
|
4228
4228
|
setIsLoaded(false);
|
|
4229
4229
|
}, []);
|
|
4230
|
-
useEffect4(() => {
|
|
4231
|
-
if (!isLoaded) return;
|
|
4232
|
-
if (!imageRef) return;
|
|
4233
|
-
if (!imageRef.current) return;
|
|
4234
|
-
const w = imageRef.current.naturalWidth;
|
|
4235
|
-
const h = imageRef.current.naturalHeight;
|
|
4236
|
-
if (w >= h) {
|
|
4237
|
-
setIsFullHeight(false);
|
|
4238
|
-
} else {
|
|
4239
|
-
setIsFullHeight(true);
|
|
4240
|
-
}
|
|
4241
|
-
}, [isLoaded, key]);
|
|
4242
4230
|
const RenderShowFullScreenItem = () => {
|
|
4243
4231
|
return /* @__PURE__ */ jsx24(
|
|
4244
4232
|
Modal3,
|
|
@@ -4290,7 +4278,7 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4290
4278
|
src: selectedFullScreenItem,
|
|
4291
4279
|
alt: "selected-fullscreen-item",
|
|
4292
4280
|
size: "custom",
|
|
4293
|
-
className: "w-full"
|
|
4281
|
+
className: "w-full h-full object-contain"
|
|
4294
4282
|
}
|
|
4295
4283
|
) })
|
|
4296
4284
|
] })
|
|
@@ -4299,63 +4287,58 @@ var ShowMaterialMediaByContentType = ({
|
|
|
4299
4287
|
};
|
|
4300
4288
|
return contentType === "IMAGE" ? /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
4301
4289
|
RenderShowFullScreenItem(),
|
|
4302
|
-
/* @__PURE__ */ jsx24("div", { className: "my-2", children: /* @__PURE__ */ jsx24("div", { className: "h-full flex
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4290
|
+
/* @__PURE__ */ jsx24("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ jsx24("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ jsxs14("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center relative", children: [
|
|
4291
|
+
/* @__PURE__ */ jsx24(
|
|
4292
|
+
BaseImage_default,
|
|
4293
|
+
{
|
|
4294
|
+
src,
|
|
4295
|
+
alt: "image",
|
|
4296
|
+
ref: imageRef,
|
|
4297
|
+
size: "custom",
|
|
4298
|
+
className: "max-h-full max-w-full object-contain rounded-catchup-xlarge",
|
|
4299
|
+
onLoad: () => {
|
|
4300
|
+
setIsLoaded(true);
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
),
|
|
4304
|
+
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ jsx24(
|
|
4305
|
+
"div",
|
|
4306
|
+
{
|
|
4307
|
+
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 bg-white bg-opacity-80",
|
|
4308
|
+
onMouseEnter: (e) => {
|
|
4309
|
+
e.preventDefault();
|
|
4310
|
+
},
|
|
4311
|
+
onClick: (e) => {
|
|
4312
|
+
e.preventDefault();
|
|
4313
|
+
setShowFullScreen(true);
|
|
4314
|
+
setSelectedFullScreenItem(src);
|
|
4315
|
+
},
|
|
4316
|
+
children: /* @__PURE__ */ jsx24(
|
|
4308
4317
|
BaseImage_default,
|
|
4309
4318
|
{
|
|
4310
|
-
src,
|
|
4311
|
-
alt: "
|
|
4312
|
-
ref: imageRef,
|
|
4319
|
+
src: "/icons/arrow-up.webp",
|
|
4320
|
+
alt: "arrow-up",
|
|
4313
4321
|
size: "custom",
|
|
4314
|
-
className: "
|
|
4315
|
-
onLoad: () => {
|
|
4316
|
-
setIsLoaded(true);
|
|
4317
|
-
}
|
|
4318
|
-
}
|
|
4319
|
-
),
|
|
4320
|
-
src !== null && src !== "" && src !== "DEFAULT_OPTION" && canFullScreen ? /* @__PURE__ */ jsx24(
|
|
4321
|
-
"div",
|
|
4322
|
-
{
|
|
4323
|
-
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",
|
|
4324
|
-
onMouseEnter: (e) => {
|
|
4325
|
-
e.preventDefault();
|
|
4326
|
-
},
|
|
4327
|
-
onClick: (e) => {
|
|
4328
|
-
e.preventDefault();
|
|
4329
|
-
setShowFullScreen(true);
|
|
4330
|
-
setSelectedFullScreenItem(src);
|
|
4331
|
-
},
|
|
4332
|
-
children: /* @__PURE__ */ jsx24(
|
|
4333
|
-
BaseImage_default,
|
|
4334
|
-
{
|
|
4335
|
-
src: "/icons/arrow-up.webp",
|
|
4336
|
-
alt: "arrow-up",
|
|
4337
|
-
size: "custom",
|
|
4338
|
-
className: "w-full"
|
|
4339
|
-
}
|
|
4340
|
-
)
|
|
4322
|
+
className: "w-full"
|
|
4341
4323
|
}
|
|
4342
|
-
)
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
) }) })
|
|
4346
|
-
] }) : contentType === "VIDEO" ? /* @__PURE__ */ jsx24("div", { className: "my-2", children: /* @__PURE__ */ jsx24("div", { className: "h-full flex
|
|
4324
|
+
)
|
|
4325
|
+
}
|
|
4326
|
+
) : null
|
|
4327
|
+
] }) }) })
|
|
4328
|
+
] }) : contentType === "VIDEO" ? /* @__PURE__ */ jsx24("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ jsx24("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ jsx24("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ jsx24(
|
|
4347
4329
|
"video",
|
|
4348
4330
|
{
|
|
4349
|
-
|
|
4331
|
+
ref: videoRef,
|
|
4332
|
+
className: "max-h-full max-w-full rounded-catchup-xlarge object-contain",
|
|
4350
4333
|
src,
|
|
4351
4334
|
controls: true,
|
|
4352
4335
|
onClick: () => {
|
|
4353
4336
|
}
|
|
4354
4337
|
}
|
|
4355
|
-
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ jsx24("div", { className: "my-2", children: /* @__PURE__ */ jsx24("div", { className: "h-full flex
|
|
4338
|
+
) }) }) }) : contentType === "AUDIO" ? /* @__PURE__ */ jsx24("div", { className: "my-2 w-full h-full", children: /* @__PURE__ */ jsx24("div", { className: "h-full flex items-center justify-center", children: /* @__PURE__ */ jsx24("div", { className: "h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center", children: /* @__PURE__ */ jsx24(
|
|
4356
4339
|
"audio",
|
|
4357
4340
|
{
|
|
4358
|
-
className: "
|
|
4341
|
+
className: "w-full rounded-catchup-xlarge",
|
|
4359
4342
|
src,
|
|
4360
4343
|
controls: true,
|
|
4361
4344
|
onClick: () => {
|
|
@@ -6203,13 +6186,29 @@ var OrderingActivityMaterialContent = ({
|
|
|
6203
6186
|
};
|
|
6204
6187
|
const calculateMarginTop = (index) => {
|
|
6205
6188
|
if (index === 0) {
|
|
6206
|
-
|
|
6189
|
+
if (contentMap.type === "TEXT") {
|
|
6190
|
+
return 0;
|
|
6191
|
+
} else {
|
|
6192
|
+
return 0;
|
|
6193
|
+
}
|
|
6207
6194
|
} else if (index === 1) {
|
|
6208
|
-
|
|
6195
|
+
if (contentMap.type === "TEXT") {
|
|
6196
|
+
return 65;
|
|
6197
|
+
} else {
|
|
6198
|
+
return 130;
|
|
6199
|
+
}
|
|
6209
6200
|
} else if (index % 2 === 0) {
|
|
6210
|
-
|
|
6201
|
+
if (contentMap.type === "TEXT") {
|
|
6202
|
+
return -65;
|
|
6203
|
+
} else {
|
|
6204
|
+
return -130;
|
|
6205
|
+
}
|
|
6211
6206
|
} else if (index % 2 === 1) {
|
|
6212
|
-
|
|
6207
|
+
if (contentMap.type === "TEXT") {
|
|
6208
|
+
return 0;
|
|
6209
|
+
} else {
|
|
6210
|
+
return 0;
|
|
6211
|
+
}
|
|
6213
6212
|
}
|
|
6214
6213
|
return 0;
|
|
6215
6214
|
};
|
package/package.json
CHANGED
|
@@ -80,13 +80,29 @@ const OrderingActivityMaterialContent = ({
|
|
|
80
80
|
|
|
81
81
|
const calculateMarginTop = (index: number) => {
|
|
82
82
|
if (index === 0) {
|
|
83
|
-
|
|
83
|
+
if (contentMap.type === "TEXT") {
|
|
84
|
+
return 0;
|
|
85
|
+
} else {
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
84
88
|
} else if (index === 1) {
|
|
85
|
-
|
|
89
|
+
if (contentMap.type === "TEXT") {
|
|
90
|
+
return 65;
|
|
91
|
+
} else {
|
|
92
|
+
return 130;
|
|
93
|
+
}
|
|
86
94
|
} else if (index % 2 === 0) {
|
|
87
|
-
|
|
95
|
+
if (contentMap.type === "TEXT") {
|
|
96
|
+
return -65;
|
|
97
|
+
} else {
|
|
98
|
+
return -130;
|
|
99
|
+
}
|
|
88
100
|
} else if (index % 2 === 1) {
|
|
89
|
-
|
|
101
|
+
if (contentMap.type === "TEXT") {
|
|
102
|
+
return 0;
|
|
103
|
+
} else {
|
|
104
|
+
return 0;
|
|
105
|
+
}
|
|
90
106
|
}
|
|
91
107
|
return 0;
|
|
92
108
|
};
|
|
@@ -14,26 +14,13 @@ const ShowMaterialMediaByContentType = ({
|
|
|
14
14
|
any | null
|
|
15
15
|
>(null);
|
|
16
16
|
const [isLoaded, setIsLoaded] = useState<boolean>(false);
|
|
17
|
-
const [isFullHeight, setIsFullHeight] = useState<boolean>(false);
|
|
18
17
|
const imageRef = useRef<HTMLImageElement>(null);
|
|
18
|
+
const videoRef = useRef<HTMLVideoElement>(null);
|
|
19
19
|
|
|
20
20
|
useEffect(() => {
|
|
21
21
|
setIsLoaded(false);
|
|
22
22
|
}, []);
|
|
23
23
|
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (!isLoaded) return;
|
|
26
|
-
if (!imageRef) return;
|
|
27
|
-
if (!imageRef.current) return;
|
|
28
|
-
const w = imageRef.current.naturalWidth;
|
|
29
|
-
const h = imageRef.current.naturalHeight;
|
|
30
|
-
if (w >= h) {
|
|
31
|
-
setIsFullHeight(false);
|
|
32
|
-
} else {
|
|
33
|
-
setIsFullHeight(true);
|
|
34
|
-
}
|
|
35
|
-
}, [isLoaded, key]);
|
|
36
|
-
|
|
37
24
|
const RenderShowFullScreenItem = () => {
|
|
38
25
|
return (
|
|
39
26
|
<Modal
|
|
@@ -66,7 +53,6 @@ const ShowMaterialMediaByContentType = ({
|
|
|
66
53
|
contentLabel=""
|
|
67
54
|
>
|
|
68
55
|
<div className="flex-1 flex flex-col">
|
|
69
|
-
{/* <div className="m-4"> */}
|
|
70
56
|
<div className="ml-auto px-5 py-3">
|
|
71
57
|
<BaseImage
|
|
72
58
|
src="/icons/cross-red.webp"
|
|
@@ -83,7 +69,7 @@ const ShowMaterialMediaByContentType = ({
|
|
|
83
69
|
src={selectedFullScreenItem}
|
|
84
70
|
alt="selected-fullscreen-item"
|
|
85
71
|
size="custom"
|
|
86
|
-
className="w-full"
|
|
72
|
+
className="w-full h-full object-contain"
|
|
87
73
|
/>
|
|
88
74
|
</div>
|
|
89
75
|
</div>
|
|
@@ -94,21 +80,15 @@ const ShowMaterialMediaByContentType = ({
|
|
|
94
80
|
return contentType === "IMAGE" ? (
|
|
95
81
|
<>
|
|
96
82
|
{RenderShowFullScreenItem()}
|
|
97
|
-
<div className="my-2">
|
|
98
|
-
<div className="h-full flex
|
|
99
|
-
<div
|
|
100
|
-
className={`${
|
|
101
|
-
isFullHeight
|
|
102
|
-
? "h-catchup-activity-media-box-item"
|
|
103
|
-
: "max-w-catchup-activity-media-box-item"
|
|
104
|
-
} flex flex-col justify-center items-center relative`}
|
|
105
|
-
>
|
|
83
|
+
<div className="my-2 w-full h-full">
|
|
84
|
+
<div className="h-full flex items-center justify-center">
|
|
85
|
+
<div className="h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center relative">
|
|
106
86
|
<BaseImage
|
|
107
87
|
src={src}
|
|
108
88
|
alt="image"
|
|
109
89
|
ref={imageRef}
|
|
110
90
|
size="custom"
|
|
111
|
-
className="h-full rounded-catchup-xlarge"
|
|
91
|
+
className="max-h-full max-w-full object-contain rounded-catchup-xlarge"
|
|
112
92
|
onLoad={() => {
|
|
113
93
|
setIsLoaded(true);
|
|
114
94
|
}}
|
|
@@ -118,7 +98,7 @@ const ShowMaterialMediaByContentType = ({
|
|
|
118
98
|
src !== "DEFAULT_OPTION" &&
|
|
119
99
|
canFullScreen ? (
|
|
120
100
|
<div
|
|
121
|
-
className="absolute flex items-center justify-center top-2 right-2
|
|
101
|
+
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 bg-white bg-opacity-80"
|
|
122
102
|
onMouseEnter={(e) => {
|
|
123
103
|
e.preventDefault();
|
|
124
104
|
}}
|
|
@@ -141,11 +121,12 @@ const ShowMaterialMediaByContentType = ({
|
|
|
141
121
|
</div>
|
|
142
122
|
</>
|
|
143
123
|
) : contentType === "VIDEO" ? (
|
|
144
|
-
<div className="my-2">
|
|
145
|
-
<div className="h-full flex
|
|
146
|
-
<div className="h-
|
|
124
|
+
<div className="my-2 w-full h-full">
|
|
125
|
+
<div className="h-full flex items-center justify-center">
|
|
126
|
+
<div className="h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center">
|
|
147
127
|
<video
|
|
148
|
-
|
|
128
|
+
ref={videoRef}
|
|
129
|
+
className="max-h-full max-w-full rounded-catchup-xlarge object-contain"
|
|
149
130
|
src={src}
|
|
150
131
|
controls
|
|
151
132
|
onClick={() => {}}
|
|
@@ -154,11 +135,11 @@ const ShowMaterialMediaByContentType = ({
|
|
|
154
135
|
</div>
|
|
155
136
|
</div>
|
|
156
137
|
) : contentType === "AUDIO" ? (
|
|
157
|
-
<div className="my-2">
|
|
158
|
-
<div className="h-full flex
|
|
159
|
-
<div className="h-
|
|
138
|
+
<div className="my-2 w-full h-full">
|
|
139
|
+
<div className="h-full flex items-center justify-center">
|
|
140
|
+
<div className="h-catchup-activity-media-box-item w-catchup-activity-media-box-item flex items-center justify-center">
|
|
160
141
|
<audio
|
|
161
|
-
className="
|
|
142
|
+
className="w-full rounded-catchup-xlarge"
|
|
162
143
|
src={src}
|
|
163
144
|
controls
|
|
164
145
|
onClick={() => {}}
|