carbon-addons-iot-react 2.151.1 → 2.152.0-next.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
@@ -3,18 +3,71 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [2.151.1](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0...v2.151.1) (2022-11-04)
6
+ # [2.152.0-next.2](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.152.0-next.1...v2.152.0-next.2) (2022-11-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **timepickerdropdown:** adjust regex for midnight ([99804d2](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/99804d231f16e9c8c5aba0d8b846c5b6e2e7db0b)), closes [#3630](https://github.com/carbon-design-system/carbon-addons-iot-react/issues/3630)
12
+
13
+
14
+
15
+
16
+
17
+ # [2.152.0-next.1](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.1...v2.152.0-next.1) (2022-11-04)
18
+
19
+
20
+
21
+ ## [2.151.1-next.1](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.1-next.0...v2.151.1-next.1) (2022-11-03)
7
22
 
8
23
 
24
+ ### Bug Fixes
25
+
26
+ * **table:** preserve pagination state during row edit mode ([85b4f80](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/85b4f809ba84a8639e4b252830d14d58810f6f32))
27
+
28
+
29
+
30
+ ## [2.151.1-next.0](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0...v2.151.1-next.0) (2022-11-01)
31
+
32
+
33
+
34
+ # [2.151.0-next.48](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0-next.47...v2.151.0-next.48) (2022-10-31)
35
+
36
+
37
+
38
+
39
+
40
+ ## [2.151.1](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0...v2.151.1) (2022-11-04)
41
+
9
42
  ### Bug Fixes
10
43
 
11
44
  * **datetimepicker:** empty vaue causing invalid state ([7388e10](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/7388e1031f5102c33d0f2a3e76d9d24109ee6f3c))
12
45
 
13
46
 
