@itwin/imodel-components-react 4.8.1 → 4.9.0-dev.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +6 -6
  2. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts +3 -1
  3. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  4. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  5. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.scss +0 -4
  6. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  7. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  8. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +2 -2
  9. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  11. package/lib/cjs/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/timeline/InlineEdit.scss +1 -4
  13. package/lib/cjs/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  14. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +12 -30
  15. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  16. package/lib/cjs/imodel-components-react/timeline/Scrubber.scss +2 -3
  17. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  18. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +8 -25
  19. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  20. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.scss +8 -13
  21. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  22. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +3 -33
  23. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  24. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.scss +0 -17
  25. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  26. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +6 -0
  27. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  28. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts +3 -1
  29. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.d.ts.map +1 -1
  30. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  31. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.scss +0 -4
  32. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  33. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.d.ts.map +1 -1
  34. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +2 -2
  35. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  36. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSelector.js.map +1 -1
  37. package/lib/esm/imodel-components-react/quantityformat/misc/UnitDescr.js.map +1 -1
  38. package/lib/esm/imodel-components-react/timeline/InlineEdit.scss +1 -4
  39. package/lib/esm/imodel-components-react/timeline/Scrubber.d.ts.map +1 -1
  40. package/lib/esm/imodel-components-react/timeline/Scrubber.js +12 -30
  41. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  42. package/lib/esm/imodel-components-react/timeline/Scrubber.scss +2 -3
  43. package/lib/esm/imodel-components-react/timeline/SolarTimeline.d.ts.map +1 -1
  44. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +8 -25
  45. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  46. package/lib/esm/imodel-components-react/timeline/SolarTimeline.scss +8 -13
  47. package/lib/esm/imodel-components-react/timeline/TimelineComponent.d.ts.map +1 -1
  48. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +3 -33
  49. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  50. package/lib/esm/imodel-components-react/timeline/TimelineComponent.scss +0 -17
  51. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  52. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +6 -0
  53. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  54. package/package.json +13 -13
@@ -12,31 +12,37 @@ import { Face } from "../navigationaids/Cube";
12
12
  /** Drawing View Change event
13
13
  * @public
14
14
  */
15
+ // eslint-disable-next-line deprecation/deprecation
15
16
  export class DrawingViewportChangeEvent extends UiEvent {
16
17
  }
17
18
  /** 3d Cube Rotation Change event
18
19
  * @public
19
20
  */
21
+ // eslint-disable-next-line deprecation/deprecation
20
22
  export class CubeRotationChangeEvent extends UiEvent {
21
23
  }
22
24
  /** Standard Rotation Change event
23
25
  * @public
24
26
  */
27
+ // eslint-disable-next-line deprecation/deprecation
25
28
  export class StandardRotationChangeEvent extends UiEvent {
26
29
  }
27
30
  /** View Rotation Change event
28
31
  * @public
29
32
  */
33
+ // eslint-disable-next-line deprecation/deprecation
30
34
  export class ViewRotationChangeEvent extends UiEvent {
31
35
  }
32
36
  /** View Class Full Name Change event
33
37
  * @public
34
38
  */
39
+ // eslint-disable-next-line deprecation/deprecation
35
40
  export class ViewClassFullNameChangedEvent extends UiEvent {
36
41
  }
37
42
  /** View Id Change event
38
43
  * @public
39
44
  */
45
+ // eslint-disable-next-line deprecation/deprecation
40
46
  export class ViewIdChangedEvent extends UiEvent {
41
47
  }
