@itwin/presentation-backend 5.0.0-dev.11 → 5.0.0-dev.110
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/CHANGELOG.md +61 -1
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts +31 -4
- package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/ElementPropertiesHelper.js +161 -56
- package/lib/cjs/presentation-backend/ElementPropertiesHelper.js.map +1 -1
- package/lib/cjs/presentation-backend/InternalSymbols.d.ts +5 -0
- package/lib/cjs/presentation-backend/InternalSymbols.d.ts.map +1 -0
- package/lib/cjs/presentation-backend/InternalSymbols.js +16 -0
- package/lib/cjs/presentation-backend/InternalSymbols.js.map +1 -0
- package/lib/cjs/presentation-backend/NativePlatform.d.ts +2 -2
- package/lib/cjs/presentation-backend/NativePlatform.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/NativePlatform.js +5 -3
- package/lib/cjs/presentation-backend/NativePlatform.js.map +1 -1
- package/lib/cjs/presentation-backend/Presentation.d.ts +2 -7
- package/lib/cjs/presentation-backend/Presentation.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/Presentation.js +40 -29
- package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts +3 -3
- package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationIpcHandler.js +5 -7
- package/lib/cjs/presentation-backend/PresentationIpcHandler.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManager.d.ts +13 -90
- package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManager.js +79 -130
- package/lib/cjs/presentation-backend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts +19 -10
- package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManagerDetail.js +83 -76
- package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts +11 -11
- package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationRpcImpl.js +110 -118
- package/lib/cjs/presentation-backend/PresentationRpcImpl.js.map +1 -1
- package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/RulesetEmbedder.js +23 -24
- package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
- package/lib/cjs/presentation-backend/RulesetManager.d.ts +1 -1
- package/lib/cjs/presentation-backend/RulesetManager.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/RulesetManager.js +2 -1
- package/lib/cjs/presentation-backend/RulesetManager.js.map +1 -1
- package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts +1 -1
- package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/RulesetVariablesManager.js +2 -0
- package/lib/cjs/presentation-backend/RulesetVariablesManager.js.map +1 -1
- package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts +2 -4
- package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/SelectionScopesHelper.js +70 -83
- package/lib/cjs/presentation-backend/SelectionScopesHelper.js.map +1 -1
- package/lib/cjs/presentation-backend/TemporaryStorage.d.ts +2 -3
- package/lib/cjs/presentation-backend/TemporaryStorage.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/TemporaryStorage.js +30 -28
- package/lib/cjs/presentation-backend/TemporaryStorage.js.map +1 -1
- package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/Utils.js +15 -21
- package/lib/cjs/presentation-backend/Utils.js.map +1 -1
- package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js +2 -2
- package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js.map +1 -1
- package/lib/cjs/presentation-backend/domain/RulesetElements.js +4 -4
- package/lib/cjs/presentation-backend/domain/RulesetElements.js.map +1 -1
- package/lib/cjs/presentation-backend-internal.d.ts +2 -0
- package/lib/cjs/presentation-backend-internal.d.ts.map +1 -0
- package/lib/cjs/presentation-backend-internal.js +12 -0
- package/lib/cjs/presentation-backend-internal.js.map +1 -0
- package/lib/cjs/presentation-backend.d.ts +7 -7
- package/lib/cjs/presentation-backend.d.ts.map +1 -1
- package/lib/cjs/presentation-backend.js +11 -21
- package/lib/cjs/presentation-backend.js.map +1 -1
- package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts +62 -0
- package/lib/esm/presentation-backend/BackendLoggerCategory.d.ts.map +1 -0
- package/lib/esm/presentation-backend/BackendLoggerCategory.js +69 -0
- package/lib/esm/presentation-backend/BackendLoggerCategory.js.map +1 -0
- package/lib/esm/presentation-backend/ElementPropertiesHelper.d.ts +45 -0
- package/lib/esm/presentation-backend/ElementPropertiesHelper.d.ts.map +1 -0
- package/lib/esm/presentation-backend/ElementPropertiesHelper.js +187 -0
- package/lib/esm/presentation-backend/ElementPropertiesHelper.js.map +1 -0
- package/lib/esm/presentation-backend/InternalSymbols.d.ts +5 -0
- package/lib/esm/presentation-backend/InternalSymbols.d.ts.map +1 -0
- package/lib/esm/presentation-backend/InternalSymbols.js +13 -0
- package/lib/esm/presentation-backend/InternalSymbols.js.map +1 -0
- package/lib/esm/presentation-backend/NativePlatform.d.ts +89 -0
- package/lib/esm/presentation-backend/NativePlatform.d.ts.map +1 -0
- package/lib/esm/presentation-backend/NativePlatform.js +156 -0
- package/lib/esm/presentation-backend/NativePlatform.js.map +1 -0
- package/lib/esm/presentation-backend/Presentation.d.ts +97 -0
- package/lib/esm/presentation-backend/Presentation.d.ts.map +1 -0
- package/lib/esm/presentation-backend/Presentation.js +147 -0
- package/lib/esm/presentation-backend/Presentation.js.map +1 -0
- package/lib/esm/presentation-backend/PresentationIpcHandler.d.ts +12 -0
- package/lib/esm/presentation-backend/PresentationIpcHandler.d.ts.map +1 -0
- package/lib/esm/presentation-backend/PresentationIpcHandler.js +25 -0
- package/lib/esm/presentation-backend/PresentationIpcHandler.js.map +1 -0
- package/lib/esm/presentation-backend/PresentationManager.d.ts +387 -0
- package/lib/esm/presentation-backend/PresentationManager.d.ts.map +1 -0
- package/lib/esm/presentation-backend/PresentationManager.js +352 -0
- package/lib/esm/presentation-backend/PresentationManager.js.map +1 -0
- package/lib/esm/presentation-backend/PresentationManagerDetail.d.ts +74 -0
- package/lib/esm/presentation-backend/PresentationManagerDetail.d.ts.map +1 -0
- package/lib/esm/presentation-backend/PresentationManagerDetail.js +446 -0
- package/lib/esm/presentation-backend/PresentationManagerDetail.js.map +1 -0
- package/lib/esm/presentation-backend/PresentationRpcImpl.d.ts +63 -0
- package/lib/esm/presentation-backend/PresentationRpcImpl.d.ts.map +1 -0
- package/lib/esm/presentation-backend/PresentationRpcImpl.js +409 -0
- package/lib/esm/presentation-backend/PresentationRpcImpl.js.map +1 -0
- package/lib/esm/presentation-backend/RulesetEmbedder.d.ts +109 -0
- package/lib/esm/presentation-backend/RulesetEmbedder.d.ts.map +1 -0
- package/lib/esm/presentation-backend/RulesetEmbedder.js +269 -0
- package/lib/esm/presentation-backend/RulesetEmbedder.js.map +1 -0
- package/lib/esm/presentation-backend/RulesetManager.d.ts +54 -0
- package/lib/esm/presentation-backend/RulesetManager.d.ts.map +1 -0
- package/lib/esm/presentation-backend/RulesetManager.js +74 -0
- package/lib/esm/presentation-backend/RulesetManager.js.map +1 -0
- package/lib/esm/presentation-backend/RulesetVariablesManager.d.ts +141 -0
- package/lib/esm/presentation-backend/RulesetVariablesManager.d.ts.map +1 -0
- package/lib/esm/presentation-backend/RulesetVariablesManager.js +140 -0
- package/lib/esm/presentation-backend/RulesetVariablesManager.js.map +1 -0
- package/lib/esm/presentation-backend/SelectionScopesHelper.d.ts +27 -0
- package/lib/esm/presentation-backend/SelectionScopesHelper.d.ts.map +1 -0
- package/lib/esm/presentation-backend/SelectionScopesHelper.js +227 -0
- package/lib/esm/presentation-backend/SelectionScopesHelper.js.map +1 -0
- package/lib/esm/presentation-backend/TemporaryStorage.d.ts +123 -0
- package/lib/esm/presentation-backend/TemporaryStorage.d.ts.map +1 -0
- package/lib/esm/presentation-backend/TemporaryStorage.js +157 -0
- package/lib/esm/presentation-backend/TemporaryStorage.js.map +1 -0
- package/lib/esm/presentation-backend/Utils.d.ts +50 -0
- package/lib/esm/presentation-backend/Utils.d.ts.map +1 -0
- package/lib/esm/presentation-backend/Utils.js +101 -0
- package/lib/esm/presentation-backend/Utils.js.map +1 -0
- package/lib/esm/presentation-backend/domain/PresentationRulesDomain.d.ts +17 -0
- package/lib/esm/presentation-backend/domain/PresentationRulesDomain.d.ts.map +1 -0
- package/lib/esm/presentation-backend/domain/PresentationRulesDomain.js +31 -0
- package/lib/esm/presentation-backend/domain/PresentationRulesDomain.js.map +1 -0
- package/lib/esm/presentation-backend/domain/RulesetElements.d.ts +22 -0
- package/lib/esm/presentation-backend/domain/RulesetElements.d.ts.map +1 -0
- package/lib/esm/presentation-backend/domain/RulesetElements.js +38 -0
- package/lib/esm/presentation-backend/domain/RulesetElements.js.map +1 -0
- package/lib/esm/presentation-backend/primary-presentation-rules/ElementProperties.PresentationRuleSet.json +14 -0
- package/lib/esm/presentation-backend/supplemental-presentation-rules/BisCore.PresentationRuleSet.json +701 -0
- package/lib/esm/presentation-backend/supplemental-presentation-rules/Functional.PresentationRuleSet.json +139 -0
- package/lib/esm/presentation-backend-internal.d.ts +2 -0
- package/lib/esm/presentation-backend-internal.d.ts.map +1 -0
- package/lib/esm/presentation-backend-internal.js +8 -0
- package/lib/esm/presentation-backend-internal.js.map +1 -0
- package/lib/esm/presentation-backend.d.ts +20 -0
- package/lib/esm/presentation-backend.d.ts.map +1 -0
- package/lib/esm/presentation-backend.js +21 -0
- package/lib/esm/presentation-backend.js.map +1 -0
- package/package.json +42 -35
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Core
|
|
3
3
|
*/
|
|
4
|
-
import { PresentationManager, PresentationManagerProps } from "./PresentationManager";
|
|
4
|
+
import { PresentationManager, PresentationManagerProps } from "./PresentationManager.js";
|
|
5
5
|
/**
|
|
6
6
|
* Properties that can be used to configure [[Presentation]] API.
|
|
7
7
|
* @public
|
|
@@ -16,11 +16,6 @@ export interface PresentationProps extends Omit<PresentationManagerProps, "enabl
|
|
|
16
16
|
* for `BriefcaseDb.onOpened` event and force pre-loads all ECSchemas.
|
|
17
17
|
*/
|
|
18
18
|
enableSchemasPreload?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Factory method for creating separate managers for each client
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
clientManagerFactory?: (clientId: string, props: PresentationManagerProps) => PresentationManager;
|
|
24
19
|
/**
|
|
25
20
|
* How much time should an unused client manager be stored in memory
|
|
26
21
|
* before it's disposed.
|
|
@@ -49,7 +44,7 @@ export type PresentationPropsBase = PresentationProps;
|
|
|
49
44
|
* @public
|
|
50
45
|
* @deprecated in 4.8 - use [[PresentationProps]] instead.
|
|
51
46
|
*/
|
|
52
|
-
export type SingleManagerPresentationProps = Omit<PresentationProps, "
|
|
47
|
+
export type SingleManagerPresentationProps = Omit<PresentationProps, "unusedClientLifetime">;
|
|
53
48
|
/**
|
|
54
49
|
* Static class used to statically set up Presentation library for the backend.
|
|
55
50
|
* Basically what it does is:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/Presentation.ts"],"names":[],"mappings":"AAIA;;GAEG;AAQH,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Presentation.d.ts","sourceRoot":"","sources":["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E,MAAM,GAAG,mBAAmB;IAOhE;;OAEG;WACW,iBAAiB,IAAI,MAAM;IAOzC,OAAO,CAAC,MAAM,CAAC,cAAc,CAK3B;CACH"}
|
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
/** @packageDocumentation
|
|
7
7
|
* @module Core
|
|
8
8
|
*/
|
|
9
|
-
var _a;
|
|
10
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
10
|
exports.Presentation = void 0;
|
|
12
11
|
const core_backend_1 = require("@itwin/core-backend");
|
|
13
12
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
14
13
|
const core_common_1 = require("@itwin/core-common");
|
|
15
14
|
const presentation_common_1 = require("@itwin/presentation-common");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
15
|
+
const BackendLoggerCategory_js_1 = require("./BackendLoggerCategory.js");
|
|
16
|
+
const PresentationIpcHandler_js_1 = require("./PresentationIpcHandler.js");
|
|
17
|
+
const PresentationManager_js_1 = require("./PresentationManager.js");
|
|
18
|
+
const PresentationRpcImpl_js_1 = require("./PresentationRpcImpl.js");
|
|
19
|
+
const TemporaryStorage_js_1 = require("./TemporaryStorage.js");
|
|
20
|
+
const InternalSymbols_js_1 = require("./InternalSymbols.js");
|
|
21
21
|
/**
|
|
22
22
|
* Static class used to statically set up Presentation library for the backend.
|
|
23
23
|
* Basically what it does is:
|
|
@@ -29,7 +29,13 @@ const TemporaryStorage_1 = require("./TemporaryStorage");
|
|
|
29
29
|
* @public
|
|
30
30
|
*/
|
|
31
31
|
class Presentation {
|
|
32
|
-
|
|
32
|
+
static _initProps;
|
|
33
|
+
static _clientsStorage;
|
|
34
|
+
static _disposeIpcHandler;
|
|
35
|
+
static _shutdownListener;
|
|
36
|
+
static _disposeIModelOpenedListener;
|
|
37
|
+
static _rpcImpl;
|
|
38
|
+
/* c8 ignore next */
|
|
33
39
|
constructor() { }
|
|
34
40
|
/** Properties used to initialize the presentation framework */
|
|
35
41
|
static get initProps() {
|
|
@@ -46,16 +52,16 @@ class Presentation {
|
|
|
46
52
|
*/
|
|
47
53
|
static initialize(props) {
|
|
48
54
|
this._initProps = props || {};
|
|
49
|
-
this._shutdownListener = core_backend_1.IModelHost.onBeforeShutdown.addListener(() =>
|
|
50
|
-
this._rpcImpl = new
|
|
55
|
+
this._shutdownListener = core_backend_1.IModelHost.onBeforeShutdown.addListener(() => Presentation.terminate());
|
|
56
|
+
this._rpcImpl = new PresentationRpcImpl_js_1.PresentationRpcImpl({
|
|
51
57
|
requestTimeout: this._initProps.requestTimeout,
|
|
52
58
|
});
|
|
53
|
-
core_common_1.RpcManager.registerImpl(presentation_common_1.PresentationRpcInterface,
|
|
59
|
+
core_common_1.RpcManager.registerImpl(presentation_common_1.PresentationRpcInterface, PresentationRpcImpl_js_1.PresentationRpcImpl);
|
|
54
60
|
core_common_1.RpcManager.supplyImplInstance(presentation_common_1.PresentationRpcInterface, this._rpcImpl);
|
|
55
61
|
if (core_backend_1.IpcHost.isValid) {
|
|
56
|
-
this._disposeIpcHandler =
|
|
62
|
+
this._disposeIpcHandler = PresentationIpcHandler_js_1.PresentationIpcHandler.register();
|
|
57
63
|
}
|
|
58
|
-
this._clientsStorage = new
|
|
64
|
+
this._clientsStorage = new TemporaryStorage_js_1.FactoryBasedTemporaryStorage({
|
|
59
65
|
factory: this.createClientManager.bind(this),
|
|
60
66
|
cleanupHandler: (_id, storeItem) => this.disposeClientManager(_id, storeItem),
|
|
61
67
|
// cleanup unused managers every minute
|
|
@@ -63,8 +69,10 @@ class Presentation {
|
|
|
63
69
|
// by default, manager is disposed after 1 hour of being unused
|
|
64
70
|
unusedValueLifetime: this._initProps.unusedClientLifetime ?? 60 * 60 * 1000,
|
|
65
71
|
// add some logging
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
/* c8 ignore next 5 */
|
|
73
|
+
onDisposedSingle: (id) => core_bentley_1.Logger.logInfo(BackendLoggerCategory_js_1.PresentationBackendLoggerCategory.PresentationManager, `Disposed PresentationManager instance with ID: ${id}. Total instances: ${this._clientsStorage.values.length}.`),
|
|
74
|
+
/* c8 ignore next */
|
|
75
|
+
onDisposedAll: () => core_bentley_1.Logger.logInfo(BackendLoggerCategory_js_1.PresentationBackendLoggerCategory.PresentationManager, `Disposed all PresentationManager instances.`),
|
|
68
76
|
});
|
|
69
77
|
if (this._initProps.enableSchemasPreload) {
|
|
70
78
|
this._disposeIModelOpenedListener = core_backend_1.BriefcaseDb.onOpened.addListener(this.onIModelOpened);
|
|
@@ -76,7 +84,7 @@ class Presentation {
|
|
|
76
84
|
*/
|
|
77
85
|
static terminate() {
|
|
78
86
|
if (this._clientsStorage) {
|
|
79
|
-
this._clientsStorage.dispose();
|
|
87
|
+
this._clientsStorage[Symbol.dispose]();
|
|
80
88
|
this._clientsStorage = undefined;
|
|
81
89
|
}
|
|
82
90
|
if (this._disposeIModelOpenedListener) {
|
|
@@ -89,7 +97,7 @@ class Presentation {
|
|
|
89
97
|
}
|
|
90
98
|
core_common_1.RpcManager.unregisterImpl(presentation_common_1.PresentationRpcInterface);
|
|
91
99
|
if (this._rpcImpl) {
|
|
92
|
-
this._rpcImpl.dispose();
|
|
100
|
+
this._rpcImpl[Symbol.dispose]();
|
|
93
101
|
this._rpcImpl = undefined;
|
|
94
102
|
}
|
|
95
103
|
if (this._disposeIpcHandler) {
|
|
@@ -98,15 +106,19 @@ class Presentation {
|
|
|
98
106
|
this._initProps = undefined;
|
|
99
107
|
}
|
|
100
108
|
static createClientManager(clientId, onManagerUsed) {
|
|
101
|
-
const manager =
|
|
102
|
-
?
|
|
103
|
-
: new
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
const manager = Presentation._initProps && Presentation._initProps.clientManagerFactory
|
|
110
|
+
? Presentation._initProps.clientManagerFactory(clientId, Presentation._initProps)
|
|
111
|
+
: new PresentationManager_js_1.PresentationManager({
|
|
112
|
+
...Presentation._initProps,
|
|
113
|
+
// @ts-expect-error internal prop
|
|
114
|
+
id: clientId,
|
|
115
|
+
});
|
|
116
|
+
manager.onUsed.addListener(onManagerUsed);
|
|
117
|
+
core_bentley_1.Logger.logInfo(BackendLoggerCategory_js_1.PresentationBackendLoggerCategory.PresentationManager, `Created a PresentationManager instance with ID: ${clientId}. Total instances: ${this._clientsStorage.values.length}.`);
|
|
106
118
|
return { manager };
|
|
107
119
|
}
|
|
108
120
|
static disposeClientManager(_id, storeItem) {
|
|
109
|
-
storeItem.manager.dispose();
|
|
121
|
+
storeItem.manager[Symbol.dispose]();
|
|
110
122
|
}
|
|
111
123
|
/**
|
|
112
124
|
* Get an instance of [[PresentationManager]] for specific client
|
|
@@ -128,13 +140,12 @@ class Presentation {
|
|
|
128
140
|
}
|
|
129
141
|
return this._rpcImpl.requestTimeout;
|
|
130
142
|
}
|
|
143
|
+
static onIModelOpened = (imodel) => {
|
|
144
|
+
const manager = this.getManager();
|
|
145
|
+
const imodelAddon = manager[InternalSymbols_js_1._presentation_manager_detail].getNativePlatform().getImodelAddon(imodel);
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
147
|
+
manager[InternalSymbols_js_1._presentation_manager_detail].getNativePlatform().forceLoadSchemas(imodelAddon);
|
|
148
|
+
};
|
|
131
149
|
}
|
|
132
150
|
exports.Presentation = Presentation;
|
|
133
|
-
_a = Presentation;
|
|
134
|
-
Presentation.onIModelOpened = (imodel) => {
|
|
135
|
-
const manager = _a.getManager();
|
|
136
|
-
const imodelAddon = manager.getNativePlatform().getImodelAddon(imodel);
|
|
137
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
138
|
-
manager.getNativePlatform().forceLoadSchemas(imodelAddon);
|
|
139
|
-
};
|
|
140
151
|
//# sourceMappingURL=Presentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-backend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAE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AI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,uCAAiB,CAAC,wCAAkB,CAAC,cAAc,EAAE,2EAA2E,CAAC,CAAC;QAC9I,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IACtC,CAAC;;AA9HH,oCAsIC;;AANgB,2BAAc,GAAG,CAAC,MAAmB,EAAE,EAAE;IACtD,MAAM,OAAO,GAAG,EAAI,CAAC,UAAU,EAAE,CAAC;IAClC,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IACvE,mEAAmE;IACnE,OAAO,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;AAC5D,CAAC,AAL4B,CAK3B","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 { BriefcaseDb, IModelHost, IpcHost } from \"@itwin/core-backend\";\r\nimport { DisposeFunc, Logger } from \"@itwin/core-bentley\";\r\nimport { RpcManager } from \"@itwin/core-common\";\r\nimport { PresentationError, PresentationRpcInterface, PresentationStatus } from \"@itwin/presentation-common\";\r\nimport { PresentationBackendLoggerCategory } from \"./BackendLoggerCategory\";\r\nimport { PresentationIpcHandler } from \"./PresentationIpcHandler\";\r\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager\";\r\nimport { PresentationRpcImpl } from \"./PresentationRpcImpl\";\r\nimport { FactoryBasedTemporaryStorage } from \"./TemporaryStorage\";\r\n\r\n/**\r\n * Properties that can be used to configure [[Presentation]] API.\r\n * @public\r\n */\r\nexport interface PresentationProps extends Omit<PresentationManagerProps, \"enableSchemasPreload\"> {\r\n /**\r\n * Time in milliseconds after which the request will timeout.\r\n */\r\n requestTimeout?: number;\r\n\r\n /**\r\n * Should schemas preloading be enabled. If true, [[Presentation]] library listens\r\n * for `BriefcaseDb.onOpened` event and force pre-loads all ECSchemas.\r\n */\r\n enableSchemasPreload?: boolean;\r\n\r\n /**\r\n * Factory method for creating separate managers for each client\r\n * @internal\r\n */\r\n clientManagerFactory?: (clientId: string, props: PresentationManagerProps) => PresentationManager;\r\n\r\n /**\r\n * How much time should an unused client manager be stored in memory\r\n * before it's disposed.\r\n */\r\n unusedClientLifetime?: number;\r\n}\r\n\r\n/**\r\n * Props for initializing the [[Presentation]] library for using multiple [[PresentationManager]]\r\n * instances, one for each frontend.\r\n *\r\n * @public\r\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\r\n */\r\nexport type MultiManagerPresentationProps = PresentationProps;\r\n\r\n/**\r\n * Base props for initializing the [[Presentation]] library.\r\n *\r\n * @public\r\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\r\n */\r\nexport type PresentationPropsBase = PresentationProps;\r\n\r\n/**\r\n * Props for initializing the [[Presentation]] library with ability to use a single\r\n * [[PresentationManager]] instance for handling all requests.\r\n *\r\n * @public\r\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\r\n */\r\nexport type SingleManagerPresentationProps = Omit<PresentationProps, \"clientManagerFactory\" | \"unusedClientLifetime\">;\r\n\r\ninterface ClientStoreItem {\r\n manager: PresentationManager;\r\n}\r\n\r\n/**\r\n * Static class used to statically set up Presentation library for the backend.\r\n * Basically what it does is:\r\n * - Register a RPC implementation\r\n * - Create a singleton [[PresentationManager]] instance\r\n * - Subscribe for [IModelHost.onBeforeShutdown]($core-backend) event and terminate\r\n * the presentation manager when that happens.\r\n *\r\n * @public\r\n */\r\nexport class Presentation {\r\n private static _initProps: PresentationProps | undefined;\r\n private static _clientsStorage: FactoryBasedTemporaryStorage<ClientStoreItem> | undefined;\r\n private static _disposeIpcHandler: DisposeFunc | undefined;\r\n private static _shutdownListener: DisposeFunc | undefined;\r\n private static _disposeIModelOpenedListener: DisposeFunc | undefined;\r\n private static _rpcImpl: PresentationRpcImpl | undefined;\r\n\r\n /* istanbul ignore next */\r\n private constructor() {}\r\n\r\n /** Properties used to initialize the presentation framework */\r\n public static get initProps() {\r\n return this._initProps;\r\n }\r\n\r\n /**\r\n * Initializes Presentation library for the backend.\r\n *\r\n * See [Setting up iTwin.js Presentation library documentation page]($docs/presentation/setup/index.md#backend) for an example.\r\n *\r\n * **Important:** The method should be called after a call to [IModelHost.startup]($core-backend)\r\n *\r\n * @param props Optional properties for [[PresentationManager]]\r\n */\r\n public static initialize(props?: PresentationProps): void {\r\n this._initProps = props || {};\r\n this._shutdownListener = IModelHost.onBeforeShutdown.addListener(() => Presentation.terminate());\r\n\r\n this._rpcImpl = new PresentationRpcImpl({\r\n requestTimeout: this._initProps.requestTimeout,\r\n });\r\n RpcManager.registerImpl(PresentationRpcInterface, PresentationRpcImpl);\r\n RpcManager.supplyImplInstance(PresentationRpcInterface, this._rpcImpl);\r\n\r\n if (IpcHost.isValid) {\r\n this._disposeIpcHandler = PresentationIpcHandler.register();\r\n }\r\n\r\n this._clientsStorage = new FactoryBasedTemporaryStorage<ClientStoreItem>({\r\n factory: this.createClientManager.bind(this),\r\n cleanupHandler: (_id, storeItem) => this.disposeClientManager(_id, storeItem),\r\n // cleanup unused managers every minute\r\n cleanupInterval: 60 * 1000,\r\n // by default, manager is disposed after 1 hour of being unused\r\n unusedValueLifetime: this._initProps.unusedClientLifetime ?? 60 * 60 * 1000,\r\n // add some logging\r\n onDisposedSingle: /* istanbul ignore next */ (id: string) =>\r\n Logger.logInfo(\r\n PresentationBackendLoggerCategory.PresentationManager,\r\n `Disposed PresentationManager instance with ID: ${id}. Total instances: ${this._clientsStorage!.values.length}.`,\r\n ),\r\n onDisposedAll: /* istanbul ignore next */ () =>\r\n Logger.logInfo(PresentationBackendLoggerCategory.PresentationManager, `Disposed all PresentationManager instances.`),\r\n });\r\n\r\n if (this._initProps.enableSchemasPreload) {\r\n this._disposeIModelOpenedListener = BriefcaseDb.onOpened.addListener(this.onIModelOpened);\r\n }\r\n }\r\n\r\n /**\r\n * Terminates Presentation. Consumers don't need to call this as it's automatically\r\n * called on [IModelHost.onBeforeShutdown]($core-backend) event.\r\n */\r\n public static terminate(): void {\r\n if (this._clientsStorage) {\r\n this._clientsStorage.dispose();\r\n this._clientsStorage = undefined;\r\n }\r\n if (this._disposeIModelOpenedListener) {\r\n this._disposeIModelOpenedListener();\r\n this._disposeIModelOpenedListener = undefined;\r\n }\r\n if (this._shutdownListener) {\r\n this._shutdownListener();\r\n this._shutdownListener = undefined;\r\n }\r\n RpcManager.unregisterImpl(PresentationRpcInterface);\r\n if (this._rpcImpl) {\r\n this._rpcImpl.dispose();\r\n this._rpcImpl = undefined;\r\n }\r\n if (this._disposeIpcHandler) {\r\n this._disposeIpcHandler();\r\n }\r\n this._initProps = undefined;\r\n }\r\n\r\n private static createClientManager(clientId: string, onManagerUsed: () => void): ClientStoreItem {\r\n const manager =\r\n Presentation._initProps && Presentation._initProps.clientManagerFactory\r\n ? Presentation._initProps.clientManagerFactory(clientId, Presentation._initProps)\r\n : new PresentationManager({ ...Presentation._initProps, id: clientId });\r\n manager.setOnManagerUsedHandler(onManagerUsed);\r\n Logger.logInfo(\r\n PresentationBackendLoggerCategory.PresentationManager,\r\n `Created a PresentationManager instance with ID: ${clientId}. Total instances: ${this._clientsStorage!.values.length}.`,\r\n );\r\n return { manager };\r\n }\r\n\r\n private static disposeClientManager(_id: string, storeItem: ClientStoreItem) {\r\n storeItem.manager.dispose();\r\n }\r\n\r\n /**\r\n * Get an instance of [[PresentationManager]] for specific client\r\n * @param clientId ID of the client requesting presentation data. If no\r\n * ID is provided, the default [[PresentationManager]] is returned.\r\n */\r\n public static getManager(clientId?: string): PresentationManager {\r\n if (this._clientsStorage) {\r\n return this._clientsStorage.getValue(clientId || \"\").manager;\r\n }\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n\r\n /**\r\n * Get the time in milliseconds that backend should respond in .\r\n */\r\n public static getRequestTimeout(): number {\r\n if (this._rpcImpl === undefined) {\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return this._rpcImpl.requestTimeout;\r\n }\r\n\r\n private static onIModelOpened = (imodel: BriefcaseDb) => {\r\n const manager = this.getManager();\r\n const imodelAddon = manager.getNativePlatform().getImodelAddon(imodel);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n manager.getNativePlatform().forceLoadSchemas(imodelAddon);\r\n };\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Presentation.js","sourceRoot":"","sources":["../../../src/presentation-backend/Presentation.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAuE;AACvE,sDAA0D;AAC1D,oDAAgD;AAChD,oEAA6G;AAC7G,yEAA+E;AAC/E,2EAAqE;AACrE,qEAAyF;AACzF,qEAA+D;AAC/D,+DAAqE;AACrE,6DAAoE;AA8DpE;;;;;;;;;GASG;AACH,MAAa,YAAY;IACf,MAAM,CAAC,UAAU,CAA8D;IAC/E,MAAM,CAAC,eAAe,CAA4D;IAClF,MAAM,CAAC,kBAAkB,CAA0B;IACnD,MAAM,CAAC,iBAAiB,CAA0B;IAClD,MAAM,CAAC,4BAA4B,CAA0B;IAC7D,MAAM,CAAC,QAAQ,CAAkC;IAEzD,oBAAoB;IACpB,gBAAuB,CAAC;IAExB,+DAA+D;IACxD,MAAM,KAAK,SAAS;QACzB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,UAAU,CAAC,KAAyB;QAChD,IAAI,CAAC,UAAU,GAAG,KAAK,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,iBAAiB,GAAG,yBAAU,CAAC,gBAAgB,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,SA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CAAC,iDAA4B,CAAC,CAAC,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1F,CAAC,CAAC;;AA1IJ,oCA2IC","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 { BriefcaseDb, IModelHost, IpcHost } from \"@itwin/core-backend\";\r\nimport { DisposeFunc, Logger } from \"@itwin/core-bentley\";\r\nimport { RpcManager } from \"@itwin/core-common\";\r\nimport { PresentationError, PresentationRpcInterface, PresentationStatus } from \"@itwin/presentation-common\";\r\nimport { PresentationBackendLoggerCategory } from \"./BackendLoggerCategory.js\";\r\nimport { PresentationIpcHandler } from \"./PresentationIpcHandler.js\";\r\nimport { PresentationManager, PresentationManagerProps } from \"./PresentationManager.js\";\r\nimport { PresentationRpcImpl } from \"./PresentationRpcImpl.js\";\r\nimport { FactoryBasedTemporaryStorage } from \"./TemporaryStorage.js\";\r\nimport { _presentation_manager_detail } from \"./InternalSymbols.js\";\r\n\r\n/**\r\n * Properties that can be used to configure [[Presentation]] API.\r\n * @public\r\n */\r\nexport interface PresentationProps extends Omit<PresentationManagerProps, \"enableSchemasPreload\"> {\r\n /**\r\n * Time in milliseconds after which the request will timeout.\r\n */\r\n requestTimeout?: number;\r\n\r\n /**\r\n * Should schemas preloading be enabled. If true, [[Presentation]] library listens\r\n * for `BriefcaseDb.onOpened` event and force pre-loads all ECSchemas.\r\n */\r\n enableSchemasPreload?: boolean;\r\n\r\n /**\r\n * How much time should an unused client manager be stored in memory\r\n * before it's disposed.\r\n */\r\n unusedClientLifetime?: number;\r\n}\r\n\r\ninterface PresentationInternalProps {\r\n /**\r\n * Factory method for creating separate managers for each client\r\n */\r\n clientManagerFactory?: (clientId: string, props: PresentationManagerProps) => PresentationManager;\r\n}\r\n\r\n/**\r\n * Props for initializing the [[Presentation]] library for using multiple [[PresentationManager]]\r\n * instances, one for each frontend.\r\n *\r\n * @public\r\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\r\n */\r\nexport type MultiManagerPresentationProps = PresentationProps;\r\n\r\n/**\r\n * Base props for initializing the [[Presentation]] library.\r\n *\r\n * @public\r\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\r\n */\r\nexport type PresentationPropsBase = PresentationProps;\r\n\r\n/**\r\n * Props for initializing the [[Presentation]] library with ability to use a single\r\n * [[PresentationManager]] instance for handling all requests.\r\n *\r\n * @public\r\n * @deprecated in 4.8 - use [[PresentationProps]] instead.\r\n */\r\nexport type SingleManagerPresentationProps = Omit<PresentationProps, \"unusedClientLifetime\">;\r\n\r\ninterface ClientStoreItem {\r\n manager: PresentationManager;\r\n}\r\n\r\n/**\r\n * Static class used to statically set up Presentation library for the backend.\r\n * Basically what it does is:\r\n * - Register a RPC implementation\r\n * - Create a singleton [[PresentationManager]] instance\r\n * - Subscribe for [IModelHost.onBeforeShutdown]($core-backend) event and terminate\r\n * the presentation manager when that happens.\r\n *\r\n * @public\r\n */\r\nexport class Presentation {\r\n private static _initProps: (PresentationProps & PresentationInternalProps) | undefined;\r\n private static _clientsStorage: FactoryBasedTemporaryStorage<ClientStoreItem> | undefined;\r\n private static _disposeIpcHandler: DisposeFunc | undefined;\r\n private static _shutdownListener: DisposeFunc | undefined;\r\n private static _disposeIModelOpenedListener: DisposeFunc | undefined;\r\n private static _rpcImpl: PresentationRpcImpl | undefined;\r\n\r\n /* c8 ignore next */\r\n private constructor() {}\r\n\r\n /** Properties used to initialize the presentation framework */\r\n public static get initProps(): PresentationProps | undefined {\r\n return this._initProps;\r\n }\r\n\r\n /**\r\n * Initializes Presentation library for the backend.\r\n *\r\n * See [Setting up iTwin.js Presentation library documentation page]($docs/presentation/setup/index.md#backend) for an example.\r\n *\r\n * **Important:** The method should be called after a call to [IModelHost.startup]($core-backend)\r\n *\r\n * @param props Optional properties for [[PresentationManager]]\r\n */\r\n public static initialize(props?: PresentationProps): void {\r\n this._initProps = props || {};\r\n this._shutdownListener = IModelHost.onBeforeShutdown.addListener(() => Presentation.terminate());\r\n\r\n this._rpcImpl = new PresentationRpcImpl({\r\n requestTimeout: this._initProps.requestTimeout,\r\n });\r\n RpcManager.registerImpl(PresentationRpcInterface, PresentationRpcImpl);\r\n RpcManager.supplyImplInstance(PresentationRpcInterface, this._rpcImpl);\r\n\r\n if (IpcHost.isValid) {\r\n this._disposeIpcHandler = PresentationIpcHandler.register();\r\n }\r\n\r\n this._clientsStorage = new FactoryBasedTemporaryStorage<ClientStoreItem>({\r\n factory: this.createClientManager.bind(this),\r\n cleanupHandler: (_id, storeItem) => this.disposeClientManager(_id, storeItem),\r\n // cleanup unused managers every minute\r\n cleanupInterval: 60 * 1000,\r\n // by default, manager is disposed after 1 hour of being unused\r\n unusedValueLifetime: this._initProps.unusedClientLifetime ?? 60 * 60 * 1000,\r\n // add some logging\r\n /* c8 ignore next 5 */\r\n onDisposedSingle: (id: string) =>\r\n Logger.logInfo(\r\n PresentationBackendLoggerCategory.PresentationManager,\r\n `Disposed PresentationManager instance with ID: ${id}. Total instances: ${this._clientsStorage!.values.length}.`,\r\n ),\r\n /* c8 ignore next */\r\n onDisposedAll: () => Logger.logInfo(PresentationBackendLoggerCategory.PresentationManager, `Disposed all PresentationManager instances.`),\r\n });\r\n\r\n if (this._initProps.enableSchemasPreload) {\r\n this._disposeIModelOpenedListener = BriefcaseDb.onOpened.addListener(this.onIModelOpened);\r\n }\r\n }\r\n\r\n /**\r\n * Terminates Presentation. Consumers don't need to call this as it's automatically\r\n * called on [IModelHost.onBeforeShutdown]($core-backend) event.\r\n */\r\n public static terminate(): void {\r\n if (this._clientsStorage) {\r\n this._clientsStorage[Symbol.dispose]();\r\n this._clientsStorage = undefined;\r\n }\r\n if (this._disposeIModelOpenedListener) {\r\n this._disposeIModelOpenedListener();\r\n this._disposeIModelOpenedListener = undefined;\r\n }\r\n if (this._shutdownListener) {\r\n this._shutdownListener();\r\n this._shutdownListener = undefined;\r\n }\r\n RpcManager.unregisterImpl(PresentationRpcInterface);\r\n if (this._rpcImpl) {\r\n this._rpcImpl[Symbol.dispose]();\r\n this._rpcImpl = undefined;\r\n }\r\n if (this._disposeIpcHandler) {\r\n this._disposeIpcHandler();\r\n }\r\n this._initProps = undefined;\r\n }\r\n\r\n private static createClientManager(clientId: string, onManagerUsed: () => void): ClientStoreItem {\r\n const manager =\r\n Presentation._initProps && Presentation._initProps.clientManagerFactory\r\n ? Presentation._initProps.clientManagerFactory(clientId, Presentation._initProps)\r\n : new PresentationManager({\r\n ...Presentation._initProps,\r\n // @ts-expect-error internal prop\r\n id: clientId,\r\n });\r\n manager.onUsed.addListener(onManagerUsed);\r\n Logger.logInfo(\r\n PresentationBackendLoggerCategory.PresentationManager,\r\n `Created a PresentationManager instance with ID: ${clientId}. Total instances: ${this._clientsStorage!.values.length}.`,\r\n );\r\n return { manager };\r\n }\r\n\r\n private static disposeClientManager(_id: string, storeItem: ClientStoreItem) {\r\n storeItem.manager[Symbol.dispose]();\r\n }\r\n\r\n /**\r\n * Get an instance of [[PresentationManager]] for specific client\r\n * @param clientId ID of the client requesting presentation data. If no\r\n * ID is provided, the default [[PresentationManager]] is returned.\r\n */\r\n public static getManager(clientId?: string): PresentationManager {\r\n if (this._clientsStorage) {\r\n return this._clientsStorage.getValue(clientId || \"\").manager;\r\n }\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n\r\n /**\r\n * Get the time in milliseconds that backend should respond in .\r\n */\r\n public static getRequestTimeout(): number {\r\n if (this._rpcImpl === undefined) {\r\n throw new PresentationError(PresentationStatus.NotInitialized, \"Presentation must be first initialized by calling Presentation.initialize\");\r\n }\r\n return this._rpcImpl.requestTimeout;\r\n }\r\n\r\n private static onIModelOpened = (imodel: BriefcaseDb) => {\r\n const manager = this.getManager();\r\n const imodelAddon = manager[_presentation_manager_detail].getNativePlatform().getImodelAddon(imodel);\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n manager[_presentation_manager_detail].getNativePlatform().forceLoadSchemas(imodelAddon);\r\n };\r\n}\r\n"]}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @module RPC
|
|
3
3
|
*/
|
|
4
4
|
import { IpcHandler } from "@itwin/core-backend";
|
|
5
|
-
import { PresentationIpcInterface
|
|
5
|
+
import { PresentationIpcInterface } from "@itwin/presentation-common/internal";
|
|
6
6
|
/** @internal */
|
|
7
7
|
export declare class PresentationIpcHandler extends IpcHandler implements PresentationIpcInterface {
|
|
8
8
|
channelName: string;
|
|
9
|
-
setRulesetVariable(params:
|
|
10
|
-
unsetRulesetVariable(params:
|
|
9
|
+
setRulesetVariable(params: Parameters<PresentationIpcInterface["setRulesetVariable"]>[0]): Promise<void>;
|
|
10
|
+
unsetRulesetVariable(params: Parameters<PresentationIpcInterface["unsetRulesetVariable"]>[0]): Promise<void>;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=PresentationIpcHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationIpcHandler.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationIpcHandler.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"PresentationIpcHandler.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationIpcHandler.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAiC,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAG9G,gBAAgB;AAChB,qBAAa,sBAAuB,SAAQ,UAAW,YAAW,wBAAwB;IACjF,WAAW,SAAiC;IAEtC,kBAAkB,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxG,oBAAoB,CAAC,MAAM,EAAE,UAAU,CAAC,wBAAwB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAI1H"}
|
|
@@ -10,21 +10,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.PresentationIpcHandler = void 0;
|
|
11
11
|
const core_backend_1 = require("@itwin/core-backend");
|
|
12
12
|
const presentation_common_1 = require("@itwin/presentation-common");
|
|
13
|
-
const
|
|
13
|
+
const internal_1 = require("@itwin/presentation-common/internal");
|
|
14
|
+
const Presentation_js_1 = require("./Presentation.js");
|
|
14
15
|
/** @internal */
|
|
15
16
|
class PresentationIpcHandler extends core_backend_1.IpcHandler {
|
|
16
|
-
|
|
17
|
-
super(...arguments);
|
|
18
|
-
this.channelName = presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME;
|
|
19
|
-
}
|
|
17
|
+
channelName = internal_1.PRESENTATION_IPC_CHANNEL_NAME;
|
|
20
18
|
async setRulesetVariable(params) {
|
|
21
19
|
const { clientId, rulesetId, variable } = params;
|
|
22
20
|
const parsedVariable = presentation_common_1.RulesetVariable.fromJSON(variable);
|
|
23
|
-
|
|
21
|
+
Presentation_js_1.Presentation.getManager(clientId).vars(rulesetId).setValue(parsedVariable.id, parsedVariable.type, parsedVariable.value);
|
|
24
22
|
}
|
|
25
23
|
async unsetRulesetVariable(params) {
|
|
26
24
|
const { clientId, rulesetId, variableId } = params;
|
|
27
|
-
|
|
25
|
+
Presentation_js_1.Presentation.getManager(clientId).vars(rulesetId).unset(variableId);
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
exports.PresentationIpcHandler = PresentationIpcHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationIpcHandler.js","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationIpcHandler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"PresentationIpcHandler.js","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationIpcHandler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAiD;AACjD,oEAA6D;AAC7D,kEAA8G;AAC9G,uDAAiD;AAEjD,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,yBAAU;IAC7C,WAAW,GAAG,wCAA6B,CAAC;IAE5C,KAAK,CAAC,kBAAkB,CAAC,MAAqE;QACnG,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QACjD,MAAM,cAAc,GAAG,qCAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1D,8BAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC;IAC3H,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAuE;QACvG,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QACnD,8BAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACtE,CAAC;CACF;AAbD,wDAaC","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 RPC\r\n */\r\n\r\nimport { IpcHandler } from \"@itwin/core-backend\";\r\nimport { RulesetVariable } from \"@itwin/presentation-common\";\r\nimport { PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface } from \"@itwin/presentation-common/internal\";\r\nimport { Presentation } from \"./Presentation.js\";\r\n\r\n/** @internal */\r\nexport class PresentationIpcHandler extends IpcHandler implements PresentationIpcInterface {\r\n public channelName = PRESENTATION_IPC_CHANNEL_NAME;\r\n\r\n public async setRulesetVariable(params: Parameters<PresentationIpcInterface[\"setRulesetVariable\"]>[0]): Promise<void> {\r\n const { clientId, rulesetId, variable } = params;\r\n const parsedVariable = RulesetVariable.fromJSON(variable);\r\n Presentation.getManager(clientId).vars(rulesetId).setValue(parsedVariable.id, parsedVariable.type, parsedVariable.value);\r\n }\r\n\r\n public async unsetRulesetVariable(params: Parameters<PresentationIpcInterface[\"unsetRulesetVariable\"]>[0]): Promise<void> {\r\n const { clientId, rulesetId, variableId } = params;\r\n Presentation.getManager(clientId).vars(rulesetId).unset(variableId);\r\n }\r\n}\r\n"]}
|
|
@@ -2,32 +2,15 @@
|
|
|
2
2
|
* @module Core
|
|
3
3
|
*/
|
|
4
4
|
import { IModelDb } from "@itwin/core-backend";
|
|
5
|
-
import {
|
|
5
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
6
6
|
import { UnitSystemKey } from "@itwin/core-quantity";
|
|
7
7
|
import { SchemaContext } from "@itwin/ecschema-metadata";
|
|
8
8
|
import { UnitSystemFormat as CommonUnitSystemFormat, ComputeSelectionRequestOptions, Content, ContentDescriptorRequestOptions, ContentRequestOptions, ContentSourcesRequestOptions, Descriptor, DescriptorOverrides, DisplayLabelRequestOptions, DisplayLabelsRequestOptions, DisplayValueGroup, DistinctValuesRequestOptions, ElementProperties, FilterByInstancePathsHierarchyRequestOptions, FilterByTextHierarchyRequestOptions, FormatsMap, HierarchyCompareInfo, HierarchyCompareOptions, HierarchyLevelDescriptorRequestOptions, HierarchyRequestOptions, InstanceKey, Item, KeySet, LabelDefinition, MultiElementPropertiesRequestOptions, Node, NodeKey, NodePathElement, Paged, PagedResponse, Prioritized, Ruleset, RulesetVariable, SelectClassInfo, SelectionScope, SelectionScopeRequestOptions, SingleElementPropertiesRequestOptions, WithCancelEvent } from "@itwin/presentation-common";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
/**
|
|
15
|
-
* Presentation manager working mode.
|
|
16
|
-
* @public
|
|
17
|
-
* @deprecated in 3.x. The attribute is not used by [[PresentationManager]] anymore
|
|
18
|
-
*/
|
|
19
|
-
export declare enum PresentationManagerMode {
|
|
20
|
-
/**
|
|
21
|
-
* Presentation manager assumes iModels are opened in read-only mode and avoids doing some work
|
|
22
|
-
* related to reacting to changes in iModels.
|
|
23
|
-
*/
|
|
24
|
-
ReadOnly = 0,
|
|
25
|
-
/**
|
|
26
|
-
* Presentation manager assumes iModels are opened in read-write mode and it may need to
|
|
27
|
-
* react to changes. This involves some additional work and gives slightly worse performance.
|
|
28
|
-
*/
|
|
29
|
-
ReadWrite = 1
|
|
30
|
-
}
|
|
9
|
+
import { PresentationManagerDetail } from "./PresentationManagerDetail.js";
|
|
10
|
+
import { RulesetManager } from "./RulesetManager.js";
|
|
11
|
+
import { RulesetVariablesManager } from "./RulesetVariablesManager.js";
|
|
12
|
+
import { BackendDiagnosticsAttribute, BackendDiagnosticsOptions } from "./Utils.js";
|
|
13
|
+
import { _presentation_manager_detail } from "./InternalSymbols.js";
|
|
31
14
|
/**
|
|
32
15
|
* Presentation hierarchy cache mode.
|
|
33
16
|
* @public
|
|
@@ -171,12 +154,6 @@ export interface PresentationAssetsRootConfig {
|
|
|
171
154
|
* Path to `presentation-backend` assets. Relative paths start from `process.cwd()`.
|
|
172
155
|
*/
|
|
173
156
|
backend: string;
|
|
174
|
-
/**
|
|
175
|
-
* Path to `presentation-common` assets.
|
|
176
|
-
*
|
|
177
|
-
* @deprecated in 3.x. This path is not used anymore
|
|
178
|
-
*/
|
|
179
|
-
common: string;
|
|
180
157
|
}
|
|
181
158
|
/**
|
|
182
159
|
* Properties that can be used to configure [[PresentationManager]]
|
|
@@ -217,20 +194,6 @@ export interface PresentationManagerProps {
|
|
|
217
194
|
* @note Only files with `.PresentationRuleSet.json` are read.
|
|
218
195
|
*/
|
|
219
196
|
supplementalRulesetDirectories?: string[];
|
|
220
|
-
/**
|
|
221
|
-
* A list of directories containing application's locale-specific localized
|
|
222
|
-
* string files (in simplified i18next v3 format)
|
|
223
|
-
*
|
|
224
|
-
* @deprecated in 3.x. Use [[getLocalizedString]] to localize data returned by [[PresentationManager]].
|
|
225
|
-
*/
|
|
226
|
-
localeDirectories?: string[];
|
|
227
|
-
/**
|
|
228
|
-
* Sets the active locale to use when localizing presentation-related
|
|
229
|
-
* strings. It can later be changed through [[PresentationManager.activeLocale]].
|
|
230
|
-
*
|
|
231
|
-
* @deprecated in 3.x. Use [[getLocalizedString]] to localize data returned by [[PresentationManager]].
|
|
232
|
-
*/
|
|
233
|
-
defaultLocale?: string;
|
|
234
197
|
/**
|
|
235
198
|
* Sets the active unit system to use for formatting property values with
|
|
236
199
|
* units. Default presentation units are used if this is not specified. The active unit
|
|
@@ -243,26 +206,10 @@ export interface PresentationManagerProps {
|
|
|
243
206
|
* in requested unit system.
|
|
244
207
|
*/
|
|
245
208
|
defaultFormats?: FormatsMap;
|
|
246
|
-
/**
|
|
247
|
-
* Should schemas preloading be enabled. If true, presentation manager listens
|
|
248
|
-
* for `BriefcaseDb.onOpened` event and force pre-loads all ECSchemas.
|
|
249
|
-
*
|
|
250
|
-
* @deprecated in 3.x. Use [[PresentationProps.enableSchemasPreload]] instead.
|
|
251
|
-
*/
|
|
252
|
-
enableSchemasPreload?: boolean;
|
|
253
209
|
/**
|
|
254
210
|
* A number of worker threads to use for handling presentation requests. Defaults to `2`.
|
|
255
211
|
*/
|
|
256
212
|
workerThreadsCount?: number;
|
|
257
|
-
/**
|
|
258
|
-
* Presentation manager working mode. Backends that use iModels in read-write mode should
|
|
259
|
-
* use `ReadWrite`, others might want to set to `ReadOnly` for better performance.
|
|
260
|
-
*
|
|
261
|
-
* Defaults to [[PresentationManagerMode.ReadWrite]].
|
|
262
|
-
*
|
|
263
|
-
* @deprecated in 3.x. The attribute is not used by [[PresentationManager]] anymore
|
|
264
|
-
*/
|
|
265
|
-
mode?: PresentationManagerMode;
|
|
266
213
|
/**
|
|
267
214
|
* The interval (in milliseconds) used to poll for presentation data changes. If not set, presentation
|
|
268
215
|
* data changes are not tracked at all.
|
|
@@ -280,17 +227,6 @@ export interface PresentationManagerProps {
|
|
|
280
227
|
* Set to a falsy value to turn off. `true` for memory-mapping the whole iModel. Number value for memory-mapping the specified amount of bytes.
|
|
281
228
|
*/
|
|
282
229
|
useMmap?: boolean | number;
|
|
283
|
-
/**
|
|
284
|
-
* An identifier which helps separate multiple presentation managers. It's
|
|
285
|
-
* mostly useful in tests where multiple presentation managers can co-exist
|
|
286
|
-
* and try to share the same resources, which we don't want. With this identifier
|
|
287
|
-
* set, managers put their resources into id-named subdirectories.
|
|
288
|
-
*
|
|
289
|
-
* @internal
|
|
290
|
-
*/
|
|
291
|
-
id?: string;
|
|
292
|
-
/** @internal */
|
|
293
|
-
addon?: NativePlatformDefinition;
|
|
294
230
|
/**
|
|
295
231
|
* Localization function to localize data returned by presentation manager when it's used directly on the backend (as opposed to when used through RPC, where
|
|
296
232
|
* data is localized on the frontend). Defaults to English localization.
|
|
@@ -321,11 +257,6 @@ export declare class PresentationManager {
|
|
|
321
257
|
private _props;
|
|
322
258
|
private _detail;
|
|
323
259
|
private _localizationHelper;
|
|
324
|
-
/**
|
|
325
|
-
* Get / set active locale used for localizing presentation data
|
|
326
|
-
* @deprecated in 3.x. Use [[PresentationManagerProps.getLocalizedString]] to localize data returned by [[PresentationManager]].
|
|
327
|
-
*/
|
|
328
|
-
activeLocale: string | undefined;
|
|
329
260
|
/**
|
|
330
261
|
* Creates an instance of PresentationManager.
|
|
331
262
|
* @param props Optional configuration properties.
|
|
@@ -335,9 +266,11 @@ export declare class PresentationManager {
|
|
|
335
266
|
get activeUnitSystem(): UnitSystemKey | undefined;
|
|
336
267
|
set activeUnitSystem(value: UnitSystemKey | undefined);
|
|
337
268
|
/** Dispose the presentation manager. Must be called to clean up native resources. */
|
|
269
|
+
[Symbol.dispose](): void;
|
|
270
|
+
/** @deprecated in 5.0 Use [Symbol.dispose] instead. */
|
|
338
271
|
dispose(): void;
|
|
339
|
-
/**
|
|
340
|
-
|
|
272
|
+
/** An event, that this manager raises whenever any request is made on it. */
|
|
273
|
+
get onUsed(): BeEvent<() => void>;
|
|
341
274
|
/** Properties used to initialize the manager */
|
|
342
275
|
get props(): PresentationManagerProps;
|
|
343
276
|
/** Get rulesets manager */
|
|
@@ -348,10 +281,7 @@ export declare class PresentationManager {
|
|
|
348
281
|
*/
|
|
349
282
|
vars(rulesetId: string): RulesetVariablesManager;
|
|
350
283
|
/** @internal */
|
|
351
|
-
|
|
352
|
-
/** @internal */
|
|
353
|
-
getDetail(): PresentationManagerDetail;
|
|
354
|
-
/** @internal */
|
|
284
|
+
get [_presentation_manager_detail](): PresentationManagerDetail;
|
|
355
285
|
getRulesetId(rulesetOrId: Ruleset | string): string;
|
|
356
286
|
/**
|
|
357
287
|
* Retrieves nodes
|
|
@@ -439,20 +369,13 @@ export declare class PresentationManager {
|
|
|
439
369
|
/**
|
|
440
370
|
* Retrieves available selection scopes.
|
|
441
371
|
* @public
|
|
372
|
+
* @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
442
373
|
*/
|
|
443
374
|
getSelectionScopes(_requestOptions: SelectionScopeRequestOptions<IModelDb> & BackendDiagnosticsAttribute): Promise<SelectionScope[]>;
|
|
444
|
-
/**
|
|
445
|
-
* Computes selection set based on provided selection scope.
|
|
446
|
-
* @public
|
|
447
|
-
* @deprecated in 3.x. Use overload with `ComputeSelectionRequestOptions` parameter.
|
|
448
|
-
*/
|
|
449
|
-
computeSelection(requestOptions: SelectionScopeRequestOptions<IModelDb> & {
|
|
450
|
-
ids: Id64String[];
|
|
451
|
-
scopeId: string;
|
|
452
|
-
} & BackendDiagnosticsAttribute): Promise<KeySet>;
|
|
453
375
|
/**
|
|
454
376
|
* Computes selection based on provided element IDs and selection scope.
|
|
455
377
|
* @public
|
|
378
|
+
* @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
456
379
|
*/
|
|
457
380
|
computeSelection(requestOptions: ComputeSelectionRequestOptions<IModelDb> & BackendDiagnosticsAttribute): Promise<KeySet>;
|
|
458
381
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"PresentationManager.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAa,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,8BAA8B,EAC9B,OAAO,EACP,+BAA+B,EAE/B,qBAAqB,EACrB,4BAA4B,EAE5B,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,4BAA4B,EAC5B,iBAAiB,EACjB,4CAA4C,EAC5C,mCAAmC,EACnC,UAAU,EACV,oBAAoB,EACpB,uBAAuB,EAEvB,sCAAsC,EACt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