@itwin/presentation-backend 3.6.0-dev.11 → 3.6.0-dev.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/assets/primary-presentation-rules/ElementProperties.PresentationRuleSet.json +14 -14
  3. package/lib/cjs/assets/supplemental-presentation-rules/BisCore.PresentationRuleSet.json +761 -761
  4. package/lib/cjs/assets/supplemental-presentation-rules/Functional.PresentationRuleSet.json +139 -139
  5. package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts +41 -41
  6. package/lib/cjs/presentation-backend/BackendLoggerCategory.js +50 -50
  7. package/lib/cjs/presentation-backend/BackendLoggerCategory.js.map +1 -1
  8. package/lib/cjs/presentation-backend/Constants.d.ts +8 -8
  9. package/lib/cjs/presentation-backend/Constants.js +36 -36
  10. package/lib/cjs/presentation-backend/Constants.js.map +1 -1
  11. package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts +11 -11
  12. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js +274 -274
  13. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js.map +1 -1
  14. package/lib/cjs/presentation-backend/NativePlatform.d.ts +86 -82
  15. package/lib/cjs/presentation-backend/NativePlatform.d.ts.map +1 -1
  16. package/lib/cjs/presentation-backend/NativePlatform.js +139 -139
  17. package/lib/cjs/presentation-backend/NativePlatform.js.map +1 -1
  18. package/lib/cjs/presentation-backend/Presentation.d.ts +106 -106
  19. package/lib/cjs/presentation-backend/Presentation.js +150 -150
  20. package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
  21. package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts +12 -12
  22. package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts.map +1 -1
  23. package/lib/cjs/presentation-backend/PresentationIpcHandler.js +41 -41
  24. package/lib/cjs/presentation-backend/PresentationIpcHandler.js.map +1 -1
  25. package/lib/cjs/presentation-backend/PresentationManager.d.ts +436 -436
  26. package/lib/cjs/presentation-backend/PresentationManager.js +292 -292
  27. package/lib/cjs/presentation-backend/PresentationManager.js.map +1 -1
  28. package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts +60 -60
  29. package/lib/cjs/presentation-backend/PresentationManagerDetail.js +420 -420
  30. package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
  31. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts +61 -61
  32. package/lib/cjs/presentation-backend/PresentationRpcImpl.js +365 -365
  33. package/lib/cjs/presentation-backend/PresentationRpcImpl.js.map +1 -1
  34. package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts +104 -104
  35. package/lib/cjs/presentation-backend/RulesetEmbedder.js +282 -282
  36. package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
  37. package/lib/cjs/presentation-backend/RulesetManager.d.ts +53 -53
  38. package/lib/cjs/presentation-backend/RulesetManager.js +73 -73
  39. package/lib/cjs/presentation-backend/RulesetManager.js.map +1 -1
  40. package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts +140 -140
  41. package/lib/cjs/presentation-backend/RulesetVariablesManager.js +129 -129
  42. package/lib/cjs/presentation-backend/RulesetVariablesManager.js.map +1 -1
  43. package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts +35 -35
  44. package/lib/cjs/presentation-backend/SelectionScopesHelper.js +229 -229
  45. package/lib/cjs/presentation-backend/SelectionScopesHelper.js.map +1 -1
  46. package/lib/cjs/presentation-backend/TemporaryStorage.d.ts +123 -123
  47. package/lib/cjs/presentation-backend/TemporaryStorage.js +151 -151
  48. package/lib/cjs/presentation-backend/TemporaryStorage.js.map +1 -1
  49. package/lib/cjs/presentation-backend/UpdatesTracker.d.ts +27 -27
  50. package/lib/cjs/presentation-backend/UpdatesTracker.js +54 -54
  51. package/lib/cjs/presentation-backend/UpdatesTracker.js.map +1 -1
  52. package/lib/cjs/presentation-backend/Utils.d.ts +49 -49
  53. package/lib/cjs/presentation-backend/Utils.js +106 -106
  54. package/lib/cjs/presentation-backend/Utils.js.map +1 -1
  55. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.d.ts +16 -16
  56. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js +51 -51
  57. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js.map +1 -1
  58. package/lib/cjs/presentation-backend/domain/RulesetElements.d.ts +21 -21
  59. package/lib/cjs/presentation-backend/domain/RulesetElements.js +38 -38
  60. package/lib/cjs/presentation-backend/domain/RulesetElements.js.map +1 -1
  61. package/lib/cjs/presentation-backend.d.ts +19 -19
  62. package/lib/cjs/presentation-backend.js +35 -35
  63. package/lib/cjs/presentation-backend.js.map +1 -1
  64. package/package.json +13 -13
