@itwin/presentation-frontend 5.0.0-dev.1 → 5.0.0-dev.100

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 (163) hide show
  1. package/CHANGELOG.md +75 -1
  2. package/lib/cjs/package.json +1 -0
  3. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts +3 -3
  4. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts.map +1 -1
  5. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +11 -9
  6. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  7. package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
  8. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  9. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.d.ts +13 -0
  10. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.d.ts.map +1 -0
  11. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.js +22 -0
  12. package/lib/cjs/presentation-frontend/IModelConnectionInitialization.js.map +1 -0
  13. package/lib/cjs/presentation-frontend/InternalSymbols.d.ts +6 -0
  14. package/lib/cjs/presentation-frontend/InternalSymbols.d.ts.map +1 -0
  15. package/lib/cjs/presentation-frontend/InternalSymbols.js +17 -0
  16. package/lib/cjs/presentation-frontend/InternalSymbols.js.map +1 -0
  17. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +12 -3
  18. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts.map +1 -1
  19. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +7 -7
  20. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  21. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +1 -1
  22. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts.map +1 -1
  23. package/lib/cjs/presentation-frontend/LocalizationHelper.js +7 -6
  24. package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
  25. package/lib/cjs/presentation-frontend/Presentation.d.ts +15 -14
  26. package/lib/cjs/presentation-frontend/Presentation.d.ts.map +1 -1
  27. package/lib/cjs/presentation-frontend/Presentation.js +31 -45
  28. package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
  29. package/lib/cjs/presentation-frontend/PresentationManager.d.ts +12 -23
  30. package/lib/cjs/presentation-frontend/PresentationManager.d.ts.map +1 -1
  31. package/lib/cjs/presentation-frontend/PresentationManager.js +81 -78
  32. package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
  33. package/lib/cjs/presentation-frontend/RulesetManager.js +2 -4
  34. package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
  35. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +2 -4
  36. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts.map +1 -1
  37. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +6 -4
  38. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  39. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.d.ts +1 -1
  40. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.d.ts.map +1 -1
  41. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.js +1 -0
  42. package/lib/cjs/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
  43. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +9 -19
  44. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
  45. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +163 -153
  46. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  47. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +4 -5
  48. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts.map +1 -1
  49. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +27 -29
  50. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  51. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -0
  52. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts.map +1 -1
  53. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +10 -4
  54. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  55. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +2 -1
  56. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts.map +1 -1
  57. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +1 -0
  58. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  59. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +5 -1
  60. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts.map +1 -1
  61. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +3 -0
  62. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  63. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +8 -5
  64. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
  65. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +35 -13
  66. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  67. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +2 -0
  68. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts.map +1 -1
  69. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +3 -1
  70. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  71. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +31 -15
  72. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
  73. package/lib/cjs/presentation-frontend/selection/SelectionManager.js +218 -120
  74. package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
  75. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +11 -9
  76. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts.map +1 -1
  77. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +6 -11
  78. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  79. package/lib/cjs/presentation-frontend.d.ts +15 -15
  80. package/lib/cjs/presentation-frontend.d.ts.map +1 -1
  81. package/lib/cjs/presentation-frontend.js +30 -29
  82. package/lib/cjs/presentation-frontend.js.map +1 -1
  83. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +3 -3
  84. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts.map +1 -1
  85. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +11 -9
  86. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  87. package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
  88. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  89. package/lib/esm/presentation-frontend/IModelConnectionInitialization.d.ts +13 -0
  90. package/lib/esm/presentation-frontend/IModelConnectionInitialization.d.ts.map +1 -0
  91. package/lib/esm/presentation-frontend/IModelConnectionInitialization.js +17 -0
  92. package/lib/esm/presentation-frontend/IModelConnectionInitialization.js.map +1 -0
  93. package/lib/esm/presentation-frontend/InternalSymbols.d.ts +6 -0
  94. package/lib/esm/presentation-frontend/InternalSymbols.d.ts.map +1 -0
  95. package/lib/esm/presentation-frontend/InternalSymbols.js +14 -0
  96. package/lib/esm/presentation-frontend/InternalSymbols.js.map +1 -0
  97. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +12 -3
  98. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts.map +1 -1
  99. package/lib/esm/presentation-frontend/IpcRequestsHandler.js +8 -8
  100. package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  101. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +1 -1
  102. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts.map +1 -1
  103. package/lib/esm/presentation-frontend/LocalizationHelper.js +3 -2
  104. package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
  105. package/lib/esm/presentation-frontend/Presentation.d.ts +15 -14
  106. package/lib/esm/presentation-frontend/Presentation.d.ts.map +1 -1
  107. package/lib/esm/presentation-frontend/Presentation.js +24 -38
  108. package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
  109. package/lib/esm/presentation-frontend/PresentationManager.d.ts +12 -23
  110. package/lib/esm/presentation-frontend/PresentationManager.d.ts.map +1 -1
  111. package/lib/esm/presentation-frontend/PresentationManager.js +67 -64
  112. package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
  113. package/lib/esm/presentation-frontend/RulesetManager.js +2 -4
  114. package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
  115. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +2 -4
  116. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts.map +1 -1
  117. package/lib/esm/presentation-frontend/RulesetVariablesManager.js +6 -4
  118. package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  119. package/lib/esm/presentation-frontend/StreamedResponseGenerator.d.ts +1 -1
  120. package/lib/esm/presentation-frontend/StreamedResponseGenerator.d.ts.map +1 -1
  121. package/lib/esm/presentation-frontend/StreamedResponseGenerator.js +1 -0
  122. package/lib/esm/presentation-frontend/StreamedResponseGenerator.js.map +1 -1
  123. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +9 -19
  124. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
  125. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +164 -154
  126. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  127. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +4 -5
  128. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts.map +1 -1
  129. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +27 -29
  130. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  131. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +3 -0
  132. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts.map +1 -1
  133. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +9 -3
  134. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  135. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +2 -1
  136. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts.map +1 -1
  137. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +1 -0
  138. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  139. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +5 -1
  140. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts.map +1 -1
  141. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +3 -0
  142. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  143. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +8 -5
  144. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
  145. package/lib/esm/presentation-frontend/selection/SelectionHandler.js +35 -13
  146. package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  147. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +2 -0
  148. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts.map +1 -1
  149. package/lib/esm/presentation-frontend/selection/SelectionHelper.js +3 -1
  150. package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  151. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +31 -15
  152. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
  153. package/lib/esm/presentation-frontend/selection/SelectionManager.js +204 -106
  154. package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
  155. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +11 -9
  156. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts.map +1 -1
  157. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +7 -11
  158. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  159. package/lib/esm/presentation-frontend.d.ts +15 -15
  160. package/lib/esm/presentation-frontend.d.ts.map +1 -1
  161. package/lib/esm/presentation-frontend.js +12 -15
  162. package/lib/esm/presentation-frontend.js.map +1 -1
  163. package/package.json +43 -43
