@itwin/presentation-frontend 3.4.0-dev.9 → 3.4.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 (130) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
  3. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +47 -47
  4. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  5. package/lib/cjs/presentation-frontend/Diagnostics.d.ts +14 -12
  6. package/lib/cjs/presentation-frontend/Diagnostics.d.ts.map +1 -1
  7. package/lib/cjs/presentation-frontend/Diagnostics.js +61 -59
  8. package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
  9. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
  10. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js +20 -20
  11. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  12. package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
  13. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +42 -42
  14. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  15. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +10 -14
  16. package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts.map +1 -1
  17. package/lib/cjs/presentation-frontend/LocalizationHelper.js +31 -57
  18. package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
  19. package/lib/cjs/presentation-frontend/Presentation.d.ts +75 -75
  20. package/lib/cjs/presentation-frontend/Presentation.js +162 -162
  21. package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
  22. package/lib/cjs/presentation-frontend/PresentationManager.d.ts +180 -179
  23. package/lib/cjs/presentation-frontend/PresentationManager.d.ts.map +1 -1
  24. package/lib/cjs/presentation-frontend/PresentationManager.js +419 -413
  25. package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
  26. package/lib/cjs/presentation-frontend/RulesetManager.d.ts +60 -60
  27. package/lib/cjs/presentation-frontend/RulesetManager.js +85 -85
  28. package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
  29. package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
  30. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +195 -195
  31. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  32. package/lib/cjs/presentation-frontend/StateTracker.d.ts +23 -23
  33. package/lib/cjs/presentation-frontend/StateTracker.js +74 -74
  34. package/lib/cjs/presentation-frontend/StateTracker.js.map +1 -1
  35. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
  36. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +525 -525
  37. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  38. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
  39. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +293 -293
  40. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  41. package/lib/cjs/presentation-frontend/selection/HiliteRules.json +172 -172
  42. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
  43. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +97 -97
  44. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  45. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
  46. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +9 -9
  47. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  48. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
  49. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +33 -33
  50. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  51. package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
  52. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +108 -108
  53. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  54. package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +14 -14
  55. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +37 -37
  56. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  57. package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +139 -139
  58. package/lib/cjs/presentation-frontend/selection/SelectionManager.js +414 -414
  59. package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
  60. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
  61. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +91 -91
  62. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  63. package/lib/cjs/presentation-frontend.d.ts +34 -34
  64. package/lib/cjs/presentation-frontend.js +50 -50
  65. package/lib/cjs/presentation-frontend.js.map +1 -1
  66. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
  67. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +43 -43
  68. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  69. package/lib/esm/presentation-frontend/Diagnostics.d.ts +14 -12
  70. package/lib/esm/presentation-frontend/Diagnostics.d.ts.map +1 -1
  71. package/lib/esm/presentation-frontend/Diagnostics.js +56 -54
  72. package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
  73. package/lib/esm/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
  74. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js +17 -17
  75. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  76. package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
  77. package/lib/esm/presentation-frontend/IpcRequestsHandler.js +38 -38
  78. package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  79. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +10 -14
  80. package/lib/esm/presentation-frontend/LocalizationHelper.d.ts.map +1 -1
  81. package/lib/esm/presentation-frontend/LocalizationHelper.js +27 -53
  82. package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
  83. package/lib/esm/presentation-frontend/Presentation.d.ts +75 -75
  84. package/lib/esm/presentation-frontend/Presentation.js +158 -158
  85. package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
  86. package/lib/esm/presentation-frontend/PresentationManager.d.ts +180 -179
  87. package/lib/esm/presentation-frontend/PresentationManager.d.ts.map +1 -1
  88. package/lib/esm/presentation-frontend/PresentationManager.js +414 -408
  89. package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
  90. package/lib/esm/presentation-frontend/RulesetManager.d.ts +60 -60
  91. package/lib/esm/presentation-frontend/RulesetManager.js +81 -81
  92. package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
  93. package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
  94. package/lib/esm/presentation-frontend/RulesetVariablesManager.js +191 -191
  95. package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  96. package/lib/esm/presentation-frontend/StateTracker.d.ts +23 -23
  97. package/lib/esm/presentation-frontend/StateTracker.js +70 -70
  98. package/lib/esm/presentation-frontend/StateTracker.js.map +1 -1
  99. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
  100. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +519 -519
  101. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  102. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
  103. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +285 -285
  104. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  105. package/lib/esm/presentation-frontend/selection/HiliteRules.json +172 -172
  106. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
  107. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +93 -93
  108. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  109. package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
  110. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +8 -8
  111. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  112. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
  113. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +29 -29
  114. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  115. package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
  116. package/lib/esm/presentation-frontend/selection/SelectionHandler.js +104 -104
  117. package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  118. package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +14 -14
  119. package/lib/esm/presentation-frontend/selection/SelectionHelper.js +33 -33
  120. package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  121. package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +139 -139
  122. package/lib/esm/presentation-frontend/selection/SelectionManager.js +409 -409
  123. package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
  124. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
  125. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +85 -85
  126. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  127. package/lib/esm/presentation-frontend.d.ts +34 -34
  128. package/lib/esm/presentation-frontend.js +38 -38
  129. package/lib/esm/presentation-frontend.js.map +1 -1
  130. package/package.json +15 -15
