@mtes-mct/monitor-ui 2.6.0 → 2.7.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 +7 -0
- package/index.js +557 -43
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/fields/AutoComplete.d.ts +4 -2
- package/src/fields/DatePicker/index.d.ts +3 -1
- package/src/fields/DateRangePicker/index.d.ts +3 -1
- package/src/fields/MultiSelect.d.ts +3 -1
- package/src/fields/Select.d.ts +3 -1
- package/src/hooks/useClickOutside.d.ts +3 -0
- package/src/index.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Option } from '../types';
|
|
2
2
|
import type { AutoCompleteProps as RsuiteAutoCompleteProps } from 'rsuite';
|
|
3
3
|
import type { Promisable } from 'type-fest';
|
|
4
|
-
export type AutoCompleteProps = Omit<RsuiteAutoCompleteProps, 'as' | 'container' | 'data' | 'id' | 'onChange' | 'onSelect' | 'value'> & {
|
|
4
|
+
export type AutoCompleteProps = Omit<RsuiteAutoCompleteProps, 'as' | 'container' | 'data' | 'id' | 'onChange' | 'open' | 'onSelect' | 'value'> & {
|
|
5
|
+
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
6
|
+
baseContainer?: Document | HTMLDivElement | null;
|
|
5
7
|
error?: string;
|
|
6
8
|
isLabelHidden?: boolean;
|
|
7
9
|
isLight?: boolean;
|
|
@@ -13,4 +15,4 @@ export type AutoCompleteProps = Omit<RsuiteAutoCompleteProps, 'as' | 'container'
|
|
|
13
15
|
queryMap?: (record: Record<string, any>) => Option;
|
|
14
16
|
queryUrl?: string;
|
|
15
17
|
};
|
|
16
|
-
export declare function AutoComplete({ defaultValue, error, isLabelHidden, isLight, label, onChange, onQuery, options, queryMap, queryUrl, ...originalProps }: AutoCompleteProps): JSX.Element;
|
|
18
|
+
export declare function AutoComplete({ baseContainer, defaultValue, error, isLabelHidden, isLight, label, onChange, onQuery, options, queryMap, queryUrl, ...originalProps }: AutoCompleteProps): JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
3
|
export type DatePickerProps = Omit<HTMLAttributes<HTMLFieldSetElement>, 'defaultValue' | 'onChange'> & {
|
|
4
|
+
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
5
|
+
baseContainer?: Document | HTMLDivElement | null;
|
|
4
6
|
defaultValue?: Date;
|
|
5
7
|
disabled?: boolean;
|
|
6
8
|
isCompact?: boolean;
|
|
@@ -24,4 +26,4 @@ export type DatePickerProps = Omit<HTMLAttributes<HTMLFieldSetElement>, 'default
|
|
|
24
26
|
onChange?: (nextUtcDate: Date) => Promisable<void>;
|
|
25
27
|
withTime?: boolean;
|
|
26
28
|
};
|
|
27
|
-
export declare function DatePicker({ defaultValue, disabled, isCompact, isHistorical, isLabelHidden, isLight, label, minutesRange, onChange, withTime, ...nativeProps }: DatePickerProps): JSX.Element;
|
|
29
|
+
export declare function DatePicker({ baseContainer, defaultValue, disabled, isCompact, isHistorical, isLabelHidden, isLight, label, minutesRange, onChange, withTime, ...nativeProps }: DatePickerProps): JSX.Element;
|
|
@@ -2,6 +2,8 @@ import type { DateRange } from '../../types';
|
|
|
2
2
|
import type { HTMLAttributes } from 'react';
|
|
3
3
|
import type { Promisable } from 'type-fest';
|
|
4
4
|
export type DateRangePickerProps = Omit<HTMLAttributes<HTMLFieldSetElement>, 'defaultValue' | 'onChange'> & {
|
|
5
|
+
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
6
|
+
baseContainer?: Document | HTMLDivElement | null;
|
|
5
7
|
defaultValue?: DateRange;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
isCompact?: boolean;
|
|
@@ -25,4 +27,4 @@ export type DateRangePickerProps = Omit<HTMLAttributes<HTMLFieldSetElement>, 'de
|
|
|
25
27
|
onChange?: (nextUtcDateRange: DateRange) => Promisable<void>;
|
|
26
28
|
withTime?: boolean;
|
|
27
29
|
};
|
|
28
|
-
export declare function DateRangePicker({ defaultValue, disabled, isCompact, isHistorical, isLabelHidden, isLight, label, minutesRange, onChange, withTime, ...nativeProps }: DateRangePickerProps): JSX.Element;
|
|
30
|
+
export declare function DateRangePicker({ baseContainer, defaultValue, disabled, isCompact, isHistorical, isLabelHidden, isLight, label, minutesRange, onChange, withTime, ...nativeProps }: DateRangePickerProps): JSX.Element;
|
|
@@ -2,6 +2,8 @@ import type { Option } from '../types';
|
|
|
2
2
|
import type { TagPickerProps } from 'rsuite';
|
|
3
3
|
import type { Promisable } from 'type-fest';
|
|
4
4
|
export type MultiSelectProps = Omit<TagPickerProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
|
|
5
|
+
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
6
|
+
baseContainer?: Document | HTMLDivElement | null;
|
|
5
7
|
defaultValue?: string[];
|
|
6
8
|
error?: string;
|
|
7
9
|
/** Width in pixels */
|
|
@@ -13,4 +15,4 @@ export type MultiSelectProps = Omit<TagPickerProps, 'as' | 'container' | 'data'
|
|
|
13
15
|
onChange?: (nextValue: string[] | undefined) => Promisable<void>;
|
|
14
16
|
options: Option[];
|
|
15
17
|
};
|
|
16
|
-
export declare function MultiSelect({ error, fixedWidth, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: MultiSelectProps): JSX.Element;
|
|
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
|
@@ -2,6 +2,8 @@ import type { Option } from '../types';
|
|
|
2
2
|
import type { SelectPickerProps } from 'rsuite';
|
|
3
3
|
import type { Promisable } from 'type-fest';
|
|
4
4
|
export type SelectProps = Omit<SelectPickerProps<any>, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'value'> & {
|
|
5
|
+
/** Used to pass something else than `window.document` as a base container to attach global events listeners. */
|
|
6
|
+
baseContainer?: Document | HTMLDivElement | null;
|
|
5
7
|
defaultValue?: string;
|
|
6
8
|
error?: string;
|
|
7
9
|
isLabelHidden?: boolean;
|
|
@@ -11,4 +13,4 @@ export type SelectProps = Omit<SelectPickerProps<any>, 'as' | 'container' | 'dat
|
|
|
11
13
|
onChange?: (nextValue: string | undefined) => Promisable<void>;
|
|
12
14
|
options: Option[];
|
|
13
15
|
};
|
|
14
|
-
export declare function Select({ error, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: SelectProps): JSX.Element;
|
|
16
|
+
export declare function Select({ baseContainer, error, isLabelHidden, isLight, label, onChange, options, searchable, ...originalProps }: SelectProps): JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { Promisable } from 'type-fest';
|
|
3
|
+
export declare const useClickOutside: (zoneRefOrzoneRefs: MutableRefObject<any> | MutableRefObject<any>[], action: () => Promisable<void>, baseContainer?: Document | HTMLDivElement | null) => void;
|
package/src/index.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export { FormikSelect } from './formiks/FormikSelect';
|
|
|
37
37
|
export { FormikTextarea } from './formiks/FormikTextarea';
|
|
38
38
|
export { FormikTextInput } from './formiks/FormikTextInput';
|
|
39
39
|
export * as Icon from './icons';
|
|
40
|
+
export { useClickOutside } from './hooks/useClickOutside';
|
|
41
|
+
export { useForceUpdate } from './hooks/useForceUpdate';
|
|
40
42
|
export type { PartialTheme, Theme } from './theme';
|
|
41
43
|
export type { DateRange, IconProps, Option } from './types';
|
|
42
44
|
export type { DropdownProps, DropdownItemProps } from './components/Dropdown';
|