package/CHANGELOG.md CHANGED
@@ -1,6 +1,80 @@
1
1
  # Change Log - @itwin/presentation-frontend
2
2
 
3
- This log was last generated on Tue, 05 Nov 2024 15:24:11 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 02 Apr 2025 19:38:36 GMT and should not be manually modified.
4
+
5
+ ## 4.10.12
6
+ Wed, 02 Apr 2025 19:35:47 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.10.11
11
+ Wed, 19 Mar 2025 15:30:39 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.10.10
16
+ Tue, 11 Mar 2025 15:25:11 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.10.9
21
+ Tue, 11 Mar 2025 05:17:33 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.10.8
26
+ Thu, 06 Mar 2025 14:13:37 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 4.10.7
31
+ Tue, 18 Feb 2025 17:27:03 GMT
32
+
33
+ ### Updates
34
+
35
+ - Fix selection changes not being handled when using multiple connections to the same iModel
36
+
37
+ ## 4.10.6
38
+ Fri, 24 Jan 2025 08:02:40 GMT
39
+
40
+ _Version update only_
41
+
42
+ ## 4.10.5
43
+ Tue, 21 Jan 2025 21:56:45 GMT
44
+
45
+ _Version update only_
46
+
47
+ ## 4.10.4
48
+ Mon, 13 Jan 2025 14:06:43 GMT
49
+
50
+ _Version update only_
51
+
52
+ ## 4.10.3
53
+ Mon, 06 Jan 2025 14:00:13 GMT
54
+
55
+ _Version update only_
56
+
57
+ ## 4.10.2
58
+ Thu, 21 Nov 2024 15:22:20 GMT
59
+
60
+ _Version update only_
61
+
62
+ ## 4.10.1
63
+ Thu, 14 Nov 2024 18:11:00 GMT
64
+
65
+ _Version update only_
66
+
67
+ ## 4.10.0
68
+ Wed, 13 Nov 2024 15:23:39 GMT
69
+
70
+ ### Updates
71
+
72
+ - Bumped `@itwin/unified-selection` version.
73
+
74
+ ## 4.9.7
75
+ Wed, 06 Nov 2024 19:23:04 GMT
76
+
77
+ _Version update only_
4
78
 
5
79
  ## 4.9.6
6
80
  Tue, 05 Nov 2024 15:22:46 GMT
@@ -0,0 +1 @@
1
+ { "type": "commonjs" }
@@ -1,7 +1,7 @@
1
1
  /** @packageDocumentation
2
2
  * @module Core
3
3
  */
4
- import { BeEvent, IDisposable } from "@itwin/core-bentley";
4
+ import { BeEvent } from "@itwin/core-bentley";
5
5
  import { InternetConnectivityStatus } from "@itwin/core-common";
6
6
  /** @internal */