package/CHANGELOG.md CHANGED
@@ -1,6 +1,56 @@
1
1
  # Change Log - @itwin/presentation-frontend
2
2
 
3
- This log was last generated on Tue, 09 Aug 2022 15:52:41 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 17 Oct 2022 20:06:51 GMT and should not be manually modified.
4
+
5
+ ## 3.4.1
6
+ Mon, 17 Oct 2022 20:06:51 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.4.0
11
+ Thu, 13 Oct 2022 20:24:47 GMT
12
+
13
+ ### Updates
14
+
15
+ - Updated Node types declaration to support latest v16
16
+ - Add missing localization
17
+
18
+ ## 3.3.5
19
+ Tue, 27 Sep 2022 11:50:59 GMT
20
+
21
+ _Version update only_
22
+
23
+ ## 3.3.4
24
+ Thu, 08 Sep 2022 19:00:05 GMT
25
+
26
+ _Version update only_
27
+
28
+ ## 3.3.3
29
+ Tue, 06 Sep 2022 20:54:19 GMT
30
+
31
+ _Version update only_
32
+
33
+ ## 3.3.2
34
+ Thu, 01 Sep 2022 14:37:23 GMT
35
+
36
+ _Version update only_
37
+
38
+ ## 3.3.1
39
+ Fri, 26 Aug 2022 15:40:02 GMT
40
+
41
+ _Version update only_
42
+
43
+ ## 3.3.0
44
+ Thu, 18 Aug 2022 19:08:02 GMT
45
+
46
+ ### Updates
47
+
48
+ - upgrade mocha to version 10.0.0
49
+
50
+ ## 3.2.9
51
+ Fri, 26 Aug 2022 14:21:40 GMT
52
+
53
+ _Version update only_
4
54
 
5
55
  ## 3.2.8
6
56
  Tue, 09 Aug 2022 15:52:41 GMT
@@ -1,30 +1,30 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { BeEvent, IDisposable } from "@itwin/core-bentley";
5
- import { InternetConnectivityStatus } from "@itwin/core-common";
6
- /** @internal */
7
- export interface IConnectivityInformationProvider {
8
- readonly status: InternetConnectivityStatus;
9
- readonly onInternetConnectivityChanged: BeEvent<(args: {
10
- status: InternetConnectivityStatus;
11
- }) => void>;
12
- }
13
- /**
14
- * A helper that wraps connectivity-related APIs in NativeApp
15
- * to give a unified information for interested parties in presentation.
16
- *
17
- * @internal
18
- */
19
- export declare class ConnectivityInformationProvider implements IConnectivityInformationProvider, IDisposable {
20
- private _currentStatus?;
21
- private _unsubscribeFromInternetConnectivityChangedEvent?;
22
- readonly onInternetConnectivityChanged: BeEvent<(args: {
23
- status: InternetConnectivityStatus;
24
- }) => void>;
25
- constructor();
26
- dispose(): void;
27
- private onNativeAppInternetConnectivityChanged;
28
- get status(): InternetConnectivityStatus;
29
- }
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { BeEvent, IDisposable } from "@itwin/core-bentley";
5
+ import { InternetConnectivityStatus } from "@itwin/core-common";
6
+ /** @internal */
7
+ export interface IConnectivityInformationProvider {
8
+ readonly status: InternetConnectivityStatus;
9
+ readonly onInternetConnectivityChanged: BeEvent<(args: {
10
+ status: InternetConnectivityStatus;
11
+ }) => void>;
12
+ }
13
+ /**
14
+ * A helper that wraps connectivity-related APIs in NativeApp
15
+ * to give a unified information for interested parties in presentation.
16
+ *
17
+ * @internal
18
+ */
19
+ export declare class ConnectivityInformationProvider implements IConnectivityInformationProvider, IDisposable {
20
+ private _currentStatus?;
21
+ private _unsubscribeFromInternetConnectivityChangedEvent?;
22
+ readonly onInternetConnectivityChanged: BeEvent<(args: {
23
+ status: InternetConnectivityStatus;
24
+ }) => void>;
25
+ constructor();
26
+ dispose(): void;
27
+ private onNativeAppInternetConnectivityChanged;
28
+ get status(): InternetConnectivityStatus;
29
+ }
30
30
  //# sourceMappingURL=ConnectivityInformationProvider.d.ts.map
