@lumx/react 4.3.2-alpha.15 → 4.3.2-alpha.17
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/index.d.ts +11 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/utils/index.d.ts +6 -1
package/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export * from '@lumx/core/js/types';
|
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes, RefObject, CSSProperties, ImgHTMLAttributes, SetStateAction, Key, ElementType, ComponentProps } from 'react';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
|
-
import { Selector } from '@lumx/core/js/types/Selector';
|
|
10
9
|
|
|
11
10
|
/** LumX Component Type. */
|
|
12
11
|
type Comp<P, T = HTMLElement> = {
|
|
@@ -541,6 +540,17 @@ interface HasDisabled {
|
|
|
541
540
|
disabled?: boolean;
|
|
542
541
|
}
|
|
543
542
|
|
|
543
|
+
type FunctionSelector<TObject, TValue> = (o: TObject) => TValue;
|
|
544
|
+
type FieldSelector<TObject, TValue> = keyof {
|
|
545
|
+
[TKey in keyof TObject as TObject[TKey] extends TValue ? TKey : never]: TObject[TKey];
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* Value selector on an object
|
|
549
|
+
* - either via an object key
|
|
550
|
+
* - or a selector function
|
|
551
|
+
*/
|
|
552
|
+
type Selector<TObject, TValue = string> = FieldSelector<TObject, TValue> | FunctionSelector<TObject, TValue>;
|
|
553
|
+
|
|
544
554
|
/**
|
|
545
555
|
* Defines the props of the component.
|
|
546
556
|
*/
|
package/index.js
CHANGED
|
@@ -47,7 +47,7 @@ import take from 'lodash/take';
|
|
|
47
47
|
import { mdiRadioboxBlank } from '@lumx/icons/esm/radiobox-blank.js';
|
|
48
48
|
import { mdiRadioboxMarked } from '@lumx/icons/esm/radiobox-marked.js';
|
|
49
49
|
import { mdiMenuDown } from '@lumx/icons/esm/menu-down.js';
|
|
50
|
-
import { getWithSelector } from '@lumx/core/js/utils/selectors
|
|
50
|
+
import { getWithSelector } from '@lumx/core/js/utils/selectors';
|
|
51
51
|
import { mdiArrowDown } from '@lumx/icons/esm/arrow-down.js';
|
|
52
52
|
import { mdiArrowUp } from '@lumx/icons/esm/arrow-up.js';
|
|
53
53
|
import set from 'lodash/set';
|