@mtes-mct/monitor-ui 24.29.2 → 24.30.1
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,16 @@
|
|
|
1
|
+
## [24.30.0](https://github.com/MTES-MCT/monitor-ui/compare/v24.29.2...v24.30.0) (2025-08-15)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **fields:** add onSearchProp on CheckTreePicker component ([82ae2f8](https://github.com/MTES-MCT/monitor-ui/commit/82ae2f8f5ae0aaf187620f3a653f03aa2c661266))
|
|
6
|
+
|
|
7
|
+
### Buid System & Dependencies
|
|
8
|
+
|
|
9
|
+
* **deps:** bump tmp from 0.2.3 to 0.2.4 in the npm_and_yarn group ([7f0b488](https://github.com/MTES-MCT/monitor-ui/commit/7f0b48863c60f700b978866370a001bdb7db7463))
|
|
10
|
+
* **dev-deps:** bump @sentry/react in /e2e/release/sample ([e93ab4d](https://github.com/MTES-MCT/monitor-ui/commit/e93ab4d5b75d9d3de77c5bccd5d814aca050d3ef))
|
|
11
|
+
* **dev-deps:** bump the all-non-major-dependencies group ([a25b35b](https://github.com/MTES-MCT/monitor-ui/commit/a25b35b757b9f8dc0c3271b38c36d80486ce4159))
|
|
12
|
+
* **dev-deps:** bump tmp ([81a5301](https://github.com/MTES-MCT/monitor-ui/commit/81a5301c81b51efd05ae6dd71dd3ea3e478b3909))
|
|
13
|
+
|
|
1
14
|
## [24.29.1](https://github.com/MTES-MCT/monitor-ui/compare/v24.29.0...v24.29.1) (2025-07-30)
|
|
2
15
|
|
|
3
16
|
### Bug Fixes
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomSearch } from '@libs/CustomSearch';
|
|
2
|
+
import { type SyntheticEvent } from 'react';
|
|
2
3
|
import { type CheckTreePickerProps as RsuiteCheckTreePickerProps } from 'rsuite';
|
|
3
4
|
import type { TreeOption } from './types';
|
|
4
5
|
import type { Promisable } from 'type-fest';
|
|
@@ -16,6 +17,7 @@ export type CheckTreePickerProps = Omit<RsuiteCheckTreePickerProps, 'as' | 'cont
|
|
|
16
17
|
label: string;
|
|
17
18
|
name: string;
|
|
18
19
|
onChange?: (nextValue: any[] | undefined) => Promisable<void>;
|
|
20
|
+
onSearch?: (query: string, event: SyntheticEvent<Element, Event>) => void;
|
|
19
21
|
options: TreeOption[];
|
|
20
22
|
popupWidth?: number | undefined;
|
|
21
23
|
renderedChildrenValue?: string;
|
|
@@ -23,5 +25,5 @@ export type CheckTreePickerProps = Omit<RsuiteCheckTreePickerProps, 'as' | 'cont
|
|
|
23
25
|
shouldShowLabels?: boolean;
|
|
24
26
|
value?: TreeOption[] | undefined;
|
|
25
27
|
};
|
|
26
|
-
export declare function CheckTreePicker({ childrenKey, className, customSearch, customSearchMinQueryLength, disabled, error, isErrorMessageHidden, isLabelHidden, isLight, isMultiSelect, isRequired, isTransparent, isUndefinedWhenDisabled, label, labelKey, onChange, options, popupWidth, readOnly, renderedChildrenValue, renderedValue, shouldShowLabels, style, value, valueKey, ...originalProps }: CheckTreePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function CheckTreePicker({ childrenKey, className, customSearch, customSearchMinQueryLength, disabled, error, isErrorMessageHidden, isLabelHidden, isLight, isMultiSelect, isRequired, isTransparent, isUndefinedWhenDisabled, label, labelKey, onChange, onSearch, options, popupWidth, readOnly, renderedChildrenValue, renderedValue, shouldShowLabels, style, value, valueKey, ...originalProps }: CheckTreePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/CheckTreePicker/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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,CAAA;IACzE,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,CAAA;CACjC,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,WAAwB,EACxB,SAAS,EACT,YAAY,EACZ,0BAA8B,EAC9B,QAAgB,EAChB,KAAK,EACL,oBAA4B,EAC5B,aAAqB,EACrB,OAAe,EACf,aAAoB,EACpB,UAAkB,EAClB,aAAqB,EACrB,uBAA+B,EAC/B,KAAK,EACL,QAAkB,EAClB,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,UAAU,EACV,QAAgB,EAChB,qBAAyC,EACzC,aAA4B,EAC5B,gBAAuB,EACvB,KAAK,EACL,KAAK,EACL,QAAkB,EAClB,GAAG,aAAa,EACjB,EAAE,oBAAoB,2CAyRtB"}
|
package/index.js
CHANGED
|
@@ -30096,7 +30096,7 @@ function getOptionsToDisplay(allOptions, selectedOptions, childrenKey = 'childre
|
|
|
30096
30096
|
return result;
|
|
30097
30097
|
}
|
|
30098
30098
|
|
|
30099
|
-
function CheckTreePicker({ childrenKey = 'children', className, customSearch, customSearchMinQueryLength = 1, disabled = false, error, isErrorMessageHidden = false, isLabelHidden = false, isLight = false, isMultiSelect = true, isRequired = false, isTransparent = false, isUndefinedWhenDisabled = false, label, labelKey = 'label', onChange, options, popupWidth, readOnly = false, renderedChildrenValue = 'Sous-thématique', renderedValue = 'Thématique', shouldShowLabels = true, style, value, valueKey = 'value', ...originalProps }) {
|
|
30099
|
+
function CheckTreePicker({ childrenKey = 'children', className, customSearch, customSearchMinQueryLength = 1, disabled = false, error, isErrorMessageHidden = false, isLabelHidden = false, isLight = false, isMultiSelect = true, isRequired = false, isTransparent = false, isUndefinedWhenDisabled = false, label, labelKey = 'label', onChange, onSearch, options, popupWidth, readOnly = false, renderedChildrenValue = 'Sous-thématique', renderedValue = 'Thématique', shouldShowLabels = true, style, value, valueKey = 'value', ...originalProps }) {
|
|
30100
30100
|
// eslint-disable-next-line no-null/no-null
|
|
30101
30101
|
const boxRef = useRef(null);
|
|
30102
30102
|
const controlledClassName = useMemo(()=>classnames('Field-CheckTreePicker', className), [
|
|
@@ -30191,7 +30191,7 @@ function CheckTreePicker({ childrenKey = 'children', className, customSearch, cu
|
|
|
30191
30191
|
valueKey,
|
|
30192
30192
|
labelKey
|
|
30193
30193
|
]);
|
|
30194
|
-
const handleSearch = useCallback((nextQuery)=>{
|
|
30194
|
+
const handleSearch = useCallback((nextQuery, event)=>{
|
|
30195
30195
|
setSearchKeyword(nextQuery);
|
|
30196
30196
|
if (!localCustomSearch || nextQuery.trim().length < customSearchMinQueryLength) {
|
|
30197
30197
|
setControlledOptions(options);
|
|
@@ -30214,12 +30214,16 @@ function CheckTreePicker({ childrenKey = 'children', className, customSearch, cu
|
|
|
30214
30214
|
...selectedOptions
|
|
30215
30215
|
].map((item)=>deepCloneExtensible(item)));
|
|
30216
30216
|
setControlledOptions(merged);
|
|
30217
|
+
if (onSearch) {
|
|
30218
|
+
onSearch(nextQuery, event);
|
|
30219
|
+
}
|
|
30217
30220
|
}, [
|
|
30218
30221
|
childrenKey,
|
|
30219
30222
|
customSearchMinQueryLength,
|
|
30220
30223
|
labelKey,
|
|
30221
30224
|
localCustomSearch,
|
|
30222
30225
|
mergeResultsByParent,
|
|
30226
|
+
onSearch,
|
|
30223
30227
|
options,
|
|
30224
30228
|
value,
|
|
30225
30229
|
valueKey
|
|
@@ -30380,7 +30384,7 @@ function CheckTreePicker({ childrenKey = 'children', className, customSearch, cu
|
|
|
30380
30384
|
uncheckableItemValues: uncheckableValues,
|
|
30381
30385
|
value: rsuiteValue ?? [],
|
|
30382
30386
|
valueKey: valueKey,
|
|
30383
|
-
virtualized:
|
|
30387
|
+
virtualized: false,
|
|
30384
30388
|
...originalProps
|
|
30385
30389
|
})
|
|
30386
30390
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtes-mct/monitor-ui",
|
|
3
3
|
"description": "Common React components, hooks, utilities and CSS stylesheets for MonitorFish, MonitorEnv and RapportNav.",
|
|
4
|
-
"version": "24.
|
|
4
|
+
"version": "24.30.1",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|