@wavelengthusaf/components 3.0.2 → 3.1.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.
@@ -206,7 +206,7 @@ var require_react_is_development = __commonJS({
206
206
  var ContextProvider = REACT_PROVIDER_TYPE;
207
207
  var Element = REACT_ELEMENT_TYPE;
208
208
  var ForwardRef2 = REACT_FORWARD_REF_TYPE;
209
- var Fragment14 = REACT_FRAGMENT_TYPE;
209
+ var Fragment17 = REACT_FRAGMENT_TYPE;
210
210
  var Lazy = REACT_LAZY_TYPE;
211
211
  var Memo2 = REACT_MEMO_TYPE;
212
212
  var Portal = REACT_PORTAL_TYPE;
@@ -265,7 +265,7 @@ var require_react_is_development = __commonJS({
265
265
  exports.ContextProvider = ContextProvider;
266
266
  exports.Element = Element;
267
267
  exports.ForwardRef = ForwardRef2;
268
- exports.Fragment = Fragment14;
268
+ exports.Fragment = Fragment17;
269
269
  exports.Lazy = Lazy;
270
270
  exports.Memo = Memo2;
271
271
  exports.Portal = Portal;
@@ -1227,26 +1227,26 @@ if (!customElements.get("sample-component")) {
1227
1227
  // src/web-components/wavelength-banner.ts
1228
1228
  var WavelengthBanner = class extends HTMLElement {
1229
1229
  static get observedAttributes() {
1230
- return ["header-text", "header-color", "text-color", "opacity", "z-index", "id"];
1230
+ return ["banner-text", "banner-color", "text-color", "opacity", "z-index", "id", "classification", "control"];
1231
1231
  }
1232
1232
  constructor() {
1233
1233
  super();
1234
1234
  const shadow = this.attachShadow({ mode: "open" });
1235
1235
  const style3 = document.createElement("style");
1236
1236
  style3.textContent = `
1237
- :host {
1238
- display: block;
1239
- width: 100%;
1240
- }
1241
-
1242
- .banner {
1243
- width: 100%;
1244
- text-align: center;
1245
- font-weight: normal;
1246
- font-family: sans-serif;
1247
- font-size: 1rem;
1248
- }
1249
- `;
1237
+ :host {
1238
+ display: block;
1239
+ width: 100%;
1240
+ }
1241
+
1242
+ .banner {
1243
+ width: 100%;
1244
+ text-align: center;
1245
+ font-weight: normal;
1246
+ font-family: sans-serif;
1247
+ font-size: 1rem;
1248
+ }
1249
+ `;
1250
1250
  this.container = document.createElement("div");
1251
1251
  this.container.classList.add("banner");
1252
1252
  this.textElement = document.createElement("p");
@@ -1261,18 +1261,76 @@ var WavelengthBanner = class extends HTMLElement {
1261
1261
  this.updateAttributes();
1262
1262
  }
1263
1263
  updateAttributes() {
1264
- const headerText = this.getAttribute("header-text") || "CLASSIFICATION//CONTROL";
1265
- const headerColor = this.getAttribute("header-color") || "#4373aa";
1266
- const textColor = this.getAttribute("text-color") || "#ffffff";
1267
- const opacity = this.getAttribute("opacity") || "1";
1268
- const zIndex = this.getAttribute("z-index") || "10";
1269
- const id = this.getAttribute("id");
1270
- this.container.style.backgroundColor = headerColor;
1271
- this.container.style.opacity = opacity;
1272
- this.container.style.zIndex = zIndex;
1273
- if (id) this.container.id = id;
1274
- this.textElement.textContent = headerText.toUpperCase();
1275
- this.textElement.style.color = textColor;
1264
+ const classificationRaw = _optionalChain([this, 'access', _2 => _2.getAttribute, 'call', _3 => _3("classification"), 'optionalAccess', _4 => _4.toLowerCase, 'call', _5 => _5()]) || "";
1265
+ const controlRaw = this.getAttribute("control") || "";
1266
+ const controlList = controlRaw.split(",").map((s) => s.trim().toLowerCase()).filter(Boolean);
1267
+ let bannerText = this.getAttribute("banner-text");
1268
+ const bannerColor = this.getAttribute("banner-color");
1269
+ const textColor = this.getAttribute("text-color");
1270
+ const palette2 = {
1271
+ primary: "#4373aa",
1272
+ secondary: "#ffffff"
1273
+ };
1274
+ let effectiveClassification = classificationRaw;
1275
+ let effectiveColor = palette2.primary;
1276
+ let effectiveTextColor = palette2.secondary;
1277
+ switch (classificationRaw) {
1278
+ case "unclassified":
1279
+ case "u":
1280
+ if (controlRaw) {
1281
+ effectiveColor = "#502b85";
1282
+ effectiveTextColor = "white";
1283
+ } else {
1284
+ effectiveColor = "#007a33";
1285
+ effectiveTextColor = "white";
1286
+ }
1287
+ break;
1288
+ case "controlled":
1289
+ case "controlled unclassified information":
1290
+ case "cui":
1291
+ effectiveColor = "#502b85";
1292
+ effectiveTextColor = "white";
1293
+ break;
1294
+ case "confidential":
1295
+ case "c":
1296
+ effectiveColor = "#0033a0";
1297
+ effectiveTextColor = "white";
1298
+ break;
1299
+ case "secret":
1300
+ case "s":
1301
+ effectiveColor = "#c8102e";
1302
+ effectiveTextColor = "white";
1303
+ break;
1304
+ case "top secret":
1305
+ case "ts":
1306
+ if (controlList.includes("sci")) {
1307
+ effectiveColor = "#fce83a";
1308
+ effectiveTextColor = "black";
1309
+ } else {
1310
+ effectiveColor = "#ff8c00";
1311
+ effectiveTextColor = "black";
1312
+ }
1313
+ break;
1314
+ case "":
1315
+ effectiveClassification = "CLASSIFICATION//CONTROL";
1316
+ break;
1317
+ default:
1318
+ effectiveColor = palette2.primary;
1319
+ effectiveTextColor = palette2.secondary;
1320
+ }
1321
+ if (!bannerText) {
1322
+ if (controlList.length === 0) {
1323
+ bannerText = effectiveClassification;
1324
+ } else {
1325
+ bannerText = `${effectiveClassification}//${controlList.join("/")}`;
1326
+ }
1327
+ }
1328
+ this.container.style.backgroundColor = bannerColor || effectiveColor;
1329
+ this.textElement.style.color = textColor || effectiveTextColor;
1330
+ this.container.style.opacity = this.getAttribute("opacity") || "1";
1331
+ this.container.style.zIndex = this.getAttribute("z-index") || "10";
1332
+ if (this.getAttribute("id")) this.container.id = this.getAttribute("id");
1333
+ this.textElement.textContent = bannerText.toUpperCase();
1276
1334
  }
1277
1335
  };
1278
1336
  if (!customElements.get("wavelength-banner")) {
@@ -1701,18 +1759,18 @@ var WavelengthTitleBar = class extends HTMLElement {
1701
1759
  attributeChangedCallback(name, oldValue, newValue) {
1702
1760
  if (oldValue !== newValue) {
1703
1761
  if (name === "title-text") {
1704
- const titleElement = _optionalChain([this, 'access', _2 => _2.shadowRoot, 'optionalAccess', _3 => _3.querySelector, 'call', _4 => _4(".title")]);
1762
+ const titleElement = _optionalChain([this, 'access', _6 => _6.shadowRoot, 'optionalAccess', _7 => _7.querySelector, 'call', _8 => _8(".title")]);
1705
1763
  if (titleElement) {
1706
1764
  titleElement.textContent = newValue;
1707
1765
  }
1708
1766
  } else if (name === "subtitle-text") {
1709
- const subtitleElement = _optionalChain([this, 'access', _5 => _5.shadowRoot, 'optionalAccess', _6 => _6.querySelector, 'call', _7 => _7(".subtitle")]);
1767
+ const subtitleElement = _optionalChain([this, 'access', _9 => _9.shadowRoot, 'optionalAccess', _10 => _10.querySelector, 'call', _11 => _11(".subtitle")]);
1710
1768
  if (subtitleElement) {
1711
1769
  subtitleElement.textContent = newValue;
1712
1770
  }
1713
1771
  } else if (name === "text-color") {
1714
- const titleElement = _optionalChain([this, 'access', _8 => _8.shadowRoot, 'optionalAccess', _9 => _9.querySelector, 'call', _10 => _10(".title")]);
1715
- const subtitleElement = _optionalChain([this, 'access', _11 => _11.shadowRoot, 'optionalAccess', _12 => _12.querySelector, 'call', _13 => _13(".subtitle")]);
1772
+ const titleElement = _optionalChain([this, 'access', _12 => _12.shadowRoot, 'optionalAccess', _13 => _13.querySelector, 'call', _14 => _14(".title")]);
1773
+ const subtitleElement = _optionalChain([this, 'access', _15 => _15.shadowRoot, 'optionalAccess', _16 => _16.querySelector, 'call', _17 => _17(".subtitle")]);
1716
1774
  if (titleElement) {
1717
1775
  titleElement.style.color = newValue;
1718
1776
  }
@@ -1720,7 +1778,7 @@ var WavelengthTitleBar = class extends HTMLElement {
1720
1778
  subtitleElement.style.color = newValue;
1721
1779
  }
1722
1780
  } else if (name === "has-shadow") {
1723
- const titleElement = _optionalChain([this, 'access', _14 => _14.shadowRoot, 'optionalAccess', _15 => _15.querySelector, 'call', _16 => _16(".title")]);
1781
+ const titleElement = _optionalChain([this, 'access', _18 => _18.shadowRoot, 'optionalAccess', _19 => _19.querySelector, 'call', _20 => _20(".title")]);
1724
1782
  if (titleElement) {
1725
1783
  titleElement.style.textShadow = newValue !== "false" ? "none" : "0.313rem 0.313rem 0.375rem #FFFFFF";
1726
1784
  }
@@ -1795,7 +1853,7 @@ var WavelengthButton2 = ({
1795
1853
  if (disabled) el.setAttribute("disabled", "");
1796
1854
  else el.removeAttribute("disabled");
1797
1855
  const handleClick = (e) => {
1798
- _optionalChain([onClick, 'optionalCall', _17 => _17(e)]);
1856
+ _optionalChain([onClick, 'optionalCall', _21 => _21(e)]);
1799
1857
  };
1800
1858
  el.addEventListener("click", handleClick);
1801
1859
  return () => el.removeEventListener("click", handleClick);
@@ -5043,7 +5101,7 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
5043
5101
  openSections[section.title] ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.KeyboardArrowDownRounded, { sx: { color: arrowColor ? arrowColor : palette2.secondary } }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.KeyboardArrowRightRounded, { sx: { color: arrowColor ? arrowColor : palette2.secondary } }),
5044
5102
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "h6", sx: { fontSize: 16, color: txtColor ? txtColor : palette2.secondary }, children: section.title })
5045
5103
  ] }),
5046
- _optionalChain([section, 'access', _18 => _18.subsections, 'optionalAccess', _19 => _19.length]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Collapse2.default, { in: openSections[section.title], timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _List2.default, { component: "div", disablePadding: true, sx: { paddingLeft: 4 }, children: section.subsections.map((subsection, subIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
5104
+ _optionalChain([section, 'access', _22 => _22.subsections, 'optionalAccess', _23 => _23.length]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Collapse2.default, { in: openSections[section.title], timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _List2.default, { component: "div", disablePadding: true, sx: { paddingLeft: 4 }, children: section.subsections.map((subsection, subIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
5047
5105
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5048
5106
  _Typography2.default,
5049
5107
  {
@@ -5054,7 +5112,7 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
5054
5112
  paddingLeft: 0.75,
5055
5113
  color: labelColor ? labelColor : palette2.secondary
5056
5114
  },
5057
- children: _optionalChain([subsection, 'access', _20 => _20.title, 'optionalAccess', _21 => _21.toUpperCase, 'call', _22 => _22()])
5115
+ children: _optionalChain([subsection, 'access', _24 => _24.title, 'optionalAccess', _25 => _25.toUpperCase, 'call', _26 => _26()])
5058
5116
  }
5059
5117
  ),
5060
5118
  subsection.items && subsection.items.map((item, itemIndex) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -5284,7 +5342,7 @@ function WavelengthCommentDisplay(props) {
5284
5342
  {
5285
5343
  onClick: (e) => {
5286
5344
  setSelected(!selected);
5287
- _optionalChain([props, 'access', _23 => _23.onClick, 'optionalCall', _24 => _24(e)]);
5345
+ _optionalChain([props, 'access', _27 => _27.onClick, 'optionalCall', _28 => _28(e)]);
5288
5346
  },
5289
5347
  style: { padding: "0px" },
5290
5348
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircleOutline2.default, { fontSize: "small" })
@@ -5295,7 +5353,7 @@ function WavelengthCommentDisplay(props) {
5295
5353
  {
5296
5354
  onClick: (e) => {
5297
5355
  setSelected(!selected);
5298
- _optionalChain([props, 'access', _25 => _25.onClick, 'optionalCall', _26 => _26(e)]);
5356
+ _optionalChain([props, 'access', _29 => _29.onClick, 'optionalCall', _30 => _30(e)]);
5299
5357
  },
5300
5358
  style: { padding: "0px" },
5301
5359
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircle2.default, { fontSize: "small", sx: { color: props.iconSelectedColor || "rgba(209, 106, 47, 1)" } })
@@ -5688,18 +5746,20 @@ function WavelengthTitleBar2({ titleText, subtitleText, textColor, textShadow })
5688
5746
  // src/components/headers/WavelengthTitleBar/WavelengthBanner.tsx
5689
5747
 
5690
5748
 
5691
- function WavelengthBanner2({ headerText = "CLASSIFICATION//CONTROL", headerColor = "#000000", textColor = "#FFFFFF", opacity = 1, zIndex = 10, id }) {
5749
+ function WavelengthBanner2({ bannerText, bannerColor, textColor, opacity = 1, zIndex = 10, id, classification, control }) {
5692
5750
  const ref = _react.useRef.call(void 0, null);
5693
5751
  _react.useEffect.call(void 0, () => {
5694
- if (ref.current) {
5695
- ref.current.setAttribute("header-text", headerText);
5696
- ref.current.setAttribute("header-color", headerColor);
5697
- ref.current.setAttribute("text-color", textColor);
5698
- ref.current.setAttribute("opacity", String(opacity));
5699
- ref.current.setAttribute("z-index", String(zIndex));
5700
- if (id) ref.current.setAttribute("id", id);
5701
- }
5702
- }, [headerText, headerColor, textColor, opacity, zIndex, id]);
5752
+ if (!ref.current) return;
5753
+ const el = ref.current;
5754
+ if (bannerText !== void 0) el.setAttribute("banner-text", bannerText);
5755
+ if (bannerColor !== void 0) el.setAttribute("banner-color", bannerColor);
5756
+ if (textColor !== void 0) el.setAttribute("text-color", textColor);
5757
+ if (classification !== void 0) el.setAttribute("classification", classification);
5758
+ if (control !== void 0) el.setAttribute("control", String(control));
5759
+ if (opacity !== void 0) el.setAttribute("opacity", String(opacity));
5760
+ if (zIndex !== void 0) el.setAttribute("z-index", String(zIndex));
5761
+ if (id) el.setAttribute("id", id);
5762
+ }, [bannerText, bannerColor, textColor, classification, control, opacity, zIndex, id]);
5703
5763
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-banner", { ref });
5704
5764
  }
5705
5765
 
@@ -5836,8 +5896,8 @@ function WavelengthConfirmationModal(props) {
5836
5896
  overflow: "scroll"
5837
5897
  },
5838
5898
  children: [
5839
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "28px", fontWeight: 500, padding: "0px", marginBottom: "16px", fontFamily: props.fontFamily }, children: _optionalChain([props, 'access', _27 => _27.textObj, 'optionalAccess', _28 => _28.title]) }),
5840
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "16px", lineHeight: "19.2px", fontFamily: props.fontFamily, fontWeight: 400, height: "60px" }, children: _optionalChain([props, 'access', _29 => _29.textObj, 'optionalAccess', _30 => _30.dialog]) }),
5899
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "28px", fontWeight: 500, padding: "0px", marginBottom: "16px", fontFamily: props.fontFamily }, children: _optionalChain([props, 'access', _31 => _31.textObj, 'optionalAccess', _32 => _32.title]) }),
5900
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "16px", lineHeight: "19.2px", fontFamily: props.fontFamily, fontWeight: 400, height: "60px" }, children: _optionalChain([props, 'access', _33 => _33.textObj, 'optionalAccess', _34 => _34.dialog]) }),
5841
5901
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { display: "flex", flexDirection: "row", justifyContent: "flex-end", marginTop: "40px", gap: "8px" }, children: [
5842
5902
  props.cancelButton,
5843
5903
  props.submitButton
@@ -5858,11 +5918,11 @@ function WavelengthContentModal(props) {
5858
5918
  };
5859
5919
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Dialog, { "data-testid": "testId-WavelengthContentModal", open: show, onClose: handleClose, "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", children: [
5860
5920
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogTitle, { alignContent: `center`, id: "alert-dialog-title", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { display: "flex", alignItems: "center", children: [
5861
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _31 => _31.textObj, 'optionalAccess', _32 => _32.title]) }),
5921
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _35 => _35.textObj, 'optionalAccess', _36 => _36.title]) }),
5862
5922
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { onClick: handleClose, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, {}) }) })
5863
5923
  ] }) }),
