@wavelengthusaf/components 2.8.0 → 2.8.1

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 CHANGED
@@ -14,6 +14,10 @@ npm install @wavelengthusaf/components
14
14
 
15
15
  ## Release Notes
16
16
 
17
+ ### 2.8.1
18
+ - 4/18/2024
19
+ - Created test for the Wavelength Comment Display
20
+
17
21
  ### 2.7.3
18
22
 
19
23
  - 4/8/2025
@@ -4743,9 +4743,9 @@ function WavelengthCommentDisplay(props) {
4743
4743
  !selected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4744
4744
  _material.IconButton,
4745
4745
  {
4746
- onClick: () => {
4746
+ onClick: (e) => {
4747
4747
  setSelected(!selected);
4748
- props.onClick;
4748
+ _optionalChain([props, 'access', _7 => _7.onClick, 'optionalCall', _8 => _8(e)]);
4749
4749
  },
4750
4750
  style: { padding: "0px" },
4751
4751
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircleOutline2.default, { fontSize: "small" })
@@ -4754,9 +4754,9 @@ function WavelengthCommentDisplay(props) {
4754
4754
  selected && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4755
4755
  _material.IconButton,
4756
4756
  {
4757
- onClick: () => {
4757
+ onClick: (e) => {
4758
4758
  setSelected(!selected);
4759
- props.onClick;
4759
+ _optionalChain([props, 'access', _9 => _9.onClick, 'optionalCall', _10 => _10(e)]);
4760
4760
  },
4761
4761
  style: { padding: "0px" },
4762
4762
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircle2.default, { fontSize: "small", sx: { color: props.iconSelectedColor || "rgba(209, 106, 47, 1)" } })
@@ -4943,18 +4943,18 @@ var WavelengthTitleBar = class extends HTMLElement {
4943
4943
  attributeChangedCallback(name, oldValue, newValue) {
4944
4944
  if (oldValue !== newValue) {
4945
4945
  if (name === "title-text") {
4946
- const titleElement = _optionalChain([this, 'access', _7 => _7.shadowRoot, 'optionalAccess', _8 => _8.querySelector, 'call', _9 => _9(".title")]);
4946
+ const titleElement = _optionalChain([this, 'access', _11 => _11.shadowRoot, 'optionalAccess', _12 => _12.querySelector, 'call', _13 => _13(".title")]);
4947
4947
  if (titleElement) {
4948
4948
  titleElement.textContent = newValue;
4949
4949
  }
4950
4950
  } else if (name === "subtitle-text") {
4951
- const subtitleElement = _optionalChain([this, 'access', _10 => _10.shadowRoot, 'optionalAccess', _11 => _11.querySelector, 'call', _12 => _12(".subtitle")]);
4951
+ const subtitleElement = _optionalChain([this, 'access', _14 => _14.shadowRoot, 'optionalAccess', _15 => _15.querySelector, 'call', _16 => _16(".subtitle")]);
4952
4952
  if (subtitleElement) {
4953
4953
  subtitleElement.textContent = newValue;
4954
4954
  }
4955
4955
  } else if (name === "text-color") {
4956
- const titleElement = _optionalChain([this, 'access', _13 => _13.shadowRoot, 'optionalAccess', _14 => _14.querySelector, 'call', _15 => _15(".title")]);
4957
- const subtitleElement = _optionalChain([this, 'access', _16 => _16.shadowRoot, 'optionalAccess', _17 => _17.querySelector, 'call', _18 => _18(".subtitle")]);
4956
+ const titleElement = _optionalChain([this, 'access', _17 => _17.shadowRoot, 'optionalAccess', _18 => _18.querySelector, 'call', _19 => _19(".title")]);
4957
+ const subtitleElement = _optionalChain([this, 'access', _20 => _20.shadowRoot, 'optionalAccess', _21 => _21.querySelector, 'call', _22 => _22(".subtitle")]);
4958
4958
  if (titleElement) {
4959
4959
  titleElement.style.color = newValue;
4960
4960
  }
@@ -4962,7 +4962,7 @@ var WavelengthTitleBar = class extends HTMLElement {
4962
4962
  subtitleElement.style.color = newValue;
4963
4963
  }
4964
4964
  } else if (name === "has-shadow") {
4965
- const titleElement = _optionalChain([this, 'access', _19 => _19.shadowRoot, 'optionalAccess', _20 => _20.querySelector, 'call', _21 => _21(".title")]);
4965
+ const titleElement = _optionalChain([this, 'access', _23 => _23.shadowRoot, 'optionalAccess', _24 => _24.querySelector, 'call', _25 => _25(".title")]);
4966
4966
  if (titleElement) {
4967
4967
  titleElement.style.textShadow = newValue !== "false" ? "none" : "0.313rem 0.313rem 0.375rem #FFFFFF";
4968
4968
  }
@@ -5193,8 +5193,8 @@ function WavelengthConfirmationModal(props) {
5193
5193
  overflow: "scroll"
5194
5194
  },
5195
5195
  children: [
5196
- /* @__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', _22 => _22.textObj, 'optionalAccess', _23 => _23.title]) }),
5197
- /* @__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', _24 => _24.textObj, 'optionalAccess', _25 => _25.dialog]) }),
5196
+ /* @__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', _26 => _26.textObj, 'optionalAccess', _27 => _27.title]) }),
5197
+ /* @__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', _28 => _28.textObj, 'optionalAccess', _29 => _29.dialog]) }),
5198
5198
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { display: "flex", flexDirection: "row", justifyContent: "flex-end", marginTop: "40px", gap: "8px" }, children: [
5199
5199
  props.cancelButton,
5200
5200
  props.submitButton
@@ -5215,11 +5215,11 @@ function WavelengthContentModal(props) {
5215
5215
  };
5216
5216
  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: [
5217
5217
  /* @__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: [
5218
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _26 => _26.textObj, 'optionalAccess', _27 => _27.title]) }),
5218
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _30 => _30.textObj, 'optionalAccess', _31 => _31.title]) }),
5219
5219
  /* @__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, {}) }) })
5220
5220
  ] }) }),
5221
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _28 => _28.textObj, 'optionalAccess', _29 => _29.dialog]) }) }),
5222
- /* @__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', _30 => _30.textObj, 'optionalAccess', _31 => _31.purpose]) }) })
5221
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _32 => _32.textObj, 'optionalAccess', _33 => _33.dialog]) }) }),
5222
+ /* @__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', _34 => _34.textObj, 'optionalAccess', _35 => _35.purpose]) }) })
5223
5223
  ] });
5224
5224
  }
5225
5225
 
@@ -5433,7 +5433,7 @@ function WavelengthDropdown({
5433
5433
  borderBottomRightRadius: "8px",
5434
5434
  borderTopRightRadius: "0px",
5435
5435
  borderTopLeftRadius: "0px",
5436
- boxShadow: _optionalChain([menuSx, 'optionalAccess', _32 => _32.boxShadow]),
5436
+ boxShadow: _optionalChain([menuSx, 'optionalAccess', _36 => _36.boxShadow]),
5437
5437
  width: myMenusx.width,
5438
5438
  backgroundColor: `${myMenusx.backgroundColor}`
5439
5439
  },
@@ -6188,7 +6188,7 @@ function WavelengthTextField(props) {
6188
6188
  label: props.label,
6189
6189
  onChange: (e) => {
6190
6190
  handleChange(e);
6191
- _optionalChain([props, 'access', _33 => _33.onChange, 'optionalCall', _34 => _34(e)]);
6191
+ _optionalChain([props, 'access', _37 => _37.onChange, 'optionalCall', _38 => _38(e)]);
6192
6192
  },
6193
6193
  error: hasError,
6194
6194
  helperText: hasError ? props.errorMessage : "",
@@ -6237,7 +6237,7 @@ function WavelengthTextField(props) {
6237
6237
  error: hasError,
6238
6238
  onChange: (e) => {
6239
6239
  handleChange(e);
6240
- _optionalChain([props, 'access', _35 => _35.onChange, 'optionalCall', _36 => _36(e)]);
6240
+ _optionalChain([props, 'access', _39 => _39.onChange, 'optionalCall', _40 => _40(e)]);
6241
6241
  }
6242
6242
  }
6243
6243
  ),
@@ -6426,7 +6426,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
6426
6426
  const [noRowsOpen, setNoRowsOpen] = _react.useState.call(void 0, false);
6427
6427
  const [isModalOpen, setIsModalOpen] = _react.useState.call(void 0, false);
6428
6428
  const [searchItem, setSearchItem] = _react.useState.call(void 0, "");
6429
- const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _37 => _37[0], 'optionalAccess', _38 => _38.key]) || "");
6429
+ const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _41 => _41[0], 'optionalAccess', _42 => _42.key]) || "");
6430
6430
  const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
6431
6431
  const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
6432
6432
  const [editingMenuKey, setEditingMenuKey] = _react.useState.call(void 0, null);
@@ -6580,7 +6580,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
6580
6580
  ] }, index)
6581
6581
  ] }, `headCell-${index}`);
6582
6582
  });
6583
- const rows = !_optionalChain([currentPageData, 'optionalAccess', _39 => _39.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', _40 => _40.map, 'call', _41 => _41((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
6583
+ const rows = !_optionalChain([currentPageData, 'optionalAccess', _43 => _43.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', _44 => _44.map, 'call', _45 => _45((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
6584
6584
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6585
6585
  StyledInput,
6586
6586
  {