@mtes-mct/monitor-ui 2.12.0 → 2.13.0
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/CHANGELOG.md +15 -0
- package/index.js +19 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/fields/MultiCheckbox.d.ts +3 -3
- package/src/fields/MultiRadio.d.ts +3 -3
- package/src/fields/MultiSelect.d.ts +3 -3
- package/src/fields/Select.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Option } from '../types';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
|
-
export type MultiCheckboxProps = {
|
|
3
|
+
export type MultiCheckboxProps<OptionValue = string> = {
|
|
4
4
|
defaultValue?: string[] | undefined;
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
error?: string | undefined;
|
|
@@ -9,7 +9,7 @@ export type MultiCheckboxProps = {
|
|
|
9
9
|
isLight?: boolean | undefined;
|
|
10
10
|
label: string;
|
|
11
11
|
name: string;
|
|
12
|
-
onChange?: ((nextValue:
|
|
13
|
-
options: Option[];
|
|
12
|
+
onChange?: ((nextValue: OptionValue[] | undefined) => Promisable<void>) | undefined;
|
|
13
|
+
options: Option<OptionValue>[];
|
|
14
14
|
};
|
|
15
15
|
export declare function MultiCheckbox({ defaultValue, disabled, error, isInline, isLabelHidden, isLight, label, name, onChange, options }: MultiCheckboxProps): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Option } from '../types';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
|
-
export type MultiRadioProps = {
|
|
3
|
+
export type MultiRadioProps<OptionValue = string> = {
|
|
4
4
|
defaultValue?: string | undefined;
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
error?: string | undefined;
|
|
@@ -9,7 +9,7 @@ export type MultiRadioProps = {
|
|
|
9
9
|
isLight?: boolean | undefined;
|
|
10
10
|
label: string;
|
|
11
11
|
name: string;
|
|
12
|
-
onChange?: ((nextValue:
|
|
13
|
-
options: Option[];
|
|
12
|
+
onChange?: ((nextValue: OptionValue | undefined) => Promisable<void>) | undefined;
|
|
13
|
+
options: Option<OptionValue>[];
|
|
14
14
|
};
|
|
15
15
|
export declare function MultiRadio({ defaultValue, disabled, error, isInline, isLabelHidden, isLight, label, name, onChange, options }: MultiRadioProps): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Option } from '../types';
|
|
2
2
|
import type { TagPickerProps } from 'rsuite';
|
|
3
3
|
import type { Promisable } from 'type-fest';
|
|
4
|
-
export type MultiSelectProps = Omit<TagPickerProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
|
|
4
|
+
export type MultiSelectProps<OptionValue = string> = Omit<TagPickerProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
|
|
5
5
|
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
6
6
|
baseContainer?: Document | HTMLDivElement | null | undefined;
|
|
7
7
|
defaultValue?: string[] | undefined;
|
|
@@ -12,7 +12,7 @@ export type MultiSelectProps = Omit<TagPickerProps, 'as' | 'container' | 'data'
|
|
|
12
12
|
isLight?: boolean | undefined;
|
|
13
13
|
label: string;
|
|
14
14
|
name: string;
|
|
15
|
-
onChange?: ((nextValue:
|
|
16
|
-
options: Option[];
|
|
15
|
+
onChange?: ((nextValue: OptionValue[] | undefined) => Promisable<void>) | undefined;
|
|
16
|
+
options: Option<OptionValue>[];
|
|
17
17
|
};
|
|
18
18
|
export declare function MultiSelect({ baseContainer, error, fixedWidth, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: MultiSelectProps): JSX.Element;
|
package/src/fields/Select.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Option } from '../types';
|
|
2
2
|
import type { SelectPickerProps } from 'rsuite';
|
|
3
3
|
import type { Promisable } from 'type-fest';
|
|
4
|
-
export type SelectProps = Omit<SelectPickerProps<any>, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
|
|
4
|
+
export type SelectProps<OptionValue = string> = Omit<SelectPickerProps<any>, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
|
|
5
5
|
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
6
6
|
baseContainer?: Document | HTMLDivElement | null | undefined;
|
|
7
7
|
defaultValue?: string | undefined;
|
|
@@ -10,7 +10,7 @@ export type SelectProps = Omit<SelectPickerProps<any>, 'as' | 'container' | 'dat
|
|
|
10
10
|
isLight?: boolean | undefined;
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
|
-
onChange?: ((nextValue:
|
|
14
|
-
options: Option[];
|
|
13
|
+
onChange?: ((nextValue: OptionValue | undefined) => Promisable<void>) | undefined;
|
|
14
|
+
options: Option<OptionValue>[];
|
|
15
15
|
};
|
|
16
16
|
export declare function Select({ baseContainer, error, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: SelectProps): JSX.Element;
|