@wavelengthusaf/components 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/cjs/index.cjs +116 -56
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +6 -4
- package/dist/esm/index.d.ts +6 -4
- package/dist/esm/index.js +96 -36
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,10 +14,15 @@ npm install @wavelengthusaf/components
|
|
|
14
14
|
|
|
15
15
|
## Release Notes
|
|
16
16
|
|
|
17
|
-
### 3.0.
|
|
17
|
+
### 3.0.3
|
|
18
|
+
|
|
19
|
+
- 5/30/2025
|
|
20
|
+
- Updated `WavelengthBanner`; re-added the `classification` and `control` props
|
|
21
|
+
|
|
22
|
+
### 3.0.2
|
|
18
23
|
|
|
19
24
|
- 5/28/2025
|
|
20
|
-
- Updated Alert
|
|
25
|
+
- Updated Alert Component
|
|
21
26
|
|
|
22
27
|
### 3.0.1
|
|
23
28
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -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 ["
|
|
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
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
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
|
|
1265
|
-
const
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1268
|
-
const
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
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',
|
|
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',
|
|
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',
|
|
1715
|
-
const subtitleElement = _optionalChain([this, 'access',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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({
|
|
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
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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',
|
|
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
|
{
|