@@ -1,48 +1,48 @@
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
- /** @packageDocumentation
7
- * @module Core
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ConnectivityInformationProvider = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const core_common_1 = require("@itwin/core-common");
13
- const core_frontend_1 = require("@itwin/core-frontend");
14
- /**
15
- * A helper that wraps connectivity-related APIs in NativeApp
16
- * to give a unified information for interested parties in presentation.
17
- *
18
- * @internal
19
- */
20
- class ConnectivityInformationProvider {
21
- constructor() {
22
- this.onInternetConnectivityChanged = new core_bentley_1.BeEvent();
23
- // eslint-disable-next-line @typescript-eslint/naming-convention
24
- this.onNativeAppInternetConnectivityChanged = (status) => {
25
- if (this._currentStatus === status)
26
- return;
27
- this._currentStatus = status;
28
- this.onInternetConnectivityChanged.raiseEvent({ status });
29
- };
30
- if (core_frontend_1.NativeApp.isValid) {
31
- this._unsubscribeFromInternetConnectivityChangedEvent = core_frontend_1.NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
32
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
33
- core_frontend_1.NativeApp.checkInternetConnectivity().then((status) => {
34
- if (undefined === this._currentStatus)
35
- this._currentStatus = status;
36
- });
37
- }
38
- else {
39
- this._currentStatus = core_common_1.InternetConnectivityStatus.Online;
40
- }
41
- }
42
- dispose() {
43
- this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
44
- }
45
- get status() { var _a; return (_a = this._currentStatus) !== null && _a !== void 0 ? _a : core_common_1.InternetConnectivityStatus.Offline; }
46
- }
47
- exports.ConnectivityInformationProvider = ConnectivityInformationProvider;
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
+ /** @packageDocumentation
7
+ * @module Core
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ConnectivityInformationProvider = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const core_common_1 = require("@itwin/core-common");
13
+ const core_frontend_1 = require("@itwin/core-frontend");
14
+ /**
15
+ * A helper that wraps connectivity-related APIs in NativeApp
16
+ * to give a unified information for interested parties in presentation.
17
+ *
18
+ * @internal
19
+ */
20
+ class ConnectivityInformationProvider {
21
+ constructor() {
22
+ this.onInternetConnectivityChanged = new core_bentley_1.BeEvent();
23
+ // eslint-disable-next-line @typescript-eslint/naming-convention
24
+ this.onNativeAppInternetConnectivityChanged = (status) => {
25
+ if (this._currentStatus === status)
26
+ return;
27
+ this._currentStatus = status;
28
+ this.onInternetConnectivityChanged.raiseEvent({ status });
29
+ };
30
+ if (core_frontend_1.NativeApp.isValid) {
31
+ this._unsubscribeFromInternetConnectivityChangedEvent = core_frontend_1.NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
32
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
33
+ core_frontend_1.NativeApp.checkInternetConnectivity().then((status) => {
34
+ if (undefined === this._currentStatus)
35
+ this._currentStatus = status;
36
+ });
37
+ }
38
+ else {
39
+ this._currentStatus = core_common_1.InternetConnectivityStatus.Online;
40
+ }
41
+ }
42
+ dispose() {
43
+ this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
44
+ }
45
+ get status() { var _a; return (_a = this._currentStatus) !== null && _a !== void 0 ? _a : core_common_1.InternetConnectivityStatus.Offline; }
46
+ }
47
+ exports.ConnectivityInformationProvider = ConnectivityInformationProvider;
48
48
  //# sourceMappingURL=ConnectivityInformationProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,oDAAgE;AAChE,wDAAiD;AAQjD;;;;;GAKG;AACH,MAAa,+BAA+B;IAM1C;QAFgB,kCAA6B,GAAG,IAAI,sBAAO,EAA0D,CAAC;QAmBtH,gEAAgE;QACxD,2CAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;YACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM;gBAChC,OAAO;YAET,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;YAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5D,CAAC,CAAC;QAvBA,IAAI,yBAAS,CAAC,OAAO,EAAE;YACrB,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;oBACnC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;YACjC,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,cAAc,GAAG,wCAA0B,CAAC,MAAM,CAAC;SACzD;IACH,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAWD,IAAW,MAAM,aAAiC,OAAO,MAAA,IAAI,CAAC,cAAc,mCAAI,wCAA0B,CAAC,OAAO,CAAC,CAAC,CAAC;CACtH;AAjCD,0EAiCC","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\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 } 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 // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\r\n if (this._currentStatus === status)\r\n return;\r\n\r\n this._currentStatus = status;\r\n this.onInternetConnectivityChanged.raiseEvent({ status });\r\n };\r\n\r\n public get status(): InternetConnectivityStatus { return this._currentStatus ?? InternetConnectivityStatus.Offline; }\r\n}\r\n"]}
