@mtes-mct/monitor-ui 18.5.1 → 18.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 CHANGED
@@ -1,14 +1,62 @@
1
- ## [18.4.2](https://github.com/MTES-MCT/monitor-ui/compare/v18.4.1...v18.4.2) (2024-07-03)
1
+ ## [18.6.0](https://github.com/MTES-MCT/monitor-ui/compare/v18.5.1...v18.6.0) (2024-07-16)
2
+
3
+
4
+ ### Features
5
+
6
+ * **components:** add right padding to input when its an search input ([ec50305](https://github.com/MTES-MCT/monitor-ui/commit/ec50305d1bd783dc09c8d5e9a7ee8b035fc69b08))
7
+ * **fields:** modifying padding-bottom for LARGE inputs ([3b2486a](https://github.com/MTES-MCT/monitor-ui/commit/3b2486a92497d6a40a44f4ec76bbc9d3fad403c0))
8
+
9
+
10
+ ### Buid System & Dependencies
11
+
12
+ * **deps:** bump the non-major-dependencies group across 1 directory with 2 updates ([f8b3fd1](https://github.com/MTES-MCT/monitor-ui/commit/f8b3fd123f8c4391b4230e9d61f1c0ab9fb32392))
13
+ * **dev-deps:** bump the all-non-major-dependencies group ([973e72d](https://github.com/MTES-MCT/monitor-ui/commit/973e72d189d863d2baa9cedd3150da1e0510e7f6))
14
+
15
+ ## [18.5.1](https://github.com/MTES-MCT/monitor-ui/compare/v18.5.0...v18.5.1) (2024-07-09)
16
+
17
+ ### Reverts
18
+
19
+ - Revert "fix(fields): isHidden with display none makes label unaccessible"
20
+ ([f9f2ae4](https://github.com/MTES-MCT/monitor-ui/commit/f9f2ae4d61784810ed60483ced4f3f30875f8a21))
21
+ - Revert "fix(components): add $ to isHidden"
22
+ ([19f3dc9](https://github.com/MTES-MCT/monitor-ui/commit/19f3dc9a0560ee85efe52d9be0ec935061d1469b))
2
23
 
24
+ ## [18.5.0](https://github.com/MTES-MCT/monitor-ui/compare/v18.4.2...v18.5.0) (2024-07-08)
25
+
26
+ ### Features
27
+
28
+ - **components:** add an international french format
29
+ ([ca61f53](https://github.com/MTES-MCT/monitor-ui/commit/ca61f530913fd37ebc9f84f90811761915cfe8f2))
30
+ - **components:** redo overwrite property
31
+ ([f2e376e](https://github.com/MTES-MCT/monitor-ui/commit/f2e376eb91b7eeecf3d6c61385db481f739f64fd))
3
32
 
4
33
  ### Bug Fixes
5
34
 
6
- * **components:** add tertiary to dropdown ([805e34e](https://github.com/MTES-MCT/monitor-ui/commit/805e34eb2e6a1c8d44e1b9c738f77c8f13186721))
35
+ - **components:** add $ to isHidden
36
+ ([bcdd45f](https://github.com/MTES-MCT/monitor-ui/commit/bcdd45f14c91cd8e385c0d28be659549a91e7687))
37
+ - **fields:** isHidden with display none makes label unaccessible
38
+ ([4253739](https://github.com/MTES-MCT/monitor-ui/commit/4253739005523a6f145308db45982dda22ad515d))
39
+
40
+ ### Buid System & Dependencies
41
+
42
+ - **dev-deps:** bump @semantic-release/commit-analyzer
43
+ ([32e8c03](https://github.com/MTES-MCT/monitor-ui/commit/32e8c03375133d5c323af4ea4c62f8256000ddea))
44
+ - **dev-deps:** bump the all-non-major-dependencies group
45
+ ([6d41b26](https://github.com/MTES-MCT/monitor-ui/commit/6d41b26e95ffbc29372cf9b582bc86d9c68e4448))
46
+ - **dev-deps:** bump the non-major-dev-dependencies group with 3 updates
47
+ ([ed2063d](https://github.com/MTES-MCT/monitor-ui/commit/ed2063dd06349e88071835787d4447fb3e615121))
48
+
49
+ ## [18.4.2](https://github.com/MTES-MCT/monitor-ui/compare/v18.4.1...v18.4.2) (2024-07-03)
50
+
51
+ ### Bug Fixes
7
52
 
53
+ - **components:** add tertiary to dropdown
54
+ ([805e34e](https://github.com/MTES-MCT/monitor-ui/commit/805e34eb2e6a1c8d44e1b9c738f77c8f13186721))
8
55
 
9
56
  ### Buid System & Dependencies
10
57
 
11
- * **dev-deps:** bump the non-major-dev-dependencies group across 1 directory with 17 updates ([5313127](https://github.com/MTES-MCT/monitor-ui/commit/53131272261e00bbf36e68b8a2e051a6c06a9b86))
58
+ - **dev-deps:** bump the non-major-dev-dependencies group across 1 directory with 17 updates
59
+ ([5313127](https://github.com/MTES-MCT/monitor-ui/commit/53131272261e00bbf36e68b8a2e051a6c06a9b86))
12
60
 
13
61
  ## [18.4.1](https://github.com/MTES-MCT/monitor-ui/compare/v18.4.0...v18.4.1) (2024-07-02)
14
62
 
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/fields/TextInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAA;AAKpE,OAAO,EAAU,IAAI,EAAE,MAAM,cAAc,CAAA;AAW3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,GAAG,cAAc,GAAG,IAAI,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG;IAC5G,IAAI,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,SAAS,CAAA;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,oBAAoB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC1C,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ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AAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACnC,uBAAuB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,UAAU,CAAC,IAAI,CAAC,CAAA;IAC9D,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AACD,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,QAAgB,EAChB,KAAK,EACL,IAAI,EACJ,oBAA4B,EAC5B,aAAqB,EACrB,OAAe,EACf,UAAkB,EAClB,aAAqB,EACrB,aAAqB,EACrB,uBAA+B,EAC/B,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,QAAgB,EAChB,IAAkB,EAClB,KAAK,EACL,IAAa,EACb,KAAK,EACL,GAAG,aAAa,EACjB,EAAE,cAAc,2CAgFhB"}
package/index.js CHANGED
@@ -68479,12 +68479,12 @@ const StyledInput = styled(Input)`
68479
68479
  `;
68480
68480
 
68481
68481
  const PADDING = {
68482
- [Size.LARGE]: '8px 16px 12px',
68482
+ [Size.LARGE]: '8px 16px 10px',
68483
68483
  [Size.NORMAL]: '3px 8px 7px',
68484
68484
  [Size.SMALL]: '3px 8px 6px'
68485
68485
  };
68486
68486
  const PADDING_WITH_ICON = {
68487
- [Size.LARGE]: '8px 48px 11px 16px',
68487
+ [Size.LARGE]: '8px 48px 10px 16px',
68488
68488
  [Size.NORMAL]: '3px 38px 6px 8px',
68489
68489
  [Size.SMALL]: '3px 38px 6px 8px'
68490
68490
  };
@@ -69201,12 +69201,13 @@ function TextInput({ className, disabled = false, error, Icon, isErrorMessageHid
69201
69201
  isHidden: isLabelHidden,
69202
69202
  children: label
69203
69203
  }),
69204
- /*#__PURE__*/ jsxs(StyledInputBox, {
69204
+ /*#__PURE__*/ jsxs(RestyledStyledInputBox, {
69205
69205
  $hasError: hasError,
69206
69206
  $hasIcon: !!Icon,
69207
69207
  $isDisabled: disabled,
69208
69208
  $isLight: isLight,
69209
69209
  $isReadOnly: readOnly,
69210
+ $isSearchInput: isSearchInput,
69210
69211
  $isTransparent: isTransparent,
69211
69212
  $size: size,
69212
69213
  children: [
@@ -69255,8 +69256,14 @@ const IconsContainer = styled.div`
69255
69256
  align-items: center;
69256
69257
  display: flex;
69257
69258
  position: absolute;
69258
- right: 5px;
69259
- top: ${(p)=>p.$size === Size.LARGE ? '10px' : '5px'};
69259
+ right: 8px;
69260
+ top: ${(p)=>p.$size === Size.LARGE ? '9px' : '5px'};
69261
+ `;
69262
+ const RestyledStyledInputBox = styled(StyledInputBox)`
69263
+ > input,
69264
+ > .rs-auto-complete > input {
69265
+ padding-right: ${(p)=>p.$isSearchInput && '64px'};
69266
+ }
69260
69267
  `;
69261
69268
  const Separator = styled.div`
69262
69269
  border-right: 1px solid ${(p)=>p.theme.color.lightGray};
@@ -75432,13 +75439,13 @@ const RowPinning = {
75432
75439
  return isTop ? 'top' : isBottom ? 'bottom' : false;
75433
75440
  };
75434
75441
  row.getPinnedIndex = () => {
75435
- var _table$_getPinnedRows, _visiblePinnedRowIds$;
75442
+ var _ref4, _visiblePinnedRowIds$;
75436
75443
  const position = row.getIsPinned();
75437
75444
  if (!position) return -1;
75438
- const visiblePinnedRowIds = (_table$_getPinnedRows = table._getPinnedRows(position)) == null ? void 0 : _table$_getPinnedRows.map(_ref4 => {
75445
+ const visiblePinnedRowIds = (_ref4 = position === 'top' ? table.getTopRows() : table.getBottomRows()) == null ? void 0 : _ref4.map(_ref5 => {
75439
75446
  let {
75440
75447
  id
75441
- } = _ref4;
75448
+ } = _ref5;
75442
75449
  return id;
75443
75450
  });
75444
75451
  return (_visiblePinnedRowIds$ = visiblePinnedRowIds == null ? void 0 : visiblePinnedRowIds.indexOf(row.id)) != null ? _visiblePinnedRowIds$ : -1;
@@ -75459,7 +75466,7 @@ const RowPinning = {
75459
75466
  }
75460
75467
  return Boolean((_pinningState$positio = pinningState[position]) == null ? void 0 : _pinningState$positio.length);
75461
75468
  };
75462
- table._getPinnedRows = memo(position => [table.getRowModel().rows, table.getState().rowPinning[position], position], (visibleRows, pinnedRowIds, position) => {
75469
+ table._getPinnedRows = (visibleRows, pinnedRowIds, position) => {
75463
75470
  var _table$options$keepPi;
75464
75471
  const rows = ((_table$options$keepPi = table.options.keepPinnedRows) != null ? _table$options$keepPi : true) ?
75465
75472
  //get all rows that are pinned even if they would not be otherwise visible
@@ -75474,9 +75481,9 @@ const RowPinning = {
75474
75481
  ...d,
75475
75482
  position
75476
75483
  }));
75477
- }, getMemoOptions(table.options, 'debugRows', '_getPinnedRows'));
75478
- table.getTopRows = () => table._getPinnedRows('top');
75479
- table.getBottomRows = () => table._getPinnedRows('bottom');
75484
+ };
75485
+ table.getTopRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top], (allRows, topPinnedRowIds) => table._getPinnedRows(allRows, topPinnedRowIds, 'top'), getMemoOptions(table.options, 'debugRows', 'getTopRows'));
75486
+ table.getBottomRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.bottom], (allRows, bottomPinnedRowIds) => table._getPinnedRows(allRows, bottomPinnedRowIds, 'bottom'), getMemoOptions(table.options, 'debugRows', 'getBottomRows'));
75480
75487
  table.getCenterRows = memo(() => [table.getRowModel().rows, table.getState().rowPinning.top, table.getState().rowPinning.bottom], (allRows, top, bottom) => {
75481
75488
  const topAndBottom = new Set([...(top != null ? top : []), ...(bottom != null ? bottom : [])]);
75482
75489
  return allRows.filter(d => !topAndBottom.has(d.id));
package/package.json CHANGED
@@ -1,15 +1,15 @@
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": "18.5.1",
4
+ "version": "18.7.0",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=20"
9
9
  },
10
10
  "dependencies": {
11
- "@babel/runtime": "7.24.7",
12
- "@tanstack/react-table": "8.17.3",
11
+ "@babel/runtime": "7.24.8",
12
+ "@tanstack/react-table": "8.19.3",
13
13
  "@tanstack/react-virtual": "beta",
14
14
  "prop-types": "15.8.1",
15
15
  "tslib": "2.6.3"