ish-ui 1.0.39 → 1.0.40
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.
|
@@ -4,3 +4,6 @@ export type StringKeyObject<V = any> = {
|
|
|
4
4
|
export type StringKeyAndValueObject = StringKeyObject<string>;
|
|
5
5
|
export type StringValueType<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
|
|
6
6
|
export type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any ? A : never;
|
|
7
|
+
export type Mutable<T> = {
|
|
8
|
+
-readonly [P in keyof T]: T[P];
|
|
9
|
+
};
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
import { SelectItemDefault } from '../../model';
|
|
1
2
|
export declare const getHighlightedPartLabel: (label: string, highlighted: string, options?: any) => any;
|
|
3
|
+
export declare const sortDefaultSelectItems: (a: SelectItemDefault, b: SelectItemDefault) => 1 | -1;
|
|
4
|
+
export declare const mapSelectItems: (i: any) => SelectItemDefault;
|
|
2
5
|
export * from './PhoneMasks';
|
|
@@ -7,4 +7,6 @@ export const getHighlightedPartLabel = (label, highlighted, options) => {
|
|
|
7
7
|
const result = parts.map((part, index) => (React.createElement("span", { key: index }, part.highlight ? React.createElement("strong", null, part.text) : part.text)));
|
|
8
8
|
return options ? (React.createElement("div", Object.assign({}, options || {}), result)) : result;
|
|
9
9
|
};
|
|
10
|
+
export const sortDefaultSelectItems = (a, b) => (a.label[0].toLowerCase() > b.label[0].toLowerCase() ? 1 : -1);
|
|
11
|
+
export const mapSelectItems = (i) => ({ label: i, value: i });
|
|
10
12
|
export * from './PhoneMasks';
|