@mtes-mct/monitor-ui 23.1.0 → 23.1.2

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,50 @@
1
+ ## [23.1.1](https://github.com/MTES-MCT/monitor-ui/compare/v23.1.0...v23.1.1) (2024-09-26)
2
+
3
+
4
+ ### Styles
5
+
6
+ * **elements:** fix close button size in SingleTag ([ff8a1b5](https://github.com/MTES-MCT/monitor-ui/commit/ff8a1b5f7bf2ba4b05d791ea038a9b25dde41665))
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **fields:** add debounce ([79b19fb](https://github.com/MTES-MCT/monitor-ui/commit/79b19fb37eae38612feab4328021d4d233775844))
12
+ * **fields:** apply review comment ([8e864da](https://github.com/MTES-MCT/monitor-ui/commit/8e864da6d96b7b211200bfe01eabba0c1283a675))
13
+ * **fields:** fix pointer-events ([13d1955](https://github.com/MTES-MCT/monitor-ui/commit/13d195566a61c99e9aae297f201dce4c425cfbc9))
14
+ * **fields:** handle undefined min/max prop in DateRangePicker number inputs ([8e10304](https://github.com/MTES-MCT/monitor-ui/commit/8e10304f20266839f7c727c686f0ad1038f8b0a9))
15
+ * **fields:** memoize list props ([54c4d3f](https://github.com/MTES-MCT/monitor-ui/commit/54c4d3f2090a6f470362dc85bdde45e9f26cb944))
16
+ * **fields:** set default listProps value to empty object in Select ([88ce94f](https://github.com/MTES-MCT/monitor-ui/commit/88ce94feff3c509c771586013f98be1a1cba5def))
17
+
18
+
19
+ ### Buid System & Dependencies
20
+
21
+ * **dev-deps:** bump rollup from 4.21.2 to 4.22.4 ([4684626](https://github.com/MTES-MCT/monitor-ui/commit/4684626b83cc16ab102c46ed4891fcfe0cde7ff2))
22
+ * **dev-deps:** bump the non-major-dev-dependencies group across 1 directory with 23 updates ([491a8c6](https://github.com/MTES-MCT/monitor-ui/commit/491a8c64b5f9d00d88bded52b868b5d9aa279398))
23
+ * **dev-deps:** bump vite from 5.4.3 to 5.4.6 ([8268198](https://github.com/MTES-MCT/monitor-ui/commit/8268198bc7156700bf58c2be2449623857dab67d))
24
+ * **dev-deps:** upgrade dev deps in /e2e/release/sample ([1581c0a](https://github.com/MTES-MCT/monitor-ui/commit/1581c0ab0e00134d51fe9caa54c8204adc416d3f))
25
+ * **e2e:** remove useless browserslist in e2e release sample package.json ([398e20a](https://github.com/MTES-MCT/monitor-ui/commit/398e20a21ca3b42a74d0df5116983865d527edf7))
26
+
27
+ ## [23.1.0](https://github.com/MTES-MCT/monitor-ui/compare/v23.0.0...v23.1.0) (2024-09-25)
28
+
29
+
30
+ ### Features
31
+
32
+ * **fields:** add unit prop to NumberInput ([5773587](https://github.com/MTES-MCT/monitor-ui/commit/5773587eb738e6eb8672ede9dc348dd430070acb))
33
+
34
+
35
+ ### Bug Fixes
36
+
37
+ * **fields:** re-add missing hasError passed prop within NumberInput ([2a3e6fb](https://github.com/MTES-MCT/monitor-ui/commit/2a3e6fb76dc1b23a09b0346695d623f6f2e719bf))
38
+
39
+
40
+ ### Buid System & Dependencies
41
+
42
+ * **dev-deps:** bump date-fns from 3.6.0 to 4.0.0 ([0490c87](https://github.com/MTES-MCT/monitor-ui/commit/0490c87f2e0b7842719619c25a28d8da3510c92d))
43
+ * **dev-deps:** bump rollup in /e2e/release/sample ([d129438](https://github.com/MTES-MCT/monitor-ui/commit/d1294389097d528637c481ada8ea9ad1514f2640))
44
+ * **dev-deps:** bump the all-non-major-dependencies group ([949f672](https://github.com/MTES-MCT/monitor-ui/commit/949f6720e532f2e91222fe20352330ed270ea17e))
45
+ * **dev-deps:** bump the all-non-major-dependencies group across 1 directory with 4 updates ([5de56bd](https://github.com/MTES-MCT/monitor-ui/commit/5de56bd3f1da2832c7302c4db549fe5387aca01a))
46
+ * **dev-deps:** bump vite from 5.4.3 to 5.4.6 in /e2e/release/sample ([7dd2268](https://github.com/MTES-MCT/monitor-ui/commit/7dd2268c1c3eced211027447da3c6c4139510a79))
47
+
1
48
  ## [23.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v22.1.0...v23.0.0) (2024-09-12)
2
49
 
3
50
 
@@ -1,6 +1,6 @@
1
1
  import { type InputHTMLAttributes } from 'react';
2
2
  import type { Promisable } from 'type-fest';
3
- export type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'maxLength' | 'onInput' | 'pattern' | 'type'> & {
3
+ export type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'max' | 'maxLength' | 'min' | 'onInput' | 'pattern' | 'type'> & {
4
4
  isLight: boolean;
5
5
  max?: number;
6
6
  min?: number;
@@ -17,7 +17,7 @@ export type NumberInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'defa
17
17
  onPrevious?: (() => Promisable<void>) | undefined;
18
18
  size: number;
19
19
  };
20
- export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "pattern" | "type" | "onInput" | "defaultValue" | "maxLength"> & {
20
+ export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "pattern" | "max" | "min" | "type" | "onInput" | "defaultValue" | "maxLength"> & {
21
21
  isLight: boolean;
22
22
  max?: number;
23
23
  min?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.d.ts","sourceRoot":"","sources":["../../../src/fields/DateRangePicker/NumberInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAA;AAKd,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,cAAc,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAC9D,GAAG;IACF,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ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,CAAC,WAAW,CAAC,EAAE,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,KAAK,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAChC,CAAA;AACD,wBAAgB,MAAM,CAAC,WAAW,SAAS,eAAe,GAAG,MAAM,EAAE,EACnE,SAAS,EACT,YAAY,EACZ,0BAA8B,EAC9B,QAAgB,EAChB,KAAK,EACL,WAAkB,EAClB,oBAA4B,EAC5B,aAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,aAAqB,EACrB,uBAA+B,EAC/B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,cAAc,EACd,UAAU,EACV,QAAgB,EAChB,UAAkB,EAClB,KAAK,EACL,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,WAAW,CAAC,WAAW,CAAC,2CA6I1B"}
package/index.js CHANGED
@@ -53288,32 +53288,21 @@ NewWindow.defaultProps = {
53288
53288
  // An error here most likely happens when trying to access stylesheets from other domains,
53289
53289
  // which is a CORS violation and should be ignored.
53290
53290
  // eslint-disable-next-line no-console
53291
- console.debug(err);
53292
53291
  return;
53293
53292
  }
53294
53293
  if (rules) {
53295
- // IE11 is very slow for appendChild, so use plain string here
53296
- const ruleText = [];
53297
53294
  // Write the text of each rule into the body of the style element
53298
- Array.from(styleSheet.cssRules).forEach((cssRule)=>{
53299
- const { type } = cssRule;
53300
- let returnText = '';
53301
- if (type === CSSRule.KEYFRAMES_RULE) {
53302
- // IE11 will throw error when trying to access cssText property, so we
53303
- // need to assemble them
53304
- returnText = getKeyFrameText(cssRule);
53305
- } else if ([
53306
- CSSRule.IMPORT_RULE,
53307
- CSSRule.FONT_FACE_RULE
53308
- ].includes(type)) {
53295
+ const ruleText = Array.from(rules).flat().map((cssRule)=>{
53296
+ if ([
53297
+ 'CSSImportRule',
53298
+ 'CSSFontFaceRule'
53299
+ ].includes(cssRule.constructor.name)) {
53309
53300
  // Check if the cssRule type is CSSImportRule (3) or CSSFontFaceRule (5)
53310
53301
  // to handle local imports on a about:blank page
53311
53302
  // '/custom.css' turns to 'http://my-site.com/custom.css'
53312
- returnText = fixUrlForRule(cssRule);
53313
- } else {
53314
- returnText = cssRule.cssText;
53303
+ return fixUrlForRule(cssRule);
53315
53304
  }
53316
- ruleText.push(returnText);
53305
+ return cssRule.cssText;
53317
53306
  });
53318
53307
  const newStyleEl = target.createElement('style');
53319
53308
  newStyleEl.textContent = ruleText.join('\n');
@@ -53328,22 +53317,6 @@ NewWindow.defaultProps = {
53328
53317
  });
53329
53318
  target.head.appendChild(headFrag);
53330
53319
  }
53331
- /**
53332
- * Make keyframe rules.
53333
- */ // This should be `CSSRule` instead of `any` but this code is a bit tedious.
53334
- function getKeyFrameText(cssRule/** CSSRule */ ) {
53335
- const tokens = [
53336
- '@keyframes',
53337
- cssRule.name,
53338
- '{'
53339
- ];
53340
- Array.from(cssRule.cssRules).forEach((keyframesCssRule)=>{
53341
- // type === CSSRule.KEYFRAME_RULE should always be true
53342
- tokens.push(keyframesCssRule.keyText, '{', keyframesCssRule.style.cssText, '}');
53343
- });
53344
- tokens.push('}');
53345
- return tokens.join(' ');
53346
- }
53347
53320
  /**
53348
53321
  * Handle local import urls.
53349
53322
  */ function fixUrlForRule(cssRule) {
@@ -53763,15 +53736,16 @@ const PrimaryText = styled.span`
53763
53736
  color: ${(p)=>p.theme.color.gunMetal};
53764
53737
  font-size: 13px;
53765
53738
  line-height: 1.3846;
53766
- padding: 3px 8px 5px;
53739
+ padding: 2px 8px 6px;
53767
53740
  overflow: hidden;
53768
53741
  text-overflow: ellipsis;
53769
53742
  white-space: nowrap;
53770
53743
  `;
53771
53744
  const PrimaryIconButton = styled(IconButton)`
53772
53745
  background-color: ${(p)=>p.theme.color.lightGray};
53746
+ line-height: 18px;
53773
53747
  margin-left: 1px;
53774
- padding: 7px;
53748
+ padding: 2px 8px 6px;
53775
53749
 
53776
53750
  :hover,
53777
53751
  &._hover {
@@ -66318,7 +66292,7 @@ function NumberInputWithRef({ isLight, max, min, name, onBack, onBlur, onFilled,
66318
66292
  return;
66319
66293
  }
66320
66294
  const valueAsNumber = Number(inputRef.current.value);
66321
- if (Number.isNaN(valueAsNumber) || valueAsNumber < min || valueAsNumber > max) {
66295
+ if (Number.isNaN(valueAsNumber) || min !== undefined && valueAsNumber < min || max !== undefined && valueAsNumber > max) {
66322
66296
  onFormatError(true);
66323
66297
  return;
66324
66298
  }
@@ -69307,6 +69281,28 @@ function Select({ className, customSearch, customSearchMinQueryLength = 1, disab
69307
69281
  controlledRsuiteData,
69308
69282
  rsuiteData
69309
69283
  ]);
69284
+ const listProps = useMemo(()=>originalProps.virtualized ? {
69285
+ onItemsRendered: lodashExports.debounce(()=>{
69286
+ if (!boxRef.current) {
69287
+ return;
69288
+ }
69289
+ const divs = boxRef.current.querySelectorAll(`[id="${originalProps.name}-listbox"] div`);
69290
+ const targetDiv = divs[2];
69291
+ /**
69292
+ * Reset the 'pointer-events' style
69293
+ * @see:
69294
+ * https://github.com/MTES-MCT/monitorfish/issues/3211
69295
+ * https://github.com/bvaughn/react-window/issues/128
69296
+ */ if (targetDiv) {
69297
+ requestAnimationFrame(()=>{
69298
+ targetDiv.style.pointerEvents = 'auto';
69299
+ });
69300
+ }
69301
+ }, 300)
69302
+ } : {}, [
69303
+ originalProps.virtualized,
69304
+ originalProps.name
69305
+ ]);
69310
69306
  useFieldUndefineEffect(isUndefinedWhenDisabled && disabled, onChange);
69311
69307
  useEffect(()=>{
69312
69308
  forceUpdate();
@@ -69341,6 +69337,7 @@ function Select({ className, customSearch, customSearchMinQueryLength = 1, disab
69341
69337
  disabled: disabled,
69342
69338
  disabledItemValues: disabledItemValues,
69343
69339
  id: originalProps.name,
69340
+ listProps: listProps,
69344
69341
  onChange: handleChange,
69345
69342
  onSearch: handleSearch,
69346
69343
  // `as any` because we customized `ItemDataType` type by adding `optionValue`,
@@ -73999,7 +73996,7 @@ function RowCheckbox({ onChange, ...nativeProps }) {
73999
73996
  onChange
74000
73997
  ]);
74001
73998
  return /*#__PURE__*/ jsx(RestyledRsuiteCheckbox, {
74002
- $isChecked: nativeProps.checked || nativeProps.indeterminate,
73999
+ $isChecked: !!nativeProps.checked || !!nativeProps.indeterminate,
74003
74000
  $isDisabled: nativeProps.disabled,
74004
74001
  $isReadOnly: nativeProps.readOnly,
74005
74002
  ...nativeProps,
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": "23.1.0",
4
+ "version": "23.1.2",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {