@itwin/presentation-backend 4.0.0-dev.8 → 4.0.0-dev.80

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 (59) hide show
  1. package/CHANGELOG.md +47 -1
  2. package/lib/cjs/assets/supplemental-presentation-rules/BisCore.PresentationRuleSet.json +5 -3
  3. package/lib/cjs/presentation-backend/BackendLoggerCategory.d.ts +41 -41
  4. package/lib/cjs/presentation-backend/BackendLoggerCategory.js +50 -50
  5. package/lib/cjs/presentation-backend/Constants.d.ts +8 -8
  6. package/lib/cjs/presentation-backend/Constants.js +40 -36
  7. package/lib/cjs/presentation-backend/Constants.js.map +1 -1
  8. package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts +11 -11
  9. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js +260 -262
  10. package/lib/cjs/presentation-backend/ElementPropertiesHelper.js.map +1 -1
  11. package/lib/cjs/presentation-backend/NativePlatform.d.ts +87 -87
  12. package/lib/cjs/presentation-backend/NativePlatform.d.ts.map +1 -1
  13. package/lib/cjs/presentation-backend/NativePlatform.js +140 -140
  14. package/lib/cjs/presentation-backend/NativePlatform.js.map +1 -1
  15. package/lib/cjs/presentation-backend/Presentation.d.ts +106 -106
  16. package/lib/cjs/presentation-backend/Presentation.d.ts.map +1 -1
  17. package/lib/cjs/presentation-backend/Presentation.js +148 -150
  18. package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
  19. package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts +12 -12
  20. package/lib/cjs/presentation-backend/PresentationIpcHandler.js +41 -41
  21. package/lib/cjs/presentation-backend/PresentationManager.d.ts +456 -445
  22. package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
  23. package/lib/cjs/presentation-backend/PresentationManager.js +309 -311
  24. package/lib/cjs/presentation-backend/PresentationManager.js.map +1 -1
  25. package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts +61 -61
  26. package/lib/cjs/presentation-backend/PresentationManagerDetail.js +430 -430
  27. package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
  28. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts +62 -62
  29. package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts.map +1 -1
  30. package/lib/cjs/presentation-backend/PresentationRpcImpl.js +388 -388
  31. package/lib/cjs/presentation-backend/PresentationRpcImpl.js.map +1 -1
  32. package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts +102 -102
  33. package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
  34. package/lib/cjs/presentation-backend/RulesetEmbedder.js +284 -279
  35. package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
  36. package/lib/cjs/presentation-backend/RulesetManager.d.ts +53 -53
  37. package/lib/cjs/presentation-backend/RulesetManager.js +73 -73
  38. package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts +140 -140
  39. package/lib/cjs/presentation-backend/RulesetVariablesManager.js +129 -129
  40. package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts +28 -28
  41. package/lib/cjs/presentation-backend/SelectionScopesHelper.js +210 -213
  42. package/lib/cjs/presentation-backend/SelectionScopesHelper.js.map +1 -1
  43. package/lib/cjs/presentation-backend/TemporaryStorage.d.ts +123 -123
  44. package/lib/cjs/presentation-backend/TemporaryStorage.js +151 -151
  45. package/lib/cjs/presentation-backend/UpdatesTracker.d.ts +27 -27
  46. package/lib/cjs/presentation-backend/UpdatesTracker.js +54 -54
  47. package/lib/cjs/presentation-backend/Utils.d.ts +49 -49
  48. package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
  49. package/lib/cjs/presentation-backend/Utils.js +107 -106
  50. package/lib/cjs/presentation-backend/Utils.js.map +1 -1
  51. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.d.ts +16 -16
  52. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js +55 -51
  53. package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js.map +1 -1
  54. package/lib/cjs/presentation-backend/domain/RulesetElements.d.ts +21 -21
  55. package/lib/cjs/presentation-backend/domain/RulesetElements.js +38 -38
  56. package/lib/cjs/presentation-backend.d.ts +19 -19
  57. package/lib/cjs/presentation-backend.js +39 -35
  58. package/lib/cjs/presentation-backend.js.map +1 -1
  59. package/package.json +18 -18
@@ -1,141 +1,141 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { Id64String } from "@itwin/core-bentley";
5
- import { VariableValue, VariableValueTypes } from "@itwin/presentation-common";
6
- import { NativePlatformDefinition } from "./NativePlatform";
7
- /**
8
- * Presentation ruleset variables registry.
9
- * @public
10
- */
11
- export interface RulesetVariablesManager {
12
- /** Gets a value of the specified type and ID */
13
- getValue(variableId: string, type: VariableValueTypes): VariableValue;
14
- /** Sets a value of the specified type */
15
- setValue(variableId: string, type: VariableValueTypes, value: VariableValue): void;
16
- /** Unsets variable with given id. */
17
- unset(variableId: string): void;
18
- /**
19
- * Retrieves `string` variable value.
20
- * Returns empty string if variable does not exist or does not convert to string.
21
- */
22
- getString(variableId: string): string;
23
- /**
24
- * Sets `string` variable value
25
- */
26
- setString(variableId: string, value: string): void;
27
- /**
28
- * Retrieves `boolean` variable value.
29
- * Returns `false` if variable does not exist or does not convert to boolean.
30
- */
31
- getBool(variableId: string): boolean;
32
- /**
33
- * Sets `boolean` variable value
34
- */
35
- setBool(variableId: string, value: boolean): void;
36
- /**
37
- * Retrieves `number` variable value.
38
- * Returns `0` if variable does not exist or does not convert to integer.
39
- */
40
- getInt(variableId: string): number;
41
- /**
42
- * Sets `number` variable value
43
- */
44
- setInt(variableId: string, value: number): void;
45
- /**
46
- * Retrieves `number[]` variable value.
47
- * Returns empty array if variable does not exist or does not convert to integer array.
48
- */
49
- getInts(variableId: string): number[];
50
- /**
51
- * Sets `number[]` variable value
52
- */
53
- setInts(variableId: string, value: number[]): void;
54
- /**
55
- * Retrieves `Id64String` variable value.
56
- * Returns invalid Id64String if variable does not exist or does not convert to Id64String.
57
- */
58
- getId64(variableId: string): Id64String;
59
- /**
60
- * Sets `Id64String` variable value
61
- */
62
- setId64(variableId: string, value: Id64String): void;
63
- /**
64
- * Retrieves `Id64String[]` variable value.
65
- * Returns empty array if variable does not exist or does not convert to Id64String array.
66
- */
67
- getId64s(variableId: string): Id64String[];
68
- /**
69
- * Sets `Id64String[]` variable value
70
- */
71
- setId64s(variableId: string, value: Id64String[]): void;
72
- }
73
- /**
74
- * Presentation ruleset variables registry implementation.
75
- * @internal
76
- */
77
- export declare class RulesetVariablesManagerImpl implements RulesetVariablesManager {
78
- private _getNativePlatform;
79
- private _rulesetId;
80
- constructor(getNativeAddon: () => NativePlatformDefinition, rulesetId: string);
81
- setValueInternal(variableId: string, type: VariableValueTypes, value: VariableValue): void;
82
- getValueInternal(variableId: string, type: VariableValueTypes): VariableValue;
83
- setValue(variableId: string, type: VariableValueTypes, value: VariableValue): void;
84
- unset(variableId: string): void;
85
- getValue(variableId: string, type: VariableValueTypes): VariableValue;
86
- /**
87
- * Retrieves `string` variable value.
88
- * Returns empty string if variable does not exist or does not convert to string.
89
- */
90
- getString(variableId: string): string;
91
- /**
92
- * Sets `string` variable value
93
- */
94
- setString(variableId: string, value: string): void;
95
- /**
96
- * Retrieves `boolean` variable value.
97
- * Returns `false` if variable does not exist or does not convert to boolean.
98
- */
99
- getBool(variableId: string): boolean;
100
- /**
101
- * Sets `boolean` variable value
102
- */
103
- setBool(variableId: string, value: boolean): void;
104
- /**
105
- * Retrieves `number` variable value.
106
- * Returns `0` if variable does not exist or does not convert to integer.
107
- */
108
- getInt(variableId: string): number;
109
- /**
110
- * Sets `number` variable value
111
- */
112
- setInt(variableId: string, value: number): void;
113
- /**
114
- * Retrieves `number[]` variable value.
115
- * Returns empty array if variable does not exist or does not convert to integer array.
116
- */
117
- getInts(variableId: string): number[];
118
- /**
119
- * Sets `number[]` variable value
120
- */
121
- setInts(variableId: string, value: number[]): void;
122
- /**
123
- * Retrieves `Id64String` variable value.
124
- * Returns invalid Id64String if variable does not exist or does not convert to Id64String.
125
- */
126
- getId64(variableId: string): Id64String;
127
- /**
128
- * Sets `Id64String` variable value
129
- */
130
- setId64(variableId: string, value: Id64String): void;
131
- /**
132
- * Retrieves `Id64String[]` variable value.
133
- * Returns empty array if variable does not exist or does not convert to Id64String array.
134
- */
135
- getId64s(variableId: string): Id64String[];
136
- /**
137
- * Sets `Id64String[]` variable value
138
- */
139
- setId64s(variableId: string, value: Id64String[]): void;
140
- }
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { Id64String } from "@itwin/core-bentley";
5
+ import { VariableValue, VariableValueTypes } from "@itwin/presentation-common";
6
+ import { NativePlatformDefinition } from "./NativePlatform";
7
+ /**
8
+ * Presentation ruleset variables registry.
9
+ * @public
10
+ */
11
+ export interface RulesetVariablesManager {
12
+ /** Gets a value of the specified type and ID */
13
+ getValue(variableId: string, type: VariableValueTypes): VariableValue;
14
+ /** Sets a value of the specified type */
15
+ setValue(variableId: string, type: VariableValueTypes, value: VariableValue): void;
16
+ /** Unsets variable with given id. */
17
+ unset(variableId: string): void;
18
+ /**
19
+ * Retrieves `string` variable value.
20
+ * Returns empty string if variable does not exist or does not convert to string.
21
+ */
22
+ getString(variableId: string): string;
23
+ /**
24
+ * Sets `string` variable value
25
+ */
26
+ setString(variableId: string, value: string): void;
27
+ /**
28
+ * Retrieves `boolean` variable value.
29
+ * Returns `false` if variable does not exist or does not convert to boolean.
30
+ */
31
+ getBool(variableId: string): boolean;
32
+ /**
33
+ * Sets `boolean` variable value
34
+ */
35
+ setBool(variableId: string, value: boolean): void;
36
+ /**
37
+ * Retrieves `number` variable value.
38
+ * Returns `0` if variable does not exist or does not convert to integer.
39
+ */
40
+ getInt(variableId: string): number;
41
+ /**
42
+ * Sets `number` variable value
43
+ */
44
+ setInt(variableId: string, value: number): void;
45
+ /**
46
+ * Retrieves `number[]` variable value.
47
+ * Returns empty array if variable does not exist or does not convert to integer array.
48
+ */
49
+ getInts(variableId: string): number[];
50
+ /**
51
+ * Sets `number[]` variable value
52
+ */
53
+ setInts(variableId: string, value: number[]): void;
54
+ /**
55
+ * Retrieves `Id64String` variable value.
56
+ * Returns invalid Id64String if variable does not exist or does not convert to Id64String.
57
+ */
58
+ getId64(variableId: string): Id64String;
59
+ /**
60
+ * Sets `Id64String` variable value
61
+ */
62
+ setId64(variableId: string, value: Id64String): void;
63
+ /**
64
+ * Retrieves `Id64String[]` variable value.
65
+ * Returns empty array if variable does not exist or does not convert to Id64String array.
66
+ */
67
+ getId64s(variableId: string): Id64String[];
68
+ /**
69
+ * Sets `Id64String[]` variable value
70
+ */
71
+ setId64s(variableId: string, value: Id64String[]): void;
72
+ }
73
+ /**
74
+ * Presentation ruleset variables registry implementation.
75
+ * @internal
76
+ */
77
+ export declare class RulesetVariablesManagerImpl implements RulesetVariablesManager {
78
+ private _getNativePlatform;
79
+ private _rulesetId;
80
+ constructor(getNativeAddon: () => NativePlatformDefinition, rulesetId: string);
81
+ setValueInternal(variableId: string, type: VariableValueTypes, value: VariableValue): void;
82
+ getValueInternal(variableId: string, type: VariableValueTypes): VariableValue;
83
+ setValue(variableId: string, type: VariableValueTypes, value: VariableValue): void;
84
+ unset(variableId: string): void;
85
+ getValue(variableId: string, type: VariableValueTypes): VariableValue;
86
+ /**
87
+ * Retrieves `string` variable value.
88
+ * Returns empty string if variable does not exist or does not convert to string.
89
+ */
90
+ getString(variableId: string): string;
91
+ /**
92
+ * Sets `string` variable value
93
+ */
94
+ setString(variableId: string, value: string): void;
95
+ /**
96
+ * Retrieves `boolean` variable value.
97
+ * Returns `false` if variable does not exist or does not convert to boolean.
98
+ */
99
+ getBool(variableId: string): boolean;
100
+ /**
101
+ * Sets `boolean` variable value
102
+ */
103
+ setBool(variableId: string, value: boolean): void;
104
+ /**
105
+ * Retrieves `number` variable value.
106
+ * Returns `0` if variable does not exist or does not convert to integer.
107
+ */
108
+ getInt(variableId: string): number;
109
+ /**
110
+ * Sets `number` variable value
111
+ */
112
+ setInt(variableId: string, value: number): void;
113
+ /**
114
+ * Retrieves `number[]` variable value.
115
+ * Returns empty array if variable does not exist or does not convert to integer array.
116
+ */
117
+ getInts(variableId: string): number[];
118
+ /**
119
+ * Sets `number[]` variable value
120
+ */
121
+ setInts(variableId: string, value: number[]): void;
122
+ /**
123
+ * Retrieves `Id64String` variable value.
124
+ * Returns invalid Id64String if variable does not exist or does not convert to Id64String.
125
+ */
126
+ getId64(variableId: string): Id64String;
127
+ /**
128
+ * Sets `Id64String` variable value
129
+ */
130
+ setId64(variableId: string, value: Id64String): void;
131
+ /**
132
+ * Retrieves `Id64String[]` variable value.
133
+ * Returns empty array if variable does not exist or does not convert to Id64String array.
134
+ */
135
+ getId64s(variableId: string): Id64String[];
136
+ /**
137
+ * Sets `Id64String[]` variable value
138
+ */
139
+ setId64s(variableId: string, value: Id64String[]): void;
140
+ }
141
141
  //# sourceMappingURL=RulesetVariablesManager.d.ts.map
@@ -1,130 +1,130 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Core
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.RulesetVariablesManagerImpl = void 0;
11
- const presentation_common_1 = require("@itwin/presentation-common");
12
- /**
13
- * Presentation ruleset variables registry implementation.
14
- * @internal
15
- */
16
- class RulesetVariablesManagerImpl {
17
- constructor(getNativeAddon, rulesetId) {
18
- this._getNativePlatform = getNativeAddon;
19
- this._rulesetId = rulesetId;
20
- }
21
- setValueInternal(variableId, type, value) {
22
- this._getNativePlatform().setRulesetVariableValue(this._rulesetId, variableId, type, value);
23
- }
24
- getValueInternal(variableId, type) {
25
- return this._getNativePlatform().getRulesetVariableValue(this._rulesetId, variableId, type).result;
26
- }
27
- setValue(variableId, type, value) {
28
- switch (type) {
29
- case presentation_common_1.VariableValueTypes.Bool: return this.setBool(variableId, value);
30
- case presentation_common_1.VariableValueTypes.Id64: return this.setId64(variableId, value);
31
- case presentation_common_1.VariableValueTypes.Id64Array: return this.setId64s(variableId, value);
32
- case presentation_common_1.VariableValueTypes.Int: return this.setInt(variableId, value);
33
- case presentation_common_1.VariableValueTypes.IntArray: return this.setInts(variableId, value);
34
- case presentation_common_1.VariableValueTypes.String: return this.setString(variableId, value);
35
- }
36
- }
37
- unset(variableId) {
38
- this._getNativePlatform().unsetRulesetVariableValue(this._rulesetId, variableId);
39
- }
40
- getValue(variableId, type) {
41
- switch (type) {
42
- case presentation_common_1.VariableValueTypes.Bool: return this.getBool(variableId);
43
- case presentation_common_1.VariableValueTypes.Id64: return this.getId64(variableId);
44
- case presentation_common_1.VariableValueTypes.Id64Array: return this.getId64s(variableId);
45
- case presentation_common_1.VariableValueTypes.Int: return this.getInt(variableId);
46
- case presentation_common_1.VariableValueTypes.IntArray: return this.getInts(variableId);
47
- case presentation_common_1.VariableValueTypes.String: return this.getString(variableId);
48
- }
49
- }
50
- /**
51
- * Retrieves `string` variable value.
52
- * Returns empty string if variable does not exist or does not convert to string.
53
- */
54
- getString(variableId) {
55
- return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.String));
56
- }
57
- /**
58
- * Sets `string` variable value
59
- */
60
- setString(variableId, value) {
61
- this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.String, value);
62
- }
63
- /**
64
- * Retrieves `boolean` variable value.
65
- * Returns `false` if variable does not exist or does not convert to boolean.
66
- */
67
- getBool(variableId) {
68
- return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Bool));
69
- }
70
- /**
71
- * Sets `boolean` variable value
72
- */
73
- setBool(variableId, value) {
74
- this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Bool, value);
75
- }
76
- /**
77
- * Retrieves `number` variable value.
78
- * Returns `0` if variable does not exist or does not convert to integer.
79
- */
80
- getInt(variableId) {
81
- return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Int));
82
- }
83
- /**
84
- * Sets `number` variable value
85
- */
86
- setInt(variableId, value) {
87
- this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Int, value);
88
- }
89
- /**
90
- * Retrieves `number[]` variable value.
91
- * Returns empty array if variable does not exist or does not convert to integer array.
92
- */
93
- getInts(variableId) {
94
- return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.IntArray));
95
- }
96
- /**
97
- * Sets `number[]` variable value
98
- */
99
- setInts(variableId, value) {
100
- this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.IntArray, value);
101
- }
102
- /**
103
- * Retrieves `Id64String` variable value.
104
- * Returns invalid Id64String if variable does not exist or does not convert to Id64String.
105
- */
106
- getId64(variableId) {
107
- return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64));
108
- }
109
- /**
110
- * Sets `Id64String` variable value
111
- */
112
- setId64(variableId, value) {
113
- this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64, value);
114
- }
115
- /**
116
- * Retrieves `Id64String[]` variable value.
117
- * Returns empty array if variable does not exist or does not convert to Id64String array.
118
- */
119
- getId64s(variableId) {
120
- return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64Array));
121
- }
122
- /**
123
- * Sets `Id64String[]` variable value
124
- */
125
- setId64s(variableId, value) {
126
- this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64Array, value);
127
- }
128
- }
129
- exports.RulesetVariablesManagerImpl = RulesetVariablesManagerImpl;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Core
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.RulesetVariablesManagerImpl = void 0;
11
+ const presentation_common_1 = require("@itwin/presentation-common");
12
+ /**
13
+ * Presentation ruleset variables registry implementation.
14
+ * @internal
15
+ */
16
+ class RulesetVariablesManagerImpl {
17
+ constructor(getNativeAddon, rulesetId) {
18
+ this._getNativePlatform = getNativeAddon;
19
+ this._rulesetId = rulesetId;
20
+ }
21
+ setValueInternal(variableId, type, value) {
22
+ this._getNativePlatform().setRulesetVariableValue(this._rulesetId, variableId, type, value);
23
+ }
24
+ getValueInternal(variableId, type) {
25
+ return this._getNativePlatform().getRulesetVariableValue(this._rulesetId, variableId, type).result;
26
+ }
27
+ setValue(variableId, type, value) {
28
+ switch (type) {
29
+ case presentation_common_1.VariableValueTypes.Bool: return this.setBool(variableId, value);
30
+ case presentation_common_1.VariableValueTypes.Id64: return this.setId64(variableId, value);
31
+ case presentation_common_1.VariableValueTypes.Id64Array: return this.setId64s(variableId, value);
32
+ case presentation_common_1.VariableValueTypes.Int: return this.setInt(variableId, value);
33
+ case presentation_common_1.VariableValueTypes.IntArray: return this.setInts(variableId, value);
34
+ case presentation_common_1.VariableValueTypes.String: return this.setString(variableId, value);
35
+ }
36
+ }
37
+ unset(variableId) {
38
+ this._getNativePlatform().unsetRulesetVariableValue(this._rulesetId, variableId);
39
+ }
40
+ getValue(variableId, type) {
41
+ switch (type) {
42
+ case presentation_common_1.VariableValueTypes.Bool: return this.getBool(variableId);
43
+ case presentation_common_1.VariableValueTypes.Id64: return this.getId64(variableId);
44
+ case presentation_common_1.VariableValueTypes.Id64Array: return this.getId64s(variableId);
45
+ case presentation_common_1.VariableValueTypes.Int: return this.getInt(variableId);
46
+ case presentation_common_1.VariableValueTypes.IntArray: return this.getInts(variableId);
47
+ case presentation_common_1.VariableValueTypes.String: return this.getString(variableId);
48
+ }
49
+ }
50
+ /**
51
+ * Retrieves `string` variable value.
52
+ * Returns empty string if variable does not exist or does not convert to string.
53
+ */
54
+ getString(variableId) {
55
+ return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.String));
56
+ }
57
+ /**
58
+ * Sets `string` variable value
59
+ */
60
+ setString(variableId, value) {
61
+ this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.String, value);
62
+ }
63
+ /**
64
+ * Retrieves `boolean` variable value.
65
+ * Returns `false` if variable does not exist or does not convert to boolean.
66
+ */
67
+ getBool(variableId) {
68
+ return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Bool));
69
+ }
70
+ /**
71
+ * Sets `boolean` variable value
72
+ */
73
+ setBool(variableId, value) {
74
+ this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Bool, value);
75
+ }
76
+ /**
77
+ * Retrieves `number` variable value.
78
+ * Returns `0` if variable does not exist or does not convert to integer.
79
+ */
80
+ getInt(variableId) {
81
+ return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Int));
82
+ }
83
+ /**
84
+ * Sets `number` variable value
85
+ */
86
+ setInt(variableId, value) {
87
+ this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Int, value);
88
+ }
89
+ /**
90
+ * Retrieves `number[]` variable value.
91
+ * Returns empty array if variable does not exist or does not convert to integer array.
92
+ */
93
+ getInts(variableId) {
94
+ return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.IntArray));
95
+ }
96
+ /**
97
+ * Sets `number[]` variable value
98
+ */
99
+ setInts(variableId, value) {
100
+ this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.IntArray, value);
101
+ }
102
+ /**
103
+ * Retrieves `Id64String` variable value.
104
+ * Returns invalid Id64String if variable does not exist or does not convert to Id64String.
105
+ */
106
+ getId64(variableId) {
107
+ return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64));
108
+ }
109
+ /**
110
+ * Sets `Id64String` variable value
111
+ */
112
+ setId64(variableId, value) {
113
+ this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64, value);
114
+ }
115
+ /**
116
+ * Retrieves `Id64String[]` variable value.
117
+ * Returns empty array if variable does not exist or does not convert to Id64String array.
118
+ */
119
+ getId64s(variableId) {
120
+ return (this.getValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64Array));
121
+ }
122
+ /**
123
+ * Sets `Id64String[]` variable value
124
+ */
125
+ setId64s(variableId, value) {
126
+ this.setValueInternal(variableId, presentation_common_1.VariableValueTypes.Id64Array, value);
127
+ }
128
+ }
129
+ exports.RulesetVariablesManagerImpl = RulesetVariablesManagerImpl;
130
130
  //# sourceMappingURL=RulesetVariablesManager.js.map