7
7
  export interface IConnectivityInformationProvider {
@@ -16,14 +16,14 @@ export interface IConnectivityInformationProvider {
16
16
  *
17
17
  * @internal
18
18
  */
19
- export declare class ConnectivityInformationProvider implements IConnectivityInformationProvider, IDisposable {
19
+ export declare class ConnectivityInformationProvider implements IConnectivityInformationProvider, Disposable {
20
20
  private _currentStatus?;
21
21
  private _unsubscribeFromInternetConnectivityChangedEvent?;
22
22
  readonly onInternetConnectivityChanged: BeEvent<(args: {
23
23
  status: InternetConnectivityStatus;
24
24
  }) => void>;
25
25
  constructor();
26
- dispose(): void;
26
+ [Symbol.dispose](): void;
27
27
  private onNativeAppInternetConnectivityChanged;
28
28
  get status(): InternetConnectivityStatus;
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectivityInformationProvider.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGhE,gBAAgB;AAChB,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,0BAA0B,CAAA;KAAE,KAAK,IAAI,CAAC,CAAC;CACzG;AAED;;;;;GAKG;AACH,qBAAa,+BAAgC,YAAW,gCAAgC,EAAE,WAAW;IACnG,OAAO,CAAC,cAAc,CAAC,CAA6B;IACpD,OAAO,CAAC,gDAAgD,CAAC,CAAa;IACtE,SAAgB,6BAA6B,iBAAsB;QAAE,MAAM,EAAE,0BAA0B,CAAA;KAAE,KAAK,IAAI,EAAI;;IAgB/G,OAAO;IAId,OAAO,CAAC,sCAAsC,CAO5C;IAEF,IAAW,MAAM,IAAI,0BAA0B,CAE9C;CACF"}
1
+ {"version":3,"file":"ConnectivityInformationProvider.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAGhE,gBAAgB;AAChB,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,6BAA6B,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,0BAA0B,CAAA;KAAE,KAAK,IAAI,CAAC,CAAC;CACzG;AAED;;;;;GAKG;AACH,qBAAa,+BAAgC,YAAW,gCAAgC,EAAE,UAAU;IAClG,OAAO,CAAC,cAAc,CAAC,CAA6B;IACpD,OAAO,CAAC,gDAAgD,CAAC,CAAa;IACtE,SAAgB,6BAA6B,iBAAsB;QAAE,MAAM,EAAE,0BAA0B,CAAA;KAAE,KAAK,IAAI,EAAI;;IAgB/G,CAAC,MAAM,CAAC,OAAO,CAAC;IAIvB,OAAO,CAAC,sCAAsC,CAO5C;IAEF,IAAW,MAAM,IAAI,0BAA0B,CAE9C;CACF"}
@@ -18,15 +18,10 @@ const core_frontend_1 = require("@itwin/core-frontend");
18
18
  * @internal
19
19
  */
20
20
  class ConnectivityInformationProvider {
21
+ _currentStatus;
22
+ _unsubscribeFromInternetConnectivityChangedEvent;
23
+ onInternetConnectivityChanged = new core_bentley_1.BeEvent();
21
24
  constructor() {
22
- this.onInternetConnectivityChanged = new core_bentley_1.BeEvent();
23
- this.onNativeAppInternetConnectivityChanged = (status) => {
24
- if (this._currentStatus === status) {
25
- return;
26
- }
27
- this._currentStatus = status;
28
- this.onInternetConnectivityChanged.raiseEvent({ status });
29
- };
30
25
  if (core_frontend_1.NativeApp.isValid) {
31
26
  this._unsubscribeFromInternetConnectivityChangedEvent = core_frontend_1.NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
32
27
  // eslint-disable-next-line @typescript-eslint/no-floating-promises
@@ -40,9 +35,16 @@ class ConnectivityInformationProvider {
40
35
  this._currentStatus = core_common_1.InternetConnectivityStatus.Online;
41
36
  }
42
37
  }
43
- dispose() {
38
+ [Symbol.dispose]() {
44
39
  this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
45
40
  }
41
+ onNativeAppInternetConnectivityChanged = (status) => {
42
+ if (this._currentStatus === status) {
43
+ return;
44
+ }
45
+ this._currentStatus = status;
46
+ this.onInternetConnectivityChanged.raiseEvent({ status });
47
+ };
46
48
  get status() {
47
49
  return this._currentStatus ?? core_common_1.InternetConnectivityStatus.Offline;
48
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAA2D;AAC3D,oDAAgE;AAChE,wDAAiD;AAQjD;;;;;GAKG;AACH,MAAa,+BAA+B;IAK1C;QAFgB,kCAA6B,GAAG,IAAI,sBAAO,EAA0D,CAAC;QAoB9G,2CAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;YACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;gBACnC,OAAO;YACT,CAAC;YAED,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;YAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5D,CAAC,CAAC;QAxBA,IAAI,yBAAS,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,gDAAgD,GAAG,yBAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,yBAAS,CAAC,yBAAyB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;gBAChF,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;gBAC/B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,cAAc,GAAG,wCAA0B,CAAC,MAAM,CAAC;QAC1D,CAAC;IACH,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAWD,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,IAAI,wCAA0B,CAAC,OAAO,CAAC;IACnE,CAAC;CACF;AAnCD,0EAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { BeEvent, IDisposable } from \"@itwin/core-bentley\";\r\nimport { InternetConnectivityStatus } from \"@itwin/core-common\";\r\nimport { NativeApp } from \"@itwin/core-frontend\";\r\n\r\n/** @internal */\r\nexport interface IConnectivityInformationProvider {\r\n readonly status: InternetConnectivityStatus;\r\n readonly onInternetConnectivityChanged: BeEvent<(args: { status: InternetConnectivityStatus }) => void>;\r\n}\r\n\r\n/**\r\n * A helper that wraps connectivity-related APIs in NativeApp\r\n * to give a unified information for interested parties in presentation.\r\n *\r\n * @internal\r\n */\r\nexport class ConnectivityInformationProvider implements IConnectivityInformationProvider, IDisposable {\r\n private _currentStatus?: InternetConnectivityStatus;\r\n private _unsubscribeFromInternetConnectivityChangedEvent?: () => void;\r\n public readonly onInternetConnectivityChanged = new BeEvent<(args: { status: InternetConnectivityStatus }) => void>();\r\n\r\n public constructor() {\r\n if (NativeApp.isValid) {\r\n this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n NativeApp.checkInternetConnectivity().then((status: InternetConnectivityStatus) => {\r\n if (undefined === this._currentStatus) {\r\n this._currentStatus = status;\r\n }\r\n });\r\n } else {\r\n this._currentStatus = InternetConnectivityStatus.Online;\r\n }\r\n }\r\n\r\n public dispose() {\r\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\r\n }\r\n\r\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\r\n if (this._currentStatus === status) {\r\n return;\r\n }\r\n\r\n this._currentStatus = status;\r\n this.onInternetConnectivityChanged.raiseEvent({ status });\r\n };\r\n\r\n public get status(): InternetConnectivityStatus {\r\n return this._currentStatus ?? InternetConnectivityStatus.Offline;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAA8C;AAC9C,oDAAgE;AAChE,wDAAiD;AAQjD;;;;;GAKG;AACH,MAAa,+BAA+B;IAClC,cAAc,CAA8B;IAC5C,gDAAgD,CAAc;IACtD,6BAA6B,GAAG,IAAI,sBAAO,EAA0D,CAAC;IAEtH;QACE,IAAI,yBAAS,CAAC,OAAO,EAAE,CAAC;YACtB,IAAI,CAAC,gDAAgD,GAAG,yBAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,yBAAS,CAAC,yBAAyB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAkC,EAAE,EAAE;gBAChF,IAAI,SAAS,KAAK,IAAI,CAAC,cAAc,EAAE,CAAC;oBACtC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;gBAC/B,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,cAAc,GAAG,wCAA0B,CAAC,MAAM,CAAC;QAC1D,CAAC;IACH,CAAC;IAEM,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAEO,sCAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;QACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,cAAc,IAAI,wCAA0B,CAAC,OAAO,CAAC;IACnE,CAAC;CACF;AAnCD,0EAmCC","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 Core\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { InternetConnectivityStatus } from \"@itwin/core-common\";\nimport { NativeApp } from \"@itwin/core-frontend\";\n\n/** @internal */\nexport interface IConnectivityInformationProvider {\n readonly status: InternetConnectivityStatus;\n readonly onInternetConnectivityChanged: BeEvent<(args: { status: InternetConnectivityStatus }) => void>;\n}\n\n/**\n * A helper that wraps connectivity-related APIs in NativeApp\n * to give a unified information for interested parties in presentation.\n *\n * @internal\n */\nexport class ConnectivityInformationProvider implements IConnectivityInformationProvider, Disposable {\n private _currentStatus?: InternetConnectivityStatus;\n private _unsubscribeFromInternetConnectivityChangedEvent?: () => void;\n public readonly onInternetConnectivityChanged = new BeEvent<(args: { status: InternetConnectivityStatus }) => void>();\n\n public constructor() {\n if (NativeApp.isValid) {\n this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n NativeApp.checkInternetConnectivity().then((status: InternetConnectivityStatus) => {\n if (undefined === this._currentStatus) {\n this._currentStatus = status;\n }\n });\n } else {\n this._currentStatus = InternetConnectivityStatus.Online;\n }\n }\n\n public [Symbol.dispose]() {\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\n }\n\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\n if (this._currentStatus === status) {\n return;\n }\n\n this._currentStatus = status;\n this.onInternetConnectivityChanged.raiseEvent({ status });\n };\n\n public get status(): InternetConnectivityStatus {\n return this._currentStatus ?? InternetConnectivityStatus.Offline;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AAeH,8DAcC;AAMD,4EAIC;AArCD,oEAOoC;AAEpC;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,WAA8B;IACtE,sCAAsC;IACtC,WAAW,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5F,WAAW,CAAC,IAAI;QACd,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,GAA0B,EAAE,KAA6B,EAAE,EAAE;YACnG,+FAA+F;YAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACxB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;YAC9C,CAAC;YACD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;gBACrB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAgB,gCAAgC,CAAC,QAAoC;IACnF,OAAO,CAAC,WAA8B,EAAE,EAAE;QACxC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC;AAID,SAAS,oBAAoB,CAAC,IAA2B,EAAE,cAA4C,EAAE,QAAgC,EAAE;IACzI,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,IAAI,yCAAmB,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACpB,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,GAA0B,EAAE,MAA8B;IACvF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAmC;IAC5D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACzD,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACxD,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;IACzD,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport {\r\n ClientDiagnostics,\r\n ClientDiagnosticsHandler,\r\n DiagnosticsLogEntry,\r\n DiagnosticsLoggerSeverity,\r\n DiagnosticsLogMessage,\r\n DiagnosticsScopeLogs,\r\n} from \"@itwin/presentation-common\";\r\n\r\n/**\r\n * A function which logs messages to the console.\r\n * @public\r\n */\r\nexport function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics) {\r\n // eslint-disable-next-line no-console\r\n diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);\r\n diagnostics.logs &&\r\n handleDiagnosticLogs(diagnostics.logs, (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => {\r\n /* note: we're duplicating the message if it's logged at both editor and dev severity levels */\r\n const str = buildLogMessageString(msg, stack);\r\n if (msg.severity.editor) {\r\n getConsoleLogFunc(msg.severity.editor)(str);\r\n }\r\n if (msg.severity.dev) {\r\n getConsoleLogFunc(msg.severity.dev)(str);\r\n }\r\n });\r\n}\r\n\r\n/**\r\n * A function which calls all diagnostics handlers passed to it.\r\n * @public\r\n */\r\nexport function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]) {\r\n return (diagnostics: ClientDiagnostics) => {\r\n handlers.forEach((handler) => handler(diagnostics));\r\n };\r\n}\r\n\r\ntype DiagnosticsLogMessageHandler = (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => void;\r\n\r\nfunction handleDiagnosticLogs(logs: DiagnosticsLogEntry[], messageHandler: DiagnosticsLogMessageHandler, stack: DiagnosticsScopeLogs[] = []) {\r\n logs.forEach((log) => {\r\n if (DiagnosticsLogEntry.isMessage(log)) {\r\n messageHandler(log, stack);\r\n } else if (log.logs) {\r\n handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);\r\n }\r\n });\r\n}\r\n\r\nfunction buildLogMessageString(msg: DiagnosticsLogMessage, _stack: DiagnosticsScopeLogs[]) {\r\n return msg.message;\r\n}\r\n\r\nfunction getConsoleLogFunc(severity: DiagnosticsLoggerSeverity) {\r\n switch (severity) {\r\n case \"error\":\r\n return console.error; // eslint-disable-line no-console\r\n case \"warning\":\r\n return console.warn; // eslint-disable-line no-console\r\n case \"info\":\r\n case \"debug\":\r\n case \"trace\":\r\n return console.log; // eslint-disable-line no-console\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AAeH,8DAcC;AAMD,4EAIC;AArCD,oEAOoC;AAEpC;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,WAA8B;IACtE,sCAAsC;IACtC,WAAW,CAAC,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,WAAW,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5F,WAAW,CAAC,IAAI;QACd,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,GAA0B,EAAE,KAA6B,EAAE,EAAE;YACnG,+FAA+F;YAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACxB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;YAC9C,CAAC;YACD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;gBACrB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAgB,gCAAgC,CAAC,QAAoC;IACnF,OAAO,CAAC,WAA8B,EAAE,EAAE;QACxC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACtD,CAAC,CAAC;AACJ,CAAC;AAID,SAAS,oBAAoB,CAAC,IAA2B,EAAE,cAA4C,EAAE,QAAgC,EAAE;IACzI,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,IAAI,yCAAmB,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;YACvC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACpB,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,GAA0B,EAAE,MAA8B;IACvF,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAmC;IAC5D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACzD,KAAK,SAAS;YACZ,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACxD,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;IACzD,CAAC;AACH,CAAC","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 Core\n */\n\nimport {\n ClientDiagnostics,\n ClientDiagnosticsHandler,\n DiagnosticsLogEntry,\n DiagnosticsLoggerSeverity,\n DiagnosticsLogMessage,\n DiagnosticsScopeLogs,\n} from \"@itwin/presentation-common\";\n\n/**\n * A function which logs messages to the console.\n * @public\n */\nexport function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics) {\n // eslint-disable-next-line no-console\n diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);\n diagnostics.logs &&\n handleDiagnosticLogs(diagnostics.logs, (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => {\n /* note: we're duplicating the message if it's logged at both editor and dev severity levels */\n const str = buildLogMessageString(msg, stack);\n if (msg.severity.editor) {\n getConsoleLogFunc(msg.severity.editor)(str);\n }\n if (msg.severity.dev) {\n getConsoleLogFunc(msg.severity.dev)(str);\n }\n });\n}\n\n/**\n * A function which calls all diagnostics handlers passed to it.\n * @public\n */\nexport function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]) {\n return (diagnostics: ClientDiagnostics) => {\n handlers.forEach((handler) => handler(diagnostics));\n };\n}\n\ntype DiagnosticsLogMessageHandler = (msg: DiagnosticsLogMessage, stack: DiagnosticsScopeLogs[]) => void;\n\nfunction handleDiagnosticLogs(logs: DiagnosticsLogEntry[], messageHandler: DiagnosticsLogMessageHandler, stack: DiagnosticsScopeLogs[] = []) {\n logs.forEach((log) => {\n if (DiagnosticsLogEntry.isMessage(log)) {\n messageHandler(log, stack);\n } else if (log.logs) {\n handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);\n }\n });\n}\n\nfunction buildLogMessageString(msg: DiagnosticsLogMessage, _stack: DiagnosticsScopeLogs[]) {\n return msg.message;\n}\n\nfunction getConsoleLogFunc(severity: DiagnosticsLoggerSeverity) {\n switch (severity) {\n case \"error\":\n return console.error; // eslint-disable-line no-console\n case \"warning\":\n return console.warn; // eslint-disable-line no-console\n case \"info\":\n case \"debug\":\n case \"trace\":\n return console.log; // eslint-disable-line no-console\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,kDAAlC,kCAAkC,QAE7C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Logging\r\n */\r\n\r\n/**\r\n * Logger categories used by this package\r\n * @note All logger categories in this package start with the `presentation-frontend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum PresentationFrontendLoggerCategory {\r\n Package = \"presentation-frontend\",\r\n}\r\n"]}
1
+ {"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,kDAAlC,kCAAkC,QAE7C","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 Logging\n */\n\n/**\n * Logger categories used by this package\n * @note All logger categories in this package start with the `presentation-frontend` prefix.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum PresentationFrontendLoggerCategory {\n Package = \"presentation-frontend\",\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { IModelConnection } from "@itwin/core-frontend";
2
+ /** @internal */
3
+ export interface IModelConnectionInitializationHandler {
4
+ startInitialization: (imodel: IModelConnection) => void;
5
+ ensureInitialized: (imodel: IModelConnection) => Promise<void>;
6
+ }
7
+ /** @internal */
8
+ export declare const imodelInitializationHandlers: Set<IModelConnectionInitializationHandler>;
9
+ /** @internal */
10
+ export declare function startIModelInitialization(imodel: IModelConnection): void;
11
+ /** @internal */
12
+ export declare function ensureIModelInitialized(imodel: IModelConnection): Promise<void>;
13
+ //# sourceMappingURL=IModelConnectionInitialization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModelConnectionInitialization.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/IModelConnectionInitialization.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,gBAAgB;AAChB,MAAM,WAAW,qCAAqC;IACpD,mBAAmB,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACxD,iBAAiB,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE;AAED,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,4CAAmD,CAAC;AAE7F,gBAAgB;AAChB,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,gBAAgB,QAIjE;AAED,gBAAgB;AAChB,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,iBAErE"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.imodelInitializationHandlers = void 0;
8
+ exports.startIModelInitialization = startIModelInitialization;
9
+ exports.ensureIModelInitialized = ensureIModelInitialized;
10
+ /** @internal */
11
+ exports.imodelInitializationHandlers = new Set();
12
+ /** @internal */
13
+ function startIModelInitialization(imodel) {
14
+ for (const { startInitialization } of exports.imodelInitializationHandlers) {
15
+ startInitialization(imodel);
16
+ }
17
+ }
18
+ /** @internal */
19
+ async function ensureIModelInitialized(imodel) {
20
+ await Promise.all([...exports.imodelInitializationHandlers].map(async ({ ensureInitialized }) => ensureInitialized(imodel)));
21
+ }
22
+ //# sourceMappingURL=IModelConnectionInitialization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModelConnectionInitialization.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IModelConnectionInitialization.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAchG,8DAIC;AAGD,0DAEC;AAbD,gBAAgB;AACH,QAAA,4BAA4B,GAAG,IAAI,GAAG,EAAyC,CAAC;AAE7F,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,MAAwB;IAChE,KAAK,MAAM,EAAE,mBAAmB,EAAE,IAAI,oCAA4B,EAAE,CAAC;QACnE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,uBAAuB,CAAC,MAAwB;IACpE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,oCAA4B,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACvH,CAAC","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\nimport { IModelConnection } from \"@itwin/core-frontend\";\n\n/** @internal */\nexport interface IModelConnectionInitializationHandler {\n startInitialization: (imodel: IModelConnection) => void;\n ensureInitialized: (imodel: IModelConnection) => Promise<void>;\n}\n\n/** @internal */\nexport const imodelInitializationHandlers = new Set<IModelConnectionInitializationHandler>();\n\n/** @internal */\nexport function startIModelInitialization(imodel: IModelConnection) {\n for (const { startInitialization } of imodelInitializationHandlers) {\n startInitialization(imodel);\n }\n}\n\n/** @internal */\nexport async function ensureIModelInitialized(imodel: IModelConnection) {\n await Promise.all([...imodelInitializationHandlers].map(async ({ ensureInitialized }) => ensureInitialized(imodel)));\n}\n"]}
@@ -0,0 +1,6 @@
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ export declare const _presentation_manager_rpcRequestsHandler: unique symbol;
5
+ export declare const _presentation_manager_ipcRequestsHandler: unique symbol;
6
+ //# sourceMappingURL=InternalSymbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalSymbols.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/InternalSymbols.ts"],"names":[],"mappings":"AAKA;;GAEG;AAMH,eAAO,MAAM,wCAAwC,eAA6D,CAAC;AACnH,eAAO,MAAM,wCAAwC,eAA6D,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /* eslint-disable @typescript-eslint/naming-convention */
7
+ /** @packageDocumentation
8
+ * @module Core
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports._presentation_manager_ipcRequestsHandler = exports._presentation_manager_rpcRequestsHandler = void 0;
12
+ function sym(name) {
13
+ return `${name}_presentation-frontend_INTERNAL_ONLY_DO_NOT_USE`;
14
+ }
15
+ exports._presentation_manager_rpcRequestsHandler = Symbol.for(sym("presentation_manager_rpcRequestsHandler"));
16
+ exports._presentation_manager_ipcRequestsHandler = Symbol.for(sym("presentation_manager_ipcRequestsHandler"));
17
+ //# sourceMappingURL=InternalSymbols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalSymbols.js","sourceRoot":"","sources":["../../../src/presentation-frontend/InternalSymbols.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,yDAAyD;AACzD;;GAEG;;;AAEH,SAAS,GAAG,CAAC,IAAY;IACvB,OAAO,GAAG,IAAI,iDAAiD,CAAC;AAClE,CAAC;AAEY,QAAA,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC;AACtG,QAAA,wCAAwC,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC,CAAC","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/* eslint-disable @typescript-eslint/naming-convention */\n/** @packageDocumentation\n * @module Core\n */\n\nfunction sym(name: string): string {\n return `${name}_presentation-frontend_INTERNAL_ONLY_DO_NOT_USE`;\n}\n\nexport const _presentation_manager_rpcRequestsHandler = Symbol.for(sym(\"presentation_manager_rpcRequestsHandler\"));\nexport const _presentation_manager_ipcRequestsHandler = Symbol.for(sym(\"presentation_manager_ipcRequestsHandler\"));\n"]}
@@ -1,10 +1,19 @@
1
- import { RulesetVariable, SetRulesetVariableParams, UnsetRulesetVariableParams } from "@itwin/presentation-common";
1
+ import { RulesetVariable } from "@itwin/presentation-common";
2
+ interface SetRulesetVariableParams {
3
+ rulesetId: string;
4
+ variable: RulesetVariable;
5
+ }
6
+ interface UnsetRulesetVariableParams {
7
+ rulesetId: string;
8
+ variableId: string;
9
+ }
2
10
  /** @internal */
3
11
  export declare class IpcRequestsHandler {
4
12
  private _ipcProxy;
5
13
  readonly clientId: string;
6
14
  constructor(clientId: string);
7
- setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, "clientId">): Promise<void>;
8
- unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, "clientId">): Promise<void>;
15
+ setRulesetVariable(params: SetRulesetVariableParams): Promise<void>;
16
+ unsetRulesetVariable(params: UnsetRulesetVariableParams): Promise<void>;
9
17
  }
18
+ export {};
10
19
  //# sourceMappingURL=IpcRequestsHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IpcRequestsHandler.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAGL,eAAe,EAEf,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AAEpC,gBAAgB;AAChB,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,SAAS,CAAgF;IACjG,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAErB,QAAQ,EAAE,MAAM;IAIf,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,wBAAwB,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC;IAStF,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC;CAOvF"}
1
+ {"version":3,"file":"IpcRequestsHandler.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,UAAU,wBAAwB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,UAAU,0BAA0B;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,gBAAgB;AAChB,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,SAAS,CAAgF;IACjG,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAErB,QAAQ,EAAE,MAAM;IAIf,kBAAkB,CAAC,MAAM,EAAE,wBAAwB;IAQnD,oBAAoB,CAAC,MAAM,EAAE,0BAA0B;CAMrE"}
@@ -7,26 +7,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.IpcRequestsHandler = void 0;
8
8
  const core_frontend_1 = require("@itwin/core-frontend");
9
9
  const presentation_common_1 = require("@itwin/presentation-common");
10
+ const internal_1 = require("@itwin/presentation-common/internal");
10
11
  /** @internal */
11
12
  class IpcRequestsHandler {
13
+ _ipcProxy = core_frontend_1.IpcApp.makeIpcProxy(internal_1.PRESENTATION_IPC_CHANNEL_NAME);
14
+ clientId;
12
15
  constructor(clientId) {
13
- this._ipcProxy = core_frontend_1.IpcApp.makeIpcProxy(presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME);
14
16
  this.clientId = clientId;
15
17
  }
16
18
  async setRulesetVariable(params) {
17
- const jsonParams = {
19
+ return this._ipcProxy.setRulesetVariable({
18
20
  ...params,
19
21
  clientId: this.clientId,
20
22
  variable: presentation_common_1.RulesetVariable.toJSON(params.variable),
21
- };
22
- return this._ipcProxy.setRulesetVariable(jsonParams);
23
+ });
23
24
  }
24
25
  async unsetRulesetVariable(params) {
25
- const jsonParams = {
26
+ return this._ipcProxy.unsetRulesetVariable({
26
27
  ...params,
27
28
  clientId: this.clientId,
28
- };
29
- return this._ipcProxy.unsetRulesetVariable(jsonParams);
29
+ });
30
30
  }
31
31
  }
32
32
  exports.IpcRequestsHandler = IpcRequestsHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,wDAA8C;AAC9C,oEAOoC;AAEpC,gBAAgB;AAChB,MAAa,kBAAkB;IAI7B,YAAY,QAAgB;QAHpB,cAAS,GAAG,sBAAM,CAAC,YAAY,CAA2B,mDAA6B,CAAC,CAAC;QAI/F,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAmE;QACjG,MAAM,UAAU,GAAkD;YAChE,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,qCAAe,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAClD,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAoD;QACpF,MAAM,UAAU,GAA+B;YAC7C,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IACzD,CAAC;CACF;AAxBD,gDAwBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { IpcApp } from \"@itwin/core-frontend\";\r\nimport {\r\n PRESENTATION_IPC_CHANNEL_NAME,\r\n PresentationIpcInterface,\r\n RulesetVariable,\r\n RulesetVariableJSON,\r\n SetRulesetVariableParams,\r\n UnsetRulesetVariableParams,\r\n} from \"@itwin/presentation-common\";\r\n\r\n/** @internal */\r\nexport class IpcRequestsHandler {\r\n private _ipcProxy = IpcApp.makeIpcProxy<PresentationIpcInterface>(PRESENTATION_IPC_CHANNEL_NAME);\r\n public readonly clientId: string;\r\n\r\n constructor(clientId: string) {\r\n this.clientId = clientId;\r\n }\r\n\r\n public async setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, \"clientId\">) {\r\n const jsonParams: SetRulesetVariableParams<RulesetVariableJSON> = {\r\n ...params,\r\n clientId: this.clientId,\r\n variable: RulesetVariable.toJSON(params.variable),\r\n };\r\n return this._ipcProxy.setRulesetVariable(jsonParams);\r\n }\r\n\r\n public async unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, \"clientId\">) {\r\n const jsonParams: UnsetRulesetVariableParams = {\r\n ...params,\r\n clientId: this.clientId,\r\n };\r\n return this._ipcProxy.unsetRulesetVariable(jsonParams);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,wDAA8C;AAC9C,oEAA6D;AAC7D,kEAA8G;AAY9G,gBAAgB;AAChB,MAAa,kBAAkB;IACrB,SAAS,GAAG,sBAAM,CAAC,YAAY,CAA2B,wCAA6B,CAAC,CAAC;IACjF,QAAQ,CAAS;IAEjC,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,MAAgC;QAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;YACvC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,qCAAe,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAkC;QAClE,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;YACzC,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,gDAsBC","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\nimport { IpcApp } from \"@itwin/core-frontend\";\nimport { RulesetVariable } from \"@itwin/presentation-common\";\nimport { PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface } from \"@itwin/presentation-common/internal\";\n\ninterface SetRulesetVariableParams {\n rulesetId: string;\n variable: RulesetVariable;\n}\n\ninterface UnsetRulesetVariableParams {\n rulesetId: string;\n variableId: string;\n}\n\n/** @internal */\nexport class IpcRequestsHandler {\n private _ipcProxy = IpcApp.makeIpcProxy<PresentationIpcInterface>(PRESENTATION_IPC_CHANNEL_NAME);\n public readonly clientId: string;\n\n constructor(clientId: string) {\n this.clientId = clientId;\n }\n\n public async setRulesetVariable(params: SetRulesetVariableParams) {\n return this._ipcProxy.setRulesetVariable({\n ...params,\n clientId: this.clientId,\n variable: RulesetVariable.toJSON(params.variable),\n });\n }\n\n public async unsetRulesetVariable(params: UnsetRulesetVariableParams) {\n return this._ipcProxy.unsetRulesetVariable({\n ...params,\n clientId: this.clientId,\n });\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { LocalizationHelper } from "@itwin/presentation-common";
1
+ import { LocalizationHelper } from "@itwin/presentation-common/internal";
2
2
  /** @internal */
3
3
  export declare class FrontendLocalizationHelper extends LocalizationHelper {
4
4
  private _lang;
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationHelper.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAKhE,gBAAgB;AAChB,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,OAAO,CAAC,KAAK,CAAqB;gBACtB,IAAI,CAAC,EAAE,MAAM;IAKzB,IAAW,MAAM,IAGS,MAAM,GAAG,SAAS,CAD3C;IACD,IAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAE3C;WAEmB,kBAAkB;WAKxB,oBAAoB;CAGnC"}
1
+ {"version":3,"file":"LocalizationHelper.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAKzE,gBAAgB;AAChB,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,OAAO,CAAC,KAAK,CAAqB;gBACtB,IAAI,CAAC,EAAE,MAAM;IAKzB,IAAW,MAAM,IAGS,MAAM,GAAG,SAAS,CAD3C;IACD,IAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAE3C;WAEmB,kBAAkB;WAKxB,oBAAoB;CAGnC"}
@@ -5,13 +5,14 @@ exports.FrontendLocalizationHelper = void 0;
5
5
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
6
6
  * See LICENSE.md in the project root for license terms and full copyright notice.
7
7
  *--------------------------------------------------------------------------------------------*/
8
- const presentation_common_1 = require("@itwin/presentation-common");
9
- const Presentation_1 = require("./Presentation");
8
+ const internal_1 = require("@itwin/presentation-common/internal");
9
+ const Presentation_js_1 = require("./Presentation.js");
10
10
  const NAMESPACES = ["Presentation"];
11
11
  /** @internal */
12
- class FrontendLocalizationHelper extends presentation_common_1.LocalizationHelper {
12
+ class FrontendLocalizationHelper extends internal_1.LocalizationHelper {
13
+ _lang;
13
14
  constructor(lang) {
14
- super({ getLocalizedString: (key) => Presentation_1.Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });
15
+ super({ getLocalizedString: (key) => Presentation_js_1.Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });
15
16
  this._lang = lang;
16
17
  }
17
18
  get locale() {
@@ -21,11 +22,11 @@ class FrontendLocalizationHelper extends presentation_common_1.LocalizationHelpe
21
22
  this._lang = locale;
22
23
  }
23
24
  static async registerNamespaces() {
24
- const localizationPromises = NAMESPACES.map(async (namespace) => Presentation_1.Presentation.localization.registerNamespace(namespace));
25
+ const localizationPromises = NAMESPACES.map(async (namespace) => Presentation_js_1.Presentation.localization.registerNamespace(namespace));
25
26
  await Promise.all(localizationPromises);
26
27
  }
27
28
  static unregisterNamespaces() {
28
- NAMESPACES.map((namespace) => Presentation_1.Presentation.localization.unregisterNamespace(namespace));
29
+ NAMESPACES.map((namespace) => Presentation_js_1.Presentation.localization.unregisterNamespace(namespace));
29
30
  }
30
31
  }
31
32
  exports.FrontendLocalizationHelper = FrontendLocalizationHelper;
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,oEAAgE;AAChE,iDAA8C;AAE9C,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpC,gBAAgB;AAChB,MAAa,0BAA2B,SAAQ,wCAAkB;IAEhE,YAAY,IAAa;QACvB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,2BAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAW,MAAM,CAAC,MAA0B;QAC1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,oBAAoB,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,2BAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,2BAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,CAAC;CACF;AAtBD,gEAsBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { LocalizationHelper } from \"@itwin/presentation-common\";\r\nimport { Presentation } from \"./Presentation\";\r\n\r\nconst NAMESPACES = [\"Presentation\"];\r\n\r\n/** @internal */\r\nexport class FrontendLocalizationHelper extends LocalizationHelper {\r\n private _lang: string | undefined;\r\n constructor(lang?: string) {\r\n super({ getLocalizedString: (key) => Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });\r\n this._lang = lang;\r\n }\r\n\r\n public get locale() {\r\n return this._lang;\r\n }\r\n public set locale(locale: string | undefined) {\r\n this._lang = locale;\r\n }\r\n\r\n public static async registerNamespaces() {\r\n const localizationPromises = NAMESPACES.map(async (namespace) => Presentation.localization.registerNamespace(namespace));\r\n await Promise.all(localizationPromises);\r\n }\r\n\r\n public static unregisterNamespaces() {\r\n NAMESPACES.map((namespace) => Presentation.localization.unregisterNamespace(namespace));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-frontend/LocalizationHelper.ts"],"names":[],"mappings":";;;AAAA;;;gGAGgG;AAChG,kEAAyE;AACzE,uDAAiD;AAEjD,MAAM,UAAU,GAAG,CAAC,cAAc,CAAC,CAAC;AAEpC,gBAAgB;AAChB,MAAa,0BAA2B,SAAQ,6BAAkB;IACxD,KAAK,CAAqB;IAClC,YAAY,IAAa;QACvB,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IACD,IAAW,MAAM,CAAC,MAA0B;QAC1C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB;QACpC,MAAM,oBAAoB,GAAG,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;QACzH,MAAM,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAEM,MAAM,CAAC,oBAAoB;QAChC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,8BAAY,CAAC,YAAY,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;IAC1F,CAAC;CACF;AAtBD,gEAsBC","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 *--------------------------------------------------------------------------------------------*/\nimport { LocalizationHelper } from \"@itwin/presentation-common/internal\";\nimport { Presentation } from \"./Presentation.js\";\n\nconst NAMESPACES = [\"Presentation\"];\n\n/** @internal */\nexport class FrontendLocalizationHelper extends LocalizationHelper {\n private _lang: string | undefined;\n constructor(lang?: string) {\n super({ getLocalizedString: (key) => Presentation.localization.getLocalizedString(key, { defaultValue: key, lng: this._lang }) });\n this._lang = lang;\n }\n\n public get locale() {\n return this._lang;\n }\n public set locale(locale: string | undefined) {\n this._lang = locale;\n }\n\n public static async registerNamespaces() {\n const localizationPromises = NAMESPACES.map(async (namespace) => Presentation.localization.registerNamespace(namespace));\n await Promise.all(localizationPromises);\n }\n\n public static unregisterNamespaces() {\n NAMESPACES.map((namespace) => Presentation.localization.unregisterNamespace(namespace));\n }\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * @module Core
3
3
  */
4
4
  import { Localization } from "@itwin/core-common";
5
- import { FavoritePropertiesManager, FavoritePropertiesManagerProps } from "./favorite-properties/FavoritePropertiesManager";
6
- import { PresentationManager, PresentationManagerProps } from "./PresentationManager";
7
- import { SelectionManager, SelectionManagerProps } from "./selection/SelectionManager";
5
+ import { FavoritePropertiesManager, FavoritePropertiesManagerProps } from "./favorite-properties/FavoritePropertiesManager.js";
6
+ import { PresentationManager, PresentationManagerProps } from "./PresentationManager.js";
7
+ import { SelectionManager, SelectionManagerProps } from "./selection/SelectionManager.js";
8
8
  /**
9
9
  * Props for initializing [[Presentation]].
10
10
  * @public
@@ -12,7 +12,12 @@ import { SelectionManager, SelectionManagerProps } from "./selection/SelectionMa
12
12
  export interface PresentationProps {
13
13
  /** Props for [[PresentationManager]]. */
14
14
  presentation?: PresentationManagerProps;
15
- /** Props for [[SelectionManager]]. */
15
+ /**
16
+ * Props for [[SelectionManager]].
17
+ *
18
+ * @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
19
+ * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
20
+ */
16
21
  selection?: Partial<SelectionManagerProps>;
17
22
  /** Props for [[FavoritePropertiesManager]]. */
18
23
  favorites?: FavoritePropertiesManagerProps;
@@ -51,24 +56,20 @@ export declare class Presentation {
51
56
  static registerInitializationHandler(handler: () => Promise<() => void>): void;
52
57
  /** The singleton [[PresentationManager]] */
53
58
  static get presentation(): PresentationManager;
54
- /** @internal */
55
- static setPresentationManager(value: PresentationManager): void;
56
- /** The singleton [[SelectionManager]] */
59
+ /**
60
+ * The singleton [[SelectionManager]].
61
+ *
62
+ * @deprecated in 5.0. The whole unified selection system in this package is deprecated in favor of the new
63
+ * [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md) package.
64
+ */
57
65
  static get selection(): SelectionManager;
58
- /** @internal */
59
- static setSelectionManager(value: SelectionManager): void;
60
66
  /**
61
67
  * The singleton [[FavoritePropertiesManager]]
62
- * @public
63
68
  */
64
69
  static get favoriteProperties(): FavoritePropertiesManager;
65
- /** @internal */
66
- static setFavoritePropertiesManager(value: FavoritePropertiesManager): void;
67
70
  /**
68
71
  * The localization manager used by Presentation frontend. Returns the result of `IModelApp.i18n`.
69
72
  */
70
73
  static get localization(): Localization;
71
- /** @internal */
72
- static setLocalization(value: Localization): void;
73
74
  }
74
75
  //# sourceMappingURL=Presentation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Presentation.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAG5H,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAUvF;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,YAAY,CAAC,EAAE,wBAAwB,CAAC;IAExC,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE3C,+CAA+C;IAC/C,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAEvB,OAAO;IAEP;;;;;;;;;OASG;WACiB,UAAU,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4CxE;;;OAGG;WACW,SAAS,IAAI,IAAI;IAyB/B;;;OAGG;WACW,6BAA6B,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;IAIrF,4CAA4C;IAC5C,WAAkB,YAAY,IAAI,mBAAmB,CAKpD;IAED,gBAAgB;WACF,sBAAsB,CAAC,KAAK,EAAE,mBAAmB;IAO/D,yCAAyC;IACzC,WAAkB,SAAS,IAAI,gBAAgB,CAK9C;IAED,gBAAgB;WACF,mBAAmB,CAAC,KAAK,EAAE,gBAAgB;IAIzD;;;OAGG;IACH,WAAkB,kBAAkB,IAAI,yBAAyB,CAKhE;IAED,gBAAgB;WACF,4BAA4B,CAAC,KAAK,EAAE,yBAAyB;IAO3E;;OAEG;IACH,WAAkB,YAAY,IAAI,YAAY,CAK7C;IAED,gBAAgB;WACF,eAAe,CAAC,KAAK,EAAE,YAAY;CAGlD"}
1
+ {"version":3,"file":"Presentation.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/Presentation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AAG/H,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAY1F;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,YAAY,CAAC,EAAE,wBAAwB,CAAC;IAExC;;;;;OAKG;IAEH,SAAS,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAE3C,+CAA+C;IAC/C,SAAS,CAAC,EAAE,8BAA8B,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,qBAAa,YAAY;IAEvB,OAAO;IAEP;;;;;;;;;OASG;WACiB,UAAU,CAAC,KAAK,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2CxE;;;OAGG;WACW,SAAS,IAAI,IAAI;IA2B/B;;;OAGG;WACW,6BAA6B,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;IAIrF,4CAA4C;IAC5C,WAAkB,YAAY,IAAI,mBAAmB,CAKpD;IAED;;;;;OAKG;IAEH,WAAkB,SAAS,IAAI,gBAAgB,CAK9C;IAED;;OAEG;IACH,WAAkB,kBAAkB,IAAI,yBAAyB,CAKhE;IAED;;OAEG;IACH,WAAkB,YAAY,IAAI,YAAY,CAK7C;CACF"}