@wavelengthusaf/components 4.1.1 → 4.1.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 +10 -0
- package/dist/cjs/index.cjs +43 -17
- package/dist/cjs/index.d.cts +6 -2
- package/dist/esm/index.d.ts +6 -2
- package/dist/esm/index.js +31 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,16 @@ npm install @wavelengthusaf/components
|
|
|
14
14
|
|
|
15
15
|
## Release Notes
|
|
16
16
|
|
|
17
|
+
### 4.1.3
|
|
18
|
+
|
|
19
|
+
- 11/24/2025
|
|
20
|
+
- Added a prop: `onBlurCallback` to `WavelengthAutoComplete`, `WavelengthInput`, and `WavelengthDatePicker` so that `onBlur` can be handled with a user defined callback.
|
|
21
|
+
|
|
22
|
+
### 4.1.2
|
|
23
|
+
|
|
24
|
+
- 11/12/2025
|
|
25
|
+
- Modified `WavelengthAutoComplete` to expose `placeholder` prop to allow injecting a default value
|
|
26
|
+
|
|
17
27
|
### 4.1.1
|
|
18
28
|
|
|
19
29
|
- 10/27/2025
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -6748,6 +6748,7 @@ var WavelengthInput = _react.forwardRef.call(void 0,
|
|
|
6748
6748
|
label,
|
|
6749
6749
|
onChange,
|
|
6750
6750
|
style: style3,
|
|
6751
|
+
onBlurCallback,
|
|
6751
6752
|
...rest
|
|
6752
6753
|
}, ref) => {
|
|
6753
6754
|
const internalRef = _react.useRef.call(void 0, null);
|
|
@@ -6828,9 +6829,21 @@ var WavelengthInput = _react.forwardRef.call(void 0,
|
|
|
6828
6829
|
]);
|
|
6829
6830
|
_react.useEffect.call(void 0, () => {
|
|
6830
6831
|
const el = internalRef.current;
|
|
6831
|
-
if (!el || !
|
|
6832
|
+
if (!el || !onBlurCallback) return;
|
|
6832
6833
|
const handler = (e) => {
|
|
6833
6834
|
const input = _optionalChain([el, 'access', _42 => _42.shadowRoot, 'optionalAccess', _43 => _43.querySelector, 'call', _44 => _44("input")]);
|
|
6835
|
+
if (input) {
|
|
6836
|
+
onBlurCallback();
|
|
6837
|
+
}
|
|
6838
|
+
};
|
|
6839
|
+
el.addEventListener("blur", handler);
|
|
6840
|
+
return () => el.removeEventListener("blur", handler);
|
|
6841
|
+
}, [onBlurCallback]);
|
|
6842
|
+
_react.useEffect.call(void 0, () => {
|
|
6843
|
+
const el = internalRef.current;
|
|
6844
|
+
if (!el || !onChange) return;
|
|
6845
|
+
const handler = (e) => {
|
|
6846
|
+
const input = _optionalChain([el, 'access', _45 => _45.shadowRoot, 'optionalAccess', _46 => _46.querySelector, 'call', _47 => _47("input")]);
|
|
6834
6847
|
if (input) {
|
|
6835
6848
|
const synthetic = {
|
|
6836
6849
|
...e,
|
|
@@ -7033,7 +7046,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
|
|
|
7033
7046
|
const [noRowsOpen, setNoRowsOpen] = _react.useState.call(void 0, false);
|
|
7034
7047
|
const [isModalOpen, setIsModalOpen] = _react.useState.call(void 0, false);
|
|
7035
7048
|
const [searchItem, setSearchItem] = _react.useState.call(void 0, "");
|
|
7036
|
-
const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access',
|
|
7049
|
+
const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _48 => _48[0], 'optionalAccess', _49 => _49.key]) || "");
|
|
7037
7050
|
const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
|
|
7038
7051
|
const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
|
|
7039
7052
|
const [editingMenuKey, setEditingMenuKey] = _react.useState.call(void 0, null);
|
|
@@ -7187,7 +7200,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
|
|
|
7187
7200
|
] }, index)
|
|
7188
7201
|
] }, `headCell-${index}`);
|
|
7189
7202
|
});
|
|
7190
|
-
const rows = !_optionalChain([currentPageData, 'optionalAccess',
|
|
7203
|
+
const rows = !_optionalChain([currentPageData, 'optionalAccess', _50 => _50.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', _51 => _51.map, 'call', _52 => _52((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
|
|
7191
7204
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7192
7205
|
StyledInput,
|
|
7193
7206
|
{
|
|
@@ -7433,7 +7446,7 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7433
7446
|
}
|
|
7434
7447
|
if (sortSubOrder) {
|
|
7435
7448
|
result.map(
|
|
7436
|
-
(item) => _optionalChain([item, 'access',
|
|
7449
|
+
(item) => _optionalChain([item, 'access', _53 => _53.Details, 'optionalAccess', _54 => _54.fileObjects, 'access', _55 => _55.sort, 'call', _56 => _56((c, d) => {
|
|
7437
7450
|
const valueC = c[sortSubKey];
|
|
7438
7451
|
const valueD = d[sortSubKey];
|
|
7439
7452
|
if (typeof valueC === "string" && typeof valueD === "string") {
|
|
@@ -7494,24 +7507,24 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
|
|
|
7494
7507
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: renderSortSubButton(column, sortSubOrder, sortSubKey) }, `SubHeadCell-${index}`);
|
|
7495
7508
|
});
|
|
7496
7509
|
const subDataRows = (itemId) => {
|
|
7497
|
-
return processedRowData.filter((item) => _optionalChain([item, 'access',
|
|
7510
|
+
return processedRowData.filter((item) => _optionalChain([item, 'access', _57 => _57.Details, 'optionalAccess', _58 => _58.relationId]) === itemId).map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: _optionalChain([item, 'access', _59 => _59.Details, 'optionalAccess', _60 => _60.fileObjects, 'access', _61 => _61.map, 'call', _62 => _62((fileItem, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableBodyRowContainer, { children: [
|
|
7498
7511
|
/* @__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,
|
|
7499
7512
|
"path",
|
|
7500
7513
|
{
|
|
7501
7514
|
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",
|
|
7502
7515
|
fill: "#1C1B1F"
|
|
7503
7516
|
}
|
|
7504
|
-
) }) }) }, `td-${_optionalChain([item, 'access',
|
|
7517
|
+
) }) }) }, `td-${_optionalChain([item, 'access', _63 => _63.Details, 'optionalAccess', _64 => _64.relationId])}-${fileItem.id}`),
|
|
7505
7518
|
SubDataColumns.map((column) => {
|
|
7506
7519
|
const columnKey = trimBeforePeriod2(column.key);
|
|
7507
7520
|
const value = fileItem[columnKey];
|
|
7508
7521
|
if (value !== void 0) {
|
|
7509
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access',
|
|
7522
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access', _65 => _65.Details, 'optionalAccess', _66 => _66.relationId])}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${_optionalChain([item, 'access', _67 => _67.Details, 'optionalAccess', _68 => _68.relationId])}-${fileItem.id}-${index}-${column.title}`);
|
|
7510
7523
|
}
|
|
7511
7524
|
})
|
|
7512
|
-
] }, `${item}-${_optionalChain([item, 'access',
|
|
7525
|
+
] }, `${item}-${_optionalChain([item, 'access', _69 => _69.Details, 'optionalAccess', _70 => _70.relationId])}-${fileItem.id}-${index}`))]) }, `SDR-${item.id}-${_optionalChain([item, 'access', _71 => _71.Details, 'optionalAccess', _72 => _72.relationId])}`));
|
|
7513
7526
|
};
|
|
7514
|
-
const dataRows = _optionalChain([processedRowData, 'optionalAccess',
|
|
7527
|
+
const dataRows = _optionalChain([processedRowData, 'optionalAccess', _73 => _73.map, 'call', _74 => _74((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BodyRowContainer, { children: [
|
|
7515
7528
|
/* @__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}`)) }),
|
|
7516
7529
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ButtonStylingRow, { children: [
|
|
7517
7530
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadMissionButton, { onClick: downloadMissionOnClick, children: "Download Mission" }),
|
|
@@ -7631,9 +7644,9 @@ var NestedDataTable = ({ data, columns }) => {
|
|
|
7631
7644
|
const SubDataHeaders = SubDataColumns.map((column, index) => {
|
|
7632
7645
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: column.title }, `SubHeadCell-${index}`);
|
|
7633
7646
|
});
|
|
7634
|
-
const subDataRows = !_optionalChain([data, 'optionalAccess',
|
|
7647
|
+
const subDataRows = !_optionalChain([data, 'optionalAccess', _75 => _75.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) => {
|
|
7635
7648
|
const columnKey = trimBeforePeriod(column.key);
|
|
7636
|
-
const value = _optionalChain([item, 'access',
|
|
7649
|
+
const value = _optionalChain([item, 'access', _76 => _76.Details, 'optionalAccess', _77 => _77[columnKey]]);
|
|
7637
7650
|
console.log("value: ", value);
|
|
7638
7651
|
if (value !== void 0) {
|
|
7639
7652
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }) }, `Span-${item.id}-${colIndex}`);
|
|
@@ -7643,7 +7656,7 @@ var NestedDataTable = ({ data, columns }) => {
|
|
|
7643
7656
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: SubDataHeaders }) }),
|
|
7644
7657
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: subDataRows })
|
|
7645
7658
|
] });
|
|
7646
|
-
const rows = !_optionalChain([data, 'optionalAccess',
|
|
7659
|
+
const rows = !_optionalChain([data, 'optionalAccess', _78 => _78.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', _79 => _79.map, 'call', _80 => _80((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7647
7660
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PrimaryTrRows, { $index: index, children: [
|
|
7648
7661
|
/* @__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" }) }),
|
|
7649
7662
|
HeadColumns.map((column, index2) => {
|
|
@@ -7790,12 +7803,14 @@ var WavelengthAutoComplete = ({
|
|
|
7790
7803
|
labelColor,
|
|
7791
7804
|
focusedLabelColor,
|
|
7792
7805
|
id,
|
|
7793
|
-
name
|
|
7806
|
+
name,
|
|
7807
|
+
placeholder,
|
|
7808
|
+
onBlurCallback
|
|
7794
7809
|
}) => {
|
|
7795
7810
|
const inputRef = _react.useRef.call(void 0, null);
|
|
7796
7811
|
const listRef = _react.useRef.call(void 0, null);
|
|
7797
7812
|
const noItemListRef = _react.useRef.call(void 0, null);
|
|
7798
|
-
const [inputValue, setInputValue] = _react.useState.call(void 0, "");
|
|
7813
|
+
const [inputValue, setInputValue] = _react.useState.call(void 0, _nullishCoalesce(placeholder, () => ( "")));
|
|
7799
7814
|
const [suggestions, setSuggestions] = _react.useState.call(void 0, []);
|
|
7800
7815
|
const [isDropdownVisible, setIsDropdownVisible] = _react.useState.call(void 0, false);
|
|
7801
7816
|
const suggestHasItems = suggestions.length > 0;
|
|
@@ -7901,7 +7916,12 @@ var WavelengthAutoComplete = ({
|
|
|
7901
7916
|
onClick: handleInputClick,
|
|
7902
7917
|
onInput: handleChange,
|
|
7903
7918
|
onKeyDown: handleKeyDown,
|
|
7904
|
-
onBlur:
|
|
7919
|
+
onBlur: () => {
|
|
7920
|
+
handleBlur();
|
|
7921
|
+
if (onBlurCallback) {
|
|
7922
|
+
onBlurCallback();
|
|
7923
|
+
}
|
|
7924
|
+
},
|
|
7905
7925
|
placeholder: "",
|
|
7906
7926
|
autoComplete: "off"
|
|
7907
7927
|
}
|
|
@@ -7994,7 +8014,8 @@ var WavelengthDatePicker = ({
|
|
|
7994
8014
|
min,
|
|
7995
8015
|
max,
|
|
7996
8016
|
inputTimeType,
|
|
7997
|
-
OnDataChange
|
|
8017
|
+
OnDataChange,
|
|
8018
|
+
onBlurCallback
|
|
7998
8019
|
}) => {
|
|
7999
8020
|
const [inputType, setInputType] = _react.useState.call(void 0, "");
|
|
8000
8021
|
const [value, setValue] = _react.useState.call(void 0, "");
|
|
@@ -8060,7 +8081,12 @@ var WavelengthDatePicker = ({
|
|
|
8060
8081
|
name,
|
|
8061
8082
|
"data-testid": "my_wl_date_input",
|
|
8062
8083
|
onFocus: handleFocus,
|
|
8063
|
-
onBlur:
|
|
8084
|
+
onBlur: () => {
|
|
8085
|
+
handleBlur();
|
|
8086
|
+
if (onBlurCallback) {
|
|
8087
|
+
onBlurCallback();
|
|
8088
|
+
}
|
|
8089
|
+
},
|
|
8064
8090
|
onChange: handleChange,
|
|
8065
8091
|
value,
|
|
8066
8092
|
placeholder: " ",
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -748,6 +748,7 @@ interface WavelengthInputProps extends React__default.HTMLAttributes<HTMLElement
|
|
|
748
748
|
label?: string;
|
|
749
749
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
750
750
|
style?: StyleProp;
|
|
751
|
+
onBlurCallback?: () => void;
|
|
751
752
|
}
|
|
752
753
|
declare const WavelengthInput: React__default.ForwardRefExoticComponent<WavelengthInputProps & React__default.RefAttributes<HTMLElement & {
|
|
753
754
|
validate?: () => boolean;
|
|
@@ -845,9 +846,11 @@ interface AutocompleteProps {
|
|
|
845
846
|
focusedLabelColor?: string;
|
|
846
847
|
id?: string;
|
|
847
848
|
name?: string;
|
|
849
|
+
placeholder?: string;
|
|
850
|
+
onBlurCallback?: () => void;
|
|
848
851
|
}
|
|
849
852
|
declare const WavelengthAutoComplete: {
|
|
850
|
-
({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
853
|
+
({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, placeholder, onBlurCallback, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
851
854
|
displayName: string;
|
|
852
855
|
};
|
|
853
856
|
|
|
@@ -867,9 +870,10 @@ interface DateInputProps {
|
|
|
867
870
|
FocusLabelColor?: string;
|
|
868
871
|
id?: string;
|
|
869
872
|
name?: string;
|
|
873
|
+
onBlurCallback?: () => void;
|
|
870
874
|
}
|
|
871
875
|
declare const WavelengthDatePicker: {
|
|
872
|
-
({ id, name, inputBorderStyle, floatLabel, labelColor, inputFocusBorderColor, FocusLabelColor, backgroundColor, height, width, min, max, inputTimeType, OnDataChange, }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
876
|
+
({ id, name, inputBorderStyle, floatLabel, labelColor, inputFocusBorderColor, FocusLabelColor, backgroundColor, height, width, min, max, inputTimeType, OnDataChange, onBlurCallback, }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
873
877
|
displayName: string;
|
|
874
878
|
};
|
|
875
879
|
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -748,6 +748,7 @@ interface WavelengthInputProps extends React__default.HTMLAttributes<HTMLElement
|
|
|
748
748
|
label?: string;
|
|
749
749
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
750
750
|
style?: StyleProp;
|
|
751
|
+
onBlurCallback?: () => void;
|
|
751
752
|
}
|
|
752
753
|
declare const WavelengthInput: React__default.ForwardRefExoticComponent<WavelengthInputProps & React__default.RefAttributes<HTMLElement & {
|
|
753
754
|
validate?: () => boolean;
|
|
@@ -845,9 +846,11 @@ interface AutocompleteProps {
|
|
|
845
846
|
focusedLabelColor?: string;
|
|
846
847
|
id?: string;
|
|
847
848
|
name?: string;
|
|
849
|
+
placeholder?: string;
|
|
850
|
+
onBlurCallback?: () => void;
|
|
848
851
|
}
|
|
849
852
|
declare const WavelengthAutoComplete: {
|
|
850
|
-
({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
853
|
+
({ floatLabel, data, height, width, inputBorderStyle, inputFocusBorderColor, onDataChange, autoBackGroundColor, labelColor, focusedLabelColor, id, name, placeholder, onBlurCallback, }: AutocompleteProps): react_jsx_runtime.JSX.Element;
|
|
851
854
|
displayName: string;
|
|
852
855
|
};
|
|
853
856
|
|
|
@@ -867,9 +870,10 @@ interface DateInputProps {
|
|
|
867
870
|
FocusLabelColor?: string;
|
|
868
871
|
id?: string;
|
|
869
872
|
name?: string;
|
|
873
|
+
onBlurCallback?: () => void;
|
|
870
874
|
}
|
|
871
875
|
declare const WavelengthDatePicker: {
|
|
872
|
-
({ id, name, inputBorderStyle, floatLabel, labelColor, inputFocusBorderColor, FocusLabelColor, backgroundColor, height, width, min, max, inputTimeType, OnDataChange, }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
876
|
+
({ id, name, inputBorderStyle, floatLabel, labelColor, inputFocusBorderColor, FocusLabelColor, backgroundColor, height, width, min, max, inputTimeType, OnDataChange, onBlurCallback, }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
873
877
|
displayName: string;
|
|
874
878
|
};
|
|
875
879
|
|
package/dist/esm/index.js
CHANGED
|
@@ -6748,6 +6748,7 @@ var WavelengthInput = forwardRef(
|
|
|
6748
6748
|
label,
|
|
6749
6749
|
onChange,
|
|
6750
6750
|
style: style3,
|
|
6751
|
+
onBlurCallback,
|
|
6751
6752
|
...rest
|
|
6752
6753
|
}, ref) => {
|
|
6753
6754
|
const internalRef = useRef8(null);
|
|
@@ -6826,6 +6827,18 @@ var WavelengthInput = forwardRef(
|
|
|
6826
6827
|
label,
|
|
6827
6828
|
disabled
|
|
6828
6829
|
]);
|
|
6830
|
+
useEffect9(() => {
|
|
6831
|
+
const el = internalRef.current;
|
|
6832
|
+
if (!el || !onBlurCallback) return;
|
|
6833
|
+
const handler = (e) => {
|
|
6834
|
+
const input = el.shadowRoot?.querySelector("input");
|
|
6835
|
+
if (input) {
|
|
6836
|
+
onBlurCallback();
|
|
6837
|
+
}
|
|
6838
|
+
};
|
|
6839
|
+
el.addEventListener("blur", handler);
|
|
6840
|
+
return () => el.removeEventListener("blur", handler);
|
|
6841
|
+
}, [onBlurCallback]);
|
|
6829
6842
|
useEffect9(() => {
|
|
6830
6843
|
const el = internalRef.current;
|
|
6831
6844
|
if (!el || !onChange) return;
|
|
@@ -7790,12 +7803,14 @@ var WavelengthAutoComplete = ({
|
|
|
7790
7803
|
labelColor,
|
|
7791
7804
|
focusedLabelColor,
|
|
7792
7805
|
id,
|
|
7793
|
-
name
|
|
7806
|
+
name,
|
|
7807
|
+
placeholder,
|
|
7808
|
+
onBlurCallback
|
|
7794
7809
|
}) => {
|
|
7795
7810
|
const inputRef = useRef11(null);
|
|
7796
7811
|
const listRef = useRef11(null);
|
|
7797
7812
|
const noItemListRef = useRef11(null);
|
|
7798
|
-
const [inputValue, setInputValue] = useState12("");
|
|
7813
|
+
const [inputValue, setInputValue] = useState12(placeholder ?? "");
|
|
7799
7814
|
const [suggestions, setSuggestions] = useState12([]);
|
|
7800
7815
|
const [isDropdownVisible, setIsDropdownVisible] = useState12(false);
|
|
7801
7816
|
const suggestHasItems = suggestions.length > 0;
|
|
@@ -7901,7 +7916,12 @@ var WavelengthAutoComplete = ({
|
|
|
7901
7916
|
onClick: handleInputClick,
|
|
7902
7917
|
onInput: handleChange,
|
|
7903
7918
|
onKeyDown: handleKeyDown,
|
|
7904
|
-
onBlur:
|
|
7919
|
+
onBlur: () => {
|
|
7920
|
+
handleBlur();
|
|
7921
|
+
if (onBlurCallback) {
|
|
7922
|
+
onBlurCallback();
|
|
7923
|
+
}
|
|
7924
|
+
},
|
|
7905
7925
|
placeholder: "",
|
|
7906
7926
|
autoComplete: "off"
|
|
7907
7927
|
}
|
|
@@ -7994,7 +8014,8 @@ var WavelengthDatePicker = ({
|
|
|
7994
8014
|
min,
|
|
7995
8015
|
max,
|
|
7996
8016
|
inputTimeType,
|
|
7997
|
-
OnDataChange
|
|
8017
|
+
OnDataChange,
|
|
8018
|
+
onBlurCallback
|
|
7998
8019
|
}) => {
|
|
7999
8020
|
const [inputType, setInputType] = useState13("");
|
|
8000
8021
|
const [value, setValue] = useState13("");
|
|
@@ -8060,7 +8081,12 @@ var WavelengthDatePicker = ({
|
|
|
8060
8081
|
name,
|
|
8061
8082
|
"data-testid": "my_wl_date_input",
|
|
8062
8083
|
onFocus: handleFocus,
|
|
8063
|
-
onBlur:
|
|
8084
|
+
onBlur: () => {
|
|
8085
|
+
handleBlur();
|
|
8086
|
+
if (onBlurCallback) {
|
|
8087
|
+
onBlurCallback();
|
|
8088
|
+
}
|
|
8089
|
+
},
|
|
8064
8090
|
onChange: handleChange,
|
|
8065
8091
|
value,
|
|
8066
8092
|
placeholder: " ",
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wavelengthusaf/components",
|
|
3
3
|
"author": "563 EWS - Wavelength",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "4.1.
|
|
5
|
+
"version": "4.1.3",
|
|
6
6
|
"description": "Common component library used by Wavelength developers",
|
|
7
7
|
"main": "/dist/cjs/index.cjs",
|
|
8
8
|
"module": "/dist/esm/index.js",
|