1
+ {"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,oDAAgE;AAChE,wDAAiD;AAQjD;;;;;GAKG;AACH,MAAa,+BAA+B;IAM1C;QAFgB,kCAA6B,GAAG,IAAI,sBAAO,EAA0D,CAAC;QAmBtH,gEAAgE;QACxD,2CAAsC,GAAG,CAAC,MAAkC,EAAE,EAAE;YACtF,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM;gBAChC,OAAO;YAET,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;YAC7B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5D,CAAC,CAAC;QAvBA,IAAI,yBAAS,CAAC,OAAO,EAAE;YACrB,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;oBACnC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;YACjC,CAAC,CAAC,CAAC;SACJ;aAAM;YACL,IAAI,CAAC,cAAc,GAAG,wCAA0B,CAAC,MAAM,CAAC;SACzD;IACH,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,gDAAgD,IAAI,IAAI,CAAC,gDAAgD,EAAE,CAAC;IACnH,CAAC;IAWD,IAAW,MAAM,aAAiC,OAAO,MAAA,IAAI,CAAC,cAAc,mCAAI,wCAA0B,CAAC,OAAO,CAAC,CAAC,CAAC;CACtH;AAjCD,0EAiCC","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, IDisposable } 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, IDisposable {\n\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 } else {\n this._currentStatus = InternetConnectivityStatus.Online;\n }\n }\n\n public dispose() {\n this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();\n }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private onNativeAppInternetConnectivityChanged = (status: InternetConnectivityStatus) => {\n if (this._currentStatus === status)\n return;\n\n this._currentStatus = status;\n this.onInternetConnectivityChanged.raiseEvent({ status });\n };\n\n public get status(): InternetConnectivityStatus { return this._currentStatus ?? InternetConnectivityStatus.Offline; }\n}\n"]}
@@ -1,13 +1,15 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { ClientDiagnostics, ClientDiagnosticsHandler } from "@itwin/presentation-common";
5
- /**
6
- * @alpha
7
- */
8
- export declare function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics): void;
9
- /**
10
- * @alpha
11
- */
12
- export declare function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]): (diagnostics: ClientDiagnostics) => void;
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { ClientDiagnostics, ClientDiagnosticsHandler } from "@itwin/presentation-common";
5
+ /**
6
+ * A function which logs messages to the console.
7
+ * @beta
8
+ */
9
+ export declare function consoleDiagnosticsHandler(diagnostics: ClientDiagnostics): void;
10
+ /**
11
+ * A function which calls all diagnostics handlers passed to it.
12
+ * @beta
13
+ */
14
+ export declare function createCombinedDiagnosticsHandler(handlers: ClientDiagnosticsHandler[]): (diagnostics: ClientDiagnostics) => void;
13
15
  //# sourceMappingURL=Diagnostics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Diagnostics.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,iBAAiB,EAAE,wBAAwB,EAC5C,MAAM,4BAA4B,CAAC;AAEpC;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,iBAAiB,QAWvE;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,wBAAwB,EAAE,iBAC9D,iBAAiB,UAGvC"}
1
+ {"version":3,"file":"Diagnostics.d.ts","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,iBAAiB,EAAE,wBAAwB,EAC5C,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,iBAAiB,QAWvE;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,wBAAwB,EAAE,iBAC9D,iBAAiB,UAGvC"}
@@ -1,60 +1,62 @@
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
- /** @packageDocumentation
7
- * @module Core
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.createCombinedDiagnosticsHandler = exports.consoleDiagnosticsHandler = void 0;
11
- const presentation_common_1 = require("@itwin/presentation-common");
12
- /**
13
- * @alpha
14
- */
15
- function consoleDiagnosticsHandler(diagnostics) {
16
- // eslint-disable-next-line no-console
17
- diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);
18
- diagnostics.logs && handleDiagnosticLogs(diagnostics.logs, (msg, stack) => {
19
- /* note: we're duplicating the message if it's logged at both editor and dev severity levels */
20
- const str = buildLogMessageString(msg, stack);
21
- if (msg.severity.editor)
22
- getConsoleLogFunc(msg.severity.editor)(str);
23
- if (msg.severity.dev)
24
- getConsoleLogFunc(msg.severity.dev)(str);
25
- });
26
- }
27
- exports.consoleDiagnosticsHandler = consoleDiagnosticsHandler;
28
- /**
29
- * @alpha
30
- */
31
- function createCombinedDiagnosticsHandler(handlers) {
32
- return (diagnostics) => {
33
- handlers.forEach((handler) => handler(diagnostics));
34
- };
35
- }
36
- exports.createCombinedDiagnosticsHandler = createCombinedDiagnosticsHandler;
37
- function handleDiagnosticLogs(logs, messageHandler, stack = []) {
38
- logs.forEach((log) => {
39
- if (presentation_common_1.DiagnosticsLogEntry.isMessage(log)) {
40
- messageHandler(log, stack);
41
- }
42
- else if (log.logs) {
43
- handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);
44
- }
45
- });
46
- }
47
- function buildLogMessageString(msg, _stack) {
48
- return msg.message;
49
- }
50
- function getConsoleLogFunc(severity) {
51
- switch (severity) {
52
- case "error": return console.error; // eslint-disable-line no-console
53
- case "warning": return console.warn; // eslint-disable-line no-console
54
- case "info":
55
- case "debug":
56
- case "trace":
57
- return console.log; // eslint-disable-line no-console
58
- }
59
- }
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
+ /** @packageDocumentation
7
+ * @module Core
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.createCombinedDiagnosticsHandler = exports.consoleDiagnosticsHandler = void 0;
11
+ const presentation_common_1 = require("@itwin/presentation-common");
12
+ /**
13
+ * A function which logs messages to the console.
14
+ * @beta
15
+ */
16
+ function consoleDiagnosticsHandler(diagnostics) {
17
+ // eslint-disable-next-line no-console
18
+ diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);
19
+ diagnostics.logs && handleDiagnosticLogs(diagnostics.logs, (msg, stack) => {
20
+ /* note: we're duplicating the message if it's logged at both editor and dev severity levels */
21
+ const str = buildLogMessageString(msg, stack);
22
+ if (msg.severity.editor)
23
+ getConsoleLogFunc(msg.severity.editor)(str);
24
+ if (msg.severity.dev)
25
+ getConsoleLogFunc(msg.severity.dev)(str);
26
+ });
27
+ }
28
+ exports.consoleDiagnosticsHandler = consoleDiagnosticsHandler;
29
+ /**
30
+ * A function which calls all diagnostics handlers passed to it.
31
+ * @beta
32
+ */
33
+ function createCombinedDiagnosticsHandler(handlers) {
34
+ return (diagnostics) => {
35
+ handlers.forEach((handler) => handler(diagnostics));
36
+ };
37
+ }
38
+ exports.createCombinedDiagnosticsHandler = createCombinedDiagnosticsHandler;
39
+ function handleDiagnosticLogs(logs, messageHandler, stack = []) {
40
+ logs.forEach((log) => {
41
+ if (presentation_common_1.DiagnosticsLogEntry.isMessage(log)) {
42
+ messageHandler(log, stack);
43
+ }
44
+ else if (log.logs) {
45
+ handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);
46
+ }
47
+ });
48
+ }
49
+ function buildLogMessageString(msg, _stack) {
50
+ return msg.message;
51
+ }
52
+ function getConsoleLogFunc(severity) {
53
+ switch (severity) {
54
+ case "error": return console.error; // eslint-disable-line no-console
55
+ case "warning": return console.warn; // eslint-disable-line no-console
56
+ case "info":
57
+ case "debug":
58
+ case "trace":
59
+ return console.log; // eslint-disable-line no-console
60
+ }
61
+ }
60
62
  //# sourceMappingURL=Diagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oEAEoC;AAEpC;;GAEG;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,IAAI,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,GAA0B,EAAE,KAA6B,EAAE,EAAE;QACvH,+FAA+F;QAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM;YACrB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG;YAClB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,8DAWC;AAED;;GAEG;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;AAJD,4EAIC;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;YACtC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC5B;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE;YACnB,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;SACjE;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;QAChB,KAAK,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACrE,KAAK,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACtE,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;KACxD;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, ClientDiagnosticsHandler, DiagnosticsLogEntry, DiagnosticsLoggerSeverity, DiagnosticsLogMessage, DiagnosticsScopeLogs,\r\n} from \"@itwin/presentation-common\";\r\n\r\n/**\r\n * @alpha\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 && 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 if (msg.severity.dev)\r\n getConsoleLogFunc(msg.severity.dev)(str);\r\n });\r\n}\r\n\r\n/**\r\n * @alpha\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\": return console.error; // eslint-disable-line no-console\r\n case \"warning\": 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;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oEAEoC;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,IAAI,oBAAoB,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,GAA0B,EAAE,KAA6B,EAAE,EAAE;QACvH,+FAA+F;QAC/F,MAAM,GAAG,GAAG,qBAAqB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM;YACrB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG;YAClB,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,8DAWC;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;AAJD,4EAIC;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;YACtC,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC5B;aAAM,IAAI,GAAG,CAAC,IAAI,EAAE;YACnB,oBAAoB,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;SACjE;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;QAChB,KAAK,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,iCAAiC;QACrE,KAAK,SAAS,CAAC,CAAC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,iCAAiC;QACtE,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,iCAAiC;KACxD;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, ClientDiagnosticsHandler, DiagnosticsLogEntry, DiagnosticsLoggerSeverity, DiagnosticsLogMessage, DiagnosticsScopeLogs,\n} from \"@itwin/presentation-common\";\n\n/**\n * A function which logs messages to the console.\n * @beta\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 && 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 if (msg.severity.dev)\n getConsoleLogFunc(msg.severity.dev)(str);\n });\n}\n\n/**\n * A function which calls all diagnostics handlers passed to it.\n * @beta\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\": return console.error; // eslint-disable-line no-console\n case \"warning\": 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,13 +1,13 @@
