@wavelengthusaf/components 4.7.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 +514 -383
- package/dist/cjs/index.d.cts +51 -18
- package/dist/esm/index.d.ts +51 -18
- package/dist/esm/index.js +673 -542
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -6217,20 +6217,449 @@ var WavelengthDropdown = forwardRef((props, ref) => {
|
|
|
6217
6217
|
});
|
|
6218
6218
|
WavelengthDropdown.displayName = "WavelengthDropdown";
|
|
6219
6219
|
|
|
6220
|
+
// src/components/modals/WavelengthMenu.tsx
|
|
6221
|
+
import { useRef as useRef14, useEffect as useEffect13 } from "react";
|
|
6222
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6223
|
+
var WavelengthMenu = ({
|
|
6224
|
+
backgroundColor: backgroundColor2,
|
|
6225
|
+
textColor,
|
|
6226
|
+
font,
|
|
6227
|
+
fontSize,
|
|
6228
|
+
border: border2,
|
|
6229
|
+
padding: padding2,
|
|
6230
|
+
borderRadius: borderRadius2,
|
|
6231
|
+
selectedColor,
|
|
6232
|
+
disabledColor,
|
|
6233
|
+
items,
|
|
6234
|
+
WavelengthMenuSelect,
|
|
6235
|
+
...rest
|
|
6236
|
+
// This rest operator includes className, style, onClick, etc.
|
|
6237
|
+
}) => {
|
|
6238
|
+
const ref = useRef14(null);
|
|
6239
|
+
const syncAttribute = (attribute, value) => {
|
|
6240
|
+
const el = ref.current;
|
|
6241
|
+
if (!el) return;
|
|
6242
|
+
el.setAttribute(attribute, value);
|
|
6243
|
+
};
|
|
6244
|
+
useEffect13(() => {
|
|
6245
|
+
const el = ref.current;
|
|
6246
|
+
if (!el) return;
|
|
6247
|
+
syncAttribute("background-color", backgroundColor2 || "");
|
|
6248
|
+
syncAttribute("text-color", textColor || "");
|
|
6249
|
+
syncAttribute("font", font || "");
|
|
6250
|
+
syncAttribute("font-size", fontSize || "");
|
|
6251
|
+
syncAttribute("border", border2 || "");
|
|
6252
|
+
syncAttribute("padding", padding2 || "");
|
|
6253
|
+
syncAttribute("border-radius", borderRadius2 || "");
|
|
6254
|
+
syncAttribute("selected-color", selectedColor || "");
|
|
6255
|
+
syncAttribute("disabled-color", disabledColor || "");
|
|
6256
|
+
syncAttribute("items", JSON.stringify(items) || "");
|
|
6257
|
+
const handleSelect = (event) => {
|
|
6258
|
+
if (WavelengthMenuSelect) WavelengthMenuSelect(event.detail);
|
|
6259
|
+
};
|
|
6260
|
+
el.addEventListener("wavelength-menu-select", handleSelect);
|
|
6261
|
+
return () => {
|
|
6262
|
+
el.removeEventListener("wavelength-menu-select", handleSelect);
|
|
6263
|
+
};
|
|
6264
|
+
}, [backgroundColor2, textColor, font, fontSize, border2, padding2, borderRadius2, selectedColor, disabledColor, items, WavelengthMenuSelect]);
|
|
6265
|
+
return /* @__PURE__ */ jsx36(
|
|
6266
|
+
"wavelength-menu",
|
|
6267
|
+
{
|
|
6268
|
+
ref,
|
|
6269
|
+
"background-color": backgroundColor2,
|
|
6270
|
+
"text-color": textColor,
|
|
6271
|
+
font,
|
|
6272
|
+
"font-size": fontSize,
|
|
6273
|
+
border: border2,
|
|
6274
|
+
padding: padding2,
|
|
6275
|
+
"border-radius": borderRadius2,
|
|
6276
|
+
"selected-color": selectedColor,
|
|
6277
|
+
"disabled-color": disabledColor,
|
|
6278
|
+
items: JSON.stringify(items),
|
|
6279
|
+
...rest
|
|
6280
|
+
}
|
|
6281
|
+
);
|
|
6282
|
+
};
|
|
6283
|
+
WavelengthMenu.displayName = "WavelengthMenu";
|
|
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
|
+
|
|
6220
6649
|
// src/components/snackbars/WavelengthSnackbar.tsx
|
|
6221
6650
|
import Snackbar from "@mui/material/Snackbar";
|
|
6222
6651
|
import SnackbarContent from "@mui/material/SnackbarContent";
|
|
6223
6652
|
import CloseIcon2 from "@mui/icons-material/Close";
|
|
6224
6653
|
import { IconButton as IconButton6 } from "@mui/material";
|
|
6225
|
-
import { jsx as
|
|
6654
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6226
6655
|
function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor, textColor, horryAlign, vertyAlign, durationSb, width: width2, icon, id }) {
|
|
6227
6656
|
const handleClose = () => {
|
|
6228
6657
|
setShow(false);
|
|
6229
6658
|
};
|
|
6230
|
-
const defaultIcon = /* @__PURE__ */
|
|
6659
|
+
const defaultIcon = /* @__PURE__ */ jsx41(IconButton6, { size: "small", "aria-label": "close", color: "inherit", children: /* @__PURE__ */ jsx41(CloseIcon2, { fontSize: "small" }) });
|
|
6231
6660
|
const palette2 = getPalette();
|
|
6232
6661
|
const durationMs = durationSb ? durationSb * 1e3 : 4e3;
|
|
6233
|
-
return /* @__PURE__ */
|
|
6662
|
+
return /* @__PURE__ */ jsx41(
|
|
6234
6663
|
Snackbar,
|
|
6235
6664
|
{
|
|
6236
6665
|
id,
|
|
@@ -6241,7 +6670,7 @@ function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor,
|
|
|
6241
6670
|
vertical: vertyAlign ? vertyAlign : "bottom",
|
|
6242
6671
|
horizontal: horryAlign ? horryAlign : "center"
|
|
6243
6672
|
},
|
|
6244
|
-
children: /* @__PURE__ */
|
|
6673
|
+
children: /* @__PURE__ */ jsx41(
|
|
6245
6674
|
SnackbarContent,
|
|
6246
6675
|
{
|
|
6247
6676
|
style: {
|
|
@@ -6250,11 +6679,11 @@ function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor,
|
|
|
6250
6679
|
display: "flex",
|
|
6251
6680
|
width: width2
|
|
6252
6681
|
},
|
|
6253
|
-
message: /* @__PURE__ */
|
|
6254
|
-
/* @__PURE__ */
|
|
6255
|
-
/* @__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" })
|
|
6256
6685
|
] }),
|
|
6257
|
-
action: /* @__PURE__ */
|
|
6686
|
+
action: /* @__PURE__ */ jsx41("div", { style: { display: "flex", justifyContent: "center" }, onClick: handleClose, children: closeIcon ? closeIcon : defaultIcon })
|
|
6258
6687
|
}
|
|
6259
6688
|
)
|
|
6260
6689
|
}
|
|
@@ -6265,7 +6694,7 @@ WavelengthSnackbar.displayName = "WavelengthSnackbar";
|
|
|
6265
6694
|
// src/components/snackbars/WavelengthStandardSnackbar.tsx
|
|
6266
6695
|
import Snackbar2 from "@mui/material/Snackbar";
|
|
6267
6696
|
import SnackbarContent2 from "@mui/material/SnackbarContent";
|
|
6268
|
-
import { jsx as
|
|
6697
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6269
6698
|
function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign, durationSb, width: width2, message, customVertyAlign, toggleShow, closeIcon, id }) {
|
|
6270
6699
|
const handleClose = () => {
|
|
6271
6700
|
toggleShow(false);
|
|
@@ -6280,7 +6709,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6280
6709
|
bgColor = "#737373";
|
|
6281
6710
|
}
|
|
6282
6711
|
const sIcon = icon ? icon : "";
|
|
6283
|
-
return /* @__PURE__ */
|
|
6712
|
+
return /* @__PURE__ */ jsx42(
|
|
6284
6713
|
Snackbar2,
|
|
6285
6714
|
{
|
|
6286
6715
|
id,
|
|
@@ -6292,7 +6721,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6292
6721
|
vertical: vertyAlign ? vertyAlign : "top",
|
|
6293
6722
|
horizontal: horryAlign ? horryAlign : "center"
|
|
6294
6723
|
},
|
|
6295
|
-
children: /* @__PURE__ */
|
|
6724
|
+
children: /* @__PURE__ */ jsx42(
|
|
6296
6725
|
SnackbarContent2,
|
|
6297
6726
|
{
|
|
6298
6727
|
style: {
|
|
@@ -6301,7 +6730,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6301
6730
|
//color: props.textColor ? props.textColor : palette.secondary,
|
|
6302
6731
|
},
|
|
6303
6732
|
sx: { paddingTop: "0px", paddingBottom: "0px" },
|
|
6304
|
-
message: /* @__PURE__ */
|
|
6733
|
+
message: /* @__PURE__ */ jsxs23(
|
|
6305
6734
|
"div",
|
|
6306
6735
|
{
|
|
6307
6736
|
style: {
|
|
@@ -6310,11 +6739,11 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
|
|
|
6310
6739
|
width: width2
|
|
6311
6740
|
},
|
|
6312
6741
|
children: [
|
|
6313
|
-
/* @__PURE__ */
|
|
6314
|
-
/* @__PURE__ */
|
|
6315
|
-
/* @__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" })
|
|
6316
6745
|
] }),
|
|
6317
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsx42("div", { style: { gridColumnStart: 6 }, onClick: handleClose, children: closeIcon })
|
|
6318
6747
|
]
|
|
6319
6748
|
}
|
|
6320
6749
|
)
|
|
@@ -6327,12 +6756,12 @@ WavelengthStandardSnackbar.displayName = "WavelengthStandardSnackbar";
|
|
|
6327
6756
|
|
|
6328
6757
|
// src/components/snackbars/WavelengthTestSnackbar.tsx
|
|
6329
6758
|
import Box5 from "@mui/material/Box";
|
|
6330
|
-
import
|
|
6331
|
-
import { useEffect as
|
|
6332
|
-
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";
|
|
6333
6762
|
var useOutsideClick = (callback) => {
|
|
6334
|
-
const ref =
|
|
6335
|
-
|
|
6763
|
+
const ref = useRef16(null);
|
|
6764
|
+
useEffect15(() => {
|
|
6336
6765
|
const handleClickOutside = (event) => {
|
|
6337
6766
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
6338
6767
|
callback();
|
|
@@ -6359,7 +6788,7 @@ function WavelengthTestSnackbar({ isPopUpOpen, toggleOpen, type, message, custom
|
|
|
6359
6788
|
} else if (type === "disabled") {
|
|
6360
6789
|
bgColor = "#737373";
|
|
6361
6790
|
}
|
|
6362
|
-
return /* @__PURE__ */
|
|
6791
|
+
return /* @__PURE__ */ jsx43(Fragment12, { children: isPopUpOpen && /* @__PURE__ */ jsxs24(
|
|
6363
6792
|
Box5,
|
|
6364
6793
|
{
|
|
6365
6794
|
id,
|
|
@@ -6379,10 +6808,10 @@ function WavelengthTestSnackbar({ isPopUpOpen, toggleOpen, type, message, custom
|
|
|
6379
6808
|
marginTop: customVertyAlign ? `${customVertyAlign}` : ""
|
|
6380
6809
|
},
|
|
6381
6810
|
children: [
|
|
6382
|
-
/* @__PURE__ */
|
|
6383
|
-
/* @__PURE__ */
|
|
6384
|
-
/* @__PURE__ */
|
|
6385
|
-
|
|
6811
|
+
/* @__PURE__ */ jsx43("div", { style: { backgroundColor: "red" } }),
|
|
6812
|
+
/* @__PURE__ */ jsx43("div", { style: { color: "white", fontSize: "1rem" }, children: message }),
|
|
6813
|
+
/* @__PURE__ */ jsx43(
|
|
6814
|
+
Button6,
|
|
6386
6815
|
{
|
|
6387
6816
|
variant: "text",
|
|
6388
6817
|
onClick: () => {
|
|
@@ -6400,10 +6829,10 @@ WavelengthTestSnackbar.displayName = "WavelengthTestSnackbar";
|
|
|
6400
6829
|
// src/components/sliders/WavelengthSlider.tsx
|
|
6401
6830
|
import Box6 from "@mui/material/Box";
|
|
6402
6831
|
import Slider from "@mui/material/Slider";
|
|
6403
|
-
import { jsx as
|
|
6832
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
6404
6833
|
function WavelengthSlider({ width: width2 = "300px", color: color2, valueDisplayed, marks, labelColor, value, id, maxVal = 100, minVal, step = 1, labelFunc, handleChange }) {
|
|
6405
6834
|
const on = valueDisplayed ? "on" : "off";
|
|
6406
|
-
return /* @__PURE__ */
|
|
6835
|
+
return /* @__PURE__ */ jsx44(Box6, { sx: { width: width2 }, children: /* @__PURE__ */ jsx44(
|
|
6407
6836
|
Slider,
|
|
6408
6837
|
{
|
|
6409
6838
|
id,
|
|
@@ -6428,7 +6857,7 @@ function WavelengthSlider({ width: width2 = "300px", color: color2, valueDisplay
|
|
|
6428
6857
|
WavelengthSlider.displayName = "WavelengthSlider";
|
|
6429
6858
|
|
|
6430
6859
|
// src/components/carousels/WavelengthDefaultCarousel.tsx
|
|
6431
|
-
import { useState as
|
|
6860
|
+
import { useState as useState7 } from "react";
|
|
6432
6861
|
import IconButton7 from "@mui/material/IconButton";
|
|
6433
6862
|
import NavigateBeforeIcon from "@mui/icons-material/NavigateBefore";
|
|
6434
6863
|
import NavigateNextIcon from "@mui/icons-material/NavigateNext";
|
|
@@ -6438,9 +6867,9 @@ import Card from "@mui/material/Card";
|
|
|
6438
6867
|
import CardContent from "@mui/material/CardContent";
|
|
6439
6868
|
import CardMedia from "@mui/material/CardMedia";
|
|
6440
6869
|
import CardActionArea from "@mui/material/CardActionArea";
|
|
6441
|
-
import { jsx as
|
|
6870
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6442
6871
|
var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight, cardWidth, id, name }) => {
|
|
6443
|
-
const [currentIndex, setCurrentIndex] =
|
|
6872
|
+
const [currentIndex, setCurrentIndex] = useState7(0);
|
|
6444
6873
|
const adjustButtonSize = buttonSize !== void 0 ? buttonSize : 70;
|
|
6445
6874
|
const adjustImageHeight = imageHeight !== void 0 ? imageHeight : 250;
|
|
6446
6875
|
const adjustImageWidth = imageWidth !== void 0 ? imageWidth : 300;
|
|
@@ -6455,7 +6884,7 @@ var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight,
|
|
|
6455
6884
|
const handleClick = () => {
|
|
6456
6885
|
window.open(items[currentIndex].path, "_blank");
|
|
6457
6886
|
};
|
|
6458
|
-
return /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsxs25(
|
|
6459
6888
|
Grid3,
|
|
6460
6889
|
{
|
|
6461
6890
|
container: true,
|
|
@@ -6464,417 +6893,118 @@ var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight,
|
|
|
6464
6893
|
alignItems: "center"
|
|
6465
6894
|
},
|
|
6466
6895
|
children: [
|
|
6467
|
-
/* @__PURE__ */
|
|
6468
|
-
/* @__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(
|
|
6469
6898
|
Card,
|
|
6470
6899
|
{
|
|
6471
6900
|
sx: {
|
|
6472
6901
|
maxWidth: adjustCardWidth,
|
|
6473
6902
|
maxHeight: adjustCardHeight
|
|
6474
6903
|
},
|
|
6475
|
-
children: /* @__PURE__ */
|
|
6476
|
-
/* @__PURE__ */
|
|
6477
|
-
/* @__PURE__ */
|
|
6478
|
-
/* @__PURE__ */
|
|
6479
|
-
/* @__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 })
|
|
6480
6909
|
] })
|
|
6481
|
-
] })
|
|
6482
|
-
}
|
|
6483
|
-
),
|
|
6484
|
-
/* @__PURE__ */
|
|
6485
|
-
]
|
|
6486
|
-
}
|
|
6487
|
-
) }) });
|
|
6488
|
-
};
|
|
6489
|
-
DefaultCarousel.displayName = "DefaultCarousel";
|
|
6490
|
-
|
|
6491
|
-
// src/components/carousels/WavelengthSliderCarousel.tsx
|
|
6492
|
-
import { useState as useState5, useEffect as useEffect15 } from "react";
|
|
6493
|
-
import Grid4 from "@mui/material/Grid";
|
|
6494
|
-
import Card2 from "@mui/material/Card";
|
|
6495
|
-
import CardContent2 from "@mui/material/CardContent";
|
|
6496
|
-
import CardMedia2 from "@mui/material/CardMedia";
|
|
6497
|
-
import CardActionArea2 from "@mui/material/CardActionArea";
|
|
6498
|
-
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6499
|
-
var delay = 2500;
|
|
6500
|
-
var SliderCardCarousel = ({ items, cardHeight, cardWidth, contHeight, contWidth }) => {
|
|
6501
|
-
const [index, setIndex] = useState5(0);
|
|
6502
|
-
const [isHovered, setIsHovered] = useState5(false);
|
|
6503
|
-
useEffect15(() => {
|
|
6504
|
-
setTimeout(() => setIndex((prevIndex) => prevIndex === items.length - 1 ? 0 : prevIndex + 1), delay);
|
|
6505
|
-
return () => {
|
|
6506
|
-
};
|
|
6507
|
-
}, [index]);
|
|
6508
|
-
const carouselCardWidth = items.length > 0 ? `calc(35% * ${items.length})` : "200%";
|
|
6509
|
-
const adjustContHeight = contHeight !== void 0 ? contHeight : "100%";
|
|
6510
|
-
const adjustContWidth = contWidth !== void 0 ? contWidth : "200%";
|
|
6511
|
-
const adjustCardHeight = cardHeight !== void 0 ? cardHeight : 120;
|
|
6512
|
-
const adjustCardWith = cardWidth !== void 0 ? cardWidth : 310;
|
|
6513
|
-
const styles = {
|
|
6514
|
-
carouselcontainer: {
|
|
6515
|
-
overflow: "hidden",
|
|
6516
|
-
position: "relative",
|
|
6517
|
-
borderColor: "#4b5563",
|
|
6518
|
-
height: adjustContHeight,
|
|
6519
|
-
width: adjustContWidth,
|
|
6520
|
-
minHeight: "280px",
|
|
6521
|
-
minWidth: "640px",
|
|
6522
|
-
borderRadius: "10px"
|
|
6523
|
-
},
|
|
6524
|
-
carouselTrackStyle: {
|
|
6525
|
-
display: "flex",
|
|
6526
|
-
position: "relative",
|
|
6527
|
-
justifyContent: "center",
|
|
6528
|
-
left: "0",
|
|
6529
|
-
alignItems: "center",
|
|
6530
|
-
gap: "5px",
|
|
6531
|
-
width: carouselCardWidth,
|
|
6532
|
-
height: "100%",
|
|
6533
|
-
transition: "background-color 0.5s ease-in-out"
|
|
6534
|
-
},
|
|
6535
|
-
carouselCard: {
|
|
6536
|
-
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
6537
|
-
transform: isHovered ? "scale(0.9)" : "scale(1)",
|
|
6538
|
-
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"
|
|
6539
|
-
}
|
|
6540
|
-
};
|
|
6541
|
-
return /* @__PURE__ */ jsx41("div", { style: styles.carouselcontainer, children: /* @__PURE__ */ jsx41("div", { className: "my-animation", style: styles.carouselTrackStyle, children: /* @__PURE__ */ jsx41(
|
|
6542
|
-
Grid4,
|
|
6543
|
-
{
|
|
6544
|
-
sx: {
|
|
6545
|
-
display: "flex",
|
|
6546
|
-
justifyContent: "center",
|
|
6547
|
-
alignItems: "center"
|
|
6548
|
-
},
|
|
6549
|
-
container: true,
|
|
6550
|
-
spacing: 0.5,
|
|
6551
|
-
children: items.map((card) => /* @__PURE__ */ jsx41("div", { children: /* @__PURE__ */ jsx41(
|
|
6552
|
-
Card2,
|
|
6553
|
-
{
|
|
6554
|
-
sx: {
|
|
6555
|
-
transition: "transform 0.3s ease, box-shadow 0.3s ease",
|
|
6556
|
-
transform: isHovered ? "scale(0.9)" : "scale(1)",
|
|
6557
|
-
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"
|
|
6558
|
-
},
|
|
6559
|
-
onMouseEnter: () => setIsHovered(true),
|
|
6560
|
-
onMouseLeave: () => setIsHovered(false),
|
|
6561
|
-
children: /* @__PURE__ */ jsxs24(CardActionArea2, { href: card.path, children: [
|
|
6562
|
-
/* @__PURE__ */ jsx41(CardMedia2, { sx: { height: adjustCardHeight, width: adjustCardWith }, image: card.image }),
|
|
6563
|
-
/* @__PURE__ */ jsxs24(CardContent2, { children: [
|
|
6564
|
-
/* @__PURE__ */ jsx41("h3", { children: card.title }),
|
|
6565
|
-
/* @__PURE__ */ jsx41("p", { children: card.description })
|
|
6566
|
-
] })
|
|
6567
|
-
] })
|
|
6568
|
-
}
|
|
6569
|
-
) }, card.title))
|
|
6570
|
-
}
|
|
6571
|
-
) }) });
|
|
6572
|
-
};
|
|
6573
|
-
SliderCardCarousel.displayName = "SliderCardCarousel";
|
|
6574
|
-
|
|
6575
|
-
// src/components/pagination/WavelengthDefaultPagination.tsx
|
|
6576
|
-
import { useState as useState8, useMemo } from "react";
|
|
6577
|
-
|
|
6578
|
-
// src/components/pagination/WavelengthButtonPagination.tsx
|
|
6579
|
-
import { useState as useState6 } from "react";
|
|
6580
|
-
import Button5 from "@mui/material/Button";
|
|
6581
|
-
import ArrowBackIosNewIcon from "@mui/icons-material/ArrowBackIosNew";
|
|
6582
|
-
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
|
6583
|
-
import styled7 from "styled-components";
|
|
6584
|
-
import { jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6585
|
-
var MyDroplistItems = styled7("li")`
|
|
6586
|
-
background-color: white;
|
|
6587
|
-
color: #000000;
|
|
6588
|
-
padding: 10px 30px;
|
|
6589
|
-
textdecoration: none;
|
|
6590
|
-
display: block;
|
|
6591
|
-
width: 80px;
|
|
6592
|
-
|
|
6593
|
-
&:hover {
|
|
6594
|
-
background-color: lightgray;
|
|
6595
|
-
}
|
|
6596
|
-
`;
|
|
6597
|
-
function WavelengthButtonPagination({ totalPages, current, handleChangePage, itemList, firstEllipseList, secondEllipseList, id }) {
|
|
6598
|
-
const [isOpen, setIsOpen] = useState6(false);
|
|
6599
|
-
const [isSecOpen, setIsSecOpen] = useState6(false);
|
|
6600
|
-
const toggleDropdown = (index) => {
|
|
6601
|
-
if (index === 1) {
|
|
6602
|
-
setIsOpen(!isOpen);
|
|
6603
|
-
} else {
|
|
6604
|
-
setIsSecOpen(!isSecOpen);
|
|
6605
|
-
}
|
|
6606
|
-
};
|
|
6607
|
-
const dropstyles = {
|
|
6608
|
-
dropcenter: { position: "relative", left: "-40px", top: "-20px" },
|
|
6609
|
-
mydrop: { position: "absolute", zIndex: "3", maxHeight: "200px", overflow: "scroll" },
|
|
6610
|
-
rangenumbers: { display: "flex" },
|
|
6611
|
-
butPagCompDivStyle: { display: "flex" }
|
|
6612
|
-
};
|
|
6613
|
-
const WLButtonPagStyle = {
|
|
6614
|
-
background: "white",
|
|
6615
|
-
color: "black",
|
|
6616
|
-
border: "none",
|
|
6617
|
-
padding: "1px",
|
|
6618
|
-
fontSize: "16px",
|
|
6619
|
-
height: "55px",
|
|
6620
|
-
width: "40px",
|
|
6621
|
-
boxshadow: "4px 2px 4px darkslategray",
|
|
6622
|
-
borderRadius: "50%",
|
|
6623
|
-
margin: "3px",
|
|
6624
|
-
"&:hover": { background: "#49baf7" },
|
|
6625
|
-
"&:disabled": { background: "rgb(226, 223, 223)" },
|
|
6626
|
-
"&.active": { background: "#8FD8FF" }
|
|
6627
|
-
};
|
|
6628
|
-
return /* @__PURE__ */ jsxs25("div", { style: dropstyles.butPagCompDivStyle, id, children: [
|
|
6629
|
-
/* @__PURE__ */ jsx42(Button5, { onClick: () => handleChangePage(current - 1), disabled: current === 1, sx: WLButtonPagStyle, children: /* @__PURE__ */ jsx42(ArrowBackIosNewIcon, {}) }),
|
|
6630
|
-
/* @__PURE__ */ jsx42("section", { style: dropstyles.rangenumbers, children: itemList.map(
|
|
6631
|
-
(item, index) => item === "..." && index === 1 ? (
|
|
6632
|
-
//first half ellipse with first half dropdown
|
|
6633
|
-
// dropdown
|
|
6634
|
-
// eslint-disable-next-line react/jsx-key
|
|
6635
|
-
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6636
|
-
/* @__PURE__ */ jsx42(Button5, { onClick: () => toggleDropdown(1), className: current === index ? "active" : "", sx: WLButtonPagStyle, children: item }, index),
|
|
6637
|
-
isOpen && /* @__PURE__ */ jsx42("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx42("ul", { style: dropstyles.mydrop, children: firstEllipseList.map((item2) => /* @__PURE__ */ jsx42(
|
|
6638
|
-
MyDroplistItems,
|
|
6639
|
-
{
|
|
6640
|
-
onClick: () => {
|
|
6641
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6642
|
-
},
|
|
6643
|
-
children: item2
|
|
6644
|
-
},
|
|
6645
|
-
item2
|
|
6646
|
-
)) }) })
|
|
6647
|
-
] })
|
|
6648
|
-
) : item === "..." && index === 5 ? (
|
|
6649
|
-
//second half ellipse with second half dropdown
|
|
6650
|
-
/* @__PURE__ */ jsxs25("div", { children: [
|
|
6651
|
-
/* @__PURE__ */ jsx42(Button5, { onClick: () => toggleDropdown(5), className: current === index ? "active" : "", sx: WLButtonPagStyle, children: item }, index),
|
|
6652
|
-
isSecOpen && /* @__PURE__ */ jsx42("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx42("ul", { style: dropstyles.mydrop, children: secondEllipseList.map((item2) => /* @__PURE__ */ jsx42(
|
|
6653
|
-
MyDroplistItems,
|
|
6654
|
-
{
|
|
6655
|
-
onClick: () => {
|
|
6656
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6657
|
-
},
|
|
6658
|
-
children: item2
|
|
6659
|
-
},
|
|
6660
|
-
item2
|
|
6661
|
-
)) }) })
|
|
6662
|
-
] })
|
|
6663
|
-
) : /* @__PURE__ */ jsx42(Button5, { onClick: () => handleChangePage(item), className: current === item ? "active" : "", sx: WLButtonPagStyle, children: item }, index)
|
|
6664
|
-
) }),
|
|
6665
|
-
/* @__PURE__ */ jsx42(Button5, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, sx: WLButtonPagStyle, children: /* @__PURE__ */ jsx42(ArrowForwardIosIcon, {}) })
|
|
6666
|
-
] });
|
|
6667
|
-
}
|
|
6668
|
-
WavelengthButtonPagination.displayName = "WavelengthButtonPagination";
|
|
6669
|
-
var WavelengthButtonPagination_default = WavelengthButtonPagination;
|
|
6670
|
-
|
|
6671
|
-
// src/components/pagination/WavelengthVariationPagination.tsx
|
|
6672
|
-
import { useState as useState7 } from "react";
|
|
6673
|
-
import Button6 from "@mui/material/Button";
|
|
6674
|
-
import ArrowBackIosNewIcon2 from "@mui/icons-material/ArrowBackIosNew";
|
|
6675
|
-
import ArrowForwardIosIcon2 from "@mui/icons-material/ArrowForwardIos";
|
|
6676
|
-
import styled8 from "styled-components";
|
|
6677
|
-
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6678
|
-
function WavelengthVariationPagination({ totalPages, current, variant, handleChangePage, itemList, firstEllipseList, secondEllipseList, id }) {
|
|
6679
|
-
const [isOpen, setIsOpen] = useState7(false);
|
|
6680
|
-
const [isSecOpen, setIsSecOpen] = useState7(false);
|
|
6681
|
-
const MyDroplistItems2 = styled8("li")`
|
|
6682
|
-
background-color: white;
|
|
6683
|
-
color: #000000;
|
|
6684
|
-
padding: 10px 30px;
|
|
6685
|
-
textdecoration: none;
|
|
6686
|
-
display: block;
|
|
6687
|
-
width: 80px;
|
|
6688
|
-
|
|
6689
|
-
&:hover {
|
|
6690
|
-
background-color: lightgray;
|
|
6910
|
+
] })
|
|
6911
|
+
}
|
|
6912
|
+
),
|
|
6913
|
+
/* @__PURE__ */ jsx45("div", { children: /* @__PURE__ */ jsx45(IconButton7, { onClick: handleNext, sx: { margin: 1, color: "white" }, children: /* @__PURE__ */ jsx45(NavigateNextIcon, { style: { fontSize: adjustButtonSize } }) }) })
|
|
6914
|
+
]
|
|
6691
6915
|
}
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6916
|
+
) }) });
|
|
6917
|
+
};
|
|
6918
|
+
DefaultCarousel.displayName = "DefaultCarousel";
|
|
6919
|
+
|
|
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",
|
|
6698
6945
|
position: "relative",
|
|
6699
|
-
|
|
6700
|
-
|
|
6946
|
+
borderColor: "#4b5563",
|
|
6947
|
+
height: adjustContHeight,
|
|
6948
|
+
width: adjustContWidth,
|
|
6949
|
+
minHeight: "280px",
|
|
6950
|
+
minWidth: "640px",
|
|
6951
|
+
borderRadius: "10px"
|
|
6701
6952
|
},
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
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"
|
|
6707
6963
|
},
|
|
6708
|
-
|
|
6709
|
-
|
|
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"
|
|
6710
6968
|
}
|
|
6711
6969
|
};
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
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))
|
|
6717
6999
|
}
|
|
6718
|
-
};
|
|
6719
|
-
return /* @__PURE__ */ jsxs26("div", { style: dropstyles.pagination, id, children: [
|
|
6720
|
-
/* @__PURE__ */ jsx43(Button6, { onClick: () => handleChangePage(current - 1), variant, disabled: current === 1, children: /* @__PURE__ */ jsx43(ArrowBackIosNewIcon2, {}) }),
|
|
6721
|
-
/* @__PURE__ */ jsx43("section", { style: dropstyles.rangenumbers, children: itemList.map(
|
|
6722
|
-
(item, index) => item === "..." && index === 1 ? (
|
|
6723
|
-
//first half ellipse with first half dropdown
|
|
6724
|
-
// eslint-disable-next-line react/jsx-key
|
|
6725
|
-
/* @__PURE__ */ jsxs26("div", { children: [
|
|
6726
|
-
/* @__PURE__ */ jsx43(Button6, { onClick: () => toggleDropdown(1), variant, className: current === index ? "active" : "", children: item }, index),
|
|
6727
|
-
isOpen && /* @__PURE__ */ jsx43("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx43("ul", { style: dropstyles.mydrop, children: firstEllipseList.map((item2) => /* @__PURE__ */ jsx43(
|
|
6728
|
-
MyDroplistItems2,
|
|
6729
|
-
{
|
|
6730
|
-
style: dropstyles.mydroplist,
|
|
6731
|
-
onClick: () => {
|
|
6732
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6733
|
-
},
|
|
6734
|
-
children: item2
|
|
6735
|
-
},
|
|
6736
|
-
item2
|
|
6737
|
-
)) }) })
|
|
6738
|
-
] })
|
|
6739
|
-
) : item === "..." && index === 5 ? (
|
|
6740
|
-
//second half ellipse with second half dropdown
|
|
6741
|
-
/* @__PURE__ */ jsxs26("div", { children: [
|
|
6742
|
-
/* @__PURE__ */ jsx43(Button6, { onClick: () => toggleDropdown(5), variant, className: current === index ? "active" : "", children: item }, index),
|
|
6743
|
-
isSecOpen && /* @__PURE__ */ jsx43("div", { style: dropstyles.dropcenter, children: /* @__PURE__ */ jsx43("ul", { style: dropstyles.mydrop, children: secondEllipseList.map((item2) => /* @__PURE__ */ jsx43(
|
|
6744
|
-
MyDroplistItems2,
|
|
6745
|
-
{
|
|
6746
|
-
style: dropstyles.mydroplist,
|
|
6747
|
-
onClick: () => {
|
|
6748
|
-
handleChangePage(item2), setIsOpen(false);
|
|
6749
|
-
},
|
|
6750
|
-
children: item2
|
|
6751
|
-
},
|
|
6752
|
-
item2
|
|
6753
|
-
)) }) })
|
|
6754
|
-
] })
|
|
6755
|
-
) : /* @__PURE__ */ jsx43(Button6, { onClick: () => handleChangePage(item), className: current === item ? "active" : "", variant, children: item }, index)
|
|
6756
|
-
) }),
|
|
6757
|
-
/* @__PURE__ */ jsx43(Button6, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, variant, children: /* @__PURE__ */ jsx43(ArrowForwardIosIcon2, {}) })
|
|
6758
|
-
] });
|
|
6759
|
-
}
|
|
6760
|
-
WavelengthVariationPagination.displayName = "WavelengthVariationPagination";
|
|
6761
|
-
var WavelengthVariationPagination_default = WavelengthVariationPagination;
|
|
6762
|
-
|
|
6763
|
-
// src/components/pagination/WavelengthDefaultPagination.tsx
|
|
6764
|
-
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
6765
|
-
var range = (start, end) => {
|
|
6766
|
-
const length = end - start + 1;
|
|
6767
|
-
return Array.from({ length }, (_, i) => start + i);
|
|
7000
|
+
) }) });
|
|
6768
7001
|
};
|
|
6769
|
-
|
|
6770
|
-
const result = [];
|
|
6771
|
-
for (let i = start; i < end; i++) {
|
|
6772
|
-
if (i !== start) {
|
|
6773
|
-
result.push(i);
|
|
6774
|
-
}
|
|
6775
|
-
}
|
|
6776
|
-
return result;
|
|
6777
|
-
}
|
|
6778
|
-
function WavelengthDefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, boundaryCount = 1, style: style3, onPageChange, id }) {
|
|
6779
|
-
const [current, setCurrent] = useState8(currentPageNumber);
|
|
6780
|
-
const startPages = range(1, Math.min(boundaryCount, totalPages));
|
|
6781
|
-
const endPages = range(Math.max(totalPages - boundaryCount + 1, boundaryCount + 1), totalPages);
|
|
6782
|
-
const siblingsStart = Math.max(Math.min(current - siblingCount, totalPages - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);
|
|
6783
|
-
const siblingsEnd = Math.min(Math.max(current + siblingCount, boundaryCount + siblingCount * 2 + 2), endPages.length > 0 ? endPages[0] - 2 : totalPages - 1);
|
|
6784
|
-
const firstEllipseList = ascendingRange(1, siblingsStart);
|
|
6785
|
-
const secondEllipseList = ascendingRange(siblingsEnd, totalPages);
|
|
6786
|
-
const itemList = useMemo(() => {
|
|
6787
|
-
return [
|
|
6788
|
-
...startPages,
|
|
6789
|
-
...siblingsStart > boundaryCount + 2 ? ["..."] : boundaryCount + 1 < totalPages - boundaryCount ? [boundaryCount + 1] : [],
|
|
6790
|
-
...range(siblingsStart, siblingsEnd),
|
|
6791
|
-
...siblingsEnd < totalPages - boundaryCount - 1 ? ["..."] : totalPages - boundaryCount > boundaryCount ? [totalPages - boundaryCount] : [],
|
|
6792
|
-
...endPages
|
|
6793
|
-
];
|
|
6794
|
-
}, [current, totalPages, boundaryCount, siblingCount, id]);
|
|
6795
|
-
const handleChangePage = (value) => {
|
|
6796
|
-
if (typeof value === "number") {
|
|
6797
|
-
setCurrent(value);
|
|
6798
|
-
onPageChange(value);
|
|
6799
|
-
}
|
|
6800
|
-
};
|
|
6801
|
-
if (style3 === "circular") {
|
|
6802
|
-
return /* @__PURE__ */ jsx44(
|
|
6803
|
-
WavelengthButtonPagination_default,
|
|
6804
|
-
{
|
|
6805
|
-
id,
|
|
6806
|
-
totalPages,
|
|
6807
|
-
current,
|
|
6808
|
-
handleChangePage,
|
|
6809
|
-
itemList,
|
|
6810
|
-
firstEllipseList,
|
|
6811
|
-
secondEllipseList
|
|
6812
|
-
}
|
|
6813
|
-
);
|
|
6814
|
-
} else if (style3 === "text") {
|
|
6815
|
-
return /* @__PURE__ */ jsx44(
|
|
6816
|
-
WavelengthVariationPagination_default,
|
|
6817
|
-
{
|
|
6818
|
-
id,
|
|
6819
|
-
totalPages,
|
|
6820
|
-
current,
|
|
6821
|
-
variant: "text",
|
|
6822
|
-
handleChangePage,
|
|
6823
|
-
itemList,
|
|
6824
|
-
firstEllipseList,
|
|
6825
|
-
secondEllipseList
|
|
6826
|
-
}
|
|
6827
|
-
);
|
|
6828
|
-
} else if (style3 === "outlined") {
|
|
6829
|
-
return /* @__PURE__ */ jsx44(
|
|
6830
|
-
WavelengthVariationPagination_default,
|
|
6831
|
-
{
|
|
6832
|
-
id,
|
|
6833
|
-
totalPages,
|
|
6834
|
-
current,
|
|
6835
|
-
variant: "outlined",
|
|
6836
|
-
handleChangePage,
|
|
6837
|
-
itemList,
|
|
6838
|
-
firstEllipseList,
|
|
6839
|
-
secondEllipseList
|
|
6840
|
-
}
|
|
6841
|
-
);
|
|
6842
|
-
} else if (style3 === "contained") {
|
|
6843
|
-
return /* @__PURE__ */ jsx44(
|
|
6844
|
-
WavelengthVariationPagination_default,
|
|
6845
|
-
{
|
|
6846
|
-
id,
|
|
6847
|
-
totalPages,
|
|
6848
|
-
current,
|
|
6849
|
-
variant: "contained",
|
|
6850
|
-
handleChangePage,
|
|
6851
|
-
itemList,
|
|
6852
|
-
firstEllipseList,
|
|
6853
|
-
secondEllipseList
|
|
6854
|
-
}
|
|
6855
|
-
);
|
|
6856
|
-
} else {
|
|
6857
|
-
return /* @__PURE__ */ jsx44(
|
|
6858
|
-
WavelengthVariationPagination_default,
|
|
6859
|
-
{
|
|
6860
|
-
id,
|
|
6861
|
-
totalPages,
|
|
6862
|
-
current,
|
|
6863
|
-
handleChangePage,
|
|
6864
|
-
itemList,
|
|
6865
|
-
firstEllipseList,
|
|
6866
|
-
secondEllipseList
|
|
6867
|
-
}
|
|
6868
|
-
);
|
|
6869
|
-
}
|
|
6870
|
-
}
|
|
6871
|
-
WavelengthDefaultPagination.displayName = "WavelengthDefaultPagination";
|
|
6872
|
-
var WavelengthDefaultPagination_default = WavelengthDefaultPagination;
|
|
7002
|
+
SliderCardCarousel.displayName = "SliderCardCarousel";
|
|
6873
7003
|
|
|
6874
7004
|
// src/components/TextField/WavelengthInput.tsx
|
|
6875
|
-
import { useRef as
|
|
7005
|
+
import { useRef as useRef17, useEffect as useEffect18, forwardRef as forwardRef2, useImperativeHandle as useImperativeHandle3 } from "react";
|
|
6876
7006
|
import "@wavelengthusaf/web-components";
|
|
6877
|
-
import { jsx as
|
|
7007
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
6878
7008
|
var WavelengthInput = forwardRef2(
|
|
6879
7009
|
({
|
|
6880
7010
|
id,
|
|
@@ -6911,12 +7041,12 @@ var WavelengthInput = forwardRef2(
|
|
|
6911
7041
|
onBlurCallback,
|
|
6912
7042
|
...rest
|
|
6913
7043
|
}, ref) => {
|
|
6914
|
-
const internalRef =
|
|
7044
|
+
const internalRef = useRef17(null);
|
|
6915
7045
|
useImperativeHandle3(ref, () => ({
|
|
6916
7046
|
...internalRef.current,
|
|
6917
7047
|
validate: () => internalRef.current?.validate?.(true)
|
|
6918
7048
|
}));
|
|
6919
|
-
|
|
7049
|
+
useEffect18(() => {
|
|
6920
7050
|
const el = internalRef.current;
|
|
6921
7051
|
if (!el) return;
|
|
6922
7052
|
const set = (attr, val) => {
|
|
@@ -6987,7 +7117,7 @@ var WavelengthInput = forwardRef2(
|
|
|
6987
7117
|
label,
|
|
6988
7118
|
disabled
|
|
6989
7119
|
]);
|
|
6990
|
-
|
|
7120
|
+
useEffect18(() => {
|
|
6991
7121
|
const el = internalRef.current;
|
|
6992
7122
|
if (!el || !onBlurCallback) return;
|
|
6993
7123
|
const handler = (e) => {
|
|
@@ -6999,7 +7129,7 @@ var WavelengthInput = forwardRef2(
|
|
|
6999
7129
|
el.addEventListener("blur", handler);
|
|
7000
7130
|
return () => el.removeEventListener("blur", handler);
|
|
7001
7131
|
}, [onBlurCallback]);
|
|
7002
|
-
|
|
7132
|
+
useEffect18(() => {
|
|
7003
7133
|
const el = internalRef.current;
|
|
7004
7134
|
if (!el || !onChange) return;
|
|
7005
7135
|
const handler = (e) => {
|
|
@@ -7020,7 +7150,7 @@ var WavelengthInput = forwardRef2(
|
|
|
7020
7150
|
...style3,
|
|
7021
7151
|
...backgroundColor2 ? { ["--wavelength-label-background"]: backgroundColor2 } : {}
|
|
7022
7152
|
};
|
|
7023
|
-
return /* @__PURE__ */
|
|
7153
|
+
return /* @__PURE__ */ jsx47("wavelength-input", { ref: internalRef, style: combinedStyle, ...rest });
|
|
7024
7154
|
}
|
|
7025
7155
|
);
|
|
7026
7156
|
WavelengthInput.displayName = "WavelengthInput";
|
|
@@ -7029,9 +7159,9 @@ WavelengthInput.displayName = "WavelengthInput";
|
|
|
7029
7159
|
import { WavelengthInput as WavelengthInput2 } from "@wavelengthusaf/web-components";
|
|
7030
7160
|
|
|
7031
7161
|
// src/components/DataTable/WavelengthDataTable.tsx
|
|
7032
|
-
import { useEffect as
|
|
7162
|
+
import { useEffect as useEffect19, useRef as useRef18, useState as useState9 } from "react";
|
|
7033
7163
|
import styled9 from "styled-components";
|
|
7034
|
-
import { jsx as
|
|
7164
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7035
7165
|
var ModalInputDiv = styled9.div`
|
|
7036
7166
|
display: flex;
|
|
7037
7167
|
flex-direction: column; /* Corrected this line */
|
|
@@ -7210,8 +7340,8 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7210
7340
|
const [currentPage, setCurrentPage] = useState9(1);
|
|
7211
7341
|
const [isOpen, setIsOpen] = useState9(false);
|
|
7212
7342
|
const [editingMenuKey, setEditingMenuKey] = useState9(null);
|
|
7213
|
-
const menuRef =
|
|
7214
|
-
const modalRef =
|
|
7343
|
+
const menuRef = useRef18(null);
|
|
7344
|
+
const modalRef = useRef18(null);
|
|
7215
7345
|
function isNumeric(value) {
|
|
7216
7346
|
return /^\d+$/.test(value);
|
|
7217
7347
|
}
|
|
@@ -7219,7 +7349,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7219
7349
|
setSelectedValue(event.target.value);
|
|
7220
7350
|
setLocalData(copiedArray);
|
|
7221
7351
|
};
|
|
7222
|
-
|
|
7352
|
+
useEffect19(() => {
|
|
7223
7353
|
if (!selectedValue || searchItem === "") {
|
|
7224
7354
|
setLocalData(copiedArray);
|
|
7225
7355
|
setNoRowsOpen(false);
|
|
@@ -7249,7 +7379,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7249
7379
|
const closeModal = () => {
|
|
7250
7380
|
setIsModalOpen(false);
|
|
7251
7381
|
};
|
|
7252
|
-
|
|
7382
|
+
useEffect19(() => {
|
|
7253
7383
|
const handleClickOutside = (event) => {
|
|
7254
7384
|
if (isModalOpen && modalRef.current && !modalRef.current.contains(event.target)) {
|
|
7255
7385
|
closeModal();
|
|
@@ -7309,7 +7439,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7309
7439
|
return /* @__PURE__ */ jsxs27(TableHeadStyle, { children: [
|
|
7310
7440
|
column.title,
|
|
7311
7441
|
/* @__PURE__ */ jsxs27(KebabMenu, { ref: menuRef, children: [
|
|
7312
|
-
/* @__PURE__ */
|
|
7442
|
+
/* @__PURE__ */ jsx48(
|
|
7313
7443
|
KebabIcon,
|
|
7314
7444
|
{
|
|
7315
7445
|
title: `KebabIcon-${index}`,
|
|
@@ -7321,25 +7451,25 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7321
7451
|
),
|
|
7322
7452
|
isOpen && editingMenuKey === column.key && /* @__PURE__ */ jsxs27(MenuOptions, { children: [
|
|
7323
7453
|
sortOrder === "asc" ? /* @__PURE__ */ jsxs27("li", { title: `MenuListASC-${index}`, onClick: () => handleSort(column.key, "asc"), children: [
|
|
7324
|
-
/* @__PURE__ */
|
|
7454
|
+
/* @__PURE__ */ jsx48("span", { children: "\u2B06" }),
|
|
7325
7455
|
" Sort ASC"
|
|
7326
7456
|
] }) : /* @__PURE__ */ jsxs27("li", { title: `MenuListDES-${index}`, onClick: () => handleSort(column.key, "desc"), children: [
|
|
7327
|
-
/* @__PURE__ */
|
|
7457
|
+
/* @__PURE__ */ jsx48("span", { children: "\u2B07" }),
|
|
7328
7458
|
" Sort DESC"
|
|
7329
7459
|
] }),
|
|
7330
7460
|
/* @__PURE__ */ jsxs27("li", { title: `MenuListFilterButton-${index}`, onClick: openModal, children: [
|
|
7331
|
-
/* @__PURE__ */
|
|
7461
|
+
/* @__PURE__ */ jsx48("span", { children: "\u23F7" }),
|
|
7332
7462
|
" Filter"
|
|
7333
7463
|
] }),
|
|
7334
|
-
isModalOpen && /* @__PURE__ */
|
|
7335
|
-
/* @__PURE__ */
|
|
7464
|
+
isModalOpen && /* @__PURE__ */ jsx48(ModalOverlay, { children: /* @__PURE__ */ jsxs27(ModalWrapper, { ref: modalRef, children: [
|
|
7465
|
+
/* @__PURE__ */ jsx48(ModalClose, { title: `ModalClose-${index}`, onClick: closeModal, children: "\xD7" }),
|
|
7336
7466
|
/* @__PURE__ */ jsxs27(ModalInputDiv, { children: [
|
|
7337
|
-
/* @__PURE__ */
|
|
7338
|
-
/* @__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)) })
|
|
7339
7469
|
] }),
|
|
7340
7470
|
/* @__PURE__ */ jsxs27(ModalInputDiv, { children: [
|
|
7341
|
-
/* @__PURE__ */
|
|
7342
|
-
/* @__PURE__ */
|
|
7471
|
+
/* @__PURE__ */ jsx48("label", { htmlFor: "filterInputId", children: "Values: " }),
|
|
7472
|
+
/* @__PURE__ */ jsx48(
|
|
7343
7473
|
"input",
|
|
7344
7474
|
{
|
|
7345
7475
|
title: `Inputfiltertest-${index}`,
|
|
@@ -7360,8 +7490,8 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7360
7490
|
] }, index)
|
|
7361
7491
|
] }, `headCell-${index}`);
|
|
7362
7492
|
});
|
|
7363
|
-
const rows = !currentPageData?.length || noRowsOpen ? /* @__PURE__ */
|
|
7364
|
-
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(
|
|
7365
7495
|
StyledInput,
|
|
7366
7496
|
{
|
|
7367
7497
|
title: `styledRow-${item.id}-${column.key}-${index2}`,
|
|
@@ -7378,14 +7508,14 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
|
|
|
7378
7508
|
},
|
|
7379
7509
|
autoFocus: true
|
|
7380
7510
|
}
|
|
7381
|
-
) : /* @__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);
|
|
7382
7512
|
}) }, item.id));
|
|
7383
7513
|
return /* @__PURE__ */ jsxs27("div", { id, children: [
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
/* @__PURE__ */
|
|
7386
|
-
/* @__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 })
|
|
7387
7517
|
] }) }),
|
|
7388
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ jsx48(StyledNavBoxDiv, { children: /* @__PURE__ */ jsx48(WavelengthDefaultPagination_default, { totalPages, currentPageNumber: currentPage, onPageChange: setCurrentPage, style: "circular" }) })
|
|
7389
7519
|
] });
|
|
7390
7520
|
};
|
|
7391
7521
|
WavelengthDataTable.displayName = "WavelengthDataTable";
|
|
@@ -7393,7 +7523,7 @@ WavelengthDataTable.displayName = "WavelengthDataTable";
|
|
|
7393
7523
|
// src/components/DataTable/SubRowTable/ChildSubTable.tsx
|
|
7394
7524
|
import { useMemo as useMemo3, useState as useState10, Fragment as Fragment13 } from "react";
|
|
7395
7525
|
import styled10 from "styled-components";
|
|
7396
|
-
import { Fragment as Fragment14, jsx as
|
|
7526
|
+
import { Fragment as Fragment14, jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7397
7527
|
var TableContainer = styled10.div`
|
|
7398
7528
|
width: 1200px;
|
|
7399
7529
|
border-radius: 16px;
|
|
@@ -7630,18 +7760,18 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7630
7760
|
return result;
|
|
7631
7761
|
}, [data, sortKey, sortOrder, sortSubKey, sortSubOrder]);
|
|
7632
7762
|
const renderSortButton = (column, sortOrder2, sortKey2) => {
|
|
7633
|
-
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: [
|
|
7634
7764
|
column.title,
|
|
7635
7765
|
" ",
|
|
7636
|
-
/* @__PURE__ */
|
|
7637
|
-
] }) }) : /* @__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: [
|
|
7638
7768
|
column.title,
|
|
7639
7769
|
" ",
|
|
7640
|
-
/* @__PURE__ */
|
|
7641
|
-
] }) }) : /* @__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: [
|
|
7642
7772
|
column.title,
|
|
7643
7773
|
" ",
|
|
7644
|
-
/* @__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" }) })
|
|
7645
7775
|
] }) });
|
|
7646
7776
|
};
|
|
7647
7777
|
const renderSortSubButton = (column, sortSubOrder2, sortSubKey2) => {
|
|
@@ -7649,26 +7779,26 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7649
7779
|
return sortSubKey2 === columnKey ? sortSubOrder2 === "asc" ? /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
|
|
7650
7780
|
column.title,
|
|
7651
7781
|
" ",
|
|
7652
|
-
/* @__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" }) })
|
|
7653
7783
|
] }) : /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
|
|
7654
7784
|
column.title,
|
|
7655
7785
|
" ",
|
|
7656
|
-
/* @__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" }) })
|
|
7657
7787
|
] }) : /* @__PURE__ */ jsxs28(SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
|
|
7658
7788
|
column.title,
|
|
7659
7789
|
" ",
|
|
7660
|
-
/* @__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" }) })
|
|
7661
7791
|
] });
|
|
7662
7792
|
};
|
|
7663
7793
|
const headers = HeadColumns.map((column) => {
|
|
7664
|
-
return /* @__PURE__ */
|
|
7794
|
+
return /* @__PURE__ */ jsx49(TableHeaderCell, { children: renderSortButton(column, sortOrder, sortKey) }, `HeaderCell-${column.key}`);
|
|
7665
7795
|
});
|
|
7666
7796
|
const SubDataHeaders = SubDataColumns.map((column, index) => {
|
|
7667
|
-
return /* @__PURE__ */
|
|
7797
|
+
return /* @__PURE__ */ jsx49("th", { children: renderSortSubButton(column, sortSubOrder, sortSubKey) }, `SubHeadCell-${index}`);
|
|
7668
7798
|
});
|
|
7669
7799
|
const subDataRows = (itemId) => {
|
|
7670
|
-
return processedRowData.filter((item) => item.Details?.relationId === itemId).map((item) => /* @__PURE__ */
|
|
7671
|
-
/* @__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(
|
|
7672
7802
|
"path",
|
|
7673
7803
|
{
|
|
7674
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",
|
|
@@ -7679,45 +7809,45 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7679
7809
|
const columnKey = trimBeforePeriod2(column.key);
|
|
7680
7810
|
const value = fileItem[columnKey];
|
|
7681
7811
|
if (value !== void 0) {
|
|
7682
|
-
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}`);
|
|
7683
7813
|
}
|
|
7684
7814
|
})
|
|
7685
7815
|
] }, `${item}-${item.Details?.relationId}-${fileItem.id}-${index}`)) }, `SDR-${item.id}-${item.Details?.relationId}`));
|
|
7686
7816
|
};
|
|
7687
7817
|
const dataRows = processedRowData?.map((item, index) => /* @__PURE__ */ jsxs28(BodyRowContainer, { children: [
|
|
7688
|
-
/* @__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}`)) }),
|
|
7689
7819
|
/* @__PURE__ */ jsxs28(ButtonStylingRow, { children: [
|
|
7690
|
-
/* @__PURE__ */
|
|
7691
|
-
/* @__PURE__ */
|
|
7820
|
+
/* @__PURE__ */ jsx49(DownloadMissionButton, { onClick: downloadMissionOnClick, children: "Download Mission" }),
|
|
7821
|
+
/* @__PURE__ */ jsx49(AddButton, { onClick: addFilesOnClick, children: "Add files" })
|
|
7692
7822
|
] }),
|
|
7693
|
-
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" }) }) }),
|
|
7694
7824
|
openRow === item.id && /* @__PURE__ */ jsxs28("div", { children: [
|
|
7695
7825
|
/* @__PURE__ */ jsxs28(SubDataTable, { children: [
|
|
7696
|
-
/* @__PURE__ */
|
|
7697
|
-
/* @__PURE__ */
|
|
7826
|
+
/* @__PURE__ */ jsx49(SubDataHeaderColumn, { children: /* @__PURE__ */ jsxs28(SubDataTableHeaderRow, { children: [
|
|
7827
|
+
/* @__PURE__ */ jsx49("th", {}),
|
|
7698
7828
|
SubDataHeaders
|
|
7699
7829
|
] }) }),
|
|
7700
|
-
/* @__PURE__ */
|
|
7830
|
+
/* @__PURE__ */ jsx49(SubDataTableBodyRow, { children: subDataRows(item.id) })
|
|
7701
7831
|
] }),
|
|
7702
|
-
/* @__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" }) }) })
|
|
7703
7833
|
] })
|
|
7704
7834
|
] }, `Bodycontainer-${item.id}-${index}`));
|
|
7705
7835
|
return /* @__PURE__ */ jsxs28(TableContainer, { children: [
|
|
7706
|
-
/* @__PURE__ */
|
|
7707
|
-
/* @__PURE__ */
|
|
7836
|
+
/* @__PURE__ */ jsx49(TablePrimaryRow, { $amountofColumns: HeadColumns.length, children: headers }),
|
|
7837
|
+
/* @__PURE__ */ jsx49("div", { title: "tablebodies", children: dataRows })
|
|
7708
7838
|
] });
|
|
7709
7839
|
};
|
|
7710
7840
|
ChildDataTable.displayName = "ChildDataTable";
|
|
7711
7841
|
|
|
7712
7842
|
// src/components/DataTable/SubRowTable/ChildDataTable.tsx
|
|
7713
|
-
import { useRef as
|
|
7843
|
+
import { useRef as useRef19, useEffect as useEffect20 } from "react";
|
|
7714
7844
|
import "@wavelengthusaf/web-components";
|
|
7715
7845
|
import { createRoot } from "react-dom/client";
|
|
7716
|
-
import { jsx as
|
|
7846
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
7717
7847
|
var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdownButtonIcon, ...rest }) => {
|
|
7718
|
-
const tableRef =
|
|
7719
|
-
const reactDropdownRoots =
|
|
7720
|
-
|
|
7848
|
+
const tableRef = useRef19(null);
|
|
7849
|
+
const reactDropdownRoots = useRef19(/* @__PURE__ */ new Map());
|
|
7850
|
+
useEffect20(() => {
|
|
7721
7851
|
const customChildDataTableElement = tableRef.current;
|
|
7722
7852
|
if (!customChildDataTableElement) return;
|
|
7723
7853
|
if (columns !== void 0) customChildDataTableElement.setColumns = columns;
|
|
@@ -7726,7 +7856,7 @@ var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdow
|
|
|
7726
7856
|
if (sortIcon !== void 0) customChildDataTableElement.setSortIcon = sortIcon;
|
|
7727
7857
|
if (dropdownButtonIcon !== void 0) customChildDataTableElement.setDropdownButtonIcon = dropdownButtonIcon;
|
|
7728
7858
|
}, [columns, data, dropdownArrowLocation, sortIcon, dropdownButtonIcon]);
|
|
7729
|
-
|
|
7859
|
+
useEffect20(() => {
|
|
7730
7860
|
const el = tableRef.current;
|
|
7731
7861
|
if (!el) return;
|
|
7732
7862
|
const handleReactDropdown = (event) => {
|
|
@@ -7763,7 +7893,7 @@ var ChildDataTable2 = ({ columns, data, dropdownArrowLocation, sortIcon, dropdow
|
|
|
7763
7893
|
el.removeEventListener("cleanupDropdown", handleCleanupDropdown);
|
|
7764
7894
|
};
|
|
7765
7895
|
}, [data]);
|
|
7766
|
-
return /* @__PURE__ */
|
|
7896
|
+
return /* @__PURE__ */ jsx50("wavelength-child-data-table", { ref: tableRef, ...rest });
|
|
7767
7897
|
};
|
|
7768
7898
|
ChildDataTable2.displayName = "ChildDataTable";
|
|
7769
7899
|
|
|
@@ -7773,7 +7903,7 @@ import { ChildDataTable as ChildDataTable3 } from "@wavelengthusaf/web-component
|
|
|
7773
7903
|
// src/components/DataTable/NestedDataTable/NestedDataTable.tsx
|
|
7774
7904
|
import { useState as useState11 } from "react";
|
|
7775
7905
|
import styled11 from "styled-components";
|
|
7776
|
-
import { Fragment as Fragment15, jsx as
|
|
7906
|
+
import { Fragment as Fragment15, jsx as jsx51, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7777
7907
|
var TableStyle = styled11.table`
|
|
7778
7908
|
width: 100%;
|
|
7779
7909
|
height: 100%;
|
|
@@ -7860,46 +7990,46 @@ var NestedDataTable = ({ data, columns, id }) => {
|
|
|
7860
7990
|
setPrimaryRowIndex(rowIndex);
|
|
7861
7991
|
};
|
|
7862
7992
|
const headers = HeadColumns.map((column, index) => {
|
|
7863
|
-
return /* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ jsx51(MainThHeaders, { children: column.title }, `headCell-${index}`);
|
|
7864
7994
|
});
|
|
7865
7995
|
const SubDataHeaders = SubDataColumns.map((column, index) => {
|
|
7866
|
-
return /* @__PURE__ */
|
|
7996
|
+
return /* @__PURE__ */ jsx51("th", { children: column.title }, `SubHeadCell-${index}`);
|
|
7867
7997
|
});
|
|
7868
|
-
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) => {
|
|
7869
7999
|
const columnKey = trimBeforePeriod(column.key);
|
|
7870
8000
|
const value = item.Details?.[columnKey];
|
|
7871
8001
|
console.log("value: ", value);
|
|
7872
8002
|
if (value !== void 0) {
|
|
7873
|
-
return /* @__PURE__ */
|
|
8003
|
+
return /* @__PURE__ */ jsx51("td", { children: /* @__PURE__ */ jsx51("span", { children: value }) }, `Span-${item.id}-${colIndex}`);
|
|
7874
8004
|
}
|
|
7875
8005
|
}) }, `Sub-${item.id}-${index}`) }));
|
|
7876
8006
|
const childRows = /* @__PURE__ */ jsxs29(SubTableStyle, { children: [
|
|
7877
|
-
/* @__PURE__ */
|
|
7878
|
-
/* @__PURE__ */
|
|
8007
|
+
/* @__PURE__ */ jsx51("thead", { children: /* @__PURE__ */ jsx51("tr", { children: SubDataHeaders }) }),
|
|
8008
|
+
/* @__PURE__ */ jsx51("tbody", { children: subDataRows })
|
|
7879
8009
|
] });
|
|
7880
|
-
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: [
|
|
7881
8011
|
/* @__PURE__ */ jsxs29(PrimaryTrRows, { $index: index, children: [
|
|
7882
|
-
/* @__PURE__ */
|
|
8012
|
+
/* @__PURE__ */ jsx51(DropdownButton, { onClick: () => toggleDropdown(index), children: isAscending && isOpen && primaryRowIndex === index ? /* @__PURE__ */ jsx51(Fragment15, { children: "\u2227" }) : /* @__PURE__ */ jsx51(Fragment15, { children: "\u2228" }) }),
|
|
7883
8013
|
HeadColumns.map((column, index2) => {
|
|
7884
|
-
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}`);
|
|
7885
8015
|
})
|
|
7886
8016
|
] }, index),
|
|
7887
|
-
isOpen && primaryRowIndex === index && /* @__PURE__ */
|
|
8017
|
+
isOpen && primaryRowIndex === index && /* @__PURE__ */ jsx51(SubTrRows, { $index: index, children: /* @__PURE__ */ jsx51("td", { colSpan: HeadColumns.length + 1, children: childRows }) }, index)
|
|
7888
8018
|
] }));
|
|
7889
|
-
return /* @__PURE__ */
|
|
7890
|
-
/* @__PURE__ */
|
|
7891
|
-
/* @__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" }),
|
|
7892
8022
|
headers
|
|
7893
8023
|
] }) }),
|
|
7894
|
-
/* @__PURE__ */
|
|
8024
|
+
/* @__PURE__ */ jsx51("tbody", { children: rows })
|
|
7895
8025
|
] }) });
|
|
7896
8026
|
};
|
|
7897
8027
|
NestedDataTable.displayName = "NestedDataTable";
|
|
7898
8028
|
|
|
7899
8029
|
// src/components/AutoComplete/WavelengthAutoComplete.tsx
|
|
7900
|
-
import { useEffect as
|
|
8030
|
+
import { useEffect as useEffect21, useRef as useRef21, useState as useState12 } from "react";
|
|
7901
8031
|
import styled12 from "styled-components";
|
|
7902
|
-
import { Fragment as Fragment16, jsx as
|
|
8032
|
+
import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7903
8033
|
var AutoContainer = styled12.div`
|
|
7904
8034
|
//position: relative;
|
|
7905
8035
|
position: relative;
|
|
@@ -8028,9 +8158,9 @@ var WavelengthAutoComplete = ({
|
|
|
8028
8158
|
placeholder,
|
|
8029
8159
|
onBlurCallback
|
|
8030
8160
|
}) => {
|
|
8031
|
-
const inputRef =
|
|
8032
|
-
const listRef =
|
|
8033
|
-
const noItemListRef =
|
|
8161
|
+
const inputRef = useRef21(null);
|
|
8162
|
+
const listRef = useRef21(null);
|
|
8163
|
+
const noItemListRef = useRef21(null);
|
|
8034
8164
|
const [inputValue, setInputValue] = useState12(placeholder ?? "");
|
|
8035
8165
|
const [suggestions, setSuggestions] = useState12([]);
|
|
8036
8166
|
const [isDropdownVisible, setIsDropdownVisible] = useState12(false);
|
|
@@ -8038,7 +8168,7 @@ var WavelengthAutoComplete = ({
|
|
|
8038
8168
|
const arrayLength = suggestions.length;
|
|
8039
8169
|
const [focusedIndex, setFocusedIndex] = useState12(0);
|
|
8040
8170
|
const idName = id ? id : "auto-comp";
|
|
8041
|
-
|
|
8171
|
+
useEffect21(() => {
|
|
8042
8172
|
const handleClickOutsideList = (event) => {
|
|
8043
8173
|
if (listRef.current && !listRef.current.contains(event.target)) {
|
|
8044
8174
|
setIsDropdownVisible(false);
|
|
@@ -8050,7 +8180,7 @@ var WavelengthAutoComplete = ({
|
|
|
8050
8180
|
};
|
|
8051
8181
|
}, [focusedIndex]);
|
|
8052
8182
|
if (onDataChange !== void 0) {
|
|
8053
|
-
|
|
8183
|
+
useEffect21(() => {
|
|
8054
8184
|
onDataChange(inputValue);
|
|
8055
8185
|
}, [inputValue]);
|
|
8056
8186
|
}
|
|
@@ -8116,9 +8246,9 @@ var WavelengthAutoComplete = ({
|
|
|
8116
8246
|
break;
|
|
8117
8247
|
}
|
|
8118
8248
|
};
|
|
8119
|
-
return /* @__PURE__ */
|
|
8249
|
+
return /* @__PURE__ */ jsx52(Fragment16, { children: /* @__PURE__ */ jsxs30(AutoContainer, { $inputHeight: height2, $inputWidth: width2, children: [
|
|
8120
8250
|
/* @__PURE__ */ jsxs30(InputWrapper, { id: `${idName}-input-wrapper`, $inputHeight: height2, $inputWidth: width2, children: [
|
|
8121
|
-
/* @__PURE__ */
|
|
8251
|
+
/* @__PURE__ */ jsx52(
|
|
8122
8252
|
Input,
|
|
8123
8253
|
{
|
|
8124
8254
|
id: idName,
|
|
@@ -8147,11 +8277,11 @@ var WavelengthAutoComplete = ({
|
|
|
8147
8277
|
autoComplete: "off"
|
|
8148
8278
|
}
|
|
8149
8279
|
),
|
|
8150
|
-
/* @__PURE__ */
|
|
8280
|
+
/* @__PURE__ */ jsx52(Label, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8151
8281
|
] }),
|
|
8152
|
-
isDropdownVisible && /* @__PURE__ */
|
|
8282
|
+
isDropdownVisible && /* @__PURE__ */ jsx52(DropDownList, { id: `${idName}-drop-list`, ref: listRef, $inputWidth: width2, "data-testid": "InputSearchOptionsList", children: suggestHasItems ? (
|
|
8153
8283
|
//suggestions length controls showing the suggestions
|
|
8154
|
-
suggestions.map((item, index) => /* @__PURE__ */
|
|
8284
|
+
suggestions.map((item, index) => /* @__PURE__ */ jsx52(
|
|
8155
8285
|
ActiveListItem,
|
|
8156
8286
|
{
|
|
8157
8287
|
"data-testid": `${idName}-input-search-list-${index + 1}`,
|
|
@@ -8164,15 +8294,15 @@ var WavelengthAutoComplete = ({
|
|
|
8164
8294
|
},
|
|
8165
8295
|
`active-list-item-${item}-${index}`
|
|
8166
8296
|
))
|
|
8167
|
-
) : /* @__PURE__ */
|
|
8297
|
+
) : /* @__PURE__ */ jsx52(NoHoverListItem, { "data-testid": "NoOptionsListitem", ref: noItemListRef, id: "No-Option-List-item", onMouseDown: (e) => e.preventDefault(), children: "No Options found" }) })
|
|
8168
8298
|
] }) });
|
|
8169
8299
|
};
|
|
8170
8300
|
WavelengthAutoComplete.displayName = "WavelengthAutoComplete";
|
|
8171
8301
|
|
|
8172
8302
|
// src/components/inputs/WavelengthDatePicker.tsx
|
|
8173
|
-
import { useEffect as
|
|
8303
|
+
import { useEffect as useEffect22, useState as useState13 } from "react";
|
|
8174
8304
|
import styled13 from "styled-components";
|
|
8175
|
-
import { jsx as
|
|
8305
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8176
8306
|
var Label2 = styled13.label`
|
|
8177
8307
|
position: absolute;
|
|
8178
8308
|
top: 50%;
|
|
@@ -8244,7 +8374,7 @@ var WavelengthDatePicker = ({
|
|
|
8244
8374
|
const [minAdjusted, setMinAdjusted] = useState13("");
|
|
8245
8375
|
const [maxAdjusted, setMaxAdjusted] = useState13("");
|
|
8246
8376
|
const idName = id ? id : "WlDatePick";
|
|
8247
|
-
|
|
8377
|
+
useEffect22(() => {
|
|
8248
8378
|
const minDate = new Date(min || "");
|
|
8249
8379
|
const maxDate = new Date(max || "");
|
|
8250
8380
|
if (inputTimeType === "datetime-local") {
|
|
@@ -8295,7 +8425,7 @@ var WavelengthDatePicker = ({
|
|
|
8295
8425
|
$FocusLabelColor: FocusLabelColor,
|
|
8296
8426
|
$inputBackGroundColor: backgroundColor2,
|
|
8297
8427
|
children: [
|
|
8298
|
-
/* @__PURE__ */
|
|
8428
|
+
/* @__PURE__ */ jsx53(
|
|
8299
8429
|
"input",
|
|
8300
8430
|
{
|
|
8301
8431
|
type: inputType,
|
|
@@ -8316,7 +8446,7 @@ var WavelengthDatePicker = ({
|
|
|
8316
8446
|
max: maxAdjusted
|
|
8317
8447
|
}
|
|
8318
8448
|
),
|
|
8319
|
-
/* @__PURE__ */
|
|
8449
|
+
/* @__PURE__ */ jsx53(Label2, { id: `${idName}-label`, htmlFor: idName, children: floatLabel })
|
|
8320
8450
|
]
|
|
8321
8451
|
}
|
|
8322
8452
|
);
|
|
@@ -8327,9 +8457,9 @@ WavelengthDatePicker.displayName = "WavelengthDatePicker";
|
|
|
8327
8457
|
import { WavelengthDatePicker as WavelengthDatePicker2 } from "@wavelengthusaf/web-components";
|
|
8328
8458
|
|
|
8329
8459
|
// src/components/inputs/WavelengthCheckbox.tsx
|
|
8330
|
-
import { useRef as
|
|
8460
|
+
import { useRef as useRef22, useEffect as useEffect23 } from "react";
|
|
8331
8461
|
import "@wavelengthusaf/web-components";
|
|
8332
|
-
import { jsx as
|
|
8462
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
8333
8463
|
var WavelengthCheckbox = ({
|
|
8334
8464
|
size,
|
|
8335
8465
|
color: color2,
|
|
@@ -8339,8 +8469,8 @@ var WavelengthCheckbox = ({
|
|
|
8339
8469
|
textSize,
|
|
8340
8470
|
...rest
|
|
8341
8471
|
}) => {
|
|
8342
|
-
const ref =
|
|
8343
|
-
|
|
8472
|
+
const ref = useRef22(null);
|
|
8473
|
+
useEffect23(() => {
|
|
8344
8474
|
const el = ref.current;
|
|
8345
8475
|
if (!el) return;
|
|
8346
8476
|
if (size !== void 0) {
|
|
@@ -8364,13 +8494,13 @@ var WavelengthCheckbox = ({
|
|
|
8364
8494
|
el.setAttribute("text-size", textSize);
|
|
8365
8495
|
}
|
|
8366
8496
|
}, [size, color2, theme, disabled, text, textSize]);
|
|
8367
|
-
return /* @__PURE__ */
|
|
8497
|
+
return /* @__PURE__ */ jsx54("wavelength-checkbox", { ref, ...rest });
|
|
8368
8498
|
};
|
|
8369
8499
|
WavelengthCheckbox.displayName = "WavelengthCheckbox";
|
|
8370
8500
|
|
|
8371
8501
|
// src/components/samples/SampleComponent.tsx
|
|
8372
|
-
import { useRef as
|
|
8373
|
-
import { jsx as
|
|
8502
|
+
import { useRef as useRef23, useEffect as useEffect24 } from "react";
|
|
8503
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
8374
8504
|
var SampleComponent = ({
|
|
8375
8505
|
testProp,
|
|
8376
8506
|
children,
|
|
@@ -8379,8 +8509,8 @@ var SampleComponent = ({
|
|
|
8379
8509
|
...rest
|
|
8380
8510
|
// This rest operator includes className, style, onClick, etc.
|
|
8381
8511
|
}) => {
|
|
8382
|
-
const ref =
|
|
8383
|
-
|
|
8512
|
+
const ref = useRef23(null);
|
|
8513
|
+
useEffect24(() => {
|
|
8384
8514
|
const el = ref.current;
|
|
8385
8515
|
if (!el) return;
|
|
8386
8516
|
el.customStyles = customStyle2;
|
|
@@ -8388,14 +8518,14 @@ var SampleComponent = ({
|
|
|
8388
8518
|
el.setAttribute("test-prop", testProp);
|
|
8389
8519
|
}
|
|
8390
8520
|
}, [testProp]);
|
|
8391
|
-
return /* @__PURE__ */
|
|
8521
|
+
return /* @__PURE__ */ jsx55("sample-component", { ref, ...rest, children });
|
|
8392
8522
|
};
|
|
8393
8523
|
SampleComponent.displayName = "SampleComponent";
|
|
8394
8524
|
|
|
8395
8525
|
// src/components/NotificationPanel/WavelengthNotificationPanel.tsx
|
|
8396
|
-
import { useRef as
|
|
8526
|
+
import { useRef as useRef24, useEffect as useEffect25 } from "react";
|
|
8397
8527
|
import "@wavelengthusaf/web-components";
|
|
8398
|
-
import { jsx as
|
|
8528
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
8399
8529
|
var WavelengthNotificationPanel = ({
|
|
8400
8530
|
notifications,
|
|
8401
8531
|
darkMode,
|
|
@@ -8404,8 +8534,8 @@ var WavelengthNotificationPanel = ({
|
|
|
8404
8534
|
...rest
|
|
8405
8535
|
// This rest operator includes className, style, onClick, etc.
|
|
8406
8536
|
}) => {
|
|
8407
|
-
const ref =
|
|
8408
|
-
|
|
8537
|
+
const ref = useRef24(null);
|
|
8538
|
+
useEffect25(() => {
|
|
8409
8539
|
const el = ref.current;
|
|
8410
8540
|
if (!el) return;
|
|
8411
8541
|
if (notifications !== void 0) {
|
|
@@ -8424,18 +8554,18 @@ var WavelengthNotificationPanel = ({
|
|
|
8424
8554
|
el.accountLink = accountLink;
|
|
8425
8555
|
}
|
|
8426
8556
|
}, [notifications, darkMode, rest.onMarkAsRead, rest.onSignOut, accountLink]);
|
|
8427
|
-
return /* @__PURE__ */
|
|
8557
|
+
return /* @__PURE__ */ jsx56("wavelength-notification-panel", { ref, ...rest, children });
|
|
8428
8558
|
};
|
|
8429
8559
|
|
|
8430
8560
|
// src/index.ts
|
|
8431
8561
|
import { SampleComponent as SampleComponent2 } from "@wavelengthusaf/web-components";
|
|
8432
8562
|
|
|
8433
8563
|
// src/components/MultiSelect/WavelengthMultiSelectAutocomplete.tsx
|
|
8434
|
-
import { useEffect as
|
|
8435
|
-
import { jsx as
|
|
8564
|
+
import { useEffect as useEffect26, useRef as useRef25 } from "react";
|
|
8565
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
8436
8566
|
var WavelengthMultiSelectAutocomplete = ({ options, placeholder = "Select Options", label, name, style: style3, onChange, value, disabled, ...rest }) => {
|
|
8437
|
-
const componentRef =
|
|
8438
|
-
|
|
8567
|
+
const componentRef = useRef25(null);
|
|
8568
|
+
useEffect26(() => {
|
|
8439
8569
|
const component = componentRef.current;
|
|
8440
8570
|
if (!component) return;
|
|
8441
8571
|
const handleValueChange = (event) => {
|
|
@@ -8448,7 +8578,7 @@ var WavelengthMultiSelectAutocomplete = ({ options, placeholder = "Select Option
|
|
|
8448
8578
|
component.removeEventListener("change", handleValueChange);
|
|
8449
8579
|
};
|
|
8450
8580
|
}, [onChange]);
|
|
8451
|
-
|
|
8581
|
+
useEffect26(() => {
|
|
8452
8582
|
const component = componentRef.current;
|
|
8453
8583
|
if (!component) return;
|
|
8454
8584
|
if (placeholder) component.setAttribute("placeholder", placeholder);
|
|
@@ -8458,13 +8588,13 @@ var WavelengthMultiSelectAutocomplete = ({ options, placeholder = "Select Option
|
|
|
8458
8588
|
if (options) component.autocompleteOptions = options;
|
|
8459
8589
|
if (style3) component.customStyles = style3;
|
|
8460
8590
|
}, [options, placeholder, name, label, style3]);
|
|
8461
|
-
|
|
8591
|
+
useEffect26(() => {
|
|
8462
8592
|
const component = componentRef.current;
|
|
8463
8593
|
if (component && value) {
|
|
8464
8594
|
component.value = value;
|
|
8465
8595
|
}
|
|
8466
8596
|
}, [value]);
|
|
8467
|
-
return /* @__PURE__ */
|
|
8597
|
+
return /* @__PURE__ */ jsx57("wavelength-multi-select-autocomplete", { ref: componentRef, ...rest });
|
|
8468
8598
|
};
|
|
8469
8599
|
|
|
8470
8600
|
// src/index.ts
|
|
@@ -8512,11 +8642,14 @@ export {
|
|
|
8512
8642
|
WavelengthInput,
|
|
8513
8643
|
WavelengthInput2 as WavelengthInputElement,
|
|
8514
8644
|
WavelengthManyPlanes,
|
|
8645
|
+
WavelengthMenu,
|
|
8515
8646
|
WavelengthMultiSelectAutocomplete,
|
|
8516
8647
|
WavelengthMultiSelectAutocomplete2 as WavelengthMultiSelectAutocompleteElement,
|
|
8517
8648
|
WavelengthNavBar,
|
|
8518
8649
|
WavelengthNotAvailablePage,
|
|
8519
8650
|
WavelengthNotificationPanel,
|
|
8651
|
+
WavelengthPagination,
|
|
8652
|
+
WavelengthPagination2 as WavelengthPaginationElement,
|
|
8520
8653
|
WavelengthPermissionAlert,
|
|
8521
8654
|
WavelengthPlaneTrail,
|
|
8522
8655
|
WavelengthPopUpMenu,
|
|
@@ -8537,10 +8670,8 @@ export {
|
|
|
8537
8670
|
WavelengthToolTip,
|
|
8538
8671
|
WavelengthWebSnackbar,
|
|
8539
8672
|
add,
|
|
8540
|
-
ascendingRange,
|
|
8541
8673
|
concat,
|
|
8542
8674
|
findBestStringMatch,
|
|
8543
|
-
range,
|
|
8544
8675
|
useOutsideClick,
|
|
8545
8676
|
useThemeContext
|
|
8546
8677
|
};
|