@itwin/itwinui-react 3.15.1 → 3.15.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,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.15.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2275](https://github.com/iTwin/iTwinUI/pull/2275): Made the `ActionType.type` type in `Table` more specific. This will help when using the `action` argument in the `stateReducer` function, for example.
8
+ - [#2273](https://github.com/iTwin/iTwinUI/pull/2273): Fixed an issue where the internal unit test detection logic was incorrectly treating Cypress like a unit test environment.
9
+
3
10
  ## 3.15.1
4
11
 
5
12
  ### Patch Changes
@@ -13,6 +20,7 @@
13
20
  ### Minor Changes
14
21
 
15
22
  - [#2233](https://github.com/iTwin/iTwinUI/pull/2233): `Popover` now enables the [`hide` middleware](https://floating-ui.com/docs/hide) to hide the floating content when the trigger is hidden.
23
+
16
24
  - This also affects other popover-like components (e.g. `Select`, `ComboBox`, `DropdownMenu`, `SplitButton`).
17
25
  - If the floating content gets hidden even when it shouldn't (e.g. due to some custom styles interfering with the trigger's hide detection), consider disabling the `hide` middleware.
18
26
 
@@ -41,6 +41,7 @@ const ExpanderColumn = (props = {}) => {
41
41
  return _react.createElement(
42
42
  _IconButton.IconButton,
43
43
  {
44
+ 'aria-label': 'Toggle expandable content',
44
45
  className: 'iui-table-row-expander',
45
46
  styleType: 'borderless',
46
47
  size: 'small',
@@ -402,6 +402,7 @@ const _index1 = require('../index.js');
402
402
  styleType: 'borderless',
403
403
  onClick: (e) => e.stopPropagation(),
404
404
  disabled: isRowDisabled(props.row.original),
405
+ label: 'Column manager',
405
406
  },
406
407
  _react.default.createElement('svg', null),
407
408
  ),
package/DEV-cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.15.1';
3
+ const e = '3.15.2';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -9,9 +9,11 @@ Object.defineProperty(exports, 'isUnitTest', {
9
9
  },
10
10
  });
11
11
  const isJest = 'undefined' != typeof jest;
12
+ const isCypress = void 0 !== globalThis.Cypress;
12
13
  const isMocha =
13
14
  void 0 !== globalThis.beforeEach &&
14
15
  'function(name,fn){suites[0].beforeEach(name,fn);}' ===
15
- `${globalThis.beforeEach}`.replace(/\s/g, '');
16
+ `${globalThis.beforeEach}`.replace(/\s/g, '') &&
17
+ !isCypress;
16
18
  const isVitest = void 0 !== globalThis.__vitest_index__;
17
19
  const isUnitTest = isJest || isVitest || isMocha;
@@ -21,6 +21,7 @@ export const ExpanderColumn = (props = {}) => {
21
21
  return React.createElement(
22
22
  IconButton,
23
23
  {
24
+ 'aria-label': 'Toggle expandable content',
24
25
  className: 'iui-table-row-expander',
25
26
  styleType: 'borderless',
26
27
  size: 'small',
@@ -409,6 +409,7 @@ import {
409
409
  styleType: 'borderless',
410
410
  onClick: (e) => e.stopPropagation(),
411
411
  disabled: isRowDisabled(props.row.original),
412
+ label: 'Column manager',
412
413
  },
413
414
  React.createElement('svg', null),
414
415
  ),
package/DEV-esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.15.1';
1
+ const t = '3.15.2';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -1,8 +1,10 @@
1
1
  let isJest = 'undefined' != typeof jest;
2
+ let isCypress = void 0 !== globalThis.Cypress;
2
3
  let isMocha =
3
4
  void 0 !== globalThis.beforeEach &&
4
5
  'function(name,fn){suites[0].beforeEach(name,fn);}' ===
5
- `${globalThis.beforeEach}`.replace(/\s/g, '');
6
+ `${globalThis.beforeEach}`.replace(/\s/g, '') &&
7
+ !isCypress;
6
8
  let isVitest = void 0 !== globalThis.__vitest_index__;
7
9
  let isUnitTest = isJest || isVitest || isMocha;
8
10
  export { isUnitTest };
@@ -41,6 +41,7 @@ const ExpanderColumn = (props = {}) => {
41
41
  return _react.createElement(
42
42
  _IconButton.IconButton,
43
43
  {
44
+ 'aria-label': 'Toggle expandable content',
44
45
  className: 'iui-table-row-expander',
45
46
  styleType: 'borderless',
46
47
  size: 'small',
@@ -721,9 +721,12 @@ export interface SortingRule<D> {
721
721
  id: IdType<D>;
722
722
  desc?: boolean | undefined;
723
723
  }
724
- export declare const actions: Record<string, string>;
724
+ type BuiltInAction = 'init' | 'resetHiddenColumns' | 'toggleHideColumn' | 'setHiddenColumns' | 'toggleHideAllColumns' | 'resetPivot' | 'togglePivot' | 'resetColumnOrder' | 'setColumnOrder' | 'resetExpanded' | 'toggleRowExpanded' | 'toggleAllRowsExpanded' | 'resetFilters' | 'setFilter' | 'setAllFilters' | 'resetGlobalFilter' | 'setGlobalFilter' | 'columnStartResizing' | 'columnResizing' | 'columnDoneResizing' | 'resetResize' | 'resetGroupBy' | 'setGroupBy' | 'toggleGroupBy' | 'resetPage' | 'gotoPage' | 'setPageSize' | 'resetSelectedRows' | 'toggleAllRowsSelected' | 'toggleRowSelected' | 'toggleAllPageRowsSelected' | 'setRowState' | 'setCellState' | 'resetRowState' | 'resetSortBy' | 'setSortBy' | 'toggleSortBy' | 'clearSortBy';
725
+ type CustomAction = 'setScrolledLeft' | 'setScrolledRight' | 'columnDragStart' | 'columnDragEnd' | 'singleRowSelected' | 'shiftRowSelected' | 'tableResizeStart' | 'tableResizeEnd';
726
+ type PossibleActionType = BuiltInAction | CustomAction | AnyString;
727
+ export declare const actions: Record<PossibleActionType, string>;
725
728
  export type ActionType = {
726
- type: string;
729
+ type: PossibleActionType;
727
730
  } & Record<string, any>;
728
731
  export declare const defaultColumn: Partial<Column> & Record<string, any>;
729
732
  export type StringKey<D> = Extract<keyof D, string>;
@@ -402,6 +402,7 @@ const _index1 = require('../index.js');
402
402
  styleType: 'borderless',
403
403
  onClick: (e) => e.stopPropagation(),
404
404
  disabled: isRowDisabled(props.row.original),
405
+ label: 'Column manager',
405
406
  },
406
407
  _react.default.createElement('svg', null),
407
408
  ),
package/cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.15.1';
3
+ const e = '3.15.2';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -9,9 +9,11 @@ Object.defineProperty(exports, 'isUnitTest', {
9
9
  },
10
10
  });
11
11
  const isJest = 'undefined' != typeof jest;
12
+ const isCypress = void 0 !== globalThis.Cypress;
12
13
  const isMocha =
13
14
  void 0 !== globalThis.beforeEach &&
14
15
  'function(name,fn){suites[0].beforeEach(name,fn);}' ===
15
- `${globalThis.beforeEach}`.replace(/\s/g, '');
16
+ `${globalThis.beforeEach}`.replace(/\s/g, '') &&
17
+ !isCypress;
16
18
  const isVitest = void 0 !== globalThis.__vitest_index__;
17
19
  const isUnitTest = isJest || isVitest || isMocha;
@@ -21,6 +21,7 @@ export const ExpanderColumn = (props = {}) => {
21
21
  return React.createElement(
22
22
  IconButton,
23
23
  {
24
+ 'aria-label': 'Toggle expandable content',
24
25
  className: 'iui-table-row-expander',
25
26
  styleType: 'borderless',
26
27
  size: 'small',
@@ -721,9 +721,12 @@ export interface SortingRule<D> {
721
721
  id: IdType<D>;
722
722
  desc?: boolean | undefined;
723
723
  }
724
- export declare const actions: Record<string, string>;
724
+ type BuiltInAction = 'init' | 'resetHiddenColumns' | 'toggleHideColumn' | 'setHiddenColumns' | 'toggleHideAllColumns' | 'resetPivot' | 'togglePivot' | 'resetColumnOrder' | 'setColumnOrder' | 'resetExpanded' | 'toggleRowExpanded' | 'toggleAllRowsExpanded' | 'resetFilters' | 'setFilter' | 'setAllFilters' | 'resetGlobalFilter' | 'setGlobalFilter' | 'columnStartResizing' | 'columnResizing' | 'columnDoneResizing' | 'resetResize' | 'resetGroupBy' | 'setGroupBy' | 'toggleGroupBy' | 'resetPage' | 'gotoPage' | 'setPageSize' | 'resetSelectedRows' | 'toggleAllRowsSelected' | 'toggleRowSelected' | 'toggleAllPageRowsSelected' | 'setRowState' | 'setCellState' | 'resetRowState' | 'resetSortBy' | 'setSortBy' | 'toggleSortBy' | 'clearSortBy';
725
+ type CustomAction = 'setScrolledLeft' | 'setScrolledRight' | 'columnDragStart' | 'columnDragEnd' | 'singleRowSelected' | 'shiftRowSelected' | 'tableResizeStart' | 'tableResizeEnd';
726
+ type PossibleActionType = BuiltInAction | CustomAction | AnyString;
727
+ export declare const actions: Record<PossibleActionType, string>;
725
728
  export type ActionType = {
726
- type: string;
729
+ type: PossibleActionType;
727
730
  } & Record<string, any>;
728
731
  export declare const defaultColumn: Partial<Column> & Record<string, any>;
729
732
  export type StringKey<D> = Extract<keyof D, string>;
@@ -409,6 +409,7 @@ import {
409
409
  styleType: 'borderless',
410
410
  onClick: (e) => e.stopPropagation(),
411
411
  disabled: isRowDisabled(props.row.original),
412
+ label: 'Column manager',
412
413
  },
413
414
  React.createElement('svg', null),
414
415
  ),
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.15.1';
1
+ const t = '3.15.2';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -1,8 +1,10 @@
1
1
  let isJest = 'undefined' != typeof jest;
2
+ let isCypress = void 0 !== globalThis.Cypress;
2
3
  let isMocha =
3
4
  void 0 !== globalThis.beforeEach &&
4
5
  'function(name,fn){suites[0].beforeEach(name,fn);}' ===
5
- `${globalThis.beforeEach}`.replace(/\s/g, '');
6
+ `${globalThis.beforeEach}`.replace(/\s/g, '') &&
7
+ !isCypress;
6
8
  let isVitest = void 0 !== globalThis.__vitest_index__;
7
9
  let isUnitTest = isJest || isVitest || isMocha;
8
10
  export { isUnitTest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "3.15.1",
3
+ "version": "3.15.2",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",