@wavelengthusaf/components 4.8.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +428 -363
- package/dist/cjs/index.d.cts +36 -18
- package/dist/esm/index.d.ts +36 -18
- package/dist/esm/index.js +599 -534
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -6282,20 +6282,384 @@ var WavelengthMenu = ({
|
|
|
6282
6282
|
};
|
|
6283
6283
|
WavelengthMenu.displayName = "WavelengthMenu";
|
|
6284
6284
|
|
|
6285
|
+
// src/components/modals/WavelengthPagination.tsx
|
|
6286
|
+
import { useRef as useRef15, useEffect as useEffect14 } from "react";
|
|
6287
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
6288
|
+
var WavelengthPagination = ({
|
|
6289
|
+
testProp,
|
|
6290
|
+
children,
|
|
6291
|
+
// Style argument
|
|
6292
|
+
customStyle: customStyle2,
|
|
6293
|
+
variant,
|
|
6294
|
+
textColor,
|
|
6295
|
+
font,
|
|
6296
|
+
fontSize,
|
|
6297
|
+
border: border2,
|
|
6298
|
+
borderRadius: borderRadius2,
|
|
6299
|
+
padding: padding2,
|
|
6300
|
+
totalPages,
|
|
6301
|
+
currentPage,
|
|
6302
|
+
activeColor,
|
|
6303
|
+
activeTextColor,
|
|
6304
|
+
backgroundColor: backgroundColor2,
|
|
6305
|
+
disabledColor,
|
|
6306
|
+
onPageChange,
|
|
6307
|
+
...rest
|
|
6308
|
+
// This rest operator includes className, style, onClick, etc.
|
|
6309
|
+
}) => {
|
|
6310
|
+
const ref = useRef15(null);
|
|
6311
|
+
const syncAttribute = (attribute, value) => {
|
|
6312
|
+
const el = ref.current;
|
|
6313
|
+
if (!el) return;
|
|
6314
|
+
el.setAttribute(attribute, value);
|
|
6315
|
+
};
|
|
6316
|
+
useEffect14(() => {
|
|
6317
|
+
const el = ref.current;
|
|
6318
|
+
if (!el) return;
|
|
6319
|
+
el.customStyles = customStyle2;
|
|
6320
|
+
syncAttribute("variant", variant || "");
|
|
6321
|
+
syncAttribute("text-color", textColor || "");
|
|
6322
|
+
syncAttribute("font", font || "");
|
|
6323
|
+
syncAttribute("font-size", fontSize || "");
|
|
6324
|
+
syncAttribute("border", border2 || "");
|
|
6325
|
+
syncAttribute("border-radius", borderRadius2 || "");
|
|
6326
|
+
syncAttribute("padding", padding2 || "");
|
|
6327
|
+
syncAttribute("active-color", activeColor || "");
|
|
6328
|
+
syncAttribute("active-text-color", activeTextColor || "");
|
|
6329
|
+
syncAttribute("background-color", backgroundColor2 || "");
|
|
6330
|
+
syncAttribute("disabled-color", disabledColor || "");
|
|
6331
|
+
syncAttribute("total-pages", totalPages?.toString() || "");
|
|
6332
|
+
syncAttribute("current-page", currentPage?.toString() || "");
|
|
6333
|
+
const handlePageChange = (e) => {
|
|
6334
|
+
if (onPageChange) {
|
|
6335
|
+
onPageChange(e.detail.page);
|
|
6336
|
+
}
|
|
6337
|
+
};
|
|
6338
|
+
el.addEventListener("page-change", handlePageChange);
|
|
6339
|
+
return () => {
|
|
6340
|
+
el.removeEventListener("page-change", handlePageChange);
|
|
6341
|
+
};
|
|
6342
|
+
}, [testProp, textColor, font, fontSize, border2, borderRadius2, padding2, variant, totalPages, currentPage, activeColor, activeTextColor, backgroundColor2, disabledColor, onPageChange]);
|
|
6343
|
+
return /* @__PURE__ */ jsx37("wavelength-pagination", { ref, variant, "total-pages": totalPages, "current-page": currentPage, ...rest });
|
|
6344
|
+
};
|
|
6345
|
+
WavelengthPagination.displayName = "WavelengthPagination";
|
|
6346
|
+
|
|
6347
|
+
// src/index.ts
|
|
6348
|
+
import { WavelengthPagination as WavelengthPagination2 } from "@wavelengthusaf/web-components";
|
|
6349
|
+
|
|
6350
|
+
// src/components/pagination/WavelengthDefaultPagination.tsx
|
|
6351
|
+
import { useState as useState6, useMemo } from "react";
|
|
6352
|
+
|
|
6353
|
+
// src/components/pagination/WavelengthButtonPagination.tsx
|
|
6354
|
+
import { useState as useState4 } from "react";
|
|
6355
|
+
import Button4 from "@mui/material/Button";
|
|
6356
|
+
import ArrowBackIosNewIcon from "@mui/icons-material/ArrowBackIosNew";
|
|
6357
|
+
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
|
6358
|
+
import styled7 from "styled-components";
|
|
6359
|
+
import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6360
|
+
var MyDroplistItems = styled7("li")`
|
|
6361
|
+
background-color: white;
|
|
6362
|
+
color: #000000;
|
|
6363
|
+
padding: 10px 30px;
|
|
6364
|
+
textdecoration: none;
|
|
6365
|
+
display: block;
|
|
6366
|
+
width: 80px;
|
|
6367
|
+
|
|
6368
|
+
&:hover {
|
|
6369
|
+
background-color: lightgray;
|
|
6370
|
+
}
|
|
6371
|
+
`;
|
|
6372
|
+
function WavelengthButtonPagination({ totalPages, current, handleChangePage, itemList, firstEllipseList, secondEllipseList, id }) {
|
|
6373
|
+
const [isOpen, setIsOpen] = useState4(false);
|
|
6374
|
+
const [isSecOpen, setIsSecOpen] = useState4(false);
|
|
6375
|
+
const toggleDropdown = (index) => {
|
|
6376
|
+
if (index === 1) {
|
|
6377
|
+
setIsOpen(!isOpen);
|
|
6378
|
+
} else {
|
|
6379
|
+
setIsSecOpen(!isSecOpen);
|
|
6380
|
+
}
|
|
6381
|
+
};
|
|
6382
|
+
const dropstyles = {
|
|
6383
|
+
dropcenter: { position: "relative", left: "-40px", top: "-20px" },
|
|
6384
|
+
mydrop: { position: "absolute", zIndex: "3", maxHeight: "200px", overflow: "scroll" },
|
|
6385
|
+
rangenumbers: { display: "flex" },
|
|
6386
|
+
butPagCompDivStyle: { display: "flex" }
|
|
6387
|
+
};
|
|
6388
|
+
const WLButtonPagStyle = {
|
|
6389
|
+
background: "white",
|
|
6390
|
+
color: "black",
|
|
6391
|
+
border: "none",
|
|
6392
|
+
padding: "1px",
|
|
6393
|
+
fontSize: "16px",
|
|
6394
|
+
height: "55px",
|
|
6395
|
+
width: "40px",
|
|
6396
|
+
boxshadow: "4px 2px 4px darkslategray",
|
|
6397
|
+
borderRadius: "50%",
|
|
6398
|
+
margin: "3px",
|
|
6399
|
+
"&:hover": { background: "#49baf7" },
|
|
6400
|
+
"&:disabled": { background: "rgb(226, 223, 223)" },
|
|
6401
|
+
"&.active": { background: "#8FD8FF" }
|
|
6402
|
+
};
|
|
6403
|
+
return /* @__PURE__ */ jsxs20("div", { style: dropstyles.butPagCompDivStyle, id, children: [
|
|
6404
|
+
/* @__PURE__ */ jsx38(Button4, { onClick: () => handleChangePage(current - 1), disabled: current === 1, sx: WLButtonPagStyle, children: /* @__PURE__ */ jsx38(ArrowBackIosNewIcon, {}) }),
|
|
6405
|
+
/* @__PURE__ */ jsx38("section", { style: dropstyles.rangenumbers, children: itemList.map(
|
|
6406
|
+
(item, index) => item === "..." && index === 1 ? (
|
|
6407
|
+
//first half ellipse with first half dropdown
|
|
6408
|
+
// dropdown
|
|
6409
|
+
// eslint-disable-next-line react/jsx-key
|
|
6410
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
6411
|
+
/* @__PURE__ */ jsx38(Button4, { onClick: () => toggleDropdown(1), className: current === index ? "active" : "", sx: WLButtonPagStyle, children: item }, index),
|
|
6412
|
+
isOpen && /* @__PURE__ */ jsx38("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx38("ul", { style: dropstyles.mydrop, children: firstEllipseList.map((item2) => /* @__PURE__ */ jsx38(
|
|
6413
|
+
MyDroplistItems,
|
|
6414
|
+
{
|
|
6415
|
+
onClick: () => {
|
|
6416
|
+
handleChangePage(item2), setIsOpen(false);
|
|
6417
|
+
},
|
|
6418
|
+
children: item2
|
|
6419
|
+
},
|
|
6420
|
+
item2
|
|
6421
|
+
)) }) })
|
|
6422
|
+
] })
|
|
6423
|
+
) : item === "..." && index === 5 ? (
|
|
6424
|
+
//second half ellipse with second half dropdown
|
|
6425
|
+
/* @__PURE__ */ jsxs20("div", { children: [
|
|
6426
|
+
/* @__PURE__ */ jsx38(Button4, { onClick: () => toggleDropdown(5), className: current === index ? "active" : "", sx: WLButtonPagStyle, children: item }, index),
|
|
6427
|
+
isSecOpen && /* @__PURE__ */ jsx38("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx38("ul", { style: dropstyles.mydrop, children: secondEllipseList.map((item2) => /* @__PURE__ */ jsx38(
|
|
6428
|
+
MyDroplistItems,
|
|
6429
|
+
{
|
|
6430
|
+
onClick: () => {
|
|
6431
|
+
handleChangePage(item2), setIsOpen(false);
|
|
6432
|
+
},
|
|
6433
|
+
children: item2
|
|
6434
|
+
},
|
|
6435
|
+
item2
|
|
6436
|
+
)) }) })
|
|
6437
|
+
] })
|
|
6438
|
+
) : /* @__PURE__ */ jsx38(Button4, { onClick: () => handleChangePage(item), className: current === item ? "active" : "", sx: WLButtonPagStyle, children: item }, index)
|
|
6439
|
+
) }),
|
|
6440
|
+
/* @__PURE__ */ jsx38(Button4, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, sx: WLButtonPagStyle, children: /* @__PURE__ */ jsx38(ArrowForwardIosIcon, {}) })
|
|
6441
|
+
] });
|
|
6442
|
+
}
|
|
6443
|
+
WavelengthButtonPagination.displayName = "WavelengthButtonPagination";
|
|
6444
|
+
var WavelengthButtonPagination_default = WavelengthButtonPagination;
|
|
6445
|
+
|
|
6446
|
+
// src/components/pagination/WavelengthVariationPagination.tsx
|
|
6447
|
+
import { useState as useState5 } from "react";
|
|
6448
|
+
import Button5 from "@mui/material/Button";
|
|
6449
|
+
import ArrowBackIosNewIcon2 from "@mui/icons-material/ArrowBackIosNew";
|
|
6450
|
+
import ArrowForwardIosIcon2 from "@mui/icons-material/ArrowForwardIos";
|
|
6451
|
+
import styled8 from "styled-components";
|
|
6452
|
+
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6453
|
+
function WavelengthVariationPagination({ totalPages, current, variant, handleChangePage, itemList, firstEllipseList, secondEllipseList, id }) {
|
|
6454
|
+
const [isOpen, setIsOpen] = useState5(false);
|
|
6455
|
+
const [isSecOpen, setIsSecOpen] = useState5(false);
|
|
6456
|
+
const MyDroplistItems2 = styled8("li")`
|
|
6457
|
+
background-color: white;
|
|
6458
|
+
color: #000000;
|
|
6459
|
+
padding: 10px 30px;
|
|
6460
|
+
textdecoration: none;
|
|
6461
|
+
display: block;
|
|
6462
|
+
width: 80px;
|
|
6463
|
+
|
|
6464
|
+
&:hover {
|
|
6465
|
+
background-color: lightgray;
|
|
6466
|
+
}
|
|
6467
|
+
`;
|
|
6468
|
+
const dropstyles = {
|
|
6469
|
+
pagination: {
|
|
6470
|
+
display: "flex"
|
|
6471
|
+
},
|
|
6472
|
+
dropcenter: {
|
|
6473
|
+
position: "relative",
|
|
6474
|
+
left: "-40px",
|
|
6475
|
+
top: "-20px"
|
|
6476
|
+
},
|
|
6477
|
+
mydrop: {
|
|
6478
|
+
position: "absolute",
|
|
6479
|
+
zIndex: "3",
|
|
6480
|
+
maxHeight: "200px",
|
|
6481
|
+
overflow: "scroll"
|
|
6482
|
+
},
|
|
6483
|
+
rangenumbers: {
|
|
6484
|
+
display: "flex"
|
|
6485
|
+
}
|
|
6486
|
+
};
|
|
6487
|
+
const toggleDropdown = (index) => {
|
|
6488
|
+
if (index === 1) {
|
|
6489
|
+
setIsOpen(!isOpen);
|
|
6490
|
+
} else {
|
|
6491
|
+
setIsSecOpen(!isSecOpen);
|
|
6492
|
+
}
|
|
6493
|
+
};
|
|
6494
|
+
return /* @__PURE__ */ jsxs21("div", { style: dropstyles.pagination, id, children: [
|
|
6495
|
+
/* @__PURE__ */ jsx39(Button5, { onClick: () => handleChangePage(current - 1), variant, disabled: current === 1, children: /* @__PURE__ */ jsx39(ArrowBackIosNewIcon2, {}) }),
|
|
6496
|
+
/* @__PURE__ */ jsx39("section", { style: dropstyles.rangenumbers, children: itemList.map(
|
|
6497
|
+
(item, index) => item === "..." && index === 1 ? (
|
|
6498
|
+
//first half ellipse with first half dropdown
|
|
6499
|
+
// eslint-disable-next-line react/jsx-key
|
|
6500
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
6501
|
+
/* @__PURE__ */ jsx39(Button5, { onClick: () => toggleDropdown(1), variant, className: current === index ? "active" : "", children: item }, index),
|
|
6502
|
+
isOpen && /* @__PURE__ */ jsx39("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx39("ul", { style: dropstyles.mydrop, children: firstEllipseList.map((item2) => /* @__PURE__ */ jsx39(
|
|
6503
|
+
MyDroplistItems2,
|
|
6504
|
+
{
|
|
6505
|
+
style: dropstyles.mydroplist,
|
|
6506
|
+
onClick: () => {
|
|
6507
|
+
handleChangePage(item2), setIsOpen(false);
|
|
6508
|
+
},
|
|
6509
|
+
children: item2
|
|
6510
|
+
},
|
|
6511
|
+
item2
|
|
6512
|
+
)) }) })
|
|
6513
|
+
] })
|
|
6514
|
+
) : item === "..." && index === 5 ? (
|
|
6515
|
+
//second half ellipse with second half dropdown
|
|
6516
|
+
/* @__PURE__ */ jsxs21("div", { children: [
|
|
6517
|
+
/* @__PURE__ */ jsx39(Button5, { onClick: () => toggleDropdown(5), variant, className: current === index ? "active" : "", children: item }, index),
|
|
6518
|
+
isSecOpen && /* @__PURE__ */ jsx39("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx39("ul", { style: dropstyles.mydrop, children: secondEllipseList.map((item2) => /* @__PURE__ */ jsx39(
|
|
6519
|
+
MyDroplistItems2,
|
|
6520
|
+
{
|
|
6521
|
+
style: dropstyles.mydroplist,
|
|
6522
|
+
onClick: () => {
|
|
6523
|
+
handleChangePage(item2), setIsOpen(false);
|
|
6524
|
+
},
|
|
6525
|
+
children: item2
|
|
6526
|
+
},
|
|
6527
|
+
item2
|
|
6528
|
+
)) }) })
|
|
6529
|
+
] })
|
|
6530
|
+
) : /* @__PURE__ */ jsx39(Button5, { onClick: () => handleChangePage(item), className: current === item ? "active" : "", variant, children: item }, index)
|
|
6531
|
+
) }),
|
|
6532
|
+
/* @__PURE__ */ jsx39(Button5, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, variant, children: /* @__PURE__ */ jsx39(ArrowForwardIosIcon2, {}) })
|
|
6533
|
+
] });
|
|
6534
|
+
}
|
|
6535
|
+
WavelengthVariationPagination.displayName = "WavelengthVariationPagination";
|
|
6536
|
+
var WavelengthVariationPagination_default = WavelengthVariationPagination;
|
|
6537
|
+
|
|
6538
|
+
// src/components/pagination/WavelengthDefaultPagination.tsx
|
|
6539
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
6540
|
+
var range = (start, end) => {
|
|
6541
|
+
const length = end - start + 1;
|
|
6542
|
+
return Array.from({ length }, (_, i) => start + i);
|
|
6543
|
+
};
|
|
6544
|
+
function ascendingRange(start, end) {
|
|
6545
|
+
const result = [];
|
|
6546
|
+
for (let i = start; i < end; i++) {
|
|
6547
|
+
if (i !== start) {
|
|
6548
|
+
result.push(i);
|
|
6549
|
+
}
|
|
6550
|
+
}
|
|
6551
|
+
return result;
|
|
6552
|
+
}
|
|
6553
|
+
function WavelengthDefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, boundaryCount = 1, style: style3, onPageChange, id }) {
|
|
6554
|
+
const [current, setCurrent] = useState6(currentPageNumber);
|
|
6555
|
+
const startPages = range(1, Math.min(boundaryCount, totalPages));
|
|
6556
|
+
const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
|
|
6557
|
+
const siblingsStart = Math.max(Math.min(current - siblingCount, totalPages - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
|
|
6558
|
+
const siblingsEnd = Math.min(Math.max(current + siblingCount, boundaryCount + siblingCount * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
|
|
6559
|
+
const firstEllipseList = ascendingRange(1, siblingsStart);
|
|
6560
|
+
const secondEllipseList = ascendingRange(siblingsEnd, totalPages);
|
|
6561
|
+
const itemList = useMemo(() => {
|
|
6562
|
+
return [
|
|
6563
|
+
...startPages,
|
|
6564
|
+
...siblingsStart > boundaryCount + 2 ? ["..."] : boundaryCount + 1 < totalPages - boundaryCount ? [boundaryCount + 1] : [],
|
|
6565
|
+
...range(siblingsStart, siblingsEnd),
|
|
6566
|
+
...siblingsEnd < totalPages - boundaryCount - 1 ? ["..."] : totalPages - boundaryCount > boundaryCount ? [totalPages - boundaryCount] : [],
|
|
6567
|
+
...endPages
|
|
6568
|
+
];
|
|
6569
|
+
}, [current, totalPages, boundaryCount, siblingCount, id]);
|
|
6570
|
+
const handleChangePage = (value) => {
|
|
6571
|
+
if (typeof value === "number") {
|
|
6572
|
+
setCurrent(value);
|
|
6573
|
+
onPageChange(value);
|
|
6574
|
+
}
|
|
6575
|
+
};
|
|
6576
|
+
if (style3 === "circular") {
|
|
6577
|
+
return /* @__PURE__ */ jsx40(
|
|
6578
|
+
WavelengthButtonPagination_default,
|
|
6579
|
+
{
|
|
6580
|
+
id,
|
|
6581
|
+
totalPages,
|
|
6582
|
+
current,
|
|
6583
|
+
handleChangePage,
|
|
6584
|
+
itemList,
|
|
6585
|
+
firstEllipseList,
|
|
6586
|
+
secondEllipseList
|
|
6587
|
+
}
|
|
6588
|
+
);
|
|
6589
|
+
} else if (style3 === "text") {
|
|
6590
|
+
return /* @__PURE__ */ jsx40(
|
|
6591
|
+
WavelengthVariationPagination_default,
|
|
6592
|
+
{
|
|
6593
|
+
id,
|
|
6594
|
+
totalPages,
|
|
6595
|
+
current,
|
|
6596
|
+
variant: "text",
|
|
6597
|
+
handleChangePage,
|
|
6598
|
+
itemList,
|
|
6599
|
+
firstEllipseList,
|
|
6600
|
+
secondEllipseList
|
|
6601
|
+
}
|
|
6602
|
+
);
|
|
6603
|
+
} else if (style3 === "outlined") {
|
|
6604
|
+
return /* @__PURE__ */ jsx40(
|
|
6605
|
+
WavelengthVariationPagination_default,
|
|
6606
|
+
{
|
|
6607
|
+
id,
|
|
6608
|
+
totalPages,
|
|
6609
|
+
current,
|
|
6610
|
+
variant: "outlined",
|
|
6611
|
+
handleChangePage,
|
|
6612
|
+
itemList,
|
|
6613
|
+
firstEllipseList,
|
|
6614
|
+
secondEllipseList
|
|
6615
|
+
}
|
|
6616
|
+
);
|
|
6617
|
+
} else if (style3 === "contained") {
|
|
6618
|
+
return /* @__PURE__ */ jsx40(
|
|
6619
|
+
WavelengthVariationPagination_default,
|
|
6620
|
+
{
|
|
6621
|
+
id,
|
|
6622
|
+
totalPages,
|
|
6623
|
+
current,
|
|
6624
|
+
variant: "contained",
|
|
6625
|
+
handleChangePage,
|
|
6626
|
+
itemList,
|
|
6627
|
+
firstEllipseList,
|
|
6628
|
+
secondEllipseList
|
|
6629
|
+
}
|
|
6630
|
+
);
|
|
6631
|
+
} else {
|
|
6632
|
+
return /* @__PURE__ */ jsx40(
|
|
6633
|
+
WavelengthVariationPagination_default,
|
|
6634
|
+
{
|
|
6635
|
+
id,
|
|
6636
|
+
totalPages,
|
|
6637
|
+
current,
|
|
6638
|
+
handleChangePage,
|
|
6639
|
+
itemList,
|
|
6640
|
+
firstEllipseList,
|
|
6641
|
+
secondEllipseList
|
|
6642
|
+
}
|
|
6643
|
+
);
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6646
|
+
WavelengthDefaultPagination.displayName = "WavelengthDefaultPagination";
|
|
6647
|
+
var WavelengthDefaultPagination_default = WavelengthDefaultPagination;
|
|
6648
|
+
|
|
6285
6649
|
// src/components/snackbars/WavelengthSnackbar.tsx
|
|
6286
6650
|
import Snackbar from "@mui/material/Snackbar";
|
|
6287
6651
|
import SnackbarContent from "@mui/material/SnackbarContent";
|
|
6288
6652
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
6289
6653
|
import { IconButton as IconButton6 } from "@mui/material";
|
|
6290
|
-
import { jsx as
|
|
6654
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6291
6655
|
function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor, textColor, horryAlign, vertyAlign, durationSb, width: width2, icon, id }) {
|
|
6292
6656
|
const handleClose = () => {
|
|
6293
6657
|
setShow(false);
|
|
6294
6658
|
};
|
|
6295
|
-
const defaultIcon = /* @__PURE__ */
|
|
6659
|
+
const defaultIcon = /* @__PURE__ */ jsx41(IconButton6, { size: "small", "aria-label": "close", color: "inherit", children: /* @__PURE__ */ jsx41(CloseIcon2, { fontSize: "small" }) });
|
|
6296
6660
|
const palette2 = getPalette();
|
|
6297
6661
|
const durationMs = durationSb ? durationSb * 1e3 : 4e3;
|
|
6298
|
-
return /* @__PURE__ */
|
|
6662
|
+
return /* @__PURE__ */ jsx41(
|
|
6299
6663
|
Snackbar,
|
|
6300
6664
|
{
|
|
6301
6665
|
id,
|
|
@@ -6306,7 +6670,7 @@ function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor,
|
|
|
6306
6670
|
vertical: vertyAlign ? vertyAlign : "bottom",
|
|
6307
6671
|
horizontal: horryAlign ? horryAlign : "center"
|
|
6308
6672
|
},
|
|
6309
|
-
children: /* @__PURE__ */
|
|
6673
|
+
children: /* @__PURE__ */ jsx41(
|
|
6310
6674
|
SnackbarContent,
|
|
6311
6675
|
{
|
|
6312
6676
|
style: {
|
|
@@ -6315,11 +6679,11 @@ function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor,
|
|
|
6315
6679
|
display: "flex",
|
|
6316
6680
|
width: width2
|
|
6317
6681
|
},
|
|
6318
|
-
message: /* @__PURE__ */
|
|
6319
|
-
/* @__PURE__ */
|
|
6320
|
-
/* @__PURE__ */
|
|
6682
|
+
message: /* @__PURE__ */ jsxs22("div", { children: [
|
|
6683
|
+
/* @__PURE__ */ jsx41("span", { children: icon }),
|
|
6684
|
+
/* @__PURE__ */ jsx41("span", { id: "snackbar", children: message ? message : "Insert Message Here" })
|
|
6321
6685
|
] }),
|
|
6322
|
-
action: /* @__PURE__ */
|
|
6686
|
+
action: /* @__PURE__ */ jsx41("div", { style: { display: "flex", justifyContent: "center" }, onClick: handleClose, children: closeIcon ? closeIcon : defaultIcon })
|
|
6323
6687
|
}
|
|
6324
6688
|
)
|
|
6325
6689
|
}
|
|
@@ -6330,7 +6694,7 @@ WavelengthSnackbar.displayName = "WavelengthSnackbar";
|
|
|
6330
6694
|
// src/components/snackbars/WavelengthStandardSnackbar.tsx
|
|
6331
6695
|
import Snackbar2 from "@mui/material/Snackbar";
|
|
6332
6696
|
import SnackbarContent2 from "@mui/material/SnackbarContent";
|
|
6333
|
-
import { jsx as
|
|
6697
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6334
6698
|
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow, closeIcon, id }) {
|
|
6335
6699
|
const handleClose = () => {
|
|
6336
6700
|
toggleShow(false);
|
|
@@ -6345,7 +6709,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6345
6709
|
bgColor = "#737373";
|
|
6346
6710
|
}
|
|
6347
6711
|
const sIcon = icon ? icon : "";
|
|
6348
|
-
return /* @__PURE__ */
|
|
6712
|
+
return /* @__PURE__ */ jsx42(
|
|
6349
6713
|
Snackbar2,
|
|
6350
6714
|
{
|
|
6351
6715
|
id,
|
|
@@ -6357,7 +6721,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6357
6721
|
vertical: vertyAlign ? vertyAlign : "top",
|
|
6358
6722
|
horizontal: horryAlign ? horryAlign : "center"
|
|
6359
6723
|
},
|
|
6360
|
-
children: /* @__PURE__ */
|
|
6724
|
+
children: /* @__PURE__ */ jsx42(
|
|
6361
6725
|
SnackbarContent2,
|
|
6362
6726
|
{
|
|
6363
6727
|
style: {
|
|
@@ -6366,7 +6730,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6366
6730
|
//color: props.textColor ? props.textColor : palette.secondary,
|
|
6367
6731
|
},
|
|
6368
6732
|
sx: { paddingTop: "0px", paddingBottom: "0px" },
|
|
6369
|
-
message: /* @__PURE__ */
|
|
6733
|
+
message: /* @__PURE__ */ jsxs23(
|
|
6370
6734
|
"div",
|
|
6371
6735
|
{
|
|
6372
6736
|
style: {
|
|
@@ -6375,11 +6739,11 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6375
6739
|
width: width2
|
|
6376
6740
|
},
|
|
6377
6741
|
children: [
|
|
6378
|
-
/* @__PURE__ */
|
|
6379
|
-
/* @__PURE__ */
|
|
6380
|
-
/* @__PURE__ */
|
|
6742
|
+
/* @__PURE__ */ jsxs23("div", { style: { gridColumnStart: 2, gridColumnEnd: 5, textAlign: "center", display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "center" }, id: "snackbar", children: [
|
|
6743
|
+
/* @__PURE__ */ jsx42("div", { style: { marginTop: "5px" }, children: sIcon }),
|
|
6744
|
+
/* @__PURE__ */ jsx42("div", { style: { fontSize: "1rem", marginLeft: "10px" }, children: message ? message : "Insert Message Here" })
|
|
6381
6745
|
] }),
|
|
6382
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsx42("div", { style: { gridColumnStart: 6 }, onClick: handleClose, children: closeIcon })
|
|
6383
6747
|
]
|
|
6384
6748
|
}
|
|
6385
6749
|
)
|
|
@@ -6392,12 +6756,12 @@ WavelengthStandardSnackbar.displayName = "WavelengthStandardSnackbar";
|
|
|
6392
6756
|
|
|
6393
6757
|
// src/components/snackbars/WavelengthTestSnackbar.tsx
|
|
6394
6758
|
import Box5 from "@mui/material/Box";
|
|
6395
|
-
import
|
|
6396
|
-
import { useEffect as
|
|
6397
|
-
import { Fragment as Fragment12, jsx as
|
|
6759
|
+
import Button6 from "@mui/material/Button";
|
|
6760
|
+
import { useEffect as useEffect15, useRef as useRef16 } from "react";
|
|
6761
|
+
import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6398
6762
|
var useOutsideClick = (callback) => {
|
|
6399
|
-
const ref =
|
|
6400
|
-
|
|
6763
|
+
const ref = useRef16(null);
|
|
6764
|
+
useEffect15(() => {
|
|
6401
6765
|
const handleClickOutside = (event) => {
|
|
6402
6766
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
6403
6767
|
callback();
|
|
@@ -6424,7 +6788,7 @@ function WavelengthTestSnackbar({ isPopUpOpen, toggleOpen, type, message, custom
|
|
|
6424
6788
|
} else if (type === "disabled") {
|
|
6425
6789
|
bgColor = "#737373";
|
|
6426
6790
|
}
|
|
6427
|
-
return /* @__PURE__ */
|
|
6791
|
+
return /* @__PURE__ */ jsx43(Fragment12, { children: isPopUpOpen && /* @__PURE__ */ jsxs24(
|
|
6428
6792
|
Box5,
|
|
6429
6793
|
{
|
|
6430
6794
|
id,
|
|
@@ -6444,10 +6808,10 @@ function WavelengthTestSnackbar({ isPopUpOpen, toggleOpen, type, message, custom
|
|
|
6444
6808
|
marginTop: customVertyAlign ? `${customVertyAlign}` : ""
|
|
6445
6809
|
},
|
|
6446
6810
|
children: [
|
|
6447
|
-
/* @__PURE__ */
|
|
6448
|
-
/* @__PURE__ */
|
|
6449
|
-
/* @__PURE__ */
|
|
6450
|
-
|
|
6811
|
+
/* @__PURE__ */ jsx43("div", { style: { backgroundColor: "red" } }),
|
|
6812
|
+
/* @__PURE__ */ jsx43("div", { style: { color: "white", fontSize: "1rem" }, children: message }),
|
|
6813
|
+
/* @__PURE__ */ jsx43(
|
|
6814
|
+
Button6,
|
|
6451
6815
|
{
|
|
6452
6816
|
variant: "text",
|
|
6453
6817
|
onClick: () => {
|
|
@@ -6465,10 +6829,10 @@ WavelengthTestSnackbar.displayName = "WavelengthTestSnackbar";
|
|
|
6465
6829
|
// src/components/sliders/WavelengthSlider.tsx
|
|
6466
6830
|
import Box6 from "@mui/material/Box";
|
|
6467
6831
|
import Slider from "@mui/material/Slider";
|
|
6468
|
-
import { jsx as
|
|
6832
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
6469
6833
|
function WavelengthSlider({ width: width2 = "300px", color: color2, valueDisplayed, marks, labelColor, value, id, maxVal = 100, minVal, step = 1, labelFunc, handleChange }) {
|
|
6470
6834
|
const on = valueDisplayed ? "on" : "off";
|
|
6471
|
-
return /* @__PURE__ */
|
|
6835
|
+
return /* @__PURE__ */ jsx44(Box6, { sx: { width: width2 }, children: /* @__PURE__ */ jsx44(
|
|
6472
6836
|
Slider,
|
|
6473
6837
|
{
|
|
6474
6838
|
id,
|
|
@@ -6493,7 +6857,7 @@ function WavelengthSlider({ width: width2 = "300px", color: color2, valueDisplay
|
|
|
6493
6857
|
WavelengthSlider.displayName = "WavelengthSlider";
|
|
6494
6858
|
|
|
6495
6859
|
// src/components/carousels/WavelengthDefaultCarousel.tsx
|
|
6496
|
-
import { useState as
|
|
6860
|
+
import { useState as useState7 } from "react";
|
|
6497
6861
|
import IconButton7 from "@mui/material/IconButton";
|
|
6498
6862
|
import NavigateBeforeIcon from "@mui/icons-material/NavigateBefore";
|
|
6499
6863
|
import NavigateNextIcon from "@mui/icons-material/NavigateNext";
|
|
@@ -6503,9 +6867,9 @@ import Card from "@mui/material/Card";
|
|
|
6503
6867
|
import CardContent from "@mui/material/CardContent";
|
|
6504
6868
|
import CardMedia from "@mui/material/CardMedia";
|
|
6505
6869
|
import CardActionArea from "@mui/material/CardActionArea";
|
|
6506
|
-
import { jsx as
|
|
6870
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6507
6871
|
var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight, cardWidth, id, name }) => {
|
|
6508
|
-
const [currentIndex, setCurrentIndex] =
|
|
6872
|
+
const [currentIndex, setCurrentIndex] = useState7(0);
|
|
6509
6873
|
const adjustButtonSize = buttonSize !== void 0 ? buttonSize : 70;
|
|
6510
6874
|
const adjustImageHeight = imageHeight !== void 0 ? imageHeight : 250;
|
|
6511
6875
|
const adjustImageWidth = imageWidth !== void 0 ? imageWidth : 300;
|
|
@@ -6520,7 +6884,7 @@ var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight,
|
|
|
6520
6884
|
const handleClick = () => {
|
|
6521
6885
|
window.open(items[currentIndex].path, "_blank");
|
|
6522
6886
|
};
|
|
6523
|
-
return /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsxs25(
|
|
6524
6888
|
Grid3,
|
|
6525
6889
|
{
|
|
6526
6890
|
container: true,
|
|
@@ -6529,417 +6893,118 @@ var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight,
|
|
|
6529
6893
|
alignItems: "center"
|
|
6530
6894
|
},
|
|
6531
6895
|
children: [
|
|
6532
|
-
/* @__PURE__ */
|
|
6533
|
-
/* @__PURE__ */
|
|
6896
|
+
/* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(IconButton7, { onClick: handlePrev, sx: { margin: 1, color: "white" }, children: /* @__PURE__ */ jsx45(NavigateBeforeIcon, { style: { fontSize: adjustButtonSize } }) }) }),
|
|
6897
|
+
/* @__PURE__ */ jsx45(
|
|
6534
6898
|
Card,
|
|
6535
6899
|
{
|
|
6536
6900
|
sx: {
|
|
6537
6901
|
maxWidth: adjustCardWidth,
|
|
6538
6902
|
maxHeight: adjustCardHeight
|
|
6539
6903
|
},
|
|
6540
|
-
children: /* @__PURE__ */
|
|
6541
|
-
/* @__PURE__ */
|
|
6542
|
-
/* @__PURE__ */
|
|
6543
|
-
/* @__PURE__ */
|
|
6544
|
-
/* @__PURE__ */
|
|
6904
|
+
children: /* @__PURE__ */ jsxs25(CardActionArea, { onClick: handleClick, children: [
|
|
6905
|
+
/* @__PURE__ */ jsx45(CardMedia, { sx: { height: adjustImageHeight, width: adjustImageWidth }, image: items[currentIndex].image }),
|
|
6906
|
+
/* @__PURE__ */ jsxs25(CardContent, { children: [
|
|
6907
|
+
/* @__PURE__ */ jsx45(Typography4, { variant: "h4", children: items[currentIndex].title }),
|
|
6908
|
+
/* @__PURE__ */ jsx45(Typography4, { variant: "body1", children: items[currentIndex].description })
|
|
6545
6909
|
] })
|
|
6546
6910
|
] })
|
|
6547
6911
|
}
|
|
6548
6912
|
),
|
|
6549
|
-
/* @__PURE__ */
|
|
6913
|
+
/* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(IconButton7, { onClick: handleNext, sx: { margin: 1, color: "white" }, children: /* @__PURE__ */ jsx45(NavigateNextIcon, { style: { fontSize: adjustButtonSize } }) }) })
|
|
6550
6914
|
]
|
|
6551
6915
|
}
|
|
6552
6916
|
) }) });
|
|
6553
6917
|
};
|
|
6554
6918
|
DefaultCarousel.displayName = "DefaultCarousel";
|
|
6555
6919
|
|
|
6556
|
-
// src/components/carousels/WavelengthSliderCarousel.tsx
|
|
6557
|
-
import { useState as
|
|
6558
|
-
import Grid4 from "@mui/material/Grid";
|
|
6559
|
-
import Card2 from "@mui/material/Card";
|
|
6560
|
-
import CardContent2 from "@mui/material/CardContent";
|
|
6561
|
-
import CardMedia2 from "@mui/material/CardMedia";
|
|
6562
|
-
import CardActionArea2 from "@mui/material/CardActionArea";
|
|
6563
|
-
import { jsx as
|
|
6564
|
-
var delay = 2500;
|
|
6565
|
-
var SliderCardCarousel = ({ items, cardHeight, cardWidth, contHeight, contWidth }) => {
|
|
6566
|
-
const [index, setIndex] =
|
|
6567
|
-
const [isHovered, setIsHovered] =
|
|
6568
|
-
|
|
6569
|
-
setTimeout(() => setIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1), delay);
|
|
6570
|
-
return () => {
|
|
6571
|
-
};
|
|
6572
|
-
}, [index]);
|
|
6573
|
-
const carouselCardWidth = items.length > 0 ? `calc(35% * ${items.length})` : "200%";
|
|
6574
|
-
const adjustContHeight = contHeight !== void 0 ? contHeight : "100%";
|
|
6575
|
-
const adjustContWidth = contWidth !== void 0 ? contWidth : "200%";
|
|
6576
|
-
const adjustCardHeight = cardHeight !== void 0 ? cardHeight : 120;
|
|
6577
|
-
const adjustCardWith = cardWidth !== void 0 ? cardWidth : 310;
|
|
6578
|
-
const styles = {
|
|
6579
|
-
carouselcontainer: {
|
|
6580
|
-
overflow: "hidden",
|
|
6581
|
-
position: "relative",
|
|
6582
|
-
borderColor: "#4b5563",
|
|
6583
|
-
height: adjustContHeight,
|
|
6584
|
-
width: adjustContWidth,
|
|
6585
|
-
minHeight: "280px",
|
|
6586
|
-
minWidth: "640px",
|
|
6587
|
-
borderRadius: "10px"
|
|
6588
|
-
},
|
|
6589
|
-
carouselTrackStyle: {
|
|
6590
|
-
display: "flex",
|
|
6591
|
-
position: "relative",
|
|
6592
|
-
justifyContent: "center",
|
|
6593
|
-
left: "0",
|
|
6594
|
-
alignItems: "center",
|
|
6595
|
-
gap: "5px",
|
|
6596
|
-
width: carouselCardWidth,
|
|
6597
|
-
height: "100%",
|
|
6598
|
-
transition: "background-color 0.5s ease-in-out"
|
|
6599
|
-
},
|
|
6600
|
-
carouselCard: {
|
|
6601
|
-
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
6602
|
-
transform: isHovered ? "scale(0.9)" : "scale(1)",
|
|
6603
|
-
boxShadow: isHovered ? "5px 5px 8px rgba(222, 222, 222, 0.362), 10px 10px 8px rgba(152, 133, 133, 0.392), 15px 15px 8px rgba(139, 154, 139, 0.303)" : "none"
|
|
6604
|
-
}
|
|
6605
|
-
};
|
|
6606
|
-
return /* @__PURE__ */ jsx42("div", { style: styles.carouselcontainer, children: /* @__PURE__ */ jsx42("div", { className: "my-animation", style: styles.carouselTrackStyle, children: /* @__PURE__ */ jsx42(
|
|
6607
|
-
Grid4,
|
|
6608
|
-
{
|
|
6609
|
-
sx: {
|
|
6610
|
-
display: "flex",
|
|
6611
|
-
justifyContent: "center",
|
|
6612
|
-
alignItems: "center"
|
|
6613
|
-
},
|
|
6614
|
-
container: true,
|
|
6615
|
-
spacing: 0.5,
|
|
6616
|
-
children: items.map((card) => /* @__PURE__ */ jsx42("div", { children: /* @__PURE__ */ jsx42(
|
|
6617
|
-
Card2,
|
|
6618
|
-
{
|
|
6619
|
-
sx: {
|
|
6620
|
-
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
6621
|
-
transform: isHovered ? "scale(0.9)" : "scale(1)",
|
|
6622
|
-
boxShadow: isHovered ? "5px 5px 8px rgba(222, 222, 222, 0.362), 10px 10px 8px rgba(152, 133, 133, 0.392), 15px 15px 8px rgba(139, 154, 139, 0.303)" : "none"
|
|
6623
|
-
},
|
|
6624
|
-
onMouseEnter: () => setIsHovered(true),
|
|
6625
|
-
onMouseLeave: () => setIsHovered(false),
|
|
6626
|
-
children: /* @__PURE__ */ jsxs24(CardActionArea2, { href: card.path, children: [
|
|
6627
|
-
/* @__PURE__ */ jsx42(CardMedia2, { sx: { height: adjustCardHeight, width: adjustCardWith }, image: card.image }),
|
|
6628
|
-
/* @__PURE__ */ jsxs24(CardContent2, { children: [
|
|
6629
|
-
/* @__PURE__ */ jsx42("h3", { children: card.title }),
|
|
6630
|
-
/* @__PURE__ */ jsx42("p", { children: card.description })
|
|
6631
|
-
] })
|
|
6632
|
-
] })
|
|
6633
|
-
}
|
|
6634
|
-
) }, card.title))
|
|
6635
|
-
}
|
|
6636
|
-
) }) });
|
|
6637
|
-
};
|
|
6638
|
-
SliderCardCarousel.displayName = "SliderCardCarousel";
|
|
6639
|
-
|
|
6640
|
-
// src/components/pagination/WavelengthDefaultPagination.tsx
|
|
6641
|
-
import { useState as useState8, useMemo } from "react";
|
|
6642
|
-
|
|
6643
|
-
// src/components/pagination/WavelengthButtonPagination.tsx
|
|
6644
|
-
import { useState as useState6 } from "react";
|
|
6645
|
-
import Button5 from "@mui/material/Button";
|
|
6646
|
-
import ArrowBackIosNewIcon from "@mui/icons-material/ArrowBackIosNew";
|
|
6647
|
-
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
|
6648
|
-
import styled7 from "styled-components";
|
|
6649
|
-
import { jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6650
|
-
var MyDroplistItems = styled7("li")`
|
|
6651
|
-
background-color: white;
|
|
6652
|
-
color: #000000;
|
|
6653
|
-
padding: 10px 30px;
|
|
6654
|
-
textdecoration: none;
|
|
6655
|
-
display: block;
|
|
6656
|
-
width: 80px;
|
|
6657
|
-
|
|
6658
|
-
&:hover {
|
|
6659
|
-
background-color: lightgray;
|
|
6660
|
-
}
|
|
6661
|
-
`;
|
|
6662
|
-
function WavelengthButtonPagination({ totalPages, current, handleChangePage, itemList, firstEllipseList, secondEllipseList, id }) {
|
|
6663
|
-
const [isOpen, setIsOpen] = useState6(false);
|
|
6664
|
-
const [isSecOpen, setIsSecOpen] = useState6(false);
|
|
6665
|
-
const toggleDropdown = (index) => {
|
|
6666
|
-
if (index === 1) {
|
|
6667
|
-
setIsOpen(!isOpen);
|
|
6668
|
-
} else {
|
|
6669
|
-
setIsSecOpen(!isSecOpen);
|
|
6670
|
-
}
|
|
6671
|
-
};
|
|
6672
|
-
const dropstyles = {
|
|
6673
|
-
dropcenter: { position: "relative", left: "-40px", top: "-20px" },
|
|
6674
|
-
mydrop: { position: "absolute", zIndex: "3", maxHeight: "200px", overflow: "scroll" },
|
|
6675
|
-
rangenumbers: { display: "flex" },
|
|
6676
|
-
butPagCompDivStyle: { display: "flex" }
|
|
6677
|
-
};
|
|
6678
|
-
const WLButtonPagStyle = {
|
|
6679
|
-
background: "white",
|
|
6680
|
-
color: "black",
|
|
6681
|
-
border: "none",
|
|
6682
|
-
padding: "1px",
|
|
6683
|
-
fontSize: "16px",
|
|
6684
|
-
height: "55px",
|
|
6685
|
-
width: "40px",
|
|
6686
|
-
boxshadow: "4px 2px 4px darkslategray",
|
|
6687
|
-
borderRadius: "50%",
|
|
6688
|
-
margin: "3px",
|
|
6689
|
-
"&:hover": { background: "#49baf7" },
|
|
6690
|
-
"&:disabled": { background: "rgb(226, 223, 223)" },
|
|
6691
|
-
"&.active": { background: "#8FD8FF" }
|
|
6692
|
-
};
|
|
6693
|
-
return /* @__PURE__ */ jsxs25("div", { style: dropstyles.butPagCompDivStyle, id, children: [
|
|
6694
|
-
/* @__PURE__ */ jsx43(Button5, { onClick: () => handleChangePage(current - 1), disabled: current === 1, sx: WLButtonPagStyle, children: /* @__PURE__ */ jsx43(ArrowBackIosNewIcon, {}) }),
|
|
6695
|
-
/* @__PURE__ */ jsx43("section", { style: dropstyles.rangenumbers, children: itemList.map(
|
|
6696
|
-
(item, index) => item === "..." && index === 1 ? (
|
|
6697
|
-
//first half ellipse with first half dropdown
|
|
6698
|
-
// dropdown
|
|
6699
|
-
// eslint-disable-next-line react/jsx-key
|
|
6700
|
-
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6701
|
-
/* @__PURE__ */ jsx43(Button5, { onClick: () => toggleDropdown(1), className: current === index ? "active" : "", sx: WLButtonPagStyle, children: item }, index),
|
|
6702
|
-
isOpen && /* @__PURE__ */ jsx43("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx43("ul", { style: dropstyles.mydrop, children: firstEllipseList.map((item2) => /* @__PURE__ */ jsx43(
|
|
6703
|
-
MyDroplistItems,
|
|
6704
|
-
{
|
|
6705
|
-
onClick: () => {
|
|
6706
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6707
|
-
},
|
|
6708
|
-
children: item2
|
|
6709
|
-
},
|
|
6710
|
-
item2
|
|
6711
|
-
)) }) })
|
|
6712
|
-
] })
|
|
6713
|
-
) : item === "..." && index === 5 ? (
|
|
6714
|
-
//second half ellipse with second half dropdown
|
|
6715
|
-
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6716
|
-
/* @__PURE__ */ jsx43(Button5, { onClick: () => toggleDropdown(5), className: current === index ? "active" : "", sx: WLButtonPagStyle, children: item }, index),
|
|
6717
|
-
isSecOpen && /* @__PURE__ */ jsx43("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx43("ul", { style: dropstyles.mydrop, children: secondEllipseList.map((item2) => /* @__PURE__ */ jsx43(
|
|
6718
|
-
MyDroplistItems,
|
|
6719
|
-
{
|
|
6720
|
-
onClick: () => {
|
|
6721
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6722
|
-
},
|
|
6723
|
-
children: item2
|
|
6724
|
-
},
|
|
6725
|
-
item2
|
|
6726
|
-
)) }) })
|
|
6727
|
-
] })
|
|
6728
|
-
) : /* @__PURE__ */ jsx43(Button5, { onClick: () => handleChangePage(item), className: current === item ? "active" : "", sx: WLButtonPagStyle, children: item }, index)
|
|
6729
|
-
) }),
|
|
6730
|
-
/* @__PURE__ */ jsx43(Button5, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, sx: WLButtonPagStyle, children: /* @__PURE__ */ jsx43(ArrowForwardIosIcon, {}) })
|
|
6731
|
-
] });
|
|
6732
|
-
}
|
|
6733
|
-
WavelengthButtonPagination.displayName = "WavelengthButtonPagination";
|
|
6734
|
-
var WavelengthButtonPagination_default = WavelengthButtonPagination;
|
|
6735
|
-
|
|
6736
|
-
// src/components/pagination/WavelengthVariationPagination.tsx
|
|
6737
|
-
import { useState as useState7 } from "react";
|
|
6738
|
-
import Button6 from "@mui/material/Button";
|
|
6739
|
-
import ArrowBackIosNewIcon2 from "@mui/icons-material/ArrowBackIosNew";
|
|
6740
|
-
import ArrowForwardIosIcon2 from "@mui/icons-material/ArrowForwardIos";
|
|
6741
|
-
import styled8 from "styled-components";
|
|
6742
|
-
import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6743
|
-
function WavelengthVariationPagination({ totalPages, current, variant, handleChangePage, itemList, firstEllipseList, secondEllipseList, id }) {
|
|
6744
|
-
const [isOpen, setIsOpen] = useState7(false);
|
|
6745
|
-
const [isSecOpen, setIsSecOpen] = useState7(false);
|
|
6746
|
-
const MyDroplistItems2 = styled8("li")`
|
|
6747
|
-
background-color: white;
|
|
6748
|
-
color: #000000;
|
|
6749
|
-
padding: 10px 30px;
|
|
6750
|
-
textdecoration: none;
|
|
6751
|
-
display: block;
|
|
6752
|
-
width: 80px;
|
|
6753
|
-
|
|
6754
|
-
&:hover {
|
|
6755
|
-
background-color: lightgray;
|
|
6756
|
-
}
|
|
6757
|
-
`;
|
|
6758
|
-
const dropstyles = {
|
|
6759
|
-
pagination: {
|
|
6760
|
-
display: "flex"
|
|
6761
|
-
},
|
|
6762
|
-
dropcenter: {
|
|
6920
|
+
// src/components/carousels/WavelengthSliderCarousel.tsx
|
|
6921
|
+
import { useState as useState8, useEffect as useEffect17 } from "react";
|
|
6922
|
+
import Grid4 from "@mui/material/Grid";
|
|
6923
|
+
import Card2 from "@mui/material/Card";
|
|
6924
|
+
import CardContent2 from "@mui/material/CardContent";
|
|
6925
|
+
import CardMedia2 from "@mui/material/CardMedia";
|
|
6926
|
+
import CardActionArea2 from "@mui/material/CardActionArea";
|
|
6927
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6928
|
+
var delay = 2500;
|
|
6929
|
+
var SliderCardCarousel = ({ items, cardHeight, cardWidth, contHeight, contWidth }) => {
|
|
6930
|
+
const [index, setIndex] = useState8(0);
|
|
6931
|
+
const [isHovered, setIsHovered] = useState8(false);
|
|
6932
|
+
useEffect17(() => {
|
|
6933
|
+
setTimeout(() => setIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1), delay);
|
|
6934
|
+
return () => {
|
|
6935
|
+
};
|
|
6936
|
+
}, [index]);
|
|
6937
|
+
const carouselCardWidth = items.length > 0 ? `calc(35% * ${items.length})` : "200%";
|
|
6938
|
+
const adjustContHeight = contHeight !== void 0 ? contHeight : "100%";
|
|
6939
|
+
const adjustContWidth = contWidth !== void 0 ? contWidth : "200%";
|
|
6940
|
+
const adjustCardHeight = cardHeight !== void 0 ? cardHeight : 120;
|
|
6941
|
+
const adjustCardWith = cardWidth !== void 0 ? cardWidth : 310;
|
|
6942
|
+
const styles = {
|
|
6943
|
+
carouselcontainer: {
|
|
6944
|
+
overflow: "hidden",
|
|
6763
6945
|
position: "relative",
|
|
6764
|
-
|
|
6765
|
-
|
|
6946
|
+
borderColor: "#4b5563",
|
|
6947
|
+
height: adjustContHeight,
|
|
6948
|
+
width: adjustContWidth,
|
|
6949
|
+
minHeight: "280px",
|
|
6950
|
+
minWidth: "640px",
|
|
6951
|
+
borderRadius: "10px"
|
|
6766
6952
|
},
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6953
|
+
carouselTrackStyle: {
|
|
6954
|
+
display: "flex",
|
|
6955
|
+
position: "relative",
|
|
6956
|
+
justifyContent: "center",
|
|
6957
|
+
left: "0",
|
|
6958
|
+
alignItems: "center",
|
|
6959
|
+
gap: "5px",
|
|
6960
|
+
width: carouselCardWidth,
|
|
6961
|
+
height: "100%",
|
|
6962
|
+
transition: "background-color 0.5s ease-in-out"
|
|
6772
6963
|
},
|
|
6773
|
-
|
|
6774
|
-
|
|
6964
|
+
carouselCard: {
|
|
6965
|
+
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
6966
|
+
transform: isHovered ? "scale(0.9)" : "scale(1)",
|
|
6967
|
+
boxShadow: isHovered ? "5px 5px 8px rgba(222, 222, 222, 0.362), 10px 10px 8px rgba(152, 133, 133, 0.392), 15px 15px 8px rgba(139, 154, 139, 0.303)" : "none"
|
|
6775
6968
|
}
|
|
6776
6969
|
};
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6970
|
+
return /* @__PURE__ */ jsx46("div", { style: styles.carouselcontainer, children: /* @__PURE__ */ jsx46("div", { className: "my-animation", style: styles.carouselTrackStyle, children: /* @__PURE__ */ jsx46(
|
|
6971
|
+
Grid4,
|
|
6972
|
+
{
|
|
6973
|
+
sx: {
|
|
6974
|
+
display: "flex",
|
|
6975
|
+
justifyContent: "center",
|
|
6976
|
+
alignItems: "center"
|
|
6977
|
+
},
|
|
6978
|
+
container: true,
|
|
6979
|
+
spacing: 0.5,
|
|
6980
|
+
children: items.map((card) => /* @__PURE__ */ jsx46("div", { children: /* @__PURE__ */ jsx46(
|
|
6981
|
+
Card2,
|
|
6982
|
+
{
|
|
6983
|
+
sx: {
|
|
6984
|
+
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
6985
|
+
transform: isHovered ? "scale(0.9)" : "scale(1)",
|
|
6986
|
+
boxShadow: isHovered ? "5px 5px 8px rgba(222, 222, 222, 0.362), 10px 10px 8px rgba(152, 133, 133, 0.392), 15px 15px 8px rgba(139, 154, 139, 0.303)" : "none"
|
|
6987
|
+
},
|
|
6988
|
+
onMouseEnter: () => setIsHovered(true),
|
|
6989
|
+
onMouseLeave: () => setIsHovered(false),
|
|
6990
|
+
children: /* @__PURE__ */ jsxs26(CardActionArea2, { href: card.path, children: [
|
|
6991
|
+
/* @__PURE__ */ jsx46(CardMedia2, { sx: { height: adjustCardHeight, width: adjustCardWith }, image: card.image }),
|
|
6992
|
+
/* @__PURE__ */ jsxs26(CardContent2, { children: [
|
|
6993
|
+
/* @__PURE__ */ jsx46("h3", { children: card.title }),
|
|
6994
|
+
/* @__PURE__ */ jsx46("p", { children: card.description })
|
|
6995
|
+
] })
|
|
6996
|
+
] })
|
|
6997
|
+
}
|
|
6998
|
+
) }, card.title))
|
|
6782
6999
|
}
|
|
6783
|
-
};
|
|
6784
|
-
return /* @__PURE__ */ jsxs26("div", { style: dropstyles.pagination, id, children: [
|
|
6785
|
-
/* @__PURE__ */ jsx44(Button6, { onClick: () => handleChangePage(current - 1), variant, disabled: current === 1, children: /* @__PURE__ */ jsx44(ArrowBackIosNewIcon2, {}) }),
|
|
6786
|
-
/* @__PURE__ */ jsx44("section", { style: dropstyles.rangenumbers, children: itemList.map(
|
|
6787
|
-
(item, index) => item === "..." && index === 1 ? (
|
|
6788
|
-
//first half ellipse with first half dropdown
|
|
6789
|
-
// eslint-disable-next-line react/jsx-key
|
|
6790
|
-
/* @__PURE__ */ jsxs26("div", { children: [
|
|
6791
|
-
/* @__PURE__ */ jsx44(Button6, { onClick: () => toggleDropdown(1), variant, className: current === index ? "active" : "", children: item }, index),
|
|
6792
|
-
isOpen && /* @__PURE__ */ jsx44("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx44("ul", { style: dropstyles.mydrop, children: firstEllipseList.map((item2) => /* @__PURE__ */ jsx44(
|
|
6793
|
-
MyDroplistItems2,
|
|
6794
|
-
{
|
|
6795
|
-
style: dropstyles.mydroplist,
|
|
6796
|
-
onClick: () => {
|
|
6797
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6798
|
-
},
|
|
6799
|
-
children: item2
|
|
6800
|
-
},
|
|
6801
|
-
item2
|
|
6802
|
-
)) }) })
|
|
6803
|
-
] })
|
|
6804
|
-
) : item === "..." && index === 5 ? (
|
|
6805
|
-
//second half ellipse with second half dropdown
|
|
6806
|
-
/* @__PURE__ */ jsxs26("div", { children: [
|
|
6807
|
-
/* @__PURE__ */ jsx44(Button6, { onClick: () => toggleDropdown(5), variant, className: current === index ? "active" : "", children: item }, index),
|
|
6808
|
-
isSecOpen && /* @__PURE__ */ jsx44("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx44("ul", { style: dropstyles.mydrop, children: secondEllipseList.map((item2) => /* @__PURE__ */ jsx44(
|
|
6809
|
-
MyDroplistItems2,
|
|
6810
|
-
{
|
|
6811
|
-
style: dropstyles.mydroplist,
|
|
6812
|
-
onClick: () => {
|
|
6813
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6814
|
-
},
|
|
6815
|
-
children: item2
|
|
6816
|
-
},
|
|
6817
|
-
item2
|
|
6818
|
-
)) }) })
|
|
6819
|
-
] })
|
|
6820
|
-
) : /* @__PURE__ */ jsx44(Button6, { onClick: () => handleChangePage(item), className: current === item ? "active" : "", variant, children: item }, index)
|
|
6821
|
-
) }),
|
|
6822
|
-
/* @__PURE__ */ jsx44(Button6, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, variant, children: /* @__PURE__ */ jsx44(ArrowForwardIosIcon2, {}) })
|
|
6823
|
-
] });
|
|
6824
|
-
}
|
|
6825
|
-
WavelengthVariationPagination.displayName = "WavelengthVariationPagination";
|
|
6826
|
-
var WavelengthVariationPagination_default = WavelengthVariationPagination;
|
|
6827
|
-
|
|
6828
|
-
// src/components/pagination/WavelengthDefaultPagination.tsx
|
|
6829
|
-
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
6830
|
-
var range = (start, end) => {
|
|
6831
|
-
const length = end - start + 1;
|
|
6832
|
-
return Array.from({ length }, (_, i) => start + i);
|
|
7000
|
+
) }) });
|
|
6833
7001
|
};
|
|
6834
|
-
|
|
6835
|
-
const result = [];
|
|
6836
|
-
for (let i = start; i < end; i++) {
|
|
6837
|
-
if (i !== start) {
|
|
6838
|
-
result.push(i);
|
|
6839
|
-
}
|
|
6840
|
-
}
|
|
6841
|
-
return result;
|
|
6842
|
-
}
|
|
6843
|
-
function WavelengthDefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, boundaryCount = 1, style: style3, onPageChange, id }) {
|
|
6844
|
-
const [current, setCurrent] = useState8(currentPageNumber);
|
|
6845
|
-
const startPages = range(1, Math.min(boundaryCount, totalPages));
|
|
6846
|
-
const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
|
|
6847
|
-
const siblingsStart = Math.max(Math.min(current - siblingCount, totalPages - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
|
|
6848
|
-
const siblingsEnd = Math.min(Math.max(current + siblingCount, boundaryCount + siblingCount * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
|
|
6849
|
-
const firstEllipseList = ascendingRange(1, siblingsStart);
|
|
6850
|
-
const secondEllipseList = ascendingRange(siblingsEnd, totalPages);
|
|
6851
|
-
const itemList = useMemo(() => {
|
|
6852
|
-
return [
|
|
6853
|
-
...startPages,
|
|
6854
|
-
...siblingsStart > boundaryCount + 2 ? ["..."] : boundaryCount + 1 < totalPages - boundaryCount ? [boundaryCount + 1] : [],
|
|
6855
|
-
...range(siblingsStart, siblingsEnd),
|
|
6856
|
-
...siblingsEnd < totalPages - boundaryCount - 1 ? ["..."] : totalPages - boundaryCount > boundaryCount ? [totalPages - boundaryCount] : [],
|
|
6857
|
-
...endPages
|
|
6858
|
-
];
|
|
6859
|
-
}, [current, totalPages, boundaryCount, siblingCount, id]);
|
|
6860
|
-
const handleChangePage = (value) => {
|
|
6861
|
-
if (typeof value === "number") {
|
|
6862
|
-
setCurrent(value);
|
|
6863
|
-
onPageChange(value);
|
|
6864
|
-
}
|
|
6865
|
-
};
|
|
6866
|
-
if (style3 === "circular") {
|
|
6867
|
-
return /* @__PURE__ */ jsx45(
|
|
6868
|
-
WavelengthButtonPagination_default,
|
|
6869
|
-
{
|
|
6870
|
-
id,
|
|
6871
|
-
totalPages,
|
|
6872
|
-
current,
|
|
6873
|
-
handleChangePage,
|
|
6874
|
-
itemList,
|
|
6875
|
-
firstEllipseList,
|
|
6876
|
-
secondEllipseList
|
|
6877
|
-
}
|
|
6878
|
-
);
|
|
6879
|
-
} else if (style3 === "text") {
|
|
6880
|
-
return /* @__PURE__ */ jsx45(
|
|
6881
|
-
WavelengthVariationPagination_default,
|
|
6882
|
-
{
|
|
6883
|
-
id,
|
|
6884
|
-
totalPages,
|
|
6885
|
-
current,
|
|
6886
|
-
variant: "text",
|
|
6887
|
-
handleChangePage,
|
|
6888
|
-
itemList,
|
|
6889
|
-
firstEllipseList,
|
|
6890
|
-
secondEllipseList
|
|
6891
|
-
}
|
|
6892
|
-
);
|
|
6893
|
-
} else if (style3 === "outlined") {
|
|
6894
|
-
return /* @__PURE__ */ jsx45(
|
|
6895
|
-
WavelengthVariationPagination_default,
|
|
6896
|
-
{
|
|
6897
|
-
id,
|
|
6898
|
-
totalPages,
|
|
6899
|
-
current,
|
|
6900
|
-
variant: "outlined",
|
|
6901
|
-
handleChangePage,
|
|
6902
|
-
itemList,
|
|
6903
|
-
firstEllipseList,
|
|
6904
|
-
secondEllipseList
|
|
6905
|
-
}
|
|
6906
|
-
);
|
|
6907
|
-
} else if (style3 === "contained") {
|
|
6908
|
-
return /* @__PURE__ */ jsx45(
|
|
6909
|
-
WavelengthVariationPagination_default,
|
|
6910
|
-
{
|
|
6911
|
-
id,
|
|
6912
|
-
totalPages,
|
|
6913
|
-
current,
|
|
6914
|
-
variant: "contained",
|
|
6915
|
-
handleChangePage,
|
|
6916
|
-
itemList,
|
|
6917
|
-
firstEllipseList,
|
|
6918
|
-
secondEllipseList
|
|
6919
|
-
}
|
|
6920
|
-
);
|
|
6921
|
-
} else {
|
|
6922
|
-
return /* @__PURE__ */ jsx45(
|
|
6923
|
-
WavelengthVariationPagination_default,
|
|
6924
|
-
{
|
|
6925
|
-
id,
|
|
6926
|
-
totalPages,
|
|
6927
|
-
current,
|
|
6928
|
-
handleChangePage,
|
|
6929
|
-
itemList,
|
|
6930
|
-
firstEllipseList,
|
|
6931
|
-
secondEllipseList
|
|
6932
|
-
}
|
|
6933
|
-
);
|
|
6934
|
-
}
|
|
6935
|
-
}
|
|
6936
|
-
WavelengthDefaultPagination.displayName = "WavelengthDefaultPagination";
|
|
6937
|
-
var WavelengthDefaultPagination_default = WavelengthDefaultPagination;
|
|
7002
|
+
SliderCardCarousel.displayName = "SliderCardCarousel";
|
|
6938
7003
|
|
|
6939
7004
|
// src/components/TextField/WavelengthInput.tsx
|
|
6940
|
-
import { useRef as
|
|
7005
|
+
import { useRef as useRef17, useEffect as useEffect18, forwardRef as forwardRef2, useImperativeHandle as useImperativeHandle3 } from "react";
|
|
6941
7006
|
import "@wavelengthusaf/web-components";
|
|
6942
|
-
import { jsx as
|
|
7007
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
6943
7008
|
var WavelengthInput = forwardRef2(
|
|
6944
7009
|
({
|
|
6945
7010
|
id,
|
|
@@ -6976,12 +7041,12 @@ var WavelengthInput = forwardRef2(
|
|
|
6976
7041
|
onBlurCallback,
|
|
6977
7042
|
...rest
|
|
6978
7043
|
}, ref) => {
|
|
6979
|
-
const internalRef =
|
|
7044
|
+
const internalRef = useRef17(null);
|
|
6980
7045
|
useImperativeHandle3(ref, () => ({
|
|
6981
7046
|
...internalRef.current,
|
|
6982
7047
|
validate: () => internalRef.current?.validate?.(true)
|
|
6983
7048
|
}));
|
|
6984
|
-
|
|
7049
|
+
useEffect18(() => {
|
|
6985
7050
|
const el = internalRef.current;
|
|
6986
7051
|
if (!el) return;
|
|
6987
7052
|
const set = (attr, val) => {
|
|
@@ -7052,7 +7117,7 @@ var WavelengthInput = forwardRef2(
|
|
|
7052
7117
|
label,
|
|
7053
7118
|
disabled
|
|
7054
7119
|
]);
|
|
7055
|
-
|
|
7120
|
+
useEffect18(() => {
|
|
7056
7121
|
const el = internalRef.current;
|
|
7057
7122
|
if (!el || !onBlurCallback) return;
|
|
7058
7123
|
const handler = (e) => {
|
|
@@ -7064,7 +7129,7 @@ var WavelengthInput = forwardRef2(
|
|
|
7064
7129
|
el.addEventListener("blur", handler);
|
|
7065
7130
|
return () => el.removeEventListener("blur", handler);
|
|
7066
7131
|
}, [onBlurCallback]);
|
|
7067
|
-
|
|
7132
|
+
useEffect18(() => {
|
|
7068
7133
|
const el = internalRef.current;
|
|
7069
7134
|
if (!el || !onChange) return;
|
|
7070
7135
|
const handler = (e) => {
|
|
@@ -7085,7 +7150,7 @@ var WavelengthInput = forwardRef2(
|
|
|
7085
7150
|
...style3,
|
|
7086
7151
|
...backgroundColor2 ? { ["--wavelength-label-background"]: backgroundColor2 } : {}
|
|
7087
7152
|
};
|
|
7088
|
-
return /* @__PURE__ */
|
|
7153
|
+
return /* @__PURE__ */ jsx47("wavelength-input", { ref: internalRef, style: combinedStyle, ...rest });
|
|
7089
7154
|
}
|
|
7090
7155
|
);
|
|
7091
7156
|
WavelengthInput.displayName = "WavelengthInput";
|
|
@@ -7094,9 +7159,9 @@ WavelengthInput.displayName = "WavelengthInput";
|
|
|
7094
7159
|
import { WavelengthInput as WavelengthInput2 } from "@wavelengthusaf/web-components";
|
|
7095
7160
|
|
|
7096
7161
|
// src/components/DataTable/WavelengthDataTable.tsx
|
|
7097
|
-
import { useEffect as
|
|
7162
|
+
import { useEffect as useEffect19, useRef as useRef18, useState as useState9 } from "react";
|
|
7098
7163
|
import styled9 from "styled-components";
|
|
7099
|
-
import { jsx as
|
|
7164
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7100
7165
|
var ModalInputDiv = styled9.div`
|
|
7101
7166
|
display: flex;
|
|
7102
7167
|
flex-direction: column; /* Corrected this line */
|
|
@@ -7275,8 +7340,8 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7275
7340
|
const [currentPage, setCurrentPage] = useState9(1);
|
|
7276
7341
|
const [isOpen, setIsOpen] = useState9(false);
|
|
7277
7342
|
const [editingMenuKey, setEditingMenuKey] = useState9(null);
|
|
7278
|
-
const menuRef =
|
|
7279
|
-
const modalRef =
|
|
7343
|
+
const menuRef = useRef18(null);
|
|
7344
|
+
const modalRef = useRef18(null);
|
|
7280
7345
|
function isNumeric(value) {
|
|
7281
7346
|
return /^\d+$/.test(value);
|
|
7282
7347
|
}
|
|
@@ -7284,7 +7349,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7284
7349
|
setSelectedValue(event.target.value);
|
|
7285
7350
|
setLocalData(copiedArray);
|
|
7286
7351
|
};
|
|
7287
|
-
|
|
7352
|
+
useEffect19(() => {
|
|
7288
7353
|
if (!selectedValue || searchItem === "") {
|
|
7289
7354
|
setLocalData(copiedArray);
|
|
7290
7355
|
setNoRowsOpen(false);
|
|
@@ -7314,7 +7379,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7314
7379
|
const closeModal = () => {
|
|
7315
7380
|
setIsModalOpen(false);
|
|
7316
7381
|
};
|
|
7317
|
-
|
|
7382
|
+
useEffect19(() => {
|
|
7318
7383
|
const handleClickOutside = (event) => {
|
|
7319
7384
|
if (isModalOpen && modalRef.current && !modalRef.current.contains(event.target)) {
|
|
7320
7385
|
closeModal();
|
|
@@ -7374,7 +7439,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7374
7439
|
return /* @__PURE__ */ jsxs27(TableHeadStyle, { children: [
|
|
7375
7440
|
column.title,
|
|
7376
7441
|
/* @__PURE__ */ jsxs27(KebabMenu, { ref: menuRef, children: [
|
|
7377
|
-
/* @__PURE__ */
|
|
7442
|
+
/* @__PURE__ */ jsx48(
|
|
7378
7443
|
KebabIcon,
|
|
7379
7444
|
{
|
|
7380
7445
|
title: `KebabIcon-${index}`,
|
|
@@ -7386,25 +7451,25 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7386
7451
|
),
|
|
7387
7452
|
isOpen && editingMenuKey === column.key && /* @__PURE__ */ jsxs27(MenuOptions, { children: [
|
|
7388
7453
|
sortOrder === "asc" ? /* @__PURE__ */ jsxs27("li", { title: `MenuListASC-${index}`, onClick: () => handleSort(column.key, "asc"), children: [
|
|
7389
|
-
/* @__PURE__ */
|
|
7454
|
+
/* @__PURE__ */ jsx48("span", { children: "\u2B06" }),
|
|
7390
7455
|
" Sort ASC"
|
|
7391
7456
|
] }) : /* @__PURE__ */ jsxs27("li", { title: `MenuListDES-${index}`, onClick: () => handleSort(column.key, "desc"), children: [
|
|
7392
|
-
/* @__PURE__ */
|
|
7457
|
+
/* @__PURE__ */ jsx48("span", { children: "\u2B07" }),
|
|
7393
7458
|
" Sort DESC"
|
|
7394
7459
|
] }),
|
|
7395
7460
|
/* @__PURE__ */ jsxs27("li", { title: `MenuListFilterButton-${index}`, onClick: openModal, children: [
|
|
7396
|
-
/* @__PURE__ */
|
|
7461
|
+
/* @__PURE__ */ jsx48("span", { children: "\u23F7" }),
|
|
7397
7462
|
" Filter"
|
|
7398
7463
|
] }),
|
|
7399
|
-
isModalOpen && /* @__PURE__ */
|
|
7400
|
-
/* @__PURE__ */
|
|
7464
|
+
isModalOpen && /* @__PURE__ */ jsx48(ModalOverlay, { children: /* @__PURE__ */ jsxs27(ModalWrapper, { ref: modalRef, children: [
|
|
7465
|
+
/* @__PURE__ */ jsx48(ModalClose, { title: `ModalClose-${index}`, onClick: closeModal, children: "\xD7" }),
|
|
7401
7466
|
/* @__PURE__ */ jsxs27(ModalInputDiv, { children: [
|
|
7402
|
-
/* @__PURE__ */
|
|
7403
|
-
/* @__PURE__ */
|
|
7467
|
+
/* @__PURE__ */ jsx48("label", { htmlFor: "filterSelectId", children: "Columns: " }),
|
|
7468
|
+
/* @__PURE__ */ jsx48("select", { title: `filterSelect-${index}`, id: "filterSelectId", value: selectedValue, onChange: handleChange, children: columns.map((item) => /* @__PURE__ */ jsx48("option", { children: item.key }, item.key)) })
|
|
7404
7469
|
] }),
|
|
7405
7470
|
/* @__PURE__ */ jsxs27(ModalInputDiv, { children: [
|
|
7406
|
-
/* @__PURE__ */
|
|
7407
|
-
/* @__PURE__ */
|
|
7471
|
+
/* @__PURE__ */ jsx48("label", { htmlFor: "filterInputId", children: "Values: " }),
|
|
7472
|
+
/* @__PURE__ */ jsx48(
|
|
7408
7473
|
"input",
|
|
7409
7474
|
{
|
|
7410
7475
|
title: `Inputfiltertest-${index}`,
|
|
@@ -7425,8 +7490,8 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7425
7490
|
] }, index)
|
|
7426
7491
|
] }, `headCell-${index}`);
|
|
7427
7492
|
});
|
|
7428
|
-
const rows = !currentPageData?.length || noRowsOpen ? /* @__PURE__ */
|
|
7429
|
-
return /* @__PURE__ */
|
|
7493
|
+
const rows = !currentPageData?.length || noRowsOpen ? /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48("td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : currentPageData?.map((item) => /* @__PURE__ */ jsx48("tr", { children: columns.map((column, index2) => {
|
|
7494
|
+
return /* @__PURE__ */ jsx48(StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ jsx48(
|
|
7430
7495
|
StyledInput,
|
|
7431
7496
|
{
|
|
7432
7497
|
title: `styledRow-${item.id}-${column.key}-${index2}`,
|
|
@@ -7443,14 +7508,14 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7443
7508
|
},
|
|
7444
7509
|
autoFocus: true
|
|
7445
7510
|
}
|
|
7446
|
-
) : /* @__PURE__ */
|
|
7511
|
+
) : /* @__PURE__ */ jsx48("span", { title: `spanRow-${item.id}-${column.key}-${index2}`, onDoubleClick: () => handleEdit(item.id, item[column.key], column.key), children: item[column.key] }) }, index2);
|
|
7447
7512
|
}) }, item.id));
|
|
7448
7513
|
return /* @__PURE__ */ jsxs27("div", { id, children: [
|
|
7449
|
-
/* @__PURE__ */
|
|
7450
|
-
/* @__PURE__ */
|
|
7451
|
-
/* @__PURE__ */
|
|
7514
|
+
/* @__PURE__ */ jsx48(StyledBoxDiv, { title: "StyledBoxDiv", children: /* @__PURE__ */ jsxs27(StyledTableTwo, { title: "StyledTable", children: [
|
|
7515
|
+
/* @__PURE__ */ jsx48("thead", { children: /* @__PURE__ */ jsx48("tr", { children: headers }) }),
|
|
7516
|
+
/* @__PURE__ */ jsx48("tbody", { children: rows })
|
|
7452
7517
|
] }) }),
|
|
7453
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ jsx48(StyledNavBoxDiv, { children: /* @__PURE__ */ jsx48(WavelengthDefaultPagination_default, { totalPages, currentPageNumber: currentPage, onPageChange: setCurrentPage, style: "circular" }) })
|
|
7454
7519
|
] });
|
|
7455
7520
|
};
|
|
7456
7521
|
WavelengthDataTable.displayName = "WavelengthDataTable";
|
|
@@ -7458,7 +7523,7 @@ WavelengthDataTable.displayName = "WavelengthDataTable";
|
|
|
7458
7523
|
// src/components/DataTable/SubRowTable/ChildSubTable.tsx
|
|
7459
7524
|
import { useMemo as useMemo3, useState as useState10, Fragment as Fragment13 } from "react";
|
|
7460
7525
|
import styled10 from "styled-components";
|
|
7461
|
-
import { Fragment as Fragment14, jsx as
|
|
7526
|
+
import { Fragment as Fragment14, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7462
7527
|
var TableContainer = styled10.div`
|
|
7463
7528
|
width: 1200px;
|
|
7464
7529
|
border-radius: 16px;
|
|
@@ -7695,18 +7760,18 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7695
7760
|
return result;
|
|
7696
7761
|
}, [data, sortKey, sortOrder, sortSubKey, sortSubOrder]);
|
|
7697
7762
|
const renderSortButton = (column, sortOrder2, sortKey2) => {
|
|
7698
|
-
return sortKey2 === column.key ? sortOrder2 === "asc" ? /* @__PURE__ */
|
|
7763
|
+
return sortKey2 === column.key ? sortOrder2 === "asc" ? /* @__PURE__ */ jsx49(Fragment14, { children: /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "black", onClick: () => toggleSortOrder(column.key), children: [
|
|
7699
7764
|
column.title,
|
|
7700
7765
|
" ",
|
|
7701
|
-
/* @__PURE__ */
|
|
7702
|
-
] }) }) : /* @__PURE__ */
|
|
7766
|
+
/* @__PURE__ */ jsx49("svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "white" }) })
|
|
7767
|
+
] }) }) : /* @__PURE__ */ jsx49(Fragment14, { children: /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "black", onClick: () => toggleSortOrder(column.key), children: [
|
|
7703
7768
|
column.title,
|
|
7704
7769
|
" ",
|
|
7705
|
-
/* @__PURE__ */
|
|
7706
|
-
] }) }) : /* @__PURE__ */
|
|
7770
|
+
/* @__PURE__ */ jsx49("svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M13.2375 9.2627L7.5 3.5377L1.7625 9.2627L0 7.5002L7.5 0.000196457L15 7.5002L13.2375 9.2627Z", fill: "white" }) })
|
|
7771
|
+
] }) }) : /* @__PURE__ */ jsx49(Fragment14, { children: /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "black", onClick: () => toggleSortOrder(column.key), children: [
|
|
7707
7772
|
column.title,
|
|
7708
7773
|
" ",
|
|
7709
|
-
/* @__PURE__ */
|
|
7774
|
+
/* @__PURE__ */ jsx49("svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "white" }) })
|
|
7710
7775
|
] }) });
|
|
7711
7776
|
};
|
|
7712
7777
|
const renderSortSubButton = (column, sortSubOrder2, sortSubKey2) => {
|
|
@@ -7714,26 +7779,26 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7714
7779
|
return sortSubKey2 === columnKey ? sortSubOrder2 === "asc" ? /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
|
|
7715
7780
|
column.title,
|
|
7716
7781
|
" ",
|
|
7717
|
-
/* @__PURE__ */
|
|
7782
|
+
/* @__PURE__ */ jsx49("svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "white" }) })
|
|
7718
7783
|
] }) : /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
|
|
7719
7784
|
column.title,
|
|
7720
7785
|
" ",
|
|
7721
|
-
/* @__PURE__ */
|
|
7786
|
+
/* @__PURE__ */ jsx49("svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M13.2375 9.2627L7.5 3.5377L1.7625 9.2627L0 7.5002L7.5 0.000196457L15 7.5002L13.2375 9.2627Z", fill: "white" }) })
|
|
7722
7787
|
] }) : /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
|
|
7723
7788
|
column.title,
|
|
7724
7789
|
" ",
|
|
7725
|
-
/* @__PURE__ */
|
|
7790
|
+
/* @__PURE__ */ jsx49("svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "white" }) })
|
|
7726
7791
|
] });
|
|
7727
7792
|
};
|
|
7728
7793
|
const headers = HeadColumns.map((column) => {
|
|
7729
|
-
return /* @__PURE__ */
|
|
7794
|
+
return /* @__PURE__ */ jsx49(TableHeaderCell, { children: renderSortButton(column, sortOrder, sortKey) }, `HeaderCell-${column.key}`);
|
|
7730
7795
|
});
|
|
7731
7796
|
const SubDataHeaders = SubDataColumns.map((column, index) => {
|
|
7732
|
-
return /* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ jsx49("th", { children: renderSortSubButton(column, sortSubOrder, sortSubKey) }, `SubHeadCell-${index}`);
|
|
7733
7798
|
});
|
|
7734
7799
|
const subDataRows = (itemId) => {
|
|
7735
|
-
return processedRowData.filter((item) => item.Details?.relationId === itemId).map((item) => /* @__PURE__ */
|
|
7736
|
-
/* @__PURE__ */
|
|
7800
|
+
return processedRowData.filter((item) => item.Details?.relationId === itemId).map((item) => /* @__PURE__ */ jsx49(Fragment13, { children: item.Details?.fileObjects.map((fileItem, index) => /* @__PURE__ */ jsxs28(SubDataTableBodyRowContainer, { children: [
|
|
7801
|
+
/* @__PURE__ */ jsx49("td", { children: /* @__PURE__ */ jsx49(DownloadArrow, { onClick: downloadArrowOnClick, children: /* @__PURE__ */ jsx49("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49(
|
|
7737
7802
|
"path",
|
|
7738
7803
|
{
|
|
7739
7804
|
d: "M8.5 12L3.5 7L4.9 5.55L7.5 8.15V0H9.5V8.15L12.1 5.55L13.5 7L8.5 12ZM2.5 16C1.95 16 1.47917 15.8042 1.0875 15.4125C0.695833 15.0208 0.5 14.55 0.5 14V11H2.5V14H14.5V11H16.5V14C16.5 14.55 16.3042 15.0208 15.9125 15.4125C15.5208 15.8042 15.05 16 14.5 16H2.5Z",
|
|
@@ -7744,45 +7809,45 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7744
7809
|
const columnKey = trimBeforePeriod2(column.key);
|
|
7745
7810
|
const value = fileItem[columnKey];
|
|
7746
7811
|
if (value !== void 0) {
|
|
7747
|
-
return /* @__PURE__ */
|
|
7812
|
+
return /* @__PURE__ */ jsx49(SubDataTableCell, { children: /* @__PURE__ */ jsx49("span", { children: value }, `span-${item.Details?.relationId}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${item.Details?.relationId}-${fileItem.id}-${index}-${column.title}`);
|
|
7748
7813
|
}
|
|
7749
7814
|
})
|
|
7750
7815
|
] }, `${item}-${item.Details?.relationId}-${fileItem.id}-${index}`)) }, `SDR-${item.id}-${item.Details?.relationId}`));
|
|
7751
7816
|
};
|
|
7752
7817
|
const dataRows = processedRowData?.map((item, index) => /* @__PURE__ */ jsxs28(BodyRowContainer, { children: [
|
|
7753
|
-
/* @__PURE__ */
|
|
7818
|
+
/* @__PURE__ */ jsx49(TableRow, { $amountofColumns: HeadColumns.length, children: HeadColumns.map((column) => /* @__PURE__ */ jsx49(TableBodyCell, { $primaryBoldState: column.PrimaryBoldText, children: item[column.key] }, `TableBodycell-${item.id}-${column.key}`)) }),
|
|
7754
7819
|
/* @__PURE__ */ jsxs28(ButtonStylingRow, { children: [
|
|
7755
|
-
/* @__PURE__ */
|
|
7756
|
-
/* @__PURE__ */
|
|
7820
|
+
/* @__PURE__ */ jsx49(DownloadMissionButton, { onClick: downloadMissionOnClick, children: "Download Mission" }),
|
|
7821
|
+
/* @__PURE__ */ jsx49(AddButton, { onClick: addFilesOnClick, children: "Add files" })
|
|
7757
7822
|
] }),
|
|
7758
|
-
openRow !== item.id && /* @__PURE__ */
|
|
7823
|
+
openRow !== item.id && /* @__PURE__ */ jsx49(BottomArrowBar, { onClick: () => toggleDropdown(item.id), children: /* @__PURE__ */ jsx49("svg", { width: "92", height: "14", viewBox: "0 0 92 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M64 0L44 6L24 0H0L44 14L92 0H64Z", fill: "#7A7A7A" }) }) }),
|
|
7759
7824
|
openRow === item.id && /* @__PURE__ */ jsxs28("div", { children: [
|
|
7760
7825
|
/* @__PURE__ */ jsxs28(SubDataTable, { children: [
|
|
7761
|
-
/* @__PURE__ */
|
|
7762
|
-
/* @__PURE__ */
|
|
7826
|
+
/* @__PURE__ */ jsx49(SubDataHeaderColumn, { children: /* @__PURE__ */ jsxs28(SubDataTableHeaderRow, { children: [
|
|
7827
|
+
/* @__PURE__ */ jsx49("th", {}),
|
|
7763
7828
|
SubDataHeaders
|
|
7764
7829
|
] }) }),
|
|
7765
|
-
/* @__PURE__ */
|
|
7830
|
+
/* @__PURE__ */ jsx49(SubDataTableBodyRow, { children: subDataRows(item.id) })
|
|
7766
7831
|
] }),
|
|
7767
|
-
/* @__PURE__ */
|
|
7832
|
+
/* @__PURE__ */ jsx49(BottomUpArrowBar, { onClick: () => toggleUpward(), children: /* @__PURE__ */ jsx49("svg", { width: "92", height: "14", viewBox: "0 0 92 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49("path", { d: "M64 14L44 8L24 14H0L44 0L92 14H64Z", fill: "#7A7A7A" }) }) })
|
|
7768
7833
|
] })
|
|
7769
7834
|
] }, `Bodycontainer-${item.id}-${index}`));
|
|
7770
7835
|
return /* @__PURE__ */ jsxs28(TableContainer, { children: [
|
|
7771
|
-
/* @__PURE__ */
|
|
7772
|
-
/* @__PURE__ */
|
|
7836
|
+
/* @__PURE__ */ jsx49(TablePrimaryRow, { $amountofColumns: HeadColumns.length, children: headers }),
|
|
7837
|
+
/* @__PURE__ */ jsx49("div", { title: "tablebodies", children: dataRows })
|
|
7773
7838
|
] });
|
|
7774
7839
|
};
|
|
7775
7840
|
ChildDataTable.displayName = "ChildDataTable";
|
|
7776
7841
|
|
|
7777
7842
|
// src/components/DataTable/SubRowTable/ChildDataTable.tsx
|
|
7778
|
-
import { useRef as
|
|
7843
|
+
import { useRef as useRef19, useEffect as useEffect20 } from "react";
|
|
7779
7844
|
import "@wavelengthusaf/web-components";
|
|
7780
7845
|
import { createRoot } from "react-dom/client";
|
|
7781
|
-
import { jsx as
|
|
7846
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
7782
7847
|
var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdownButtonIcon, ...rest }) => {
|
|
7783
|
-
const tableRef =
|
|
7784
|
-
const reactDropdownRoots =
|
|
7785
|
-
|
|
7848
|
+
const tableRef = useRef19(null);
|
|
7849
|
+
const reactDropdownRoots = useRef19(/* @__PURE__ */ new Map());
|
|
7850
|
+
useEffect20(() => {
|
|
7786
7851
|
const customChildDataTableElement = tableRef.current;
|
|
7787
7852
|
if (!customChildDataTableElement) return;
|
|
7788
7853
|
if (columns !== void 0) customChildDataTableElement.setColumns = columns;
|
|
@@ -7791,7 +7856,7 @@ var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdow
|
|
|
7791
7856
|
if (sortIcon !== void 0) customChildDataTableElement.setSortIcon = sortIcon;
|
|
7792
7857
|
if (dropdownButtonIcon !== void 0) customChildDataTableElement.setDropdownButtonIcon = dropdownButtonIcon;
|
|
7793
7858
|
}, [columns, data, dropdownArrowLocation, sortIcon, dropdownButtonIcon]);
|
|
7794
|
-
|
|
7859
|
+
useEffect20(() => {
|
|
7795
7860
|
const el = tableRef.current;
|
|
7796
7861
|
if (!el) return;
|
|
7797
7862
|
const handleReactDropdown = (event) => {
|
|
@@ -7828,7 +7893,7 @@ var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdow
|
|
|
7828
7893
|
el.removeEventListener("cleanupDropdown", handleCleanupDropdown);
|
|
7829
7894
|
};
|
|
7830
7895
|
}, [data]);
|
|
7831
|
-
return /* @__PURE__ */
|
|
7896
|
+
return /* @__PURE__ */ jsx50("wavelength-child-data-table", { ref: tableRef, ...rest });
|
|
7832
7897
|
};
|
|
7833
7898
|
ChildDataTable2.displayName = "ChildDataTable";
|
|
7834
7899
|
|
|
@@ -7838,7 +7903,7 @@ import { ChildDataTable as ChildDataTable3 } from "@wavelengthusaf/web-component
|
|
|
7838
7903
|
// src/components/DataTable/NestedDataTable/NestedDataTable.tsx
|
|
7839
7904
|
import { useState as useState11 } from "react";
|
|
7840
7905
|
import styled11 from "styled-components";
|
|
7841
|
-
import { Fragment as Fragment15, jsx as
|
|
7906
|
+
import { Fragment as Fragment15, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7842
7907
|
var TableStyle = styled11.table`
|
|
7843
7908
|
width: 100%;
|
|
7844
7909
|
height: 100%;
|
|
@@ -7925,46 +7990,46 @@ var NestedDataTable = ({ data, columns, id }) => {
|
|
|
7925
7990
|
setPrimaryRowIndex(rowIndex);
|
|
7926
7991
|
};
|
|
7927
7992
|
const headers = HeadColumns.map((column, index) => {
|
|
7928
|
-
return /* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ jsx51(MainThHeaders, { children: column.title }, `headCell-${index}`);
|
|
7929
7994
|
});
|
|
7930
7995
|
const SubDataHeaders = SubDataColumns.map((column, index) => {
|
|
7931
|
-
return /* @__PURE__ */
|
|
7996
|
+
return /* @__PURE__ */ jsx51("th", { children: column.title }, `SubHeadCell-${index}`);
|
|
7932
7997
|
});
|
|
7933
|
-
const subDataRows = !data?.length ? /* @__PURE__ */
|
|
7998
|
+
const subDataRows = !data?.length ? /* @__PURE__ */ jsx51("tr", { children: /* @__PURE__ */ jsx51("td", { title: "NoSubDataRows", colSpan: columns.length, children: "No data" }) }) : data.map((item, index) => /* @__PURE__ */ jsx51(Fragment15, { children: /* @__PURE__ */ jsx51(SubDataTr, { children: SubDataColumns.map((column, colIndex) => {
|
|
7934
7999
|
const columnKey = trimBeforePeriod(column.key);
|
|
7935
8000
|
const value = item.Details?.[columnKey];
|
|
7936
8001
|
console.log("value: ", value);
|
|
7937
8002
|
if (value !== void 0) {
|
|
7938
|
-
return /* @__PURE__ */
|
|
8003
|
+
return /* @__PURE__ */ jsx51("td", { children: /* @__PURE__ */ jsx51("span", { children: value }) }, `Span-${item.id}-${colIndex}`);
|
|
7939
8004
|
}
|
|
7940
8005
|
}) }, `Sub-${item.id}-${index}`) }));
|
|
7941
8006
|
const childRows = /* @__PURE__ */ jsxs29(SubTableStyle, { children: [
|
|
7942
|
-
/* @__PURE__ */
|
|
7943
|
-
/* @__PURE__ */
|
|
8007
|
+
/* @__PURE__ */ jsx51("thead", { children: /* @__PURE__ */ jsx51("tr", { children: SubDataHeaders }) }),
|
|
8008
|
+
/* @__PURE__ */ jsx51("tbody", { children: subDataRows })
|
|
7944
8009
|
] });
|
|
7945
|
-
const rows = !data?.length ? /* @__PURE__ */
|
|
8010
|
+
const rows = !data?.length ? /* @__PURE__ */ jsx51("tr", { children: /* @__PURE__ */ jsx51("td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : data?.map((item, index) => /* @__PURE__ */ jsxs29(Fragment15, { children: [
|
|
7946
8011
|
/* @__PURE__ */ jsxs29(PrimaryTrRows, { $index: index, children: [
|
|
7947
|
-
/* @__PURE__ */
|
|
8012
|
+
/* @__PURE__ */ jsx51(DropdownButton, { onClick: () => toggleDropdown(index), children: isAscending && isOpen && primaryRowIndex === index ? /* @__PURE__ */ jsx51(Fragment15, { children: "\u2227" }) : /* @__PURE__ */ jsx51(Fragment15, { children: "\u2228" }) }),
|
|
7948
8013
|
HeadColumns.map((column, index2) => {
|
|
7949
|
-
return /* @__PURE__ */
|
|
8014
|
+
return /* @__PURE__ */ jsx51(PrimaryTdSpan, { children: /* @__PURE__ */ jsx51("span", { title: `spanRow-${item.id}-${column.key}-${index2}`, children: item[column.key] }) }, `${item.id}-${index}=${index2}`);
|
|
7950
8015
|
})
|
|
7951
8016
|
] }, index),
|
|
7952
|
-
isOpen && primaryRowIndex === index && /* @__PURE__ */
|
|
8017
|
+
isOpen && primaryRowIndex === index && /* @__PURE__ */ jsx51(SubTrRows, { $index: index, children: /* @__PURE__ */ jsx51("td", { colSpan: HeadColumns.length + 1, children: childRows }) }, index)
|
|
7953
8018
|
] }));
|
|
7954
|
-
return /* @__PURE__ */
|
|
7955
|
-
/* @__PURE__ */
|
|
7956
|
-
/* @__PURE__ */
|
|
8019
|
+
return /* @__PURE__ */ jsx51("div", { id, children: /* @__PURE__ */ jsxs29(TableStyle, { children: [
|
|
8020
|
+
/* @__PURE__ */ jsx51("thead", { children: /* @__PURE__ */ jsxs29("tr", { children: [
|
|
8021
|
+
/* @__PURE__ */ jsx51("th", { title: "dropdownth" }),
|
|
7957
8022
|
headers
|
|
7958
8023
|
] }) }),
|
|
7959
|
-
/* @__PURE__ */
|
|
8024
|
+
/* @__PURE__ */ jsx51("tbody", { children: rows })
|
|
7960
8025
|
] }) });
|
|
7961
8026
|
};
|
|
7962
8027
|
NestedDataTable.displayName = "NestedDataTable";
|
|
7963
8028
|
|
|
7964
8029
|
// src/components/AutoComplete/WavelengthAutoComplete.tsx
|
|
7965
|
-
import { useEffect as
|
|
8030
|
+
import { useEffect as useEffect21, useRef as useRef21, useState as useState12 } from "react";
|
|
7966
8031
|
import styled12 from "styled-components";
|
|
7967
|
-
import { Fragment as Fragment16, jsx as
|
|
8032
|
+
import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7968
8033
|
var AutoContainer = styled12.div`
|
|
7969
8034
|
//position: relative;
|
|
7970
8035
|
position: relative;
|
|
@@ -8093,9 +8158,9 @@ var WavelengthAutoComplete = ({
|
|
|
8093
8158
|
placeholder,
|
|
8094
8159
|
onBlurCallback
|
|
8095
8160
|
}) => {
|
|
8096
|
-
const inputRef =
|
|
8097
|
-
const listRef =
|
|
8098
|
-
const noItemListRef =
|
|
8161
|
+
const inputRef = useRef21(null);
|
|
8162
|
+
const listRef = useRef21(null);
|
|
8163
|
+
const noItemListRef = useRef21(null);
|
|
8099
8164
|
const [inputValue, setInputValue] = useState12(placeholder ?? "");
|
|
8100
8165
|
const [suggestions, setSuggestions] = useState12([]);
|
|
8101
8166
|
const [isDropdownVisible, setIsDropdownVisible] = useState12(false);
|
|
@@ -8103,7 +8168,7 @@ var WavelengthAutoComplete = ({
|
|
|
8103
8168
|
const arrayLength = suggestions.length;
|
|
8104
8169
|
const [focusedIndex, setFocusedIndex] = useState12(0);
|
|
8105
8170
|
const idName = id ? id : "auto-comp";
|
|
8106
|
-
|
|
8171
|
+
useEffect21(() => {
|
|
8107
8172
|
const handleClickOutsideList = (event) => {
|
|
8108
8173
|
if (listRef.current && !listRef.current.contains(event.target)) {
|
|
8109
8174
|
setIsDropdownVisible(false);
|
|
@@ -8115,7 +8180,7 @@ var WavelengthAutoComplete = ({
|
|
|
8115
8180
|
};
|
|
8116
8181
|
}, [focusedIndex]);
|
|
8117
8182
|
if (onDataChange !== void 0) {
|
|
8118
|
-
|
|
8183
|
+
useEffect21(() => {
|
|
8119
8184
|
onDataChange(inputValue);
|
|
8120
8185
|
}, [inputValue]);
|
|
8121
8186
|
}
|
|
@@ -8181,9 +8246,9 @@ var WavelengthAutoComplete = ({
|
|
|
8181
8246
|
break;
|
|
8182
8247
|
}
|
|
8183
8248
|
};
|
|
8184
|
-
return /* @__PURE__ */
|
|
8249
|
+
return /* @__PURE__ */ jsx52(Fragment16, { children: /* @__PURE__ */ jsxs30(AutoContainer, { $inputHeight: height2, $inputWidth: width2, children: [
|
|
8185
8250
|
/* @__PURE__ */ jsxs30(InputWrapper, { id: `${idName}-input-wrapper`, $inputHeight: height2, $inputWidth: width2, children: [
|
|
8186
|
-
/* @__PURE__ */
|
|
8251
|
+
/* @__PURE__ */ jsx52(
|
|
8187
8252
|
Input,
|
|
8188
8253
|
{
|
|
8189
8254
|
id: idName,
|
|
@@ -8212,11 +8277,11 @@ var WavelengthAutoComplete = ({
|
|
|
8212
8277
|
autoComplete: "off"
|
|
8213
8278
|
}
|
|
8214
8279
|
),
|
|
8215
|
-
/* @__PURE__ */
|
|
8280
|
+
/* @__PURE__ */ jsx52(Label, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8216
8281
|
] }),
|
|
8217
|
-
isDropdownVisible && /* @__PURE__ */
|
|
8282
|
+
isDropdownVisible && /* @__PURE__ */ jsx52(DropDownList, { id: `${idName}-drop-list`, ref: listRef, $inputWidth: width2, "data-testid": "InputSearchOptionsList", children: suggestHasItems ? (
|
|
8218
8283
|
//suggestions length controls showing the suggestions
|
|
8219
|
-
suggestions.map((item, index) => /* @__PURE__ */
|
|
8284
|
+
suggestions.map((item, index) => /* @__PURE__ */ jsx52(
|
|
8220
8285
|
ActiveListItem,
|
|
8221
8286
|
{
|
|
8222
8287
|
"data-testid": `${idName}-input-search-list-${index + 1}`,
|
|
@@ -8229,15 +8294,15 @@ var WavelengthAutoComplete = ({
|
|
|
8229
8294
|
},
|
|
8230
8295
|
`active-list-item-${item}-${index}`
|
|
8231
8296
|
))
|
|
8232
|
-
) : /* @__PURE__ */
|
|
8297
|
+
) : /* @__PURE__ */ jsx52(NoHoverListItem, { "data-testid": "NoOptionsListitem", ref: noItemListRef, id: "No-Option-List-item", onMouseDown: (e) => e.preventDefault(), children: "No Options found" }) })
|
|
8233
8298
|
] }) });
|
|
8234
8299
|
};
|
|
8235
8300
|
WavelengthAutoComplete.displayName = "WavelengthAutoComplete";
|
|
8236
8301
|
|
|
8237
8302
|
// src/components/inputs/WavelengthDatePicker.tsx
|
|
8238
|
-
import { useEffect as
|
|
8303
|
+
import { useEffect as useEffect22, useState as useState13 } from "react";
|
|
8239
8304
|
import styled13 from "styled-components";
|
|
8240
|
-
import { jsx as
|
|
8305
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8241
8306
|
var Label2 = styled13.label`
|
|
8242
8307
|
position: absolute;
|
|
8243
8308
|
top: 50%;
|
|
@@ -8309,7 +8374,7 @@ var WavelengthDatePicker = ({
|
|
|
8309
8374
|
const [minAdjusted, setMinAdjusted] = useState13("");
|
|
8310
8375
|
const [maxAdjusted, setMaxAdjusted] = useState13("");
|
|
8311
8376
|
const idName = id ? id : "WlDatePick";
|
|
8312
|
-
|
|
8377
|
+
useEffect22(() => {
|
|
8313
8378
|
const minDate = new Date(min || "");
|
|
8314
8379
|
const maxDate = new Date(max || "");
|
|
8315
8380
|
if (inputTimeType === "datetime-local") {
|
|
@@ -8360,7 +8425,7 @@ var WavelengthDatePicker = ({
|
|
|
8360
8425
|
$FocusLabelColor: FocusLabelColor,
|
|
8361
8426
|
$inputBackGroundColor: backgroundColor2,
|
|
8362
8427
|
children: [
|
|
8363
|
-
/* @__PURE__ */
|
|
8428
|
+
/* @__PURE__ */ jsx53(
|
|
8364
8429
|
"input",
|
|
8365
8430
|
{
|
|
8366
8431
|
type: inputType,
|
|
@@ -8381,7 +8446,7 @@ var WavelengthDatePicker = ({
|
|
|
8381
8446
|
max: maxAdjusted
|
|
8382
8447
|
}
|
|
8383
8448
|
),
|
|
8384
|
-
/* @__PURE__ */
|
|
8449
|
+
/* @__PURE__ */ jsx53(Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8385
8450
|
]
|
|
8386
8451
|
}
|
|
8387
8452
|
);
|
|
@@ -8392,9 +8457,9 @@ WavelengthDatePicker.displayName = "WavelengthDatePicker";
|
|
|
8392
8457
|
import { WavelengthDatePicker as WavelengthDatePicker2 } from "@wavelengthusaf/web-components";
|
|
8393
8458
|
|
|
8394
8459
|
// src/components/inputs/WavelengthCheckbox.tsx
|
|
8395
|
-
import { useRef as
|
|
8460
|
+
import { useRef as useRef22, useEffect as useEffect23 } from "react";
|
|
8396
8461
|
import "@wavelengthusaf/web-components";
|
|
8397
|
-
import { jsx as
|
|
8462
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
8398
8463
|
var WavelengthCheckbox = ({
|
|
8399
8464
|
size,
|
|
8400
8465
|
color: color2,
|
|
@@ -8404,8 +8469,8 @@ var WavelengthCheckbox = ({
|
|
|
8404
8469
|
textSize,
|
|
8405
8470
|
...rest
|
|
8406
8471
|
}) => {
|
|
8407
|
-
const ref =
|
|
8408
|
-
|
|
8472
|
+
const ref = useRef22(null);
|
|
8473
|
+
useEffect23(() => {
|
|
8409
8474
|
const el = ref.current;
|
|
8410
8475
|
if (!el) return;
|
|
8411
8476
|
if (size !== void 0) {
|
|
@@ -8429,13 +8494,13 @@ var WavelengthCheckbox = ({
|
|
|
8429
8494
|
el.setAttribute("text-size", textSize);
|
|
8430
8495
|
}
|
|
8431
8496
|
}, [size, color2, theme, disabled, text, textSize]);
|
|
8432
|
-
return /* @__PURE__ */
|
|
8497
|
+
return /* @__PURE__ */ jsx54("wavelength-checkbox", { ref, ...rest });
|
|
8433
8498
|
};
|
|
8434
8499
|
WavelengthCheckbox.displayName = "WavelengthCheckbox";
|
|
8435
8500
|
|
|
8436
8501
|
// src/components/samples/SampleComponent.tsx
|
|
8437
|
-
import { useRef as
|
|
8438
|
-
import { jsx as
|
|
8502
|
+
import { useRef as useRef23, useEffect as useEffect24 } from "react";
|
|
8503
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
8439
8504
|
var SampleComponent = ({
|
|
8440
8505
|
testProp,
|
|
8441
8506
|
children,
|
|
@@ -8444,8 +8509,8 @@ var SampleComponent = ({
|
|
|
8444
8509
|
...rest
|
|
8445
8510
|
// This rest operator includes className, style, onClick, etc.
|
|
8446
8511
|
}) => {
|
|
8447
|
-
const ref =
|
|
8448
|
-
|
|
8512
|
+
const ref = useRef23(null);
|
|
8513
|
+
useEffect24(() => {
|
|
8449
8514
|
const el = ref.current;
|
|
8450
8515
|
if (!el) return;
|
|
8451
8516
|
el.customStyles = customStyle2;
|
|
@@ -8453,14 +8518,14 @@ var SampleComponent = ({
|
|
|
8453
8518
|
el.setAttribute("test-prop", testProp);
|
|
8454
8519
|
}
|
|
8455
8520
|
}, [testProp]);
|
|
8456
|
-
return /* @__PURE__ */
|
|
8521
|
+
return /* @__PURE__ */ jsx55("sample-component", { ref, ...rest, children });
|
|
8457
8522
|
};
|
|
8458
8523
|
SampleComponent.displayName = "SampleComponent";
|
|
8459
8524
|
|
|
8460
8525
|
// src/components/NotificationPanel/WavelengthNotificationPanel.tsx
|
|
8461
|
-
import { useRef as
|
|
8526
|
+
import { useRef as useRef24, useEffect as useEffect25 } from "react";
|
|
8462
8527
|
import "@wavelengthusaf/web-components";
|
|
8463
|
-
import { jsx as
|
|
8528
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
8464
8529
|
var WavelengthNotificationPanel = ({
|
|
8465
8530
|
notifications,
|
|
8466
8531
|
darkMode,
|
|
@@ -8469,8 +8534,8 @@ var WavelengthNotificationPanel = ({
|
|
|
8469
8534
|
...rest
|
|
8470
8535
|
// This rest operator includes className, style, onClick, etc.
|
|
8471
8536
|
}) => {
|
|
8472
|
-
const ref =
|
|
8473
|
-
|
|
8537
|
+
const ref = useRef24(null);
|
|
8538
|
+
useEffect25(() => {
|
|
8474
8539
|
const el = ref.current;
|
|
8475
8540
|
if (!el) return;
|
|
8476
8541
|
if (notifications !== void 0) {
|
|
@@ -8489,18 +8554,18 @@ var WavelengthNotificationPanel = ({
|
|
|
8489
8554
|
el.accountLink = accountLink;
|
|
8490
8555
|
}
|
|
8491
8556
|
}, [notifications, darkMode, rest.onMarkAsRead, rest.onSignOut, accountLink]);
|
|
8492
|
-
return /* @__PURE__ */
|
|
8557
|
+
return /* @__PURE__ */ jsx56("wavelength-notification-panel", { ref, ...rest, children });
|
|
8493
8558
|
};
|
|
8494
8559
|
|
|
8495
8560
|
// src/index.ts
|
|
8496
8561
|
import { SampleComponent as SampleComponent2 } from "@wavelengthusaf/web-components";
|
|
8497
8562
|
|
|
8498
8563
|
// src/components/MultiSelect/WavelengthMultiSelectAutocomplete.tsx
|
|
8499
|
-
import { useEffect as
|
|
8500
|
-
import { jsx as
|
|
8564
|
+
import { useEffect as useEffect26, useRef as useRef25 } from "react";
|
|
8565
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
8501
8566
|
var WavelengthMultiSelectAutocomplete = ({ options, placeholder = "Select Options", label, name, style: style3, onChange, value, disabled, ...rest }) => {
|
|
8502
|
-
const componentRef =
|
|
8503
|
-
|
|
8567
|
+
const componentRef = useRef25(null);
|
|
8568
|
+
useEffect26(() => {
|
|
8504
8569
|
const component = componentRef.current;
|
|
8505
8570
|
if (!component) return;
|
|
8506
8571
|
const handleValueChange = (event) => {
|
|
@@ -8513,7 +8578,7 @@ var WavelengthMultiSelectAutocomplete = ({ options, placeholder = "Select Option
|
|
|
8513
8578
|
component.removeEventListener("change", handleValueChange);
|
|
8514
8579
|
};
|
|
8515
8580
|
}, [onChange]);
|
|
8516
|
-
|
|
8581
|
+
useEffect26(() => {
|
|
8517
8582
|
const component = componentRef.current;
|
|
8518
8583
|
if (!component) return;
|
|
8519
8584
|
if (placeholder) component.setAttribute("placeholder", placeholder);
|
|
@@ -8523,13 +8588,13 @@ var WavelengthMultiSelectAutocomplete = ({ options, placeholder = "Select Option
|
|
|
8523
8588
|
if (options) component.autocompleteOptions = options;
|
|
8524
8589
|
if (style3) component.customStyles = style3;
|
|
8525
8590
|
}, [options, placeholder, name, label, style3]);
|
|
8526
|
-
|
|
8591
|
+
useEffect26(() => {
|
|
8527
8592
|
const component = componentRef.current;
|
|
8528
8593
|
if (component && value) {
|
|
8529
8594
|
component.value = value;
|
|
8530
8595
|
}
|
|
8531
8596
|
}, [value]);
|
|
8532
|
-
return /* @__PURE__ */
|
|
8597
|
+
return /* @__PURE__ */ jsx57("wavelength-multi-select-autocomplete", { ref: componentRef, ...rest });
|
|
8533
8598
|
};
|
|
8534
8599
|
|
|
8535
8600
|
// src/index.ts
|
|
@@ -8583,6 +8648,8 @@ export {
|
|
|
8583
8648
|
WavelengthNavBar,
|
|
8584
8649
|
WavelengthNotAvailablePage,
|
|
8585
8650
|
WavelengthNotificationPanel,
|
|
8651
|
+
WavelengthPagination,
|
|
8652
|
+
WavelengthPagination2 as WavelengthPaginationElement,
|
|
8586
8653
|
WavelengthPermissionAlert,
|
|
8587
8654
|
WavelengthPlaneTrail,
|
|
8588
8655
|
WavelengthPopUpMenu,
|
|
@@ -8603,10 +8670,8 @@ export {
|
|
|
8603
8670
|
WavelengthToolTip,
|
|
8604
8671
|
WavelengthWebSnackbar,
|
|
8605
8672
|
add,
|
|
8606
|
-
ascendingRange,
|
|
8607
8673
|
concat,
|
|
8608
8674
|
findBestStringMatch,
|
|
8609
|
-
range,
|
|
8610
8675
|
useOutsideClick,
|
|
8611
8676
|
useThemeContext
|
|
8612
8677
|
};
|