42
48
  /** Viewport Rotation events and methods
@@ -1 +1 @@
1
- {"version":3,"file":"ViewportComponentEvents.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/viewport/ViewportComponentEvents.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,QA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,cAAc,EAAE,CAAC;AAC3C,oDAA4B,GACjD,IAAI,0BAA0B,EAAE,CAAC;AACZ,iDAAyB,GAC9C,IAAI,uBAAuB,EAAE,CAAC;AACT,qDAA6B,GAClD,IAAI,2BAA2B,EAAE,CAAC;AACb,iDAAyB,GAC9C,IAAI,uBAAuB,EAAE,CAAC;AACT,uDAA+B,GACpD,IAAI,6BAA6B,EAAE,CAAC;AACf,4CAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;SAlC5D,uBAAuB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Viewport\n */\n\nimport { Matrix3d, Point3d, Vector3d } from \"@itwin/core-geometry\";\nimport type {\n SelectedViewportChangedArgs,\n StandardViewId,\n Viewport,\n} from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { Face } from \"../navigationaids/Cube\";\n\n/** Arguments for [[DrawingViewportChangeEvent]]\n * @public\n */\nexport interface DrawingViewportChangeEventArgs {\n rotation: Matrix3d;\n origin: Point3d;\n complete: boolean;\n}\n\n/** Drawing View Change event\n * @public\n */\nexport class DrawingViewportChangeEvent extends UiEvent<DrawingViewportChangeEventArgs> {}\n\n/** Arguments for [[CubeRotationChangeEvent]]\n * @public\n */\nexport interface CubeRotationChangeEventArgs {\n rotMatrix: Matrix3d;\n face: Face;\n complete?: boolean;\n}\n\n/** 3d Cube Rotation Change event\n * @public\n */\nexport class CubeRotationChangeEvent extends UiEvent<CubeRotationChangeEventArgs> {}\n\n/** Arguments for [[StandardRotationChangeEvent]]\n * @public\n */\nexport interface StandardRotationChangeEventArgs {\n standardRotation: StandardViewId;\n}\n\n/** Standard Rotation Change event\n * @public\n */\nexport class StandardRotationChangeEvent extends UiEvent<StandardRotationChangeEventArgs> {}\n\n/** Arguments for [[ViewRotationChangeEvent]]\n * @public\n */\nexport interface ViewRotationChangeEventArgs {\n viewport: Viewport;\n animationTime?: number;\n}\n\n/** View Rotation Change event\n * @public\n */\nexport class ViewRotationChangeEvent extends UiEvent<ViewRotationChangeEventArgs> {}\n\n/** Arguments for [[ViewClassFullNameChangedEvent]]\n * @public\n */\nexport interface ViewClassFullNameChangedEventArgs {\n viewport: Viewport;\n oldName: string;\n newName: string;\n}\n\n/** View Class Full Name Change event\n * @public\n */\nexport class ViewClassFullNameChangedEvent extends UiEvent<ViewClassFullNameChangedEventArgs> {}\n\n/** Arguments for [[ViewIdChangedEvent]]\n * @public\n */\nexport interface ViewIdChangedEventArgs {\n viewport: Viewport;\n oldId: string;\n newId: string;\n}\n\n/** View Id Change event\n * @public\n */\nexport class ViewIdChangedEvent extends UiEvent<ViewIdChangedEventArgs> {}\n\n/** Viewport Rotation events and methods\n * @public\n */\nexport class ViewportComponentEvents {\n private static _removeListener?: () => void;\n\n public static initialize() {\n if (undefined !== this._removeListener) return;\n\n this._removeListener =\n IModelApp.viewManager.onSelectedViewportChanged.addListener(\n ViewportComponentEvents.handleSelectedViewportChanged\n );\n }\n\n /** @internal - for unit testing */\n public static terminate() {\n if (this._removeListener) {\n this._removeListener();\n this._removeListener = undefined;\n }\n }\n\n public static face = Face.None;\n public static readonly origin = Point3d.createZero();\n public static readonly extents = Vector3d.createZero();\n public static readonly rotationMatrix = Matrix3d.createIdentity();\n public static readonly onDrawingViewportChangeEvent =\n new DrawingViewportChangeEvent();\n public static readonly onCubeRotationChangeEvent =\n new CubeRotationChangeEvent();\n public static readonly onStandardRotationChangeEvent =\n new StandardRotationChangeEvent();\n public static readonly onViewRotationChangeEvent =\n new ViewRotationChangeEvent();\n public static readonly onViewClassFullNameChangedEvent =\n new ViewClassFullNameChangedEvent();\n public static readonly onViewIdChangedEvent = new ViewIdChangedEvent();\n\n private static handleSelectedViewportChanged(\n args: SelectedViewportChangedArgs\n ): void {\n if (args.current) ViewportComponentEvents.setViewMatrix(args.current);\n }\n\n public static setCubeMatrix(\n rotMatrix: Matrix3d,\n face = Face.None,\n complete: boolean = false\n ): void {\n this.rotationMatrix.setFrom(rotMatrix);\n this.face = face;\n this.onCubeRotationChangeEvent.emit({ rotMatrix, complete, face });\n }\n\n public static setDrawingViewportState(\n origin: Point3d,\n rotation: Matrix3d,\n complete: boolean = false\n ): void {\n this.onDrawingViewportChangeEvent.emit({ origin, rotation, complete });\n }\n\n public static setStandardRotation(standardRotation: StandardViewId): void {\n this.onStandardRotationChangeEvent.emit({ standardRotation });\n }\n\n public static setViewMatrix(\n viewport: Viewport,\n animationTime?: number\n ): void {\n // When handling onViewChanged, use setTimeout\n setTimeout(() => {\n // istanbul ignore next\n if (viewport.view) {\n this.origin.setFrom(viewport.view.getOrigin());\n this.extents.setFrom(viewport.view.getExtents());\n }\n this.rotationMatrix.setFrom(viewport.rotation);\n\n this.onViewRotationChangeEvent.emit({ viewport, animationTime });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"ViewportComponentEvents.js","sourceRoot":"","sources":["../../../../src/imodel-components-react/viewport/ViewportComponentEvents.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMnE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAW9C;;GAEG;AACH,mDAAmD;AACnD,MAAM,OAAO,0BAA2B,SAAQ,OAAuC;CAAG;AAW1F;;GAEG;AACH,mDAAmD;AACnD,MAAM,OAAO,uBAAwB,SAAQ,OAAoC;CAAG;AASpF;;GAEG;AACH,mDAAmD;AACnD,MAAM,OAAO,2BAA4B,SAAQ,OAAwC;CAAG;AAU5F;;GAEG;AACH,mDAAmD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AC;IACzE,CAAC;IAEM,MAAM,CAAC,mBAAmB,CAAC,gBAAgC;QAChE,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,aAAa,CACzB,QAAkB,EAClB,aAAsB;QAEtB,8CAA8C;QAC9C,UAAU,CAAC,GAAG,EAAE;YACd,uBAAuB;YACvB,IAAI,QAAQ,CAAC,IAAI,EAAE;gBACjB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;gBAC/C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;aAClD;YACD,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAE/C,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACL,CAAC;;AA3Da,4BAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AACR,8BAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;AAC9B,+BAAO,GAAG,QAAQ,CAAC,UAAU,EAAE,CAAC;AAChC,sCAAc,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;AAC3C,oDAA4B,GACjD,IAAI,0BAA0B,EAAE,CAAC;AACZ,iDAAyB,GAC9C,IAAI,uBAAuB,EAAE,CAAC;AACT,qDAA6B,GAClD,IAAI,2BAA2B,EAAE,CAAC;AACb,iDAAyB,GAC9C,IAAI,uBAAuB,EAAE,CAAC;AACT,uDAA+B,GACpD,IAAI,6BAA6B,EAAE,CAAC;AACf,4CAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;SAlC5D,uBAAuB","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Viewport\n */\n\nimport { Matrix3d, Point3d, Vector3d } from \"@itwin/core-geometry\";\nimport type {\n SelectedViewportChangedArgs,\n StandardViewId,\n Viewport,\n} from \"@itwin/core-frontend\";\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport { UiEvent } from \"@itwin/appui-abstract\";\nimport { Face } from \"../navigationaids/Cube\";\n\n/** Arguments for [[DrawingViewportChangeEvent]]\n * @public\n */\nexport interface DrawingViewportChangeEventArgs {\n rotation: Matrix3d;\n origin: Point3d;\n complete: boolean;\n}\n\n/** Drawing View Change event\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class DrawingViewportChangeEvent extends UiEvent<DrawingViewportChangeEventArgs> {}\n\n/** Arguments for [[CubeRotationChangeEvent]]\n * @public\n */\nexport interface CubeRotationChangeEventArgs {\n rotMatrix: Matrix3d;\n face: Face;\n complete?: boolean;\n}\n\n/** 3d Cube Rotation Change event\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class CubeRotationChangeEvent extends UiEvent<CubeRotationChangeEventArgs> {}\n\n/** Arguments for [[StandardRotationChangeEvent]]\n * @public\n */\nexport interface StandardRotationChangeEventArgs {\n standardRotation: StandardViewId;\n}\n\n/** Standard Rotation Change event\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class StandardRotationChangeEvent extends UiEvent<StandardRotationChangeEventArgs> {}\n\n/** Arguments for [[ViewRotationChangeEvent]]\n * @public\n */\nexport interface ViewRotationChangeEventArgs {\n viewport: Viewport;\n animationTime?: number;\n}\n\n/** View Rotation Change event\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ViewRotationChangeEvent extends UiEvent<ViewRotationChangeEventArgs> {}\n\n/** Arguments for [[ViewClassFullNameChangedEvent]]\n * @public\n */\nexport interface ViewClassFullNameChangedEventArgs {\n viewport: Viewport;\n oldName: string;\n newName: string;\n}\n\n/** View Class Full Name Change event\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ViewClassFullNameChangedEvent extends UiEvent<ViewClassFullNameChangedEventArgs> {}\n\n/** Arguments for [[ViewIdChangedEvent]]\n * @public\n */\nexport interface ViewIdChangedEventArgs {\n viewport: Viewport;\n oldId: string;\n newId: string;\n}\n\n/** View Id Change event\n * @public\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ViewIdChangedEvent extends UiEvent<ViewIdChangedEventArgs> {}\n\n/** Viewport Rotation events and methods\n * @public\n */\nexport class ViewportComponentEvents {\n private static _removeListener?: () => void;\n\n public static initialize() {\n if (undefined !== this._removeListener) return;\n\n this._removeListener =\n IModelApp.viewManager.onSelectedViewportChanged.addListener(\n ViewportComponentEvents.handleSelectedViewportChanged\n );\n }\n\n /** @internal - for unit testing */\n public static terminate() {\n if (this._removeListener) {\n this._removeListener();\n this._removeListener = undefined;\n }\n }\n\n public static face = Face.None;\n public static readonly origin = Point3d.createZero();\n public static readonly extents = Vector3d.createZero();\n public static readonly rotationMatrix = Matrix3d.createIdentity();\n public static readonly onDrawingViewportChangeEvent =\n new DrawingViewportChangeEvent();\n public static readonly onCubeRotationChangeEvent =\n new CubeRotationChangeEvent();\n public static readonly onStandardRotationChangeEvent =\n new StandardRotationChangeEvent();\n public static readonly onViewRotationChangeEvent =\n new ViewRotationChangeEvent();\n public static readonly onViewClassFullNameChangedEvent =\n new ViewClassFullNameChangedEvent();\n public static readonly onViewIdChangedEvent = new ViewIdChangedEvent();\n\n private static handleSelectedViewportChanged(\n args: SelectedViewportChangedArgs\n ): void {\n if (args.current) ViewportComponentEvents.setViewMatrix(args.current);\n }\n\n public static setCubeMatrix(\n rotMatrix: Matrix3d,\n face = Face.None,\n complete: boolean = false\n ): void {\n this.rotationMatrix.setFrom(rotMatrix);\n this.face = face;\n this.onCubeRotationChangeEvent.emit({ rotMatrix, complete, face });\n }\n\n public static setDrawingViewportState(\n origin: Point3d,\n rotation: Matrix3d,\n complete: boolean = false\n ): void {\n this.onDrawingViewportChangeEvent.emit({ origin, rotation, complete });\n }\n\n public static setStandardRotation(standardRotation: StandardViewId): void {\n this.onStandardRotationChangeEvent.emit({ standardRotation });\n }\n\n public static setViewMatrix(\n viewport: Viewport,\n animationTime?: number\n ): void {\n // When handling onViewChanged, use setTimeout\n setTimeout(() => {\n // istanbul ignore next\n if (viewport.view) {\n this.origin.setFrom(viewport.view.getOrigin());\n this.extents.setFrom(viewport.view.getExtents());\n }\n this.rotationMatrix.setFrom(viewport.rotation);\n\n this.onViewRotationChangeEvent.emit({ viewport, animationTime });\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/imodel-components-react",
3
- "version": "4.8.1",
3
+ "version": "4.9.0-dev.1",
4
4
  "description": "iTwin.js UI IModel Components",
5
5
  "main": "lib/cjs/imodel-components-react.js",
6
6
  "module": "lib/esm/imodel-components-react.js",
@@ -23,13 +23,13 @@
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@itwin/appui-abstract": "^3.7.0 || ^4.0.0",
26
- "@itwin/components-react": "^4.8.1",
26
+ "@itwin/components-react": "^4.9.0-dev.1",
27
27
  "@itwin/core-bentley": "^3.7.0 || ^4.0.0",
28
28
  "@itwin/core-common": "^3.7.0 || ^4.0.0",
29
29
  "@itwin/core-frontend": "^3.7.0 || ^4.0.0",
30
30
  "@itwin/core-geometry": "^3.7.0 || ^4.0.0",
31
31
  "@itwin/core-quantity": "^3.7.0 || ^4.0.0",
32
- "@itwin/core-react": "^4.8.1",
32
+ "@itwin/core-react": "^4.9.0-dev.1",
33
33
  "react": "^17.0.0 || ^18.0.0",
34
34
  "react-dom": "^17.0.0 || ^18.0.0"
35
35
  },
@@ -40,14 +40,14 @@
40
40
  "devDependencies": {
41
41
  "@itwin/appui-abstract": "^3.7.0",
42
42
  "@itwin/build-tools": "^3.7.0",
43
- "@itwin/components-react": "4.8.1",
43
+ "@itwin/components-react": "4.9.0-dev.1",
44
44
  "@itwin/core-bentley": "^3.7.0",
45
45
  "@itwin/core-common": "^3.7.0",
46
46
  "@itwin/core-frontend": "^3.7.0",
47
47
  "@itwin/core-geometry": "^3.7.0",
48
48
  "@itwin/core-orbitgt": "^3.7.0",
49
49
  "@itwin/core-quantity": "^3.7.0",
50
- "@itwin/core-react": "4.8.1",
50
+ "@itwin/core-react": "4.9.0-dev.1",
51
51
  "@itwin/eslint-plugin": "^4.0.0-dev.45",
52
52
  "@itwin/webgl-compatibility": "^3.7.0",
53
53
  "@testing-library/dom": "^8.11.2",
@@ -80,13 +80,13 @@
80
80
  "raf": "^3.4.0",
81
81
  "react": "^17.0.0",
82
82
  "react-dom": "^17.0.0",
83
- "react-test-renderer": "^17.0.0",
84
83
  "rimraf": "^3.0.2",
85
84
  "sinon": "^15.2.0",
86
85
  "sinon-chai": "^3.2.0",
87
86
  "ts-node": "^10.8.2",
88
87
  "typemoq": "^2.1.0",
89
- "typescript": "~5.0.2"
88
+ "typescript": "~5.0.2",
89
+ "upath": "^2.0.1"
90
90
  },
91
91
  "//dependencies": [
92
92
  "NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API",
@@ -94,9 +94,9 @@
94
94
  ],
95
95
  "dependencies": {
96
96
  "@bentley/icons-generic": "^1.0.34",
97
- "@itwin/itwinui-react": "^2.11.11",
98
- "@itwin/itwinui-variables": "^2.0.0",
99
- "@itwin/itwinui-icons-react": "^2.1.0",
97
+ "@itwin/itwinui-react": "^3.2.4",
98
+ "@itwin/itwinui-variables": "^3.0.0",
99
+ "@itwin/itwinui-icons-react": "^2.8.0",
100
100
  "classnames": "2.3.1",
101
101
  "ts-key-enum": "~2.0.12"
102
102
  },
@@ -109,10 +109,10 @@
109
109
  "ts-node/register"
110
110
  ],
111
111
  "check-coverage": true,
112
- "statements": 99.9,
113
- "branches": 99.9,
112
+ "statements": 99,
113
+ "branches": 99,
114
114
  "functions": 100,
115
- "lines": 99.9
115
+ "lines": 99
116
116
  },
117
117
  "scripts": {
118
118
  "start": "run-p -l \"build:** -- -w\" \"copy:** -- -w\"",