@mtes-mct/monitor-ui 6.2.2 → 6.3.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [6.2.2](https://github.com/MTES-MCT/monitor-ui/compare/v6.2.1...v6.2.2) (2023-05-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **formiks:** set touched to true on change ([2507de9](https://github.com/MTES-MCT/monitor-ui/commit/2507de91c5ba117ecda97916e58414958bb40107))
7
+
1
8
  ## [6.2.1](https://github.com/MTES-MCT/monitor-ui/compare/v6.2.0...v6.2.1) (2023-05-21)
2
9
 
3
10
 
@@ -1,9 +1,11 @@
1
- import type { Option, OptionValueType } from '../types';
2
- import type { TagPickerProps } from 'rsuite';
1
+ import { type TagPickerProps } from 'rsuite';
2
+ import { type CustomSearch } from '../libs/CustomSearch';
3
+ import { type Option, type OptionValueType } from '../types';
3
4
  import type { Promisable } from 'type-fest';
4
5
  export type MultiSelectProps<OptionValue extends OptionValueType = string> = Omit<TagPickerProps, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'open' | 'renderMenuItem' | 'value'> & {
5
6
  /** Used to pass something else than `window.document` as a base container to attach global events listeners. */
6
7
  baseContainer?: Document | HTMLDivElement | null | undefined;
8
+ customSearch?: CustomSearch<Option<OptionValue>> | undefined;
7
9
  error?: string | undefined;
8
10
  isErrorMessageHidden?: boolean | undefined;
9
11
  isLabelHidden?: boolean | undefined;
@@ -16,4 +18,4 @@ export type MultiSelectProps<OptionValue extends OptionValueType = string> = Omi
16
18
  options: Option<OptionValue>[];
17
19
  value?: OptionValue[] | undefined;
18
20
  };
19
- export declare function MultiSelect<OptionValue extends OptionValueType = string>({ baseContainer, disabled, error, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, options, optionValueKey, searchable, value, ...originalProps }: MultiSelectProps<OptionValue>): JSX.Element;
21
+ export declare function MultiSelect<OptionValue extends OptionValueType = string>({ baseContainer, customSearch, disabled, error, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, options, optionValueKey, searchable, value, ...originalProps }: MultiSelectProps<OptionValue>): JSX.Element;
@@ -1,9 +1,11 @@
1
- import type { Option, OptionValueType } from '../types';
2
- import type { SelectPickerProps } from 'rsuite';
1
+ import { type SelectPickerProps } from 'rsuite';
2
+ import { type CustomSearch } from '../libs/CustomSearch';
3
+ import { type Option, type OptionValueType } from '../types';
3
4
  import type { Promisable } from 'type-fest';
4
5
  export type SelectProps<OptionValue extends OptionValueType = string> = Omit<SelectPickerProps<any>, 'as' | 'container' | 'data' | 'defaultValue' | 'id' | 'onChange' | 'open' | 'renderMenuItem' | 'renderValue' | 'value' | 'valueKey'> & {
5
6
  /** Used to pass something else than `window.document` as a base container to attach global events listeners. */
6
7
  baseContainer?: Document | HTMLDivElement | null | undefined;
8
+ customSearch?: CustomSearch<Option<OptionValue>> | undefined;
7
9
  error?: string | undefined;
8
10
  isCleanable?: boolean | undefined;
9
11
  isErrorMessageHidden?: boolean | undefined;
@@ -17,4 +19,4 @@ export type SelectProps<OptionValue extends OptionValueType = string> = Omit<Sel
17
19
  options: Option<OptionValue>[];
18
20
  value?: OptionValue | undefined;
19
21
  };
20
- export declare function Select<OptionValue extends OptionValueType = string>({ baseContainer, disabled, error, isCleanable, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, options, optionValueKey, searchable, value, ...originalProps }: SelectProps<OptionValue>): JSX.Element;
22
+ export declare function Select<OptionValue extends OptionValueType = string>({ baseContainer, customSearch, disabled, error, isCleanable, isErrorMessageHidden, isLabelHidden, isLight, isUndefinedWhenDisabled, label, onChange, options, optionValueKey, searchable, value, ...originalProps }: SelectProps<OptionValue>): JSX.Element;
package/index.d.ts CHANGED
@@ -56,6 +56,7 @@ export { useForceUpdate } from './hooks/useForceUpdate';
56
56
  export { useKey } from './hooks/useKey';
57
57
  export { NewWindowContext, useNewWindow } from './hooks/useNewWindow';
58
58
  export { usePrevious } from './hooks/usePrevious';
59
+ export { CustomSearch } from './libs/CustomSearch';
59
60
  export { customDayjs } from './utils/customDayjs';
60
61
  export { getCoordinates, coordinatesAreDistinct } from './utils/coordinates';
61
62
  export { getLocalizedDayjs } from './utils/getLocalizedDayjs';
@@ -105,3 +106,4 @@ export type { FormikSelectProps } from './formiks/FormikSelect';
105
106
  export type { FormikTextareaProps } from './formiks/FormikTextarea';
106
107
  export type { FormikTextInputProps } from './formiks/FormikTextInput';
107
108
  export type { NewWindowContextValue } from './hooks/useNewWindow';
109
+ export type { CustomSearchKey, CustomSearchOptions } from './libs/CustomSearch';