5864
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _33 => _33.textObj, 'optionalAccess', _34 => _34.dialog]) }) }),
5865
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthContentModalConfirmButton", onClick: handleContentModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: _optionalChain([props, 'access', _35 => _35.textObj, 'optionalAccess', _36 => _36.purpose]) }) })
5924
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _37 => _37.textObj, 'optionalAccess', _38 => _38.dialog]) }) }),
5925
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthContentModalConfirmButton", onClick: handleContentModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: _optionalChain([props, 'access', _39 => _39.textObj, 'optionalAccess', _40 => _40.purpose]) }) })
5866
5926
  ] });
5867
5927
  }
5868
5928
 
@@ -6076,7 +6136,7 @@ function WavelengthDropdown({
6076
6136
  borderBottomRightRadius: "8px",
6077
6137
  borderTopRightRadius: "0px",
6078
6138
  borderTopLeftRadius: "0px",
6079
- boxShadow: _optionalChain([menuSx, 'optionalAccess', _37 => _37.boxShadow]),
6139
+ boxShadow: _optionalChain([menuSx, 'optionalAccess', _41 => _41.boxShadow]),
6080
6140
  width: myMenusx.width,
6081
6141
  backgroundColor: `${myMenusx.backgroundColor}`
6082
6142
  },
@@ -6859,7 +6919,7 @@ function WavelengthTextField(props) {
6859
6919
  label: props.label,
6860
6920
  onChange: (e) => {
6861
6921
  handleChange(e);
6862
- _optionalChain([props, 'access', _38 => _38.onChange, 'optionalCall', _39 => _39(e)]);
6922
+ _optionalChain([props, 'access', _42 => _42.onChange, 'optionalCall', _43 => _43(e)]);
6863
6923
  },
6864
6924
  error: hasError,
6865
6925
  helperText: hasError ? props.errorMessage : "",
@@ -6910,7 +6970,7 @@ function WavelengthTextField(props) {
6910
6970
  error: hasError,
6911
6971
  onChange: (e) => {
6912
6972
  handleChange(e);
6913
- _optionalChain([props, 'access', _40 => _40.onChange, 'optionalCall', _41 => _41(e)]);
6973
+ _optionalChain([props, 'access', _44 => _44.onChange, 'optionalCall', _45 => _45(e)]);
6914
6974
  }
6915
6975
  }
6916
6976
  ),
@@ -7099,7 +7159,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
7099
7159
  const [noRowsOpen, setNoRowsOpen] = _react.useState.call(void 0, false);
7100
7160
  const [isModalOpen, setIsModalOpen] = _react.useState.call(void 0, false);
7101
7161
  const [searchItem, setSearchItem] = _react.useState.call(void 0, "");
7102
- const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _42 => _42[0], 'optionalAccess', _43 => _43.key]) || "");
7162
+ const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _46 => _46[0], 'optionalAccess', _47 => _47.key]) || "");
7103
7163
  const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