@@ -1,29 +1,29 @@
1
- /** @packageDocumentation
2
- * @module Core
3
- */
4
- import { IModelDb } from "@itwin/core-backend";
5
- import { Id64String } from "@itwin/core-bentley";
6
- import { ComputeSelectionRequestOptions, KeySet, SelectionScope, SelectionScopeRequestOptions } from "@itwin/presentation-common";
7
- /**
8
- * Contains helper methods for computing selection scopes. Will get removed
9
- * once rules-driven scopes are implemented.
10
- *
11
- * @internal
12
- */
13
- export declare class SelectionScopesHelper {
14
- private constructor();
15
- static getSelectionScopes(): SelectionScope[];
16
- private static getElementKey;
17
- private static computeElementSelection;
18
- private static computeCategorySelection;
19
- private static computeModelSelection;
20
- private static getRelatedFunctionalElementKey;
21
- private static findFirstRelatedFunctionalElementKey;
22
- private static elementClassDerivesFrom;
23
- private static computeFunctionalElementSelection;
24
- private static computeFunctionalAssemblySelection;
25
- private static computeFunctionalTopAssemblySelection;
26
- static computeSelection(requestOptions: SelectionScopeRequestOptions<IModelDb>, ids: Id64String[], scopeId: string): Promise<KeySet>;
27
- static computeSelection(requestOptions: ComputeSelectionRequestOptions<IModelDb>): Promise<KeySet>;
28
- }
1
+ /** @packageDocumentation
2
+ * @module Core
3
+ */
4
+ import { IModelDb } from "@itwin/core-backend";
5
+ import { Id64String } from "@itwin/core-bentley";
6
+ import { ComputeSelectionRequestOptions, KeySet, SelectionScope, SelectionScopeRequestOptions } from "@itwin/presentation-common";
7
+ /**
8
+ * Contains helper methods for computing selection scopes. Will get removed
9
+ * once rules-driven scopes are implemented.
10
+ *
11
+ * @internal
12
+ */
13
+ export declare class SelectionScopesHelper {
14
+ private constructor();
15
+ static getSelectionScopes(): SelectionScope[];
16
+ private static getElementKey;
17
+ private static computeElementSelection;
18
+ private static computeCategorySelection;
19
+ private static computeModelSelection;
20
+ private static getRelatedFunctionalElementKey;
21
+ private static findFirstRelatedFunctionalElementKey;
22
+ private static elementClassDerivesFrom;
23
+ private static computeFunctionalElementSelection;
24
+ private static computeFunctionalAssemblySelection;
25
+ private static computeFunctionalTopAssemblySelection;
26
+ static computeSelection(requestOptions: SelectionScopeRequestOptions<IModelDb>, ids: Id64String[], scopeId: string): Promise<KeySet>;
27
+ static computeSelection(requestOptions: ComputeSelectionRequestOptions<IModelDb>): Promise<KeySet>;
28
+ }
29
29
  //# sourceMappingURL=SelectionScopesHelper.d.ts.map