1
- /** @packageDocumentation
2
- * @module Logging
3
- */
4
- /**
5
- * Logger categories used by this package
6
- * @note All logger categories in this package start with the `presentation-frontend` prefix.
7
- * @see [Logger]($bentley)
8
- * @public
9
- */
10
- export declare enum PresentationFrontendLoggerCategory {
11
- Package = "presentation-frontend"
12
- }
1
+ /** @packageDocumentation
2
+ * @module Logging
3
+ */
4
+ /**
5
+ * Logger categories used by this package
6
+ * @note All logger categories in this package start with the `presentation-frontend` prefix.
7
+ * @see [Logger]($bentley)
8
+ * @public
9
+ */
10
+ export declare enum PresentationFrontendLoggerCategory {
11
+ Package = "presentation-frontend"
12
+ }
13
13
  //# sourceMappingURL=FrontendLoggerCategory.d.ts.map
@@ -1,21 +1,21 @@
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
- /** @packageDocumentation
7
- * @module Logging
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PresentationFrontendLoggerCategory = void 0;
11
- /**
12
- * Logger categories used by this package
13
- * @note All logger categories in this package start with the `presentation-frontend` prefix.
14
- * @see [Logger]($bentley)
15
- * @public
16
- */
17
- var PresentationFrontendLoggerCategory;
18
- (function (PresentationFrontendLoggerCategory) {
19
- PresentationFrontendLoggerCategory["Package"] = "presentation-frontend";
20
- })(PresentationFrontendLoggerCategory = exports.PresentationFrontendLoggerCategory || (exports.PresentationFrontendLoggerCategory = {}));
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
+ /** @packageDocumentation
7
+ * @module Logging
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PresentationFrontendLoggerCategory = void 0;
11
+ /**
12
+ * Logger categories used by this package
13
+ * @note All logger categories in this package start with the `presentation-frontend` prefix.
14
+ * @see [Logger]($bentley)
15
+ * @public
16
+ */
17
+ var PresentationFrontendLoggerCategory;
18
+ (function (PresentationFrontendLoggerCategory) {
19
+ PresentationFrontendLoggerCategory["Package"] = "presentation-frontend";
20
+ })(PresentationFrontendLoggerCategory = exports.PresentationFrontendLoggerCategory || (exports.PresentationFrontendLoggerCategory = {}));
21
21
  //# sourceMappingURL=FrontendLoggerCategory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,GAAlC,0CAAkC,KAAlC,0CAAkC,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;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,GAAlC,0CAAkC,KAAlC,0CAAkC,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"]}