7104
7164
  const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
7105
7165
  const [editingMenuKey, setEditingMenuKey] = _react.useState.call(void 0, null);
@@ -7253,7 +7313,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
7253
7313
  ] }, index)
7254
7314
  ] }, `headCell-${index}`);
7255
7315
  });
7256
- const rows = !_optionalChain([currentPageData, 'optionalAccess', _44 => _44.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _45 => _45.map, 'call', _46 => _46((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
7316
+ const rows = !_optionalChain([currentPageData, 'optionalAccess', _48 => _48.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _49 => _49.map, 'call', _50 => _50((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
7257
7317
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7258
7318
  StyledInput,
7259
7319
  {
@@ -7282,6 +7342,461 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
7282
7342
  ] });
7283
7343
  };
7284
7344
 
7345
+ // src/components/DataTable/SubRowTable/ChildSubTable.tsx
7346
+
7347
+
7348
+
7349
+ var downWardAnimation = _styledcomponents.keyframes`
7350
+ 0% { top: -122px; }
7351
+ 100% { top: 0px; }
7352
+ `;
7353
+ var disSubTableAnim = _styledcomponents.keyframes`
7354
+ 0% { opacity: 0; }
7355
+ 25% { opacity: 0; }
7356
+ 50% { opacity: 0; }
7357
+ 60% { opacity: 0.2; }
7358
+ 75% { opacity: 0.8; }
7359
+ 100% { opacity: 1; }
7360
+ `;
7361
+ var TableContainer = _styledcomponents2.default.div`
7362
+ background-color: white;
7363
+ width: 1200px;
7364
+ border-radius: 16px;
7365
+ `;
7366
+ var TableRow = _styledcomponents2.default.div`
7367
+ display: grid;
7368
+ grid-template-columns: ${({ $amountofColumns }) => `repeat(${$amountofColumns}, 1fr)`};
7369
+ `;
7370
+ var TablePrimaryRow = _styledcomponents2.default.div`
7371
+ display: grid;
7372
+ grid-template-columns: ${({ $amountofColumns }) => `repeat(${$amountofColumns}, 1fr)`};
7373
+ margin-bottom: 25px;
7374
+ `;
7375
+ var BodyRowContainer = _styledcomponents2.default.div`
7376
+ border: 1px solid black;
7377
+ background-color: white;
7378
+ border-radius: 16px;
7379
+ overflow: hidden;
7380
+ margin-bottom: 10px;
7381
+ `;
7382
+ var TableHeaderCell = _styledcomponents2.default.div`
7383
+ padding-left: 12px;
7384
+ padding-right: 25px;
7385
+ `;
7386
+ var TableBodyCell = _styledcomponents2.default.div`
7387
+ background-color: #fff;
7388
+ color: black;
7389
+ position: relative;
7390
+ padding: 10px 5px 0px 20px;
7391
+ text-wrap: balance;
7392
+ font-size: ${(props) => props.$primaryBoldState ? "24px" : "16px"};
7393
+ font-weight: ${(props) => props.$primaryBoldState ? "bold" : "normal"};
7394
+ `;
7395
+ var ButtonStylingRow = _styledcomponents2.default.div`
7396
+ display: flex;
7397
+ flex-direction: row;
7398
+ `;
7399
+ var BottomArrowBar = _styledcomponents2.default.div`
7400
+ background-color: #e9e9e9;
7401
+ text-align: center;
7402
+ `;
7403
+ var BottomUpArrowBar = _styledcomponents2.default.div`
7404
+ background-color: #e9e9e9;
7405
+ text-align: center;
7406
+ position: relative;
7407
+ animation: ${downWardAnimation} 1.5s;
7408
+ `;
7409
+ var SubDataTable = _styledcomponents2.default.table`
7410
+ background-color: white;
7411
+ color: black;
7412
+ width: 100%;
7413
+ border-collapse: collapse;
7414
+ animation: ${disSubTableAnim} 1.5s;
7415
+
7416
+ line-height: 1.2;
7417
+ `;
7418
+ var SubDataTableHeaderRow = _styledcomponents2.default.tr`
7419
+ height: 50px;
7420
+ background-color: #304359;
7421
+ color: white;
7422
+ font-size: 16px;
7423
+ font-weight: bold;
7424
+
7425
+ th {
7426
+ white-space: nowrap;
7427
+ }
7428
+ `;
7429
+ var SubDataTableBodyRow = _styledcomponents2.default.tbody`
7430
+ font-size: 14px;
7431
+ `;
7432
+ var SubDataTableBodyRowContainer = _styledcomponents2.default.tr`
7433
+ td {
7434
+ padding: 10px 25px 10px 20px;
7435
+ }
7436
+
7437
+ &:nth-child(even) {
7438
+ background-color: #96e0e5;
7439
+ }
7440
+ `;
7441
+ var SubDataTableCell = _styledcomponents2.default.td`
7442
+ text-align: center;
7443
+ `;
7444
+ var SubDataHeaderColumn = _styledcomponents2.default.thead`
7445
+ background-color: #304359;
7446
+ `;
7447
+ var SortButton = _styledcomponents2.default.button`
7448
+ font-size: 16px;
7449
+ font-weight: bold;
7450
+ color: ${(props) => props.$sortColor};
7451
+ background-color: #11ffee00;
7452
+ border: none;
7453
+ white-space: nowrap;
7454
+ `;
7455
+ var DownloadMissionButton = _styledcomponents2.default.button`
7456
+ width: 217px;
7457
+ height: 45px;
7458
+ padding: 12px 32px 12px 32px;
7459
+ background-color: #1a8083cc;
7460
+ color: white;
7461
+
7462
+ margin-left: 22px;
7463
+ margin-bottom: 15px;
7464
+ margin-top: 10px;
7465
+ white-space: nowrap;
7466
+ border: none;
7467
+ border-radius: 8px;
7468
+ gap: 4px;
7469
+
7470
+ font-weight: 600;
7471
+ font-size: 16px;
7472
+
7473
+ &:hover {
7474
+ background-color: rgba(38, 186, 190, 1);
7475
+ color: rgba(247, 247, 249, 1);
7476
+ cursor: pointer;
7477
+ }
7478
+
7479
+ &:active {
7480
+ background-color: #67a8aa;
7481
+ transition: background-color 0.2s ease;
7482
+ }
7483
+ `;
7484
+ var AddButton = _styledcomponents2.default.button`
7485
+ width: 130px;
7486
+ height: 45px;
7487
+ border: 1px solid #1a8083;
7488
+
7489
+ padding: 12px 32px 12px 32px;
7490
+ gap: 4px;
7491
+ background-color: white;
7492
+ color: #1a8083cc;
7493
+
7494
+ margin-left: 22px;
7495
+ margin-bottom: 15px;
7496
+ margin-top: 10px;
7497
+ white-space: nowrap;
7498
+ border-radius: 8px;
7499
+
7500
+ font-weight: 600;
7501
+ font-size: 16px;
7502
+
7503
+ &:hover {
7504
+ background-color: rgba(26, 128, 131, 0.1);
7505
+ color: rgba(26, 128, 131, 1);
7506
+ cursor: pointer;
7507
+ }
7508
+
7509
+ &:active {
7510
+ background-color: #bad7da;
7511
+ transition: background-color 0.2s ease;
7512
+ }
7513
+ `;
7514
+ var DownloadArrow = _styledcomponents2.default.button`
7515
+ background-color: transparent;
7516
+ border: none;
7517
+
7518
+ &:active {
7519
+ transform: scale(0.95);
7520
+ }
7521
+ `;
7522
+ var ChildDataTable = ({ data, columns, downloadArrowOnClick }) => {
7523
+ const HeadColumns = columns.filter((col) => col.subDataTableColumn === false);
7524
+ const SubDataColumns = columns.filter((col) => col.subDataTableColumn === true);
7525
+ const [openRow, setOpenRow] = _react.useState.call(void 0, null);
7526
+ const [sortOrder, setSortOrder] = _react.useState.call(void 0, "asc");
7527
+ const [sortKey, setSortKey] = _react.useState.call(void 0, "");
7528
+ const [sortSubOrder, setSortSubOrder] = _react.useState.call(void 0, "asc");
7529
+ const [sortSubKey, setSortSubKey] = _react.useState.call(void 0, "");
7530
+ const toggleSortOrder = (key) => {
7531
+ setSortOrder(sortOrder === "asc" ? "desc" : "asc");
7532
+ setSortKey(key);
7533
+ };
7534
+ const toggleSubSortOrder = (key) => {
7535
+ setSortSubOrder(sortSubOrder === "asc" ? "desc" : "asc");
7536
+ setSortSubKey(key);
7537
+ };
7538
+ const toggleDropdown = (id) => {
7539
+ setOpenRow(openRow === id ? null : id);
7540
+ };
7541
+ const toggleUpward = () => {
7542
+ setOpenRow(null);
7543
+ };
7544
+ function trimBeforePeriod2(text) {
7545
+ const index = text.indexOf(".");
7546
+ return index === -1 ? text : text.substring(index + 1);
7547
+ }
7548
+ const processedRowData = _react.useMemo.call(void 0, () => {
7549
+ const result = [..._nullishCoalesce(data, () => ( []))];
7550
+ if (sortOrder) {
7551
+ result.sort((a, b) => {
7552
+ const valueA = a[sortKey];
7553
+ const valueB = b[sortKey];
7554
+ if (typeof valueA === "string" && typeof valueB === "string") {
7555
+ if (sortOrder === "asc") {
7556
+ return valueA.localeCompare(valueB);
7557
+ } else {
7558
+ return valueB.localeCompare(valueA);
7559
+ }
7560
+ } else if (typeof valueA === "number" && typeof valueB === "number") {
7561
+ if (sortOrder === "asc") {
7562
+ return valueA - valueB;
7563
+ } else {
7564
+ return valueB - valueA;
7565
+ }
7566
+ } else {
7567
+ return 0;
7568
+ }
7569
+ });
7570
+ }
7571
+ if (sortSubOrder) {
7572
+ result.map(
7573
+ (item) => _optionalChain([item, 'access', _51 => _51.Details, 'optionalAccess', _52 => _52.fileObjects, 'access', _53 => _53.sort, 'call', _54 => _54((c, d) => {
7574
+ const valueC = c[sortSubKey];
7575
+ const valueD = d[sortSubKey];
7576
+ if (typeof valueC === "string" && typeof valueD === "string") {
7577
+ if (sortSubOrder === "asc") {
7578
+ return valueC.localeCompare(valueD);
7579
+ } else {
7580
+ return valueD.localeCompare(valueC);
7581
+ }
7582
+ } else if (typeof valueC === "number" && typeof valueD === "number") {
7583
+ if (sortSubOrder === "asc") {
7584
+ return valueC - valueD;
7585
+ } else {
7586
+ return valueD - valueC;
7587
+ }
7588
+ } else {
7589
+ return 0;
7590
+ }
7591
+ })])
7592
+ );
7593
+ }
7594
+ return result;
7595
+ }, [data, sortKey, sortOrder, sortSubKey, sortSubOrder]);
7596
+ const renderSortButton = (column, sortOrder2, sortKey2) => {
7597
+ return sortKey2 === column.key ? sortOrder2 === "asc" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SortButton, { $sortColor: "black", onClick: () => toggleSortOrder(column.key), children: [
7598
+ column.title,
7599
+ " ",
7600
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "black" }) })
7601
+ ] }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SortButton, { $sortColor: "black", onClick: () => toggleSortOrder(column.key), children: [
7602
+ column.title,
7603
+ " ",
7604
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13.2375 9.2627L7.5 3.5377L1.7625 9.2627L0 7.5002L7.5 0.000196457L15 7.5002L13.2375 9.2627Z", fill: "black" }) })
7605
+ ] }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SortButton, { $sortColor: "black", onClick: () => toggleSortOrder(column.key), children: [
7606
+ column.title,
7607
+ " ",
7608
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "black" }) })
7609
+ ] }) });
7610
+ };
7611
+ const renderSortSubButton = (column, sortSubOrder2, sortSubKey2) => {
7612
+ const columnKey = trimBeforePeriod2(column.key);
7613
+ return sortSubKey2 === columnKey ? sortSubOrder2 === "asc" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
7614
+ column.title,
7615
+ " ",
7616
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "white" }) })
7617
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
7618
+ column.title,
7619
+ " ",
7620
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13.2375 9.2627L7.5 3.5377L1.7625 9.2627L0 7.5002L7.5 0.000196457L15 7.5002L13.2375 9.2627Z", fill: "white" }) })
7621
+ ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SortButton, { $sortColor: "white", onClick: () => toggleSubSortOrder(columnKey), children: [
7622
+ column.title,
7623
+ " ",
7624
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "15", height: "10", viewBox: "0 0 15 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M13.2375 0.368774L7.5 6.09377L1.7625 0.368774L0 2.13127L7.5 9.63127L15 2.13127L13.2375 0.368774Z", fill: "white" }) })
7625
+ ] });
7626
+ };
7627
+ const headers = HeadColumns.map((column) => {
7628
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHeaderCell, { children: renderSortButton(column, sortOrder, sortKey) }, `HeaderCell-${column.key}`);
7629
+ });
7630
+ const SubDataHeaders = SubDataColumns.map((column, index) => {
7631
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: renderSortSubButton(column, sortSubOrder, sortSubKey) }, `SubHeadCell-${index}`);
7632
+ });
7633
+ const subDataRows = (itemId) => {
7634
+ return processedRowData.filter((item) => _optionalChain([item, 'access', _55 => _55.Details, 'optionalAccess', _56 => _56.relationId]) === itemId).map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: _optionalChain([item, 'access', _57 => _57.Details, 'optionalAccess', _58 => _58.fileObjects, 'access', _59 => _59.map, 'call', _60 => _60((fileItem, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableBodyRowContainer, { children: [
7635
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadArrow, { onClick: downloadArrowOnClick, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7636
+ "path",
7637
+ {
7638
+ 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",
7639
+ fill: "#1C1B1F"
7640
+ }
7641
+ ) }) }) }, `td-${_optionalChain([item, 'access', _61 => _61.Details, 'optionalAccess', _62 => _62.relationId])}-${fileItem.id}`),
7642
+ SubDataColumns.map((column) => {
7643
+ const columnKey = trimBeforePeriod2(column.key);
7644
+ const value = fileItem[columnKey];
7645
+ if (value !== void 0) {
7646
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access', _63 => _63.Details, 'optionalAccess', _64 => _64.relationId])}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${_optionalChain([item, 'access', _65 => _65.Details, 'optionalAccess', _66 => _66.relationId])}-${fileItem.id}-${index}-${column.title}`);
7647
+ }
7648
+ })
7649
+ ] }, `${item}-${_optionalChain([item, 'access', _67 => _67.Details, 'optionalAccess', _68 => _68.relationId])}-${fileItem.id}-${index}`))]) }, `SDR-${item.id}-${_optionalChain([item, 'access', _69 => _69.Details, 'optionalAccess', _70 => _70.relationId])}`));
7650
+ };
7651
+ const dataRows = _optionalChain([processedRowData, 'optionalAccess', _71 => _71.map, 'call', _72 => _72((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BodyRowContainer, { children: [
7652
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { $amountofColumns: HeadColumns.length, children: HeadColumns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBodyCell, { $primaryBoldState: column.PrimaryBoldText, children: item[column.key] }, `TableBodycell-${item.id}-${column.key}`)) }),
7653
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ButtonStylingRow, { children: [
7654
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadMissionButton, { children: "Download Mission" }),
7655
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AddButton, { children: "Add files" })
7656
+ ] }),
7657
+ openRow !== item.id && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BottomArrowBar, { onClick: () => toggleDropdown(item.id), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "92", height: "14", viewBox: "0 0 92 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M64 0L44 6L24 0H0L44 14L92 0H64Z", fill: "#7A7A7A" }) }) }),
7658
+ openRow === item.id && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
7659
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTable, { children: [
7660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataHeaderColumn, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableHeaderRow, { children: [
7661
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", {}),
7662
+ SubDataHeaders
7663
+ ] }) }),
7664
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableBodyRow, { children: subDataRows(item.id) })
7665
+ ] }),
7666
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BottomUpArrowBar, { onClick: () => toggleUpward(), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "92", height: "14", viewBox: "0 0 92 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { d: "M64 14L44 8L24 14H0L44 0L92 14H64Z", fill: "#7A7A7A" }) }) })
7667
+ ] })
7668
+ ] }, `Bodycontainer-${item.id}-${index}`))]);
7669
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableContainer, { children: [
7670
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TablePrimaryRow, { $amountofColumns: HeadColumns.length, children: headers }),
7671
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { title: "tablebodies", children: dataRows })
7672
+ ] });
7673
+ };
7674
+
7675
+ // src/components/DataTable/NestedDataTable/NestedDataTable.tsx
7676
+
7677
+
7678
+
7679
+ var TableStyle = _styledcomponents2.default.table`
7680
+ width: 100%;
7681
+ height: 100%;
7682
+ border-collapse: collapse;
7683
+ color: black;
7684
+ text-align: center;
7685
+
7686
+ thead {
7687
+ background-color: black;
7688
+ color: white;
7689
+ }
7690
+
7691
+ margin-left: auto;
7692
+ margin-right: auto;
7693
+ position: absolute;
7694
+ `;
7695
+ var MainThHeaders = _styledcomponents2.default.th`
7696
+ &:not(:last-child) {
7697
+ border-right: 1px solid #c6c7cc;
7698
+ }
7699
+ `;
7700
+ var SubDataTr = _styledcomponents2.default.tr`
7701
+ background-color: white;
7702
+
7703
+ &:nth-child(even) {
7704
+ background-color: #e0ffff;
7705
+ }
7706
+ `;
7707
+ var PrimaryTrRows = _styledcomponents2.default.tr`
7708
+ background-color: ${(props) => props.$index % 2 === 0 ? "white" : "#e0ffff"};
7709
+ `;
7710
+ var SubTrRows = _styledcomponents2.default.tr`
7711
+ background-color: ${(props) => props.$index % 2 === 0 ? "white" : "#e0ffff"};
7712
+ height: 120px;
7713
+ `;
7714
+ var SubTableStyle = _styledcomponents2.default.table`
7715
+ width: 95%;
7716
+ border-collapse: collapse;
7717
+ margin-top: -15px;
7718
+ margin-left: auto;
7719
+ margin-right: auto;
7720
+
7721
+ td {
7722
+ &:not(:last-child) {
7723
+ border-right: 1px solid black;
7724
+ }
7725
+ }
7726
+
7727
+ th {
7728
+ background-color: #065465;
7729
+ &:not(:last-child) {
7730
+ border-right: 1px solid #c6c7cc;
7731
+ }
7732
+ }
7733
+ `;
7734
+ var DropdownButton = _styledcomponents2.default.button`
7735
+ background-color: transparent;
7736
+ background-repeat: no-repeat;
7737
+ border: none;
7738
+ cursor: pointer;
7739
+ overflow: hidden;
7740
+ outline: none;
7741
+ font-weight: bold; /* This makes the UTF symbols bold */
7742
+ font-size: 20px;
7743
+ `;
7744
+ var PrimaryTdSpan = _styledcomponents2.default.td`
7745
+ &:not(:last-child) {
7746
+ border-right: 1px solid black;
7747
+ }
7748
+ `;
7749
+ function trimBeforePeriod(text) {
7750
+ const index = text.indexOf(".");
7751
+ return index === -1 ? text : text.substring(index + 1);
7752
+ }
7753
+ var NestedDataTable = ({ data, columns }) => {
7754
+ const HeadColumns = columns.filter((col) => col.subDataTableColumn === false);
7755
+ const SubDataColumns = columns.filter((col) => col.subDataTableColumn === true);
7756
+ const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
7757
+ const [isAscending, setIsAscending] = _react.useState.call(void 0, false);
7758
+ const [primaryRowIndex, setPrimaryRowIndex] = _react.useState.call(void 0, null);
7759
+ const toggleDropdown = (rowIndex) => {
7760
+ setIsOpen(!isOpen);
7761
+ setIsAscending(!isAscending);
7762
+ setPrimaryRowIndex(rowIndex);
7763
+ };
7764
+ const headers = HeadColumns.map((column, index) => {
7765
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MainThHeaders, { children: column.title }, `headCell-${index}`);
7766
+ });
7767
+ const SubDataHeaders = SubDataColumns.map((column, index) => {
7768
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: column.title }, `SubHeadCell-${index}`);
7769
+ });
7770
+ const subDataRows = !_optionalChain([data, 'optionalAccess', _73 => _73.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoSubDataRows", colSpan: columns.length, children: "No data" }) }) : data.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTr, { children: SubDataColumns.map((column, colIndex) => {
7771
+ const columnKey = trimBeforePeriod(column.key);
7772
+ const value = _optionalChain([item, 'access', _74 => _74.Details, 'optionalAccess', _75 => _75[columnKey]]);
7773
+ console.log("value: ", value);
7774
+ if (value !== void 0) {
7775
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }) }, `Span-${item.id}-${colIndex}`);
7776
+ }
7777
+ }) }, `Sub-${item.id}-${index}`) }));
7778
+ const childRows = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubTableStyle, { children: [
7779
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: SubDataHeaders }) }),
7780
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: subDataRows })
7781
+ ] });
7782
+ const rows = !_optionalChain([data, 'optionalAccess', _76 => _76.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([data, 'optionalAccess', _77 => _77.map, 'call', _78 => _78((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
7783
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PrimaryTrRows, { $index: index, children: [
7784
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownButton, { onClick: () => toggleDropdown(index), children: isAscending && isOpen && primaryRowIndex === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: "\u2227" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: "\u2228" }) }),
7785
+ HeadColumns.map((column, index2) => {
7786
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PrimaryTdSpan, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { title: `spanRow-${item.id}-${column.key}-${index2}`, children: item[column.key] }) }, `${item.id}-${index}=${index2}`);
7787
+ })
7788
+ ] }, index),
7789
+ isOpen && primaryRowIndex === index && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubTrRows, { $index: index, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { colSpan: HeadColumns.length + 1, children: childRows }) }, index)
7790
+ ] }))]);
7791
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableStyle, { children: [
7792
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { children: [
7793
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { title: "dropdownth" }),
7794
+ headers
7795
+ ] }) }),
7796
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: rows })
7797
+ ] }) });
7798
+ };
7799
+
7285
7800
  // src/components/samples/SampleComponent.tsx
