@natoora-libs/core 0.2.26 → 0.2.27-dev-doug-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3UDYWCV6.js +67 -0
- package/dist/chunk-3UDYWCV6.js.map +1 -0
- package/dist/components/index.cjs +63 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +19 -3
- package/dist/components/index.js.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +49 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +13 -1
- package/dist/utils/index.d.ts +13 -1
- package/dist/utils/index.js +5 -3
- package/package.json +3 -3
- package/dist/chunk-N3IUZVB7.js +0 -21
- package/dist/chunk-N3IUZVB7.js.map +0 -1
package/dist/components/index.js
CHANGED
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
isDarkModeEnabled
|
|
8
8
|
} from "../chunk-CKW5LT7K.js";
|
|
9
9
|
import {
|
|
10
|
-
getFlattenedFiltersLabels
|
|
11
|
-
|
|
10
|
+
getFlattenedFiltersLabels,
|
|
11
|
+
getSelectOptionFromKeyPress
|
|
12
|
+
} from "../chunk-3UDYWCV6.js";
|
|
12
13
|
import {
|
|
13
14
|
__commonJS,
|
|
14
15
|
__toESM
|
|
@@ -736,6 +737,20 @@ var SmartSelect = forwardRef(
|
|
|
736
737
|
onChange(selectedOption);
|
|
737
738
|
}
|
|
738
739
|
};
|
|
740
|
+
const handleKeyDown = (event) => {
|
|
741
|
+
if (event.ctrlKey || event.altKey || event.metaKey) {
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
const nextOption = getSelectOptionFromKeyPress({
|
|
745
|
+
key: event.key,
|
|
746
|
+
options: visibleOptions,
|
|
747
|
+
currentValue: value
|
|
748
|
+
});
|
|
749
|
+
if (nextOption) {
|
|
750
|
+
event.preventDefault();
|
|
751
|
+
onChange(nextOption);
|
|
752
|
+
}
|
|
753
|
+
};
|
|
739
754
|
const renderMenuContent = () => {
|
|
740
755
|
if (isFetching) {
|
|
741
756
|
return [
|
|
@@ -808,6 +823,7 @@ var SmartSelect = forwardRef(
|
|
|
808
823
|
value: value ?? "",
|
|
809
824
|
onChange: handleChange,
|
|
810
825
|
onOpen: handleOpen,
|
|
826
|
+
onKeyDown: handleKeyDown,
|
|
811
827
|
label: inputLabel,
|
|
812
828
|
MenuProps: menuProps,
|
|
813
829
|
children: renderMenuContent()
|
|
@@ -1389,7 +1405,7 @@ import {
|
|
|
1389
1405
|
Typography as Typography6
|
|
1390
1406
|
} from "@mui/material";
|
|
1391
1407
|
|
|
1392
|
-
// src/utils/resolveObjectType.ts
|
|
1408
|
+
// src/utils/resolveObjectType/resolveObjectType.ts
|
|
1393
1409
|
var resolveObjectType = (object, fieldName) => {
|
|
1394
1410
|
if (!object || typeof object !== "object") {
|
|
1395
1411
|
return object;
|