@@ -1,11 +1,11 @@
1
- import { NodeKey, RulesetVariable, SetRulesetVariableParams, UnsetRulesetVariableParams, UpdateHierarchyStateParams } from "@itwin/presentation-common";
2
- /** @internal */
3
- export declare class IpcRequestsHandler {
4
- readonly clientId: string;
5
- constructor(clientId: string);
6
- private call;
7
- setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, "clientId">): Promise<void>;
8
- unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, "clientId">): Promise<void>;
9
- updateHierarchyState(params: Omit<UpdateHierarchyStateParams<NodeKey>, "clientId">): Promise<void>;
10
- }
1
+ import { NodeKey, RulesetVariable, SetRulesetVariableParams, UnsetRulesetVariableParams, UpdateHierarchyStateParams } from "@itwin/presentation-common";
2
+ /** @internal */
3
+ export declare class IpcRequestsHandler {
4
+ readonly clientId: string;
5
+ constructor(clientId: string);
6
+ private call;
7
+ setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, "clientId">): Promise<void>;
8
+ unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, "clientId">): Promise<void>;
9
+ updateHierarchyState(params: Omit<UpdateHierarchyStateParams<NodeKey>, "clientId">): Promise<void>;
10
+ }
11
11
  //# sourceMappingURL=IpcRequestsHandler.d.ts.map
@@ -1,43 +1,43 @@
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.IpcRequestsHandler = void 0;
8
- const core_frontend_1 = require("@itwin/core-frontend");
9
- const presentation_common_1 = require("@itwin/presentation-common");
10
- /** @internal */
11
- class IpcRequestsHandler {
12
- constructor(clientId) {
13
- this.clientId = clientId;
14
- }
15
- async call(methodName, ...args) {
16
- return core_frontend_1.IpcApp.callIpcChannel(presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);
17
- }
18
- async setRulesetVariable(params) {
19
- const jsonParams = {
20
- ...params,
21
- clientId: this.clientId,
22
- variable: presentation_common_1.RulesetVariable.toJSON(params.variable),
23
- };
24
- return this.call("setRulesetVariable", jsonParams);
25
- }
26
- async unsetRulesetVariable(params) {
27
- const jsonParams = {
28
- ...params,
29
- clientId: this.clientId,
30
- };
31
- return this.call("unsetRulesetVariable", jsonParams);
32
- }
33
- async updateHierarchyState(params) {
34
- const jsonParams = {
35
- ...params,
36
- clientId: this.clientId,
37
- nodeKeys: params.nodeKeys.map(presentation_common_1.NodeKey.toJSON),
38
- };
39
- return this.call("updateHierarchyState", jsonParams);
40
- }
41
- }
42
- exports.IpcRequestsHandler = IpcRequestsHandler;
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.IpcRequestsHandler = void 0;
8
+ const core_frontend_1 = require("@itwin/core-frontend");
9
+ const presentation_common_1 = require("@itwin/presentation-common");
10
+ /** @internal */
11
+ class IpcRequestsHandler {
12
+ constructor(clientId) {
13
+ this.clientId = clientId;
14
+ }
15
+ async call(methodName, ...args) {
16
+ return core_frontend_1.IpcApp.callIpcChannel(presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);
17
+ }
18
+ async setRulesetVariable(params) {
19
+ const jsonParams = {
20
+ ...params,
21
+ clientId: this.clientId,
22
+ variable: presentation_common_1.RulesetVariable.toJSON(params.variable),
23
+ };
24
+ return this.call("setRulesetVariable", jsonParams);
25
+ }
26
+ async unsetRulesetVariable(params) {
27
+ const jsonParams = {
28
+ ...params,
29
+ clientId: this.clientId,
30
+ };
31
+ return this.call("unsetRulesetVariable", jsonParams);
32
+ }
33
+ async updateHierarchyState(params) {
34
+ const jsonParams = {
35
+ ...params,
36
+ clientId: this.clientId,
37
+ nodeKeys: params.nodeKeys.map(presentation_common_1.NodeKey.toJSON),
38
+ };
39
+ return this.call("updateHierarchyState", jsonParams);
40
+ }
41
+ }
42
+ exports.IpcRequestsHandler = IpcRequestsHandler;
43
43
  //# sourceMappingURL=IpcRequestsHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,wDAA8C;AAC9C,oEAGoC;AAEpC,gBAAgB;AAChB,MAAa,kBAAkB;IAG7B,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEO,KAAK,CAAC,IAAI,CAAqD,UAAa,EAAE,GAAG,IAA6C;QACpI,OAAO,sBAAM,CAAC,cAAc,CAAC,mDAA6B,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;IACnF,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,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;IACrD,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,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAA6D;QAC7F,MAAM,UAAU,GAA4C;YAC1D,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,6BAAO,CAAC,MAAM,CAAC;SAC9C,CAAC;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;CACF;AApCD,gDAoCC","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 { AsyncMethodsOf, PromiseReturnType } from \"@itwin/core-bentley\";\r\nimport { IpcApp } from \"@itwin/core-frontend\";\r\nimport {\r\n NodeKey, NodeKeyJSON, PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface, RulesetVariable, RulesetVariableJSON, SetRulesetVariableParams,\r\n UnsetRulesetVariableParams, UpdateHierarchyStateParams,\r\n} from \"@itwin/presentation-common\";\r\n\r\n/** @internal */\r\nexport class IpcRequestsHandler {\r\n public readonly clientId: string;\r\n\r\n constructor(clientId: string) {\r\n this.clientId = clientId;\r\n }\r\n\r\n private async call<T extends AsyncMethodsOf<PresentationIpcInterface>>(methodName: T, ...args: Parameters<PresentationIpcInterface[T]>): Promise<PromiseReturnType<PresentationIpcInterface[T]>> {\r\n return IpcApp.callIpcChannel(PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);\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.call(\"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.call(\"unsetRulesetVariable\", jsonParams);\r\n }\r\n\r\n public async updateHierarchyState(params: Omit<UpdateHierarchyStateParams<NodeKey>, \"clientId\">) {\r\n const jsonParams: UpdateHierarchyStateParams<NodeKeyJSON> = {\r\n ...params,\r\n clientId: this.clientId,\r\n nodeKeys: params.nodeKeys.map(NodeKey.toJSON),\r\n };\r\n return this.call(\"updateHierarchyState\", jsonParams);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IpcRequestsHandler.js","sourceRoot":"","sources":["../../../src/presentation-frontend/IpcRequestsHandler.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,wDAA8C;AAC9C,oEAGoC;AAEpC,gBAAgB;AAChB,MAAa,kBAAkB;IAG7B,YAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEO,KAAK,CAAC,IAAI,CAAqD,UAAa,EAAE,GAAG,IAA6C;QACpI,OAAO,sBAAM,CAAC,cAAc,CAAC,mDAA6B,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC;IACnF,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,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC;IACrD,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,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAA6D;QAC7F,MAAM,UAAU,GAA4C;YAC1D,GAAG,MAAM;YACT,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,6BAAO,CAAC,MAAM,CAAC;SAC9C,CAAC;QACF,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;CACF;AApCD,gDAoCC","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 { AsyncMethodsOf, PromiseReturnType } from \"@itwin/core-bentley\";\nimport { IpcApp } from \"@itwin/core-frontend\";\nimport {\n NodeKey, NodeKeyJSON, PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface, RulesetVariable, RulesetVariableJSON, SetRulesetVariableParams,\n UnsetRulesetVariableParams, UpdateHierarchyStateParams,\n} from \"@itwin/presentation-common\";\n\n/** @internal */\nexport class IpcRequestsHandler {\n public readonly clientId: string;\n\n constructor(clientId: string) {\n this.clientId = clientId;\n }\n\n private async call<T extends AsyncMethodsOf<PresentationIpcInterface>>(methodName: T, ...args: Parameters<PresentationIpcInterface[T]>): Promise<PromiseReturnType<PresentationIpcInterface[T]>> {\n return IpcApp.callIpcChannel(PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);\n }\n\n public async setRulesetVariable(params: Omit<SetRulesetVariableParams<RulesetVariable>, \"clientId\">) {\n const jsonParams: SetRulesetVariableParams<RulesetVariableJSON> = {\n ...params,\n clientId: this.clientId,\n variable: RulesetVariable.toJSON(params.variable),\n };\n return this.call(\"setRulesetVariable\", jsonParams);\n }\n\n public async unsetRulesetVariable(params: Omit<UnsetRulesetVariableParams, \"clientId\">) {\n const jsonParams: UnsetRulesetVariableParams = {\n ...params,\n clientId: this.clientId,\n };\n return this.call(\"unsetRulesetVariable\", jsonParams);\n }\n\n public async updateHierarchyState(params: Omit<UpdateHierarchyStateParams<NodeKey>, \"clientId\">) {\n const jsonParams: UpdateHierarchyStateParams<NodeKeyJSON> = {\n ...params,\n clientId: this.clientId,\n nodeKeys: params.nodeKeys.map(NodeKey.toJSON),\n };\n return this.call(\"updateHierarchyState\", jsonParams);\n }\n}\n"]}