47
+ ## [2.151.1-next.1](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.1-next.0...v2.151.1-next.1) (2022-11-03)
48
+
49
+ ### Bug Fixes
50
+
51
+ * **table:** preserve pagination state during row edit mode ([85b4f80](https://github.com/carbon-design-system/carbon-addons-iot-react/commit/85b4f809ba84a8639e4b252830d14d58810f6f32))
52
+
53
+
54
+
55
+
56
+
57
+ ## [2.151.1-next.0](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0...v2.151.1-next.0) (2022-11-01)
58
+
59
+
60
+
61
+ # [2.151.0-next.48](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0-next.47...v2.151.0-next.48) (2022-10-31)
62
+
63
+ **Note:** Version bump only for package carbon-addons-iot-react
64
+
65
+
14
66
 
15
67
 
16
68
 
17
69
  # [2.151.0](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0-next.47...v2.151.0) (2022-11-01)
70
+ # [2.151.0-next.48](https://github.com/carbon-design-system/carbon-addons-iot-react/compare/v2.151.0-next.47...v2.151.0-next.48) (2022-10-31)
18
71
 
19
72
 
20
73
  ### Bug Fixes
@@ -508,7 +508,7 @@ var tableReducer = function tableReducer() {
508
508
 
509
509
  case TABLE_REGISTER:
510
510
  {
511
- var _state$view$table$loa, _state$view, _state$view$table, _state$view$table$loa2, _view$table$rowAction, _view$table, _view$toolbar;
511
+ var _state$view$table$loa, _state$view, _state$view$table, _state$view$table$loa2, _view$toolbar, _state$view2, _state$view2$toolbar, _view$table$rowAction, _view$table;
512
512
 
513
513
  var updatedData = action.payload.data || state.data; // The only thing that changes after additional child rows have been loaded is the
514
514
  // actual data, so we use that diff to find out which ids in loadingMoreIds that
@@ -533,6 +533,10 @@ var tableReducer = function tableReducer() {
533
533
 
534
534
  var paginationFromState = get(state, 'view.pagination');
535
535
 
536
+ var activeBar = view === null || view === void 0 ? void 0 : (_view$toolbar = view.toolbar) === null || _view$toolbar === void 0 ? void 0 : _view$toolbar.activeBar;
537
+ var activeBarFromState = (_state$view2 = state.view) === null || _state$view2 === void 0 ? void 0 : (_state$view2$toolbar = _state$view2.toolbar) === null || _state$view2$toolbar === void 0 ? void 0 : _state$view2$toolbar.activeBar;
538
+ var rowEditMode = activeBarFromState === 'rowEdit';
539
+
536
540
  var initialDefaultSearch = get(view, 'toolbar.search.defaultValue') || get(view, 'toolbar.search.value'); // update the column ordering if I'm passed new columns
537
541
  // but only if hasUserViewManagement is not active.
538
542
 
@@ -545,7 +549,7 @@ var tableReducer = function tableReducer() {
545
549
  var searchTermFromState = hasUserViewManagement ? searchFromState === null || searchFromState === void 0 ? void 0 : searchFromState.defaultValue : searchFromState === null || searchFromState === void 0 ? void 0 : searchFromState.value;
546
550
  var nextPageSize = paginationFromState.pageSize || pageSize;
547
551
  var nextTotalItems = _totalItems || updatedData.length;
548
- var nextPage = _page || 1;
552
+ var nextPage = rowEditMode ? paginationFromState.page : _page || 1;
549
553
 
550
554
  var _pagination = get(state, 'view.pagination') ? {
551
555
  totalItems: {
@@ -608,7 +612,6 @@ var tableReducer = function tableReducer() {
608
612
 
609
613
  return filter;
610
614
  });
611
- var activeBar = view === null || view === void 0 ? void 0 : (_view$toolbar = view.toolbar) === null || _view$toolbar === void 0 ? void 0 : _view$toolbar.activeBar;
612
615
  return update(state, {
613
616
  data: {
614
617
  $set: updatedData
@@ -42,7 +42,7 @@ var timeUtils = {
42
42
  return /(0[1-9])|(1[0-2])/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(0, 2);
43
43
  },
44
44
  get24Hours: function get24Hours(selectedTime, currentTime) {
45
- return /(0[1-9]|1[0-9]|2[0-3])/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(2, 4);
45
+ return /^(2[0-3]|[01]?[0-9])$/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(2, 4);
46
46
  },
47
47
  getMinutes: function getMinutes(selectedTime, currentTime) {
48
48
  return /[0-5][0-9]/.test(selectedTime.substring(3, 5)) ? selectedTime.substring(3, 5) : currentTime.substring(4, 6);
@@ -519,7 +519,7 @@ var tableReducer = function tableReducer() {
519
519
 
520
520
  case tableActionCreators.TABLE_REGISTER:
521
521
  {
522
- var _state$view$table$loa, _state$view, _state$view$table, _state$view$table$loa2, _view$table$rowAction, _view$table, _view$toolbar;
522
+ var _state$view$table$loa, _state$view, _state$view$table, _state$view$table$loa2, _view$toolbar, _state$view2, _state$view2$toolbar, _view$table$rowAction, _view$table;
523
523
 
524
524
  var updatedData = action.payload.data || state.data; // The only thing that changes after additional child rows have been loaded is the
525
525
  // actual data, so we use that diff to find out which ids in loadingMoreIds that
@@ -544,6 +544,10 @@ var tableReducer = function tableReducer() {
544
544
 
545
545
  var paginationFromState = get(state, 'view.pagination');
546
546
 
547
+ var activeBar = view === null || view === void 0 ? void 0 : (_view$toolbar = view.toolbar) === null || _view$toolbar === void 0 ? void 0 : _view$toolbar.activeBar;
548
+ var activeBarFromState = (_state$view2 = state.view) === null || _state$view2 === void 0 ? void 0 : (_state$view2$toolbar = _state$view2.toolbar) === null || _state$view2$toolbar === void 0 ? void 0 : _state$view2$toolbar.activeBar;
549
+ var rowEditMode = activeBarFromState === 'rowEdit';
550
+
547
551
  var initialDefaultSearch = get(view, 'toolbar.search.defaultValue') || get(view, 'toolbar.search.value'); // update the column ordering if I'm passed new columns
548
552
  // but only if hasUserViewManagement is not active.
549
553
 
@@ -556,7 +560,7 @@ var tableReducer = function tableReducer() {
556
560
  var searchTermFromState = hasUserViewManagement ? searchFromState === null || searchFromState === void 0 ? void 0 : searchFromState.defaultValue : searchFromState === null || searchFromState === void 0 ? void 0 : searchFromState.value;
557
561
  var nextPageSize = paginationFromState.pageSize || pageSize;
558
562
  var nextTotalItems = _totalItems || updatedData.length;
559
- var nextPage = _page || 1;
563
+ var nextPage = rowEditMode ? paginationFromState.page : _page || 1;
560
564
 
561
565
  var _pagination = get(state, 'view.pagination') ? {
562
566
  totalItems: {
@@ -619,7 +623,6 @@ var tableReducer = function tableReducer() {
619
623
 
620
624
  return filter;
621
625
  });
622
- var activeBar = view === null || view === void 0 ? void 0 : (_view$toolbar = view.toolbar) === null || _view$toolbar === void 0 ? void 0 : _view$toolbar.activeBar;
623
626
  return update__default['default'](state, {
624
627
  data: {
625
628
  $set: updatedData
@@ -58,7 +58,7 @@ var timeUtils = {
58
58
  return /(0[1-9])|(1[0-2])/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(0, 2);
59
59
  },
60
60
  get24Hours: function get24Hours(selectedTime, currentTime) {
61
- return /(0[1-9]|1[0-9]|2[0-3])/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(2, 4);
61
+ return /^(2[0-3]|[01]?[0-9])$/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(2, 4);
62
62
  },
63
63
  getMinutes: function getMinutes(selectedTime, currentTime) {
64
64
  return /[0-5][0-9]/.test(selectedTime.substring(3, 5)) ? selectedTime.substring(3, 5) : currentTime.substring(4, 6);
package/package.json CHANGED
@@ -340,10 +340,10 @@
340
340
  "whatwg-fetch": "^3.0.0"
341
341
  },
342
342
  "sideEffects": false,
343
- "version": "2.151.1",
343
+ "version": "2.152.0-next.2",
344
344
  "resolutions": {
345
345
  "chokidar": "3.3.1",
346
346
  "react-grid-layout": "1.2.2"
347
347
  },
348
- "gitHead": "b1030fd8fcf9506eeaf1efd9b09b5f8ad812a26d"
348
+ "gitHead": "f3366d4136db87d5cd9b1d67a2cff4c210140365"
349
349
  }
@@ -57514,7 +57514,7 @@
57514
57514
 
57515
57515
  case TABLE_REGISTER:
57516
57516
  {
57517
- var _state$view$table$loa, _state$view, _state$view$table, _state$view$table$loa2, _view$table$rowAction, _view$table, _view$toolbar;
57517
+ var _state$view$table$loa, _state$view, _state$view$table, _state$view$table$loa2, _view$toolbar, _state$view2, _state$view2$toolbar, _view$table$rowAction, _view$table;
57518
57518
 
57519
57519
  var updatedData = action.payload.data || state.data; // The only thing that changes after additional child rows have been loaded is the
57520
57520
  // actual data, so we use that diff to find out which ids in loadingMoreIds that
@@ -57539,6 +57539,10 @@
57539
57539
 
57540
57540
  var paginationFromState = get$4(state, 'view.pagination');
57541
57541
 
57542
+ var activeBar = view === null || view === void 0 ? void 0 : (_view$toolbar = view.toolbar) === null || _view$toolbar === void 0 ? void 0 : _view$toolbar.activeBar;
57543
+ var activeBarFromState = (_state$view2 = state.view) === null || _state$view2 === void 0 ? void 0 : (_state$view2$toolbar = _state$view2.toolbar) === null || _state$view2$toolbar === void 0 ? void 0 : _state$view2$toolbar.activeBar;
57544
+ var rowEditMode = activeBarFromState === 'rowEdit';
57545
+
57542
57546
  var initialDefaultSearch = get$4(view, 'toolbar.search.defaultValue') || get$4(view, 'toolbar.search.value'); // update the column ordering if I'm passed new columns
57543
57547
  // but only if hasUserViewManagement is not active.
57544
57548
 
@@ -57551,7 +57555,7 @@
57551
57555
  var searchTermFromState = hasUserViewManagement ? searchFromState === null || searchFromState === void 0 ? void 0 : searchFromState.defaultValue : searchFromState === null || searchFromState === void 0 ? void 0 : searchFromState.value;
57552
57556
  var nextPageSize = paginationFromState.pageSize || pageSize;
57553
57557
  var nextTotalItems = _totalItems || updatedData.length;
57554
- var nextPage = _page || 1;
57558
+ var nextPage = rowEditMode ? paginationFromState.page : _page || 1;
57555
57559
 
57556
57560
  var _pagination = get$4(state, 'view.pagination') ? {
57557
57561
  totalItems: {
@@ -57614,7 +57618,6 @@
57614
57618
 
57615
57619
  return filter;
57616
57620
  });
57617
- var activeBar = view === null || view === void 0 ? void 0 : (_view$toolbar = view.toolbar) === null || _view$toolbar === void 0 ? void 0 : _view$toolbar.activeBar;
57618
57621
  return update(state, {
57619
57622
  data: {
57620
57623
  $set: updatedData
@@ -111144,7 +111147,7 @@
111144
111147
  return /(0[1-9])|(1[0-2])/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(0, 2);
111145
111148
  },
111146
111149
  get24Hours: function get24Hours(selectedTime, currentTime) {
111147
- return /(0[1-9]|1[0-9]|2[0-3])/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(2, 4);
111150
+ return /^(2[0-3]|[01]?[0-9])$/.test(selectedTime.substring(0, 2)) ? selectedTime.substring(0, 2) : currentTime.substring(2, 4);
111148
111151
  },
111149
111152
  getMinutes: function getMinutes(selectedTime, currentTime) {
111150
111153
  return /[0-5][0-9]/.test(selectedTime.substring(3, 5)) ? selectedTime.substring(3, 5) : currentTime.substring(4, 6);