@itwin/presentation-frontend 4.0.0-dev.21 → 4.0.0-dev.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +47 -47
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/Diagnostics.d.ts +14 -14
- package/lib/cjs/presentation-frontend/Diagnostics.js +61 -61
- package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js +20 -20
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +41 -41
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +10 -10
- package/lib/cjs/presentation-frontend/LocalizationHelper.js +31 -31
- package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/Presentation.d.ts +73 -73
- package/lib/cjs/presentation-frontend/Presentation.js +160 -160
- package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts +186 -186
- package/lib/cjs/presentation-frontend/PresentationManager.js +436 -436
- package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetManager.d.ts +63 -63
- package/lib/cjs/presentation-frontend/RulesetManager.js +85 -85
- package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +195 -195
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/StateTracker.d.ts +38 -38
- package/lib/cjs/presentation-frontend/StateTracker.js +129 -129
- package/lib/cjs/presentation-frontend/StateTracker.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +525 -525
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +293 -293
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteRules.json +172 -172
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +97 -97
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +9 -9
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +33 -33
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +108 -108
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +17 -17
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +40 -40
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +139 -139
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js +414 -414
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +91 -91
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend.d.ts +34 -34
- package/lib/cjs/presentation-frontend.js +50 -50
- package/lib/cjs/presentation-frontend.js.map +1 -1
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +43 -43
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/Diagnostics.d.ts +14 -14
- package/lib/esm/presentation-frontend/Diagnostics.js +56 -56
- package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js +17 -17
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js +37 -37
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +10 -10
- package/lib/esm/presentation-frontend/LocalizationHelper.js +27 -27
- package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/Presentation.d.ts +73 -73
- package/lib/esm/presentation-frontend/Presentation.js +156 -156
- package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.d.ts +186 -186
- package/lib/esm/presentation-frontend/PresentationManager.js +431 -431
- package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetManager.d.ts +63 -63
- package/lib/esm/presentation-frontend/RulesetManager.js +81 -81
- package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js +191 -191
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/StateTracker.d.ts +38 -38
- package/lib/esm/presentation-frontend/StateTracker.js +125 -125
- package/lib/esm/presentation-frontend/StateTracker.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +519 -519
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +285 -285
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteRules.json +172 -172
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +93 -93
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +8 -8
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +29 -29
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js +104 -104
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +17 -17
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js +36 -36
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +139 -139
- package/lib/esm/presentation-frontend/selection/SelectionManager.js +409 -409
- package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +85 -85
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/esm/presentation-frontend.d.ts +34 -34
- package/lib/esm/presentation-frontend.js +38 -38
- package/lib/esm/presentation-frontend.js.map +1 -1
- package/package.json +14 -14
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
/*---------------------------------------------------------------------------------------------
|
|
14
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
15
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
|
-
*--------------------------------------------------------------------------------------------*/
|
|
17
|
-
/**
|
|
18
|
-
* @module Core
|
|
19
|
-
*
|
|
20
|
-
* @docs-group-description Core
|
|
21
|
-
* Common types used for retrieving presentation data from iModels.
|
|
22
|
-
*/
|
|
23
|
-
__exportStar(require("./presentation-frontend/Presentation"), exports);
|
|
24
|
-
__exportStar(require("./presentation-frontend/PresentationManager"), exports);
|
|
25
|
-
__exportStar(require("./presentation-frontend/RulesetManager"), exports);
|
|
26
|
-
__exportStar(require("./presentation-frontend/RulesetVariablesManager"), exports);
|
|
27
|
-
__exportStar(require("./presentation-frontend/favorite-properties/FavoritePropertiesManager"), exports);
|
|
28
|
-
__exportStar(require("./presentation-frontend/favorite-properties/FavoritePropertiesStorage"), exports);
|
|
29
|
-
__exportStar(require("./presentation-frontend/StateTracker"), exports);
|
|
30
|
-
__exportStar(require("./presentation-frontend/Diagnostics"), exports);
|
|
31
|
-
/**
|
|
32
|
-
* @module Logging
|
|
33
|
-
*
|
|
34
|
-
* @docs-group-description Logging
|
|
35
|
-
* Types related to logging in this package.
|
|
36
|
-
*/
|
|
37
|
-
__exportStar(require("./presentation-frontend/FrontendLoggerCategory"), exports);
|
|
38
|
-
/**
|
|
39
|
-
* @module UnifiedSelection
|
|
40
|
-
*
|
|
41
|
-
* @docs-group-description UnifiedSelection
|
|
42
|
-
* Types related to [unified selection]($docs/presentation/unified-selection/index.md).
|
|
43
|
-
*/
|
|
44
|
-
__exportStar(require("./presentation-frontend/selection/SelectionChangeEvent"), exports);
|
|
45
|
-
__exportStar(require("./presentation-frontend/selection/ISelectionProvider"), exports);
|
|
46
|
-
__exportStar(require("./presentation-frontend/selection/SelectionManager"), exports);
|
|
47
|
-
__exportStar(require("./presentation-frontend/selection/SelectionScopesManager"), exports);
|
|
48
|
-
__exportStar(require("./presentation-frontend/selection/SelectionHandler"), exports);
|
|
49
|
-
__exportStar(require("./presentation-frontend/selection/HiliteSetProvider"), exports);
|
|
50
|
-
__exportStar(require("./presentation-frontend/selection/SelectionHelper"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
/*---------------------------------------------------------------------------------------------
|
|
14
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
15
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
|
+
*--------------------------------------------------------------------------------------------*/
|
|
17
|
+
/**
|
|
18
|
+
* @module Core
|
|
19
|
+
*
|
|
20
|
+
* @docs-group-description Core
|
|
21
|
+
* Common types used for retrieving presentation data from iModels.
|
|
22
|
+
*/
|
|
23
|
+
__exportStar(require("./presentation-frontend/Presentation"), exports);
|
|
24
|
+
__exportStar(require("./presentation-frontend/PresentationManager"), exports);
|
|
25
|
+
__exportStar(require("./presentation-frontend/RulesetManager"), exports);
|
|
26
|
+
__exportStar(require("./presentation-frontend/RulesetVariablesManager"), exports);
|
|
27
|
+
__exportStar(require("./presentation-frontend/favorite-properties/FavoritePropertiesManager"), exports);
|
|
28
|
+
__exportStar(require("./presentation-frontend/favorite-properties/FavoritePropertiesStorage"), exports);
|
|
29
|
+
__exportStar(require("./presentation-frontend/StateTracker"), exports);
|
|
30
|
+
__exportStar(require("./presentation-frontend/Diagnostics"), exports);
|
|
31
|
+
/**
|
|
32
|
+
* @module Logging
|
|
33
|
+
*
|
|
34
|
+
* @docs-group-description Logging
|
|
35
|
+
* Types related to logging in this package.
|
|
36
|
+
*/
|
|
37
|
+
__exportStar(require("./presentation-frontend/FrontendLoggerCategory"), exports);
|
|
38
|
+
/**
|
|
39
|
+
* @module UnifiedSelection
|
|
40
|
+
*
|
|
41
|
+
* @docs-group-description UnifiedSelection
|
|
42
|
+
* Types related to [unified selection]($docs/presentation/unified-selection/index.md).
|
|
43
|
+
*/
|
|
44
|
+
__exportStar(require("./presentation-frontend/selection/SelectionChangeEvent"), exports);
|
|
45
|
+
__exportStar(require("./presentation-frontend/selection/ISelectionProvider"), exports);
|
|
46
|
+
__exportStar(require("./presentation-frontend/selection/SelectionManager"), exports);
|
|
47
|
+
__exportStar(require("./presentation-frontend/selection/SelectionScopesManager"), exports);
|
|
48
|
+
__exportStar(require("./presentation-frontend/selection/SelectionHandler"), exports);
|
|
49
|
+
__exportStar(require("./presentation-frontend/selection/HiliteSetProvider"), exports);
|
|
50
|
+
__exportStar(require("./presentation-frontend/selection/SelectionHelper"), exports);
|
|
51
51
|
//# sourceMappingURL=presentation-frontend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-frontend.js","sourceRoot":"","sources":["../../src/presentation-frontend.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,uEAAqD;AACrD,8EAA4D;AAC5D,yEAAuD;AACvD,kFAAgE;AAChE,wGAAsF;AACtF,wGAAsF;AACtF,uEAAqD;AACrD,sEAAoD;AAEpD;;;;;GAKG;AACH,iFAA+D;AAE/D;;;;;GAKG;AACH,yFAAuE;AACvE,uFAAqE;AACrE,qFAAmE;AACnE,2FAAyE;AACzE,qFAAmE;AACnE,sFAAoE;AACpE,oFAAkE","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"presentation-frontend.js","sourceRoot":"","sources":["../../src/presentation-frontend.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,uEAAqD;AACrD,8EAA4D;AAC5D,yEAAuD;AACvD,kFAAgE;AAChE,wGAAsF;AACtF,wGAAsF;AACtF,uEAAqD;AACrD,sEAAoD;AAEpD;;;;;GAKG;AACH,iFAA+D;AAE/D;;;;;GAKG;AACH,yFAAuE;AACvE,uFAAqE;AACrE,qFAAmE;AACnE,2FAAyE;AACzE,qFAAmE;AACnE,sFAAoE;AACpE,oFAAkE","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/**\n * @module Core\n *\n * @docs-group-description Core\n * Common types used for retrieving presentation data from iModels.\n */\nexport * from \"./presentation-frontend/Presentation\";\nexport * from \"./presentation-frontend/PresentationManager\";\nexport * from \"./presentation-frontend/RulesetManager\";\nexport * from \"./presentation-frontend/RulesetVariablesManager\";\nexport * from \"./presentation-frontend/favorite-properties/FavoritePropertiesManager\";\nexport * from \"./presentation-frontend/favorite-properties/FavoritePropertiesStorage\";\nexport * from \"./presentation-frontend/StateTracker\";\nexport * from \"./presentation-frontend/Diagnostics\";\n\n/**\n * @module Logging\n *\n * @docs-group-description Logging\n * Types related to logging in this package.\n */\nexport * from \"./presentation-frontend/FrontendLoggerCategory\";\n\n/**\n * @module UnifiedSelection\n *\n * @docs-group-description UnifiedSelection\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\n */\nexport * from \"./presentation-frontend/selection/SelectionChangeEvent\";\nexport * from \"./presentation-frontend/selection/ISelectionProvider\";\nexport * from \"./presentation-frontend/selection/SelectionManager\";\nexport * from \"./presentation-frontend/selection/SelectionScopesManager\";\nexport * from \"./presentation-frontend/selection/SelectionHandler\";\nexport * from \"./presentation-frontend/selection/HiliteSetProvider\";\nexport * from \"./presentation-frontend/selection/SelectionHelper\";\n"]}
|
|
@@ -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,44 +1,44 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Core
|
|
7
|
-
*/
|
|
8
|
-
import { BeEvent } from "@itwin/core-bentley";
|
|
9
|
-
import { InternetConnectivityStatus } from "@itwin/core-common";
|
|
10
|
-
import { NativeApp } from "@itwin/core-frontend";
|
|
11
|
-
/**
|
|
12
|
-
* A helper that wraps connectivity-related APIs in NativeApp
|
|
13
|
-
* to give a unified information for interested parties in presentation.
|
|
14
|
-
*
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export class ConnectivityInformationProvider {
|
|
18
|
-
constructor() {
|
|
19
|
-
this.onInternetConnectivityChanged = new BeEvent();
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
21
|
-
this.onNativeAppInternetConnectivityChanged = (status) => {
|
|
22
|
-
if (this._currentStatus === status)
|
|
23
|
-
return;
|
|
24
|
-
this._currentStatus = status;
|
|
25
|
-
this.onInternetConnectivityChanged.raiseEvent({ status });
|
|
26
|
-
};
|
|
27
|
-
if (NativeApp.isValid) {
|
|
28
|
-
this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
30
|
-
NativeApp.checkInternetConnectivity().then((status) => {
|
|
31
|
-
if (undefined === this._currentStatus)
|
|
32
|
-
this._currentStatus = status;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this._currentStatus = InternetConnectivityStatus.Online;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
dispose() {
|
|
40
|
-
this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
|
|
41
|
-
}
|
|
42
|
-
get status() { var _a; return (_a = this._currentStatus) !== null && _a !== void 0 ? _a : InternetConnectivityStatus.Offline; }
|
|
43
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Core
|
|
7
|
+
*/
|
|
8
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
9
|
+
import { InternetConnectivityStatus } from "@itwin/core-common";
|
|
10
|
+
import { NativeApp } from "@itwin/core-frontend";
|
|
11
|
+
/**
|
|
12
|
+
* A helper that wraps connectivity-related APIs in NativeApp
|
|
13
|
+
* to give a unified information for interested parties in presentation.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export class ConnectivityInformationProvider {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.onInternetConnectivityChanged = new BeEvent();
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
21
|
+
this.onNativeAppInternetConnectivityChanged = (status) => {
|
|
22
|
+
if (this._currentStatus === status)
|
|
23
|
+
return;
|
|
24
|
+
this._currentStatus = status;
|
|
25
|
+
this.onInternetConnectivityChanged.raiseEvent({ status });
|
|
26
|
+
};
|
|
27
|
+
if (NativeApp.isValid) {
|
|
28
|
+
this._unsubscribeFromInternetConnectivityChangedEvent = NativeApp.onInternetConnectivityChanged.addListener(this.onNativeAppInternetConnectivityChanged);
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
30
|
+
NativeApp.checkInternetConnectivity().then((status) => {
|
|
31
|
+
if (undefined === this._currentStatus)
|
|
32
|
+
this._currentStatus = status;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this._currentStatus = InternetConnectivityStatus.Online;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
dispose() {
|
|
40
|
+
this._unsubscribeFromInternetConnectivityChangedEvent && this._unsubscribeFromInternetConnectivityChangedEvent();
|
|
41
|
+
}
|
|
42
|
+
get status() { var _a; return (_a = this._currentStatus) !== null && _a !== void 0 ? _a : InternetConnectivityStatus.Offline; }
|
|
43
|
+
}
|
|
44
44
|
//# 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,OAAO,EAAE,OAAO,EAAe,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQjD;;;;;GAKG;AACH,MAAM,OAAO,+BAA+B;IAM1C;QAFgB,kCAA6B,GAAG,IAAI,OAAO,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,SAAS,CAAC,OAAO,EAAE;YACrB,IAAI,CAAC,gDAAgD,GAAG,SAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,SAAS,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,0BAA0B,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,0BAA0B,CAAC,OAAO,CAAC,CAAC,CAAC;CACtH","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"ConnectivityInformationProvider.js","sourceRoot":"","sources":["../../../src/presentation-frontend/ConnectivityInformationProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAe,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQjD;;;;;GAKG;AACH,MAAM,OAAO,+BAA+B;IAM1C;QAFgB,kCAA6B,GAAG,IAAI,OAAO,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,SAAS,CAAC,OAAO,EAAE;YACrB,IAAI,CAAC,gDAAgD,GAAG,SAAS,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;YACzJ,mEAAmE;YACnE,SAAS,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,0BAA0B,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,0BAA0B,CAAC,OAAO,CAAC,CAAC,CAAC;CACtH","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,15 +1,15 @@
|
|
|
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;
|
|
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;
|
|
15
15
|
//# sourceMappingURL=Diagnostics.d.ts.map
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Core
|
|
7
|
-
*/
|
|
8
|
-
import { DiagnosticsLogEntry, } from "@itwin/presentation-common";
|
|
9
|
-
/**
|
|
10
|
-
* A function which logs messages to the console.
|
|
11
|
-
* @beta
|
|
12
|
-
*/
|
|
13
|
-
export function consoleDiagnosticsHandler(diagnostics) {
|
|
14
|
-
// eslint-disable-next-line no-console
|
|
15
|
-
diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);
|
|
16
|
-
diagnostics.logs && handleDiagnosticLogs(diagnostics.logs, (msg, stack) => {
|
|
17
|
-
/* note: we're duplicating the message if it's logged at both editor and dev severity levels */
|
|
18
|
-
const str = buildLogMessageString(msg, stack);
|
|
19
|
-
if (msg.severity.editor)
|
|
20
|
-
getConsoleLogFunc(msg.severity.editor)(str);
|
|
21
|
-
if (msg.severity.dev)
|
|
22
|
-
getConsoleLogFunc(msg.severity.dev)(str);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A function which calls all diagnostics handlers passed to it.
|
|
27
|
-
* @beta
|
|
28
|
-
*/
|
|
29
|
-
export function createCombinedDiagnosticsHandler(handlers) {
|
|
30
|
-
return (diagnostics) => {
|
|
31
|
-
handlers.forEach((handler) => handler(diagnostics));
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function handleDiagnosticLogs(logs, messageHandler, stack = []) {
|
|
35
|
-
logs.forEach((log) => {
|
|
36
|
-
if (DiagnosticsLogEntry.isMessage(log)) {
|
|
37
|
-
messageHandler(log, stack);
|
|
38
|
-
}
|
|
39
|
-
else if (log.logs) {
|
|
40
|
-
handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function buildLogMessageString(msg, _stack) {
|
|
45
|
-
return msg.message;
|
|
46
|
-
}
|
|
47
|
-
function getConsoleLogFunc(severity) {
|
|
48
|
-
switch (severity) {
|
|
49
|
-
case "error": return console.error; // eslint-disable-line no-console
|
|
50
|
-
case "warning": return console.warn; // eslint-disable-line no-console
|
|
51
|
-
case "info":
|
|
52
|
-
case "debug":
|
|
53
|
-
case "trace":
|
|
54
|
-
return console.log; // eslint-disable-line no-console
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Core
|
|
7
|
+
*/
|
|
8
|
+
import { DiagnosticsLogEntry, } from "@itwin/presentation-common";
|
|
9
|
+
/**
|
|
10
|
+
* A function which logs messages to the console.
|
|
11
|
+
* @beta
|
|
12
|
+
*/
|
|
13
|
+
export function consoleDiagnosticsHandler(diagnostics) {
|
|
14
|
+
// eslint-disable-next-line no-console
|
|
15
|
+
diagnostics.backendVersion && console.log(`Backend version: ${diagnostics.backendVersion}`);
|
|
16
|
+
diagnostics.logs && handleDiagnosticLogs(diagnostics.logs, (msg, stack) => {
|
|
17
|
+
/* note: we're duplicating the message if it's logged at both editor and dev severity levels */
|
|
18
|
+
const str = buildLogMessageString(msg, stack);
|
|
19
|
+
if (msg.severity.editor)
|
|
20
|
+
getConsoleLogFunc(msg.severity.editor)(str);
|
|
21
|
+
if (msg.severity.dev)
|
|
22
|
+
getConsoleLogFunc(msg.severity.dev)(str);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A function which calls all diagnostics handlers passed to it.
|
|
27
|
+
* @beta
|
|
28
|
+
*/
|
|
29
|
+
export function createCombinedDiagnosticsHandler(handlers) {
|
|
30
|
+
return (diagnostics) => {
|
|
31
|
+
handlers.forEach((handler) => handler(diagnostics));
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function handleDiagnosticLogs(logs, messageHandler, stack = []) {
|
|
35
|
+
logs.forEach((log) => {
|
|
36
|
+
if (DiagnosticsLogEntry.isMessage(log)) {
|
|
37
|
+
messageHandler(log, stack);
|
|
38
|
+
}
|
|
39
|
+
else if (log.logs) {
|
|
40
|
+
handleDiagnosticLogs(log.logs, messageHandler, [...stack, log]);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function buildLogMessageString(msg, _stack) {
|
|
45
|
+
return msg.message;
|
|
46
|
+
}
|
|
47
|
+
function getConsoleLogFunc(severity) {
|
|
48
|
+
switch (severity) {
|
|
49
|
+
case "error": return console.error; // eslint-disable-line no-console
|
|
50
|
+
case "warning": return console.warn; // eslint-disable-line no-console
|
|
51
|
+
case "info":
|
|
52
|
+
case "debug":
|
|
53
|
+
case "trace":
|
|
54
|
+
return console.log; // eslint-disable-line no-console
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
57
|
//# 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,OAAO,EACwC,mBAAmB,GACjE,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,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;AAED;;;GAGG;AACH,MAAM,UAAU,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,mBAAmB,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":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"Diagnostics.js","sourceRoot":"","sources":["../../../src/presentation-frontend/Diagnostics.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EACwC,mBAAmB,GACjE,MAAM,4BAA4B,CAAC;AAEpC;;;GAGG;AACH,MAAM,UAAU,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;AAED;;;GAGG;AACH,MAAM,UAAU,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,mBAAmB,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,18 +1,18 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Logging
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Logger categories used by this package
|
|
10
|
-
* @note All logger categories in this package start with the `presentation-frontend` prefix.
|
|
11
|
-
* @see [Logger]($bentley)
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export var PresentationFrontendLoggerCategory;
|
|
15
|
-
(function (PresentationFrontendLoggerCategory) {
|
|
16
|
-
PresentationFrontendLoggerCategory["Package"] = "presentation-frontend";
|
|
17
|
-
})(PresentationFrontendLoggerCategory || (PresentationFrontendLoggerCategory = {}));
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Logging
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Logger categories used by this package
|
|
10
|
+
* @note All logger categories in this package start with the `presentation-frontend` prefix.
|
|
11
|
+
* @see [Logger]($bentley)
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export var PresentationFrontendLoggerCategory;
|
|
15
|
+
(function (PresentationFrontendLoggerCategory) {
|
|
16
|
+
PresentationFrontendLoggerCategory["Package"] = "presentation-frontend";
|
|
17
|
+
})(PresentationFrontendLoggerCategory || (PresentationFrontendLoggerCategory = {}));
|
|
18
18
|
//# 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,MAAM,CAAN,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,KAAlC,kCAAkC,QAE7C","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"FrontendLoggerCategory.js","sourceRoot":"","sources":["../../../src/presentation-frontend/FrontendLoggerCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,kCAEX;AAFD,WAAY,kCAAkC;IAC5C,uEAAiC,CAAA;AACnC,CAAC,EAFW,kCAAkC,KAAlC,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"]}
|
|
@@ -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,38 +1,38 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { IpcApp } from "@itwin/core-frontend";
|
|
6
|
-
import { PRESENTATION_IPC_CHANNEL_NAME, RulesetVariable, } from "@itwin/presentation-common";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export class IpcRequestsHandler {
|
|
9
|
-
constructor(clientId) {
|
|
10
|
-
this.clientId = clientId;
|
|
11
|
-
}
|
|
12
|
-
async call(methodName, ...args) {
|
|
13
|
-
return IpcApp.callIpcChannel(PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);
|
|
14
|
-
}
|
|
15
|
-
async setRulesetVariable(params) {
|
|
16
|
-
const jsonParams = {
|
|
17
|
-
...params,
|
|
18
|
-
clientId: this.clientId,
|
|
19
|
-
variable: RulesetVariable.toJSON(params.variable),
|
|
20
|
-
};
|
|
21
|
-
return this.call("setRulesetVariable", jsonParams);
|
|
22
|
-
}
|
|
23
|
-
async unsetRulesetVariable(params) {
|
|
24
|
-
const jsonParams = {
|
|
25
|
-
...params,
|
|
26
|
-
clientId: this.clientId,
|
|
27
|
-
};
|
|
28
|
-
return this.call("unsetRulesetVariable", jsonParams);
|
|
29
|
-
}
|
|
30
|
-
async updateHierarchyState(params) {
|
|
31
|
-
const jsonParams = {
|
|
32
|
-
...params,
|
|
33
|
-
clientId: this.clientId,
|
|
34
|
-
};
|
|
35
|
-
return this.call("updateHierarchyState", jsonParams);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { IpcApp } from "@itwin/core-frontend";
|
|
6
|
+
import { PRESENTATION_IPC_CHANNEL_NAME, RulesetVariable, } from "@itwin/presentation-common";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export class IpcRequestsHandler {
|
|
9
|
+
constructor(clientId) {
|
|
10
|
+
this.clientId = clientId;
|
|
11
|
+
}
|
|
12
|
+
async call(methodName, ...args) {
|
|
13
|
+
return IpcApp.callIpcChannel(PRESENTATION_IPC_CHANNEL_NAME, methodName, ...args);
|
|
14
|
+
}
|
|
15
|
+
async setRulesetVariable(params) {
|
|
16
|
+
const jsonParams = {
|
|
17
|
+
...params,
|
|
18
|
+
clientId: this.clientId,
|
|
19
|
+
variable: RulesetVariable.toJSON(params.variable),
|
|
20
|
+
};
|
|
21
|
+
return this.call("setRulesetVariable", jsonParams);
|
|
22
|
+
}
|
|
23
|
+
async unsetRulesetVariable(params) {
|
|
24
|
+
const jsonParams = {
|
|
25
|
+
...params,
|
|
26
|
+
clientId: this.clientId,
|
|
27
|
+
};
|
|
28
|
+
return this.call("unsetRulesetVariable", jsonParams);
|
|
29
|
+
}
|
|
30
|
+
async updateHierarchyState(params) {
|
|
31
|
+
const jsonParams = {
|
|
32
|
+
...params,
|
|
33
|
+
clientId: this.clientId,
|
|
34
|
+
};
|
|
35
|
+
return this.call("updateHierarchyState", jsonParams);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
38
|
//# sourceMappingURL=IpcRequestsHandler.js.map
|