@reltio/components 1.4.1902 → 1.4.1903
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MultipliableSelect } from '../MultipliableSelect';
|
|
3
3
|
import { DropDownEntryType } from '../types';
|
|
4
|
-
type Props = {
|
|
5
|
-
entries: DropDownEntryType[];
|
|
4
|
+
type Props<T> = {
|
|
5
|
+
entries: DropDownEntryType<T>[];
|
|
6
6
|
classes?: Record<string, string>;
|
|
7
|
-
value:
|
|
8
|
-
onChange: (value:
|
|
7
|
+
value: T;
|
|
8
|
+
onChange: (value: T) => void;
|
|
9
9
|
disableUnderline?: boolean;
|
|
10
10
|
displayEmpty?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
} & Omit<React.ComponentProps<typeof MultipliableSelect>, 'children' | 'getValueLabel' | 'onChange' | 'value'>;
|
|
13
|
-
export declare const DropDownEditor: ({ entries, classes, ...otherProps }: Props) => JSX.Element;
|
|
13
|
+
export declare const DropDownEditor: <T extends string | number>({ entries, classes, ...otherProps }: Props<T>) => JSX.Element;
|
|
14
14
|
export {};
|
package/cjs/types/index.d.ts
CHANGED
|
@@ -161,13 +161,13 @@ export type RelationOption = {
|
|
|
161
161
|
label: string;
|
|
162
162
|
value: string;
|
|
163
163
|
} & Pick<ConnectionRelationType, 'startObject' | 'endObject'>;
|
|
164
|
-
export type DropDownEntryType = {
|
|
164
|
+
export type DropDownEntryType<T = string> = {
|
|
165
165
|
label?: string;
|
|
166
|
-
value:
|
|
166
|
+
value: T;
|
|
167
167
|
};
|
|
168
|
-
export type DropDownGroupEntryType = {
|
|
168
|
+
export type DropDownGroupEntryType<T = string> = {
|
|
169
169
|
label?: string;
|
|
170
|
-
values: DropDownEntryType[];
|
|
170
|
+
values: DropDownEntryType<T>[];
|
|
171
171
|
isGroup?: boolean;
|
|
172
172
|
};
|
|
173
173
|
export type AdditionalControlsRenderer<T extends AttributeValue> = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MultipliableSelect } from '../MultipliableSelect';
|
|
3
3
|
import { DropDownEntryType } from '../types';
|
|
4
|
-
type Props = {
|
|
5
|
-
entries: DropDownEntryType[];
|
|
4
|
+
type Props<T> = {
|
|
5
|
+
entries: DropDownEntryType<T>[];
|
|
6
6
|
classes?: Record<string, string>;
|
|
7
|
-
value:
|
|
8
|
-
onChange: (value:
|
|
7
|
+
value: T;
|
|
8
|
+
onChange: (value: T) => void;
|
|
9
9
|
disableUnderline?: boolean;
|
|
10
10
|
displayEmpty?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
} & Omit<React.ComponentProps<typeof MultipliableSelect>, 'children' | 'getValueLabel' | 'onChange' | 'value'>;
|
|
13
|
-
export declare const DropDownEditor: ({ entries, classes, ...otherProps }: Props) => JSX.Element;
|
|
13
|
+
export declare const DropDownEditor: <T extends string | number>({ entries, classes, ...otherProps }: Props<T>) => JSX.Element;
|
|
14
14
|
export {};
|
package/esm/types/index.d.ts
CHANGED
|
@@ -161,13 +161,13 @@ export type RelationOption = {
|
|
|
161
161
|
label: string;
|
|
162
162
|
value: string;
|
|
163
163
|
} & Pick<ConnectionRelationType, 'startObject' | 'endObject'>;
|
|
164
|
-
export type DropDownEntryType = {
|
|
164
|
+
export type DropDownEntryType<T = string> = {
|
|
165
165
|
label?: string;
|
|
166
|
-
value:
|
|
166
|
+
value: T;
|
|
167
167
|
};
|
|
168
|
-
export type DropDownGroupEntryType = {
|
|
168
|
+
export type DropDownGroupEntryType<T = string> = {
|
|
169
169
|
label?: string;
|
|
170
|
-
values: DropDownEntryType[];
|
|
170
|
+
values: DropDownEntryType<T>[];
|
|
171
171
|
isGroup?: boolean;
|
|
172
172
|
};
|
|
173
173
|
export type AdditionalControlsRenderer<T extends AttributeValue> = {
|