@@ -1,42 +1,42 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module RPC
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.PresentationIpcHandler = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const core_backend_1 = require("@itwin/core-backend");
13
- const presentation_common_1 = require("@itwin/presentation-common");
14
- const BackendLoggerCategory_1 = require("./BackendLoggerCategory");
15
- const Presentation_1 = require("./Presentation");
16
- /** @internal */
17
- class PresentationIpcHandler extends core_backend_1.IpcHandler {
18
- constructor() {
19
- super(...arguments);
20
- this.channelName = presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME;
21
- }
22
- async setRulesetVariable(params) {
23
- const { clientId, rulesetId, variable } = params;
24
- const parsedVariable = presentation_common_1.RulesetVariable.fromJSON(variable);
25
- Presentation_1.Presentation.getManager(clientId).vars(rulesetId).setValue(parsedVariable.id, parsedVariable.type, parsedVariable.value);
26
- }
27
- async unsetRulesetVariable(params) {
28
- const { clientId, rulesetId, variableId } = params;
29
- Presentation_1.Presentation.getManager(clientId).vars(rulesetId).unset(variableId);
30
- }
31
- async updateHierarchyState(params) {
32
- const { clientId, imodelKey, rulesetId, changeType, nodeKeys } = params;
33
- const imodelDb = core_backend_1.IModelDb.tryFindByKey(imodelKey);
34
- if (!imodelDb) {
35
- core_bentley_1.Logger.logError(BackendLoggerCategory_1.PresentationBackendLoggerCategory.Ipc, "Could not find IModelDb to perform hierarchy state update");
36
- return;
37
- }
38
- Presentation_1.Presentation.getManager(clientId).getNativePlatform().updateHierarchyState(imodelDb.nativeDb, rulesetId, changeType, JSON.stringify(nodeKeys));
39
- }
40
- }
41
- exports.PresentationIpcHandler = PresentationIpcHandler;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module RPC
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.PresentationIpcHandler = void 0;
11
+ const core_backend_1 = require("@itwin/core-backend");
12
+ const core_bentley_1 = require("@itwin/core-bentley");
13
+ const presentation_common_1 = require("@itwin/presentation-common");
14
+ const BackendLoggerCategory_1 = require("./BackendLoggerCategory");
15
+ const Presentation_1 = require("./Presentation");
16
+ /** @internal */
17
+ class PresentationIpcHandler extends core_backend_1.IpcHandler {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.channelName = presentation_common_1.PRESENTATION_IPC_CHANNEL_NAME;
21
+ }
22
+ async setRulesetVariable(params) {
23
+ const { clientId, rulesetId, variable } = params;
24
+ const parsedVariable = presentation_common_1.RulesetVariable.fromJSON(variable);
25
+ Presentation_1.Presentation.getManager(clientId).vars(rulesetId).setValue(parsedVariable.id, parsedVariable.type, parsedVariable.value);
26
+ }
27
+ async unsetRulesetVariable(params) {
28
+ const { clientId, rulesetId, variableId } = params;
29
+ Presentation_1.Presentation.getManager(clientId).vars(rulesetId).unset(variableId);
30
+ }
31
+ async updateHierarchyState(params) {
32
+ const { clientId, imodelKey, rulesetId, stateChanges } = params;
33
+ const imodelDb = core_backend_1.IModelDb.tryFindByKey(imodelKey);
34
+ if (!imodelDb) {
35
+ core_bentley_1.Logger.logError(BackendLoggerCategory_1.PresentationBackendLoggerCategory.Ipc, "Could not find IModelDb to perform hierarchy state update");
36
+ return;
37
+ }
38
+ Presentation_1.Presentation.getManager(clientId).getNativePlatform().updateHierarchyState(imodelDb.nativeDb, rulesetId, stateChanges);
39
+ }
40
+ }
41
+ exports.PresentationIpcHandler = PresentationIpcHandler;
42
42
  //# sourceMappingURL=PresentationIpcHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationIpcHandler.js","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationIpcHandler.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,sDAA2D;AAC3D,oEAGoC;AACpC,mEAA4E;AAC5E,iDAA8C;AAE9C,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,yBAAU;IAAtD;;QACS,gBAAW,GAAG,mDAA6B,CAAC;IAuBrD,CAAC;IArBQ,KAAK,CAAC,kBAAkB,CAAC,MAAqD;QACnF,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QACjD,MAAM,cAAc,GAAG,qCAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1D,2BAAY,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,MAAkC;QAClE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QACnD,2BAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAA+C;QAC/E,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QACxE,MAAM,QAAQ,GAAG,uBAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,EAAE;YACb,qBAAM,CAAC,QAAQ,CAAC,yDAAiC,CAAC,GAAG,EAAE,2DAA2D,CAAC,CAAC;YAEpH,OAAO;SACR;QACD,2BAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,iBAAiB,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjJ,CAAC;CACF;AAxBD,wDAwBC","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 { Logger } from \"@itwin/core-bentley\";\r\nimport { IModelDb, IpcHandler } from \"@itwin/core-backend\";\r\nimport {\r\n NodeKeyJSON, PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface, RulesetVariable, RulesetVariableJSON, SetRulesetVariableParams,\r\n UnsetRulesetVariableParams, UpdateHierarchyStateParams,\r\n} from \"@itwin/presentation-common\";\r\nimport { PresentationBackendLoggerCategory } from \"./BackendLoggerCategory\";\r\nimport { Presentation } from \"./Presentation\";\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: SetRulesetVariableParams<RulesetVariableJSON>): 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: UnsetRulesetVariableParams): Promise<void> {\r\n const { clientId, rulesetId, variableId } = params;\r\n Presentation.getManager(clientId).vars(rulesetId).unset(variableId);\r\n }\r\n\r\n public async updateHierarchyState(params: UpdateHierarchyStateParams<NodeKeyJSON>): Promise<void> {\r\n const { clientId, imodelKey, rulesetId, changeType, nodeKeys } = params;\r\n const imodelDb = IModelDb.tryFindByKey(imodelKey);\r\n if (!imodelDb) {\r\n Logger.logError(PresentationBackendLoggerCategory.Ipc, \"Could not find IModelDb to perform hierarchy state update\");\r\n\r\n return;\r\n }\r\n Presentation.getManager(clientId).getNativePlatform().updateHierarchyState(imodelDb.nativeDb, rulesetId, changeType, JSON.stringify(nodeKeys));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"PresentationIpcHandler.js","sourceRoot":"","sources":["../../../src/presentation-backend/PresentationIpcHandler.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2D;AAC3D,sDAA6C;AAC7C,oEAGoC;AACpC,mEAA4E;AAC5E,iDAA8C;AAE9C,gBAAgB;AAChB,MAAa,sBAAuB,SAAQ,yBAAU;IAAtD;;QACS,gBAAW,GAAG,mDAA6B,CAAC;IAsBrD,CAAC;IApBQ,KAAK,CAAC,kBAAkB,CAAC,MAAqD;QACnF,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QACjD,MAAM,cAAc,GAAG,qCAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1D,2BAAY,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,MAAkC;QAClE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QACnD,2BAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAA+C;QAC/E,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChE,MAAM,QAAQ,GAAG,uBAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,EAAE;YACb,qBAAM,CAAC,QAAQ,CAAC,yDAAiC,CAAC,GAAG,EAAE,2DAA2D,CAAC,CAAC;YACpH,OAAO;SACR;QACD,2BAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,iBAAiB,EAAE,CAAC,oBAAoB,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;IACzH,CAAC;CACF;AAvBD,wDAuBC","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 RPC\n */\n\nimport { IModelDb, IpcHandler } from \"@itwin/core-backend\";\nimport { Logger } from \"@itwin/core-bentley\";\nimport {\n NodeKeyJSON, PRESENTATION_IPC_CHANNEL_NAME, PresentationIpcInterface, RulesetVariable, RulesetVariableJSON, SetRulesetVariableParams,\n UnsetRulesetVariableParams, UpdateHierarchyStateParams,\n} from \"@itwin/presentation-common\";\nimport { PresentationBackendLoggerCategory } from \"./BackendLoggerCategory\";\nimport { Presentation } from \"./Presentation\";\n\n/** @internal */\nexport class PresentationIpcHandler extends IpcHandler implements PresentationIpcInterface {\n public channelName = PRESENTATION_IPC_CHANNEL_NAME;\n\n public async setRulesetVariable(params: SetRulesetVariableParams<RulesetVariableJSON>): Promise<void> {\n const { clientId, rulesetId, variable } = params;\n const parsedVariable = RulesetVariable.fromJSON(variable);\n Presentation.getManager(clientId).vars(rulesetId).setValue(parsedVariable.id, parsedVariable.type, parsedVariable.value);\n }\n\n public async unsetRulesetVariable(params: UnsetRulesetVariableParams): Promise<void> {\n const { clientId, rulesetId, variableId } = params;\n Presentation.getManager(clientId).vars(rulesetId).unset(variableId);\n }\n\n public async updateHierarchyState(params: UpdateHierarchyStateParams<NodeKeyJSON>): Promise<void> {\n const { clientId, imodelKey, rulesetId, stateChanges } = params;\n const imodelDb = IModelDb.tryFindByKey(imodelKey);\n if (!imodelDb) {\n Logger.logError(PresentationBackendLoggerCategory.Ipc, \"Could not find IModelDb to perform hierarchy state update\");\n return;\n }\n Presentation.getManager(clientId).getNativePlatform().updateHierarchyState(imodelDb.nativeDb, rulesetId, stateChanges);\n }\n}\n"]}