7286
7801
 
7287
7802
 
@@ -7353,7 +7868,9 @@ var SampleComponent2 = ({
7353
7868
 
7354
7869
 
7355
7870
 
7356
- exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.DefaultCarousel = DefaultCarousel; exports.DefaultPagination = DefaultPagination; exports.SampleComponent = SampleComponent2; exports.SliderCardCarousel = SliderCardCarousel; exports.WavelengthAccessAlert = WavelengthAccessAlert; exports.WavelengthAlert = WavelengthAlert; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton2; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar2; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSearchTextField = WavelengthSearchTextField; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTestSnackbar = WavelengthTestSnackbar; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
7871
+
7872
+
7873
+ exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.ChildDataTable = ChildDataTable; exports.DefaultCarousel = DefaultCarousel; exports.DefaultPagination = DefaultPagination; exports.NestedDataTable = NestedDataTable; exports.SampleComponent = SampleComponent2; exports.SliderCardCarousel = SliderCardCarousel; exports.WavelengthAccessAlert = WavelengthAccessAlert; exports.WavelengthAlert = WavelengthAlert; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton2; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar2; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSearchTextField = WavelengthSearchTextField; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTestSnackbar = WavelengthTestSnackbar; exports.WavelengthTextField = WavelengthTextField; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
7357
7874
  /*! Bundled license information:
7358
7875
 
7359
7876
  react-is/cjs/react-is.production.min.js: