@itwin/imodel-components-react 4.12.0 → 4.13.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 (88) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/lib/cjs/imodel-components-react/UiIModelComponents.js +2 -4
  3. package/lib/cjs/imodel-components-react/UiIModelComponents.js.map +1 -1
  4. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js +1 -1
  5. package/lib/cjs/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  6. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  7. package/lib/cjs/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  8. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js +1 -1
  9. package/lib/cjs/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  10. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js +7 -11
  11. package/lib/cjs/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  12. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js +2 -1
  13. package/lib/cjs/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  14. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js +1 -1
  15. package/lib/cjs/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  16. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js +1 -2
  17. package/lib/cjs/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  18. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js +2 -2
  19. package/lib/cjs/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  20. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js +3 -2
  21. package/lib/cjs/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  22. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js +1 -2
  23. package/lib/cjs/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  24. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js +6 -10
  25. package/lib/cjs/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  26. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js +3 -7
  27. package/lib/cjs/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  28. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +1 -2
  29. package/lib/cjs/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  30. package/lib/cjs/imodel-components-react/timeline/PlayButton.js +2 -2
  31. package/lib/cjs/imodel-components-react/timeline/PlayButton.js.map +1 -1
  32. package/lib/cjs/imodel-components-react/timeline/Scrubber.js +1 -1
  33. package/lib/cjs/imodel-components-react/timeline/Scrubber.js.map +1 -1
  34. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js +1 -2
  35. package/lib/cjs/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  36. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js +9 -10
  37. package/lib/cjs/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  38. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  39. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js +12 -11
  40. package/lib/cjs/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  41. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts +12 -0
  42. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  43. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js +12 -5
  44. package/lib/cjs/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  45. package/lib/esm/imodel-components-react/UiIModelComponents.js +2 -4
  46. package/lib/esm/imodel-components-react/UiIModelComponents.js.map +1 -1
  47. package/lib/esm/imodel-components-react/color/ColorPickerButton.js +1 -1
  48. package/lib/esm/imodel-components-react/color/ColorPickerButton.js.map +1 -1
  49. package/lib/esm/imodel-components-react/color/ColorPickerDialog.d.ts.map +1 -1
  50. package/lib/esm/imodel-components-react/color/ColorPickerDialog.js.map +1 -1
  51. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js +1 -1
  52. package/lib/esm/imodel-components-react/inputs/QuantityNumberInput.js.map +1 -1
  53. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js +7 -11
  54. package/lib/esm/imodel-components-react/navigationaids/CubeNavigationAid.js.map +1 -1
  55. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js +2 -1
  56. package/lib/esm/imodel-components-react/navigationaids/DrawingNavigationAid.js.map +1 -1
  57. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js +1 -1
  58. package/lib/esm/imodel-components-react/quantityformat/FormatPanel.js.map +1 -1
  59. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js +1 -2
  60. package/lib/esm/imodel-components-react/quantityformat/FormatPrecision.js.map +1 -1
  61. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js +2 -2
  62. package/lib/esm/imodel-components-react/quantityformat/FormatSample.js.map +1 -1
  63. package/lib/esm/imodel-components-react/quantityformat/FormatType.js +3 -2
  64. package/lib/esm/imodel-components-react/quantityformat/FormatType.js.map +1 -1
  65. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js +1 -2
  66. package/lib/esm/imodel-components-react/quantityformat/FormatUnitLabel.js.map +1 -1
  67. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js +6 -10
  68. package/lib/esm/imodel-components-react/quantityformat/FormatUnits.js.map +1 -1
  69. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js +3 -7
  70. package/lib/esm/imodel-components-react/quantityformat/MiscFormatOptions.js.map +1 -1
  71. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js +1 -2
  72. package/lib/esm/imodel-components-react/quantityformat/misc/ThousandsSeparator.js.map +1 -1
  73. package/lib/esm/imodel-components-react/timeline/PlayButton.js +2 -2
  74. package/lib/esm/imodel-components-react/timeline/PlayButton.js.map +1 -1
  75. package/lib/esm/imodel-components-react/timeline/Scrubber.js +1 -1
  76. package/lib/esm/imodel-components-react/timeline/Scrubber.js.map +1 -1
  77. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js +1 -2
  78. package/lib/esm/imodel-components-react/timeline/SolarTimeline.js.map +1 -1
  79. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js +9 -10
  80. package/lib/esm/imodel-components-react/timeline/TimelineComponent.js.map +1 -1
  81. package/lib/esm/imodel-components-react/viewport/ViewportComponent.d.ts.map +1 -1
  82. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js +12 -11
  83. package/lib/esm/imodel-components-react/viewport/ViewportComponent.js.map +1 -1
  84. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts +12 -0
  85. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.d.ts.map +1 -1
  86. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js +12 -5
  87. package/lib/esm/imodel-components-react/viewport/ViewportComponentEvents.js.map +1 -1
  88. package/package.json +10 -36
@@ -7,6 +7,7 @@ import { UiEvent } from "@itwin/appui-abstract";
7
7
  import { Face } from "../navigationaids/Cube";
8
8
  /** Arguments for [[DrawingViewportChangeEvent]]
9
9
  * @public
10
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
10
11
  */
11
12
  export interface DrawingViewportChangeEventArgs {
12
13
  rotation: Matrix3d;
@@ -15,11 +16,13 @@ export interface DrawingViewportChangeEventArgs {
15
16
  }
16
17
  /** Drawing View Change event
17
18
  * @public
19
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
18
20
  */
19
21
  export declare class DrawingViewportChangeEvent extends UiEvent<DrawingViewportChangeEventArgs> {
20
22
  }
21
23
  /** Arguments for [[CubeRotationChangeEvent]]
22
24
  * @public
25
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
23
26
  */
24
27
  export interface CubeRotationChangeEventArgs {
25
28
  rotMatrix: Matrix3d;
@@ -28,22 +31,26 @@ export interface CubeRotationChangeEventArgs {
28
31
  }
29
32
  /** 3d Cube Rotation Change event
30
33
  * @public
34
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
31
35
  */
32
36
  export declare class CubeRotationChangeEvent extends UiEvent<CubeRotationChangeEventArgs> {
33
37
  }
34
38
  /** Arguments for [[StandardRotationChangeEvent]]
35
39
  * @public
40
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
36
41
  */
37
42
  export interface StandardRotationChangeEventArgs {
38
43
  standardRotation: StandardViewId;
39
44
  }
40
45
  /** Standard Rotation Change event
41
46
  * @public
47
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
42
48
  */
43
49
  export declare class StandardRotationChangeEvent extends UiEvent<StandardRotationChangeEventArgs> {
44
50
  }
45
51
  /** Arguments for [[ViewRotationChangeEvent]]
46
52
  * @public
53
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
47
54
  */
48
55
  export interface ViewRotationChangeEventArgs {
49
56
  viewport: Viewport;
@@ -51,11 +58,13 @@ export interface ViewRotationChangeEventArgs {
51
58
  }
52
59
  /** View Rotation Change event
53
60
  * @public
61
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
54
62
  */
55
63
  export declare class ViewRotationChangeEvent extends UiEvent<ViewRotationChangeEventArgs> {
56
64
  }
57
65
  /** Arguments for [[ViewClassFullNameChangedEvent]]
58
66
  * @public
67
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
59
68
  */
60
69
  export interface ViewClassFullNameChangedEventArgs {
61
70
  viewport: Viewport;
@@ -64,11 +73,13 @@ export interface ViewClassFullNameChangedEventArgs {
64
73
  }
65
74
  /** View Class Full Name Change event
66
75
  * @public
76
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
67
77
  */
68
78
  export declare class ViewClassFullNameChangedEvent extends UiEvent<ViewClassFullNameChangedEventArgs> {
69
79
  }
70
80
  /** Arguments for [[ViewIdChangedEvent]]
71
81
  * @public
82
+ * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.
72
83
  */
73
84
  export interface ViewIdChangedEventArgs {
74
85
  viewport: Viewport;
@@ -77,6 +88,7 @@ export interface ViewIdChangedEventArgs {
77
88
  }
78
89
  /** View Id Change event
79
90
  * @public
91
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
80
92
  */
81
93
  export declare class ViewIdChangedEvent extends UiEvent<ViewIdChangedEventArgs> {
82
94
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ViewportComponentEvents.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/viewport/ViewportComponentEvents.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAEV,cAAc,EACd,QAAQ,EACT,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AAEH,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,8BAA8B,CAAC;CAAG;AAE1F;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,QAAQ,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AAEH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC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AA6B;WAM9B,aAAa,CACzB,SAAS,EAAE,QAAQ,EACnB,IAAI,OAAY,EAChB,QAAQ,GAAE,OAAe,GACxB,IAAI;WAMO,uBAAuB,CACnC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,GAAE,OAAe,GACxB,IAAI;WAIO,mBAAmB,CAAC,gBAAgB,EAAE,cAAc,GAAG,IAAI;WAI3D,aAAa,CACzB,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,IAAI;CAaR"}
1
+ {"version":3,"file":"ViewportComponentEvents.d.ts","sourceRoot":"","sources":["../../../../src/imodel-components-react/viewport/ViewportComponentEvents.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAEV,cAAc,EACd,QAAQ,EACT,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AAEH,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,8BAA8B,CAAC;CAAG;AAE1F;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,QAAQ,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AAEH,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,2BAA2B,CAAC;CAAG;AAEpF;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,gBAAgB,EAAE,cAAc,CAAC;CAClC;AAED;;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I;WAMO,uBAAuB,CACnC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,QAAQ,EAClB,QAAQ,GAAE,OAAe,GACxB,IAAI;WAIO,mBAAmB,CAAC,gBAAgB,EAAE,cAAc,GAAG,IAAI;WAI3D,aAAa,CACzB,QAAQ,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,MAAM,GACrB,IAAI;CAaR"}
@@ -11,36 +11,42 @@ import { UiEvent } from "@itwin/appui-abstract";
11
11
  import { Face } from "../navigationaids/Cube";
12
12
  /** Drawing View Change event
13
13
  * @public
14
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
14
15
  */
15
16
  // eslint-disable-next-line deprecation/deprecation
16
17
  export class DrawingViewportChangeEvent extends UiEvent {
17
18
  }
18
19
  /** 3d Cube Rotation Change event
19
20
  * @public
21
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
20
22
  */
21
23
  // eslint-disable-next-line deprecation/deprecation
22
24
  export class CubeRotationChangeEvent extends UiEvent {
23
25
  }
24
26
  /** Standard Rotation Change event
25
27
  * @public
28
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
26
29
  */
27
30
  // eslint-disable-next-line deprecation/deprecation
28
31
  export class StandardRotationChangeEvent extends UiEvent {
29
32
  }
30
33
  /** View Rotation Change event
31
34
  * @public
35
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
32
36
  */
33
37
  // eslint-disable-next-line deprecation/deprecation
34
38
  export class ViewRotationChangeEvent extends UiEvent {
35
39
  }
36
40
  /** View Class Full Name Change event
37
41
  * @public
42
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
38
43
  */
39
44
  // eslint-disable-next-line deprecation/deprecation
40
45
  export class ViewClassFullNameChangedEvent extends UiEvent {
41
46
  }
42
47
  /** View Id Change event
43
48
  * @public
49
+ * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.
44
50
  */
45
51
  // eslint-disable-next-line deprecation/deprecation
46
52
  export class ViewIdChangedEvent extends UiEvent {
@@ -94,11 +100,12 @@ ViewportComponentEvents.face = Face.None;
94
100
  ViewportComponentEvents.origin = Point3d.createZero();
95
101
  ViewportComponentEvents.extents = Vector3d.createZero();
96
102
  ViewportComponentEvents.rotationMatrix = Matrix3d.createIdentity();
97
- ViewportComponentEvents.onDrawingViewportChangeEvent = new DrawingViewportChangeEvent();
98
- ViewportComponentEvents.onCubeRotationChangeEvent = new CubeRotationChangeEvent();
99
- ViewportComponentEvents.onStandardRotationChangeEvent = new StandardRotationChangeEvent();
100
- ViewportComponentEvents.onViewRotationChangeEvent = new ViewRotationChangeEvent();
101
- ViewportComponentEvents.onViewClassFullNameChangedEvent = new ViewClassFullNameChangedEvent();
103
+ ViewportComponentEvents.onDrawingViewportChangeEvent = new DrawingViewportChangeEvent(); // eslint-disable-line deprecation/deprecation
104
+ ViewportComponentEvents.onCubeRotationChangeEvent = new CubeRotationChangeEvent(); // eslint-disable-line deprecation/deprecation
105
+ ViewportComponentEvents.onStandardRotationChangeEvent = new StandardRotationChangeEvent(); // eslint-disable-line deprecation/deprecation
106
+ ViewportComponentEvents.onViewRotationChangeEvent = new ViewRotationChangeEvent(); // eslint-disable-line deprecation/deprecation
107
+ ViewportComponentEvents.onViewClassFullNameChangedEvent = new ViewClassFullNameChangedEvent(); // eslint-disable-line deprecation/deprecation
108
+ // eslint-disable-next-line deprecation/deprecation
102
109
  ViewportComponentEvents.onViewIdChangedEvent = new ViewIdChangedEvent();
103
110
  export { ViewportComponentEvents };
104
111
  //# sourceMappingURL=ViewportComponentEvents.js.map
@@ -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,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMnE,OAAO,EAAE,SAAS,EAAE,MA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Ac,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"]}
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;AAY9C;;;GAGG;AACH,mDAAmD;AACnD,MAAM,OAAO,0BAA2B,SAAQ,OAAuC;CAAG;AAY1F;;;GAGG;AAC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AC5D,iDAAyB,GAC9C,IAAI,uBAAuB,EAAE,CAAC,CAAC,8CAA8C;AACxD,uDAA+B,GACpD,IAAI,6BAA6B,EAAE,CAAC,CAAC,8CAA8C;AACrF,mDAAmD;AAC5B,4CAAoB,GAAG,IAAI,kBAAkB,EAAE,CAAC;SAnC5D,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 * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface DrawingViewportChangeEventArgs {\n rotation: Matrix3d;\n origin: Point3d;\n complete: boolean;\n}\n\n/** Drawing View Change event\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class DrawingViewportChangeEvent extends UiEvent<DrawingViewportChangeEventArgs> {}\n\n/** Arguments for [[CubeRotationChangeEvent]]\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface CubeRotationChangeEventArgs {\n rotMatrix: Matrix3d;\n face: Face;\n complete?: boolean;\n}\n\n/** 3d Cube Rotation Change event\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class CubeRotationChangeEvent extends UiEvent<CubeRotationChangeEventArgs> {}\n\n/** Arguments for [[StandardRotationChangeEvent]]\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface StandardRotationChangeEventArgs {\n standardRotation: StandardViewId;\n}\n\n/** Standard Rotation Change event\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class StandardRotationChangeEvent extends UiEvent<StandardRotationChangeEventArgs> {}\n\n/** Arguments for [[ViewRotationChangeEvent]]\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ViewRotationChangeEventArgs {\n viewport: Viewport;\n animationTime?: number;\n}\n\n/** View Rotation Change event\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ViewRotationChangeEvent extends UiEvent<ViewRotationChangeEventArgs> {}\n\n/** Arguments for [[ViewClassFullNameChangedEvent]]\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\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 * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport class ViewClassFullNameChangedEvent extends UiEvent<ViewClassFullNameChangedEventArgs> {}\n\n/** Arguments for [[ViewIdChangedEvent]]\n * @public\n * @deprecated in 4.13.x. Event args are inferred from a listener. If explicit type is needed use a type helper.\n */\nexport interface ViewIdChangedEventArgs {\n viewport: Viewport;\n oldId: string;\n newId: string;\n}\n\n/** View Id Change event\n * @public\n * @deprecated in 4.13.x. This class should not be used by applications to instantiate objects.\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(); // eslint-disable-line deprecation/deprecation\n public static readonly onCubeRotationChangeEvent =\n new CubeRotationChangeEvent(); // eslint-disable-line deprecation/deprecation\n public static readonly onStandardRotationChangeEvent =\n new StandardRotationChangeEvent(); // eslint-disable-line deprecation/deprecation\n public static readonly onViewRotationChangeEvent =\n new ViewRotationChangeEvent(); // eslint-disable-line deprecation/deprecation\n public static readonly onViewClassFullNameChangedEvent =\n new ViewClassFullNameChangedEvent(); // eslint-disable-line deprecation/deprecation\n // eslint-disable-next-line deprecation/deprecation\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.12.0",
3
+ "version": "4.13.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.12.0",
26
+ "@itwin/components-react": "^4.13.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.12.0",
32
+ "@itwin/core-react": "^4.13.1",
33
33
  "react": "^17.0.0 || ^18.0.0",
34
34
  "react-dom": "^17.0.0 || ^18.0.0"
35
35
  },
@@ -52,41 +52,30 @@
52
52
  "@testing-library/react": "^12.0.0",
53
53
  "@testing-library/react-hooks": "^7.0.2",
54
54
  "@testing-library/user-event": "^14.4.2",
55
- "@types/chai": "4.3.1",
56
- "@types/chai-as-promised": "^7",
57
- "@types/chai-string": "^1.4.1",
58
55
  "@types/faker": "^4.1.0",
59
- "@types/mocha": "^8.2.2",
60
56
  "@types/node": "18.11.5",
61
57
  "@types/react": "^17.0.37",
62
58
  "@types/react-dom": "^17.0.0",
63
- "@types/sinon": "^17.0.3",
64
- "@types/sinon-chai": "^3.2.0",
65
- "chai": "^4.3.10",
66
- "chai-as-promised": "^7",
67
- "chai-string": "^1.5.0",
59
+ "@vitest/coverage-v8": "^1.4.0",
68
60
  "cpx2": "^3.0.0",
69
61
  "eslint": "^8.44.0",
70
62
  "eslint-config-prettier": "~8.8.0",
71
63
  "faker": "^4.1.0",
72
64
  "ignore-styles": "^5.0.1",
73
- "jsdom": "^19.0.0",
65
+ "jsdom": "^24.0.0",
74
66
  "jsdom-global": "3.0.2",
75
- "mocha": "^10.0.0",
76
67
  "npm-run-all": "^4.1.5",
77
- "nyc": "^15.1.0",
78
68
  "raf": "^3.4.0",
79
69
  "react": "^17.0.0",
80
70
  "react-dom": "^17.0.0",
81
71
  "rimraf": "^3.0.2",
82
- "sinon": "^17.0.1",
83
- "sinon-chai": "^3.2.0",
84
72
  "ts-node": "^10.8.2",
85
73
  "typemoq": "^2.1.0",
86
74
  "typescript": "~5.0.2",
87
75
  "upath": "^2.0.1",
88
- "@itwin/components-react": "4.12.0",
89
- "@itwin/core-react": "4.12.0"
76
+ "vitest": "^1.4.0",
77
+ "@itwin/components-react": "4.13.1",
78
+ "@itwin/core-react": "4.13.1"
90
79
  },
91
80
  "//dependencies": [
92
81
  "NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API",
@@ -100,20 +89,6 @@
100
89
  "classnames": "2.3.1",
101
90
  "ts-key-enum": "~2.0.12"
102
91
  },
103
- "nyc": {
104
- "extends": "./node_modules/@itwin/build-tools/.nycrc",
105
- "require": [
106
- "ignore-styles",
107
- "jsdom-global/register",
108
- "source-map-support/register",
109
- "ts-node/register"
110
- ],
111
- "check-coverage": true,
112
- "lines": 97,
113
- "functions": 96,
114
- "branches": 96,
115
- "statements": 97
116
- },
117
92
  "scripts": {
118
93
  "start": "run-p -l \"build:** -- -w\" \"copy:** -- -w\"",
119
94
  "build": "npm run -s copy:locale && npm run -s build:cjs && npm run -s build:esm",
@@ -123,12 +98,11 @@
123
98
  "copy:esm": "cpx \"./src/**/*.*css\" ./lib/esm",
124
99
  "copy:locale": "cpx ./src/imodel-components-react/UiIModelComponents.json ./lib/public/locales/en",
125
100
  "clean": "rimraf lib .rush/temp/package-deps*.json",
126
- "cover": "nyc npm -s test",
101
+ "cover": "vitest run --coverage",
127
102
  "lint": "eslint -f visualstudio \"./src/**/*.{ts,tsx}\" 1>&2",
128
103
  "lint:fix": "npm run -s lint -- --fix",
129
104
  "extract-api": "betools extract-api --entry=imodel-components-react",
130
- "test": "mocha --config ../.mocharc.json \"./lib/cjs/test/**/*.test.js\"",
131
- "test:watch": "npm -s test -- --reporter min --watch-extensions ts,tsx --watch",
105
+ "test": "vitest",
132
106
  "docs": "npm run -s docs:reference && npm run -s docs:changelog",
133
107
  "docs:changelog": "cpx ./CHANGELOG.md ../../generated-docs/reference/imodel-components-react",
134
108
  "docs:reference": "betools docs --includes=../../generated-docs/extract --json=../../generated-docs/reference/imodel-components-react/file.json --tsIndexFile=./imodel-components-react.ts --onlyJson"