@itwin/presentation-frontend 4.5.0-dev.0 → 4.5.0-dev.10
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 +10 -1
- package/README.md +1 -1
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +10 -6
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/Diagnostics.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/Diagnostics.js +18 -13
- package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js +3 -3
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +3 -3
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/LocalizationHelper.js +3 -3
- package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/Presentation.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/Presentation.js +24 -14
- package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/PresentationManager.js +57 -30
- package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetManager.js +11 -7
- package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +53 -31
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +111 -66
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +54 -25
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteRules.json +172 -172
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +16 -10
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +3 -3
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +3 -3
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +15 -9
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +7 -5
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js +31 -16
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +25 -14
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend.js +3 -3
- package/lib/cjs/presentation-frontend.js.map +1 -1
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +10 -6
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/Diagnostics.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/Diagnostics.js +18 -13
- package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js +3 -3
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js +3 -3
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/LocalizationHelper.js +3 -3
- package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/Presentation.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/Presentation.js +24 -14
- package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/PresentationManager.js +57 -30
- package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/RulesetManager.js +11 -7
- package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js +53 -31
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +111 -66
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +54 -25
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteRules.json +172 -172
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +17 -11
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +3 -3
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +3 -3
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js +15 -9
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js +7 -5
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionManager.js +31 -16
- package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +25 -14
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
- package/lib/esm/presentation-frontend.js +3 -3
- package/lib/esm/presentation-frontend.js.map +1 -1
- package/package.json +19 -16
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
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
|
-
*--------------------------------------------------------------------------------------------*/
|
|
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
6
|
/** @packageDocumentation
|
|
7
7
|
* @module Core
|
|
8
8
|
*/
|
|
@@ -20,62 +20,80 @@ class RulesetVariablesManagerImpl {
|
|
|
20
20
|
}
|
|
21
21
|
getAllVariables() {
|
|
22
22
|
const variables = [];
|
|
23
|
-
for (const entry of this._clientValues)
|
|
23
|
+
for (const entry of this._clientValues) {
|
|
24
24
|
variables.push(entry[1]);
|
|
25
|
+
}
|
|
25
26
|
return variables;
|
|
26
27
|
}
|
|
27
28
|
changeValueType(variable, toType) {
|
|
28
29
|
switch (toType) {
|
|
29
30
|
case presentation_common_1.VariableValueTypes.Bool:
|
|
30
31
|
switch (variable.type) {
|
|
31
|
-
case presentation_common_1.VariableValueTypes.Int:
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
case presentation_common_1.VariableValueTypes.Int:
|
|
33
|
+
return 0 !== variable.value;
|
|
34
|
+
case presentation_common_1.VariableValueTypes.Id64:
|
|
35
|
+
return core_bentley_1.Id64.isValidId64(variable.value);
|
|
36
|
+
default:
|
|
37
|
+
return undefined;
|
|
34
38
|
}
|
|
35
39
|
case presentation_common_1.VariableValueTypes.Int:
|
|
36
40
|
switch (variable.type) {
|
|
37
|
-
case presentation_common_1.VariableValueTypes.Bool:
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
case presentation_common_1.VariableValueTypes.Bool:
|
|
42
|
+
return variable.value ? 1 : 0;
|
|
43
|
+
case presentation_common_1.VariableValueTypes.Id64:
|
|
44
|
+
return core_bentley_1.Id64.getUpperUint32(variable.value);
|
|
45
|
+
default:
|
|
46
|
+
return undefined;
|
|
40
47
|
}
|
|
41
48
|
case presentation_common_1.VariableValueTypes.IntArray:
|
|
42
49
|
switch (variable.type) {
|
|
43
|
-
case presentation_common_1.VariableValueTypes.Id64Array:
|
|
44
|
-
|
|
50
|
+
case presentation_common_1.VariableValueTypes.Id64Array:
|
|
51
|
+
return variable.value.map((id) => core_bentley_1.Id64.getUpperUint32(id));
|
|
52
|
+
default:
|
|
53
|
+
return undefined;
|
|
45
54
|
}
|
|
46
55
|
case presentation_common_1.VariableValueTypes.Id64:
|
|
47
56
|
switch (variable.type) {
|
|
48
|
-
case presentation_common_1.VariableValueTypes.Bool:
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
case presentation_common_1.VariableValueTypes.Bool:
|
|
58
|
+
return core_bentley_1.Id64.fromLocalAndBriefcaseIds(variable.value ? 1 : 0, 0);
|
|
59
|
+
case presentation_common_1.VariableValueTypes.Int:
|
|
60
|
+
return core_bentley_1.Id64.fromLocalAndBriefcaseIds(variable.value, 0);
|
|
61
|
+
default:
|
|
62
|
+
return undefined;
|
|
51
63
|
}
|
|
52
64
|
case presentation_common_1.VariableValueTypes.Id64Array:
|
|
53
65
|
switch (variable.type) {
|
|
54
|
-
case presentation_common_1.VariableValueTypes.IntArray:
|
|
55
|
-
|
|
66
|
+
case presentation_common_1.VariableValueTypes.IntArray:
|
|
67
|
+
return variable.value.map((int) => core_bentley_1.Id64.fromLocalAndBriefcaseIds(int, 0));
|
|
68
|
+
default:
|
|
69
|
+
return undefined;
|
|
56
70
|
}
|
|
57
71
|
case presentation_common_1.VariableValueTypes.String:
|
|
58
72
|
switch (variable.type) {
|
|
59
73
|
case presentation_common_1.VariableValueTypes.IntArray:
|
|
60
74
|
case presentation_common_1.VariableValueTypes.Id64Array:
|
|
61
75
|
return undefined;
|
|
62
|
-
default:
|
|
76
|
+
default:
|
|
77
|
+
variable.value.toString();
|
|
63
78
|
}
|
|
64
79
|
}
|
|
65
80
|
return undefined;
|
|
66
81
|
}
|
|
67
82
|
async getValue(id, type) {
|
|
68
83
|
const variable = this._clientValues.get(id);
|
|
69
|
-
if (!variable)
|
|
84
|
+
if (!variable) {
|
|
70
85
|
return undefined;
|
|
71
|
-
|
|
86
|
+
}
|
|
87
|
+
if (variable.type !== type) {
|
|
72
88
|
return this.changeValueType(variable, type);
|
|
89
|
+
}
|
|
73
90
|
return variable.value;
|
|
74
91
|
}
|
|
75
92
|
async setValue(variable) {
|
|
76
93
|
const oldVariable = this._clientValues.get(variable.id);
|
|
77
|
-
if (oldVariable && variablesEqual(oldVariable, variable))
|
|
94
|
+
if (oldVariable && variablesEqual(oldVariable, variable)) {
|
|
78
95
|
return;
|
|
96
|
+
}
|
|
79
97
|
this._clientValues.set(variable.id, variable);
|
|
80
98
|
if (this._ipcHandler) {
|
|
81
99
|
await this._ipcHandler.setRulesetVariable({ rulesetId: this._rulesetId, variable });
|
|
@@ -84,8 +102,9 @@ class RulesetVariablesManagerImpl {
|
|
|
84
102
|
}
|
|
85
103
|
async unset(variableId) {
|
|
86
104
|
const variable = this._clientValues.get(variableId);
|
|
87
|
-
if (variable === undefined)
|
|
105
|
+
if (variable === undefined) {
|
|
88
106
|
return;
|
|
107
|
+
}
|
|
89
108
|
this._clientValues.delete(variable.id);
|
|
90
109
|
if (this._ipcHandler) {
|
|
91
110
|
await this._ipcHandler.unsetRulesetVariable({ rulesetId: this._rulesetId, variableId });
|
|
@@ -97,7 +116,7 @@ class RulesetVariablesManagerImpl {
|
|
|
97
116
|
* Returns empty string if variable does not exist or does not convert to string.
|
|
98
117
|
*/
|
|
99
118
|
async getString(variableId) {
|
|
100
|
-
return await this.getValue(variableId, presentation_common_1.VariableValueTypes.String) || "";
|
|
119
|
+
return (await this.getValue(variableId, presentation_common_1.VariableValueTypes.String)) || "";
|
|
101
120
|
}
|
|
102
121
|
/**
|
|
103
122
|
* Sets `string` variable value
|
|
@@ -110,7 +129,7 @@ class RulesetVariablesManagerImpl {
|
|
|
110
129
|
* Returns `false` if variable does not exist or does not convert to boolean.
|
|
111
130
|
*/
|
|
112
131
|
async getBool(variableId) {
|
|
113
|
-
return await this.getValue(variableId, presentation_common_1.VariableValueTypes.Bool) || false;
|
|
132
|
+
return (await this.getValue(variableId, presentation_common_1.VariableValueTypes.Bool)) || false;
|
|
114
133
|
}
|
|
115
134
|
/**
|
|
116
135
|
* Sets `boolean` variable value
|
|
@@ -123,7 +142,7 @@ class RulesetVariablesManagerImpl {
|
|
|
123
142
|
* Returns `0` if variable does not exist or does not convert to integer.
|
|
124
143
|
*/
|
|
125
144
|
async getInt(variableId) {
|
|
126
|
-
return await this.getValue(variableId, presentation_common_1.VariableValueTypes.Int) || 0;
|
|
145
|
+
return (await this.getValue(variableId, presentation_common_1.VariableValueTypes.Int)) || 0;
|
|
127
146
|
}
|
|
128
147
|
/**
|
|
129
148
|
* Sets `number` variable value
|
|
@@ -136,7 +155,7 @@ class RulesetVariablesManagerImpl {
|
|
|
136
155
|
* Returns empty array if variable does not exist or does not convert to integer array.
|
|
137
156
|
*/
|
|
138
157
|
async getInts(variableId) {
|
|
139
|
-
return await this.getValue(variableId, presentation_common_1.VariableValueTypes.IntArray) || [];
|
|
158
|
+
return (await this.getValue(variableId, presentation_common_1.VariableValueTypes.IntArray)) || [];
|
|
140
159
|
}
|
|
141
160
|
/**
|
|
142
161
|
* Sets `number[]` variable value
|
|
@@ -149,7 +168,7 @@ class RulesetVariablesManagerImpl {
|
|
|
149
168
|
* Returns invalid Id64String if variable does not exist or does not convert to Id64String.
|
|
150
169
|
*/
|
|
151
170
|
async getId64(variableId) {
|
|
152
|
-
return await this.getValue(variableId, presentation_common_1.VariableValueTypes.Id64) || core_bentley_1.Id64.invalid;
|
|
171
|
+
return (await this.getValue(variableId, presentation_common_1.VariableValueTypes.Id64)) || core_bentley_1.Id64.invalid;
|
|
153
172
|
}
|
|
154
173
|
/**
|
|
155
174
|
* Sets `Id64String` variable value
|
|
@@ -162,7 +181,7 @@ class RulesetVariablesManagerImpl {
|
|
|
162
181
|
* Returns empty array if variable does not exist or does not convert to Id64String array.
|
|
163
182
|
*/
|
|
164
183
|
async getId64s(variableId) {
|
|
165
|
-
return await this.getValue(variableId, presentation_common_1.VariableValueTypes.Id64Array) || [];
|
|
184
|
+
return (await this.getValue(variableId, presentation_common_1.VariableValueTypes.Id64Array)) || [];
|
|
166
185
|
}
|
|
167
186
|
/**
|
|
168
187
|
* Sets `Id64String[]` variable value
|
|
@@ -173,8 +192,9 @@ class RulesetVariablesManagerImpl {
|
|
|
173
192
|
}
|
|
174
193
|
exports.RulesetVariablesManagerImpl = RulesetVariablesManagerImpl;
|
|
175
194
|
function variablesEqual(lhs, rhs) {
|
|
176
|
-
if (lhs.type !== rhs.type)
|
|
195
|
+
if (lhs.type !== rhs.type) {
|
|
177
196
|
return false;
|
|
197
|
+
}
|
|
178
198
|
switch (lhs.type) {
|
|
179
199
|
case presentation_common_1.VariableValueTypes.IntArray:
|
|
180
200
|
case presentation_common_1.VariableValueTypes.Id64Array:
|
|
@@ -185,11 +205,13 @@ function variablesEqual(lhs, rhs) {
|
|
|
185
205
|
}
|
|
186
206
|
}
|
|
187
207
|
function arraysEqual(lhs, rhs) {
|
|
188
|
-
if (lhs.length !== rhs.length)
|
|
208
|
+
if (lhs.length !== rhs.length) {
|
|
189
209
|
return false;
|
|
210
|
+
}
|
|
190
211
|
for (let i = 0; i < lhs.length; ++i) {
|
|
191
|
-
if (lhs[i] !== rhs[i])
|
|
212
|
+
if (lhs[i] !== rhs[i]) {
|
|
192
213
|
return false;
|
|
214
|
+
}
|
|
193
215
|
}
|
|
194
216
|
return true;
|
|
195
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|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AAC;IAC/F,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,QAAQ,CAAC,UAAkB,EAAE,KAAmB;QAC3D,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,wCAAkB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,kCAAmB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAChI,CAAC;CACF;AAvLD,kEAuLC;AAED,SAAS,cAAc,CAAC,GAAoB,EAAE,GAAoB;IAChE,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI;QACvB,OAAO,KAAK,CAAC;IAEf,QAAQ,GAAG,CAAC,IAAI,EAAE;QAChB,KAAK,wCAAkB,CAAC,QAAQ,CAAC;QACjC,KAAK,wCAAkB,CAAC,SAAS;YAC/B,IAAA,qBAAM,EAAC,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9B,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QAE3C;YACE,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;KAClC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,GAAU,EAAE,GAAU;IACzC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM;QAC3B,OAAO,KAAK,CAAC;IAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACnC,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;YACnB,OAAO,KAAK,CAAC;KAChB;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { assert, BeEvent, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { RulesetVariable, VariableValue, VariableValueTypes } from \"@itwin/presentation-common\";\nimport { IpcRequestsHandler } from \"./IpcRequestsHandler\";\n\n/**\n * Presentation ruleset variables' registry.\n * @public\n */\nexport interface RulesetVariablesManager {\n\n /**\n * An event that is raised when variable changes.\n */\n onVariableChanged: BeEvent<(variableId: string, prevValue: VariableValue | undefined, currValue: VariableValue | undefined) => void>;\n\n /**\n * Retrieves `string` variable value.\n * Returns empty string if variable does not exist or does not convert to string.\n */\n getString(variableId: string): Promise<string>;\n /**\n * Sets `string` variable value\n */\n setString(variableId: string, value: string): Promise<void>;\n\n /**\n * Retrieves `boolean` variable value.\n * Returns `false` if variable does not exist or does not convert to boolean.\n */\n getBool(variableId: string): Promise<boolean>;\n /**\n * Sets `boolean` variable value\n */\n setBool(variableId: string, value: boolean): Promise<void>;\n\n /**\n * Retrieves `number` variable value.\n * Returns `0` if variable does not exist or does not convert to integer.\n */\n getInt(variableId: string): Promise<number>;\n /**\n * Sets `number` variable value\n */\n setInt(variableId: string, value: number): Promise<void>;\n\n /**\n * Retrieves `number[]` variable value.\n * Returns empty array if variable does not exist or does not convert to integer array.\n */\n getInts(variableId: string): Promise<number[]>;\n /**\n * Sets `number[]` variable value\n */\n setInts(variableId: string, value: number[]): Promise<void>;\n\n /**\n * Retrieves `Id64String` variable value.\n * Returns invalid Id64String if variable does not exist or does not convert to Id64String.\n */\n getId64(variableId: string): Promise<Id64String>;\n /**\n * Sets `Id64String` variable value\n */\n setId64(variableId: string, value: Id64String): Promise<void>;\n\n /**\n * Retrieves `Id64String[]` variable value.\n * Returns empty array if variable does not exist or does not convert to Id64String array.\n */\n getId64s(variableId: string): Promise<Id64String[]>;\n /**\n * Sets `Id64String[]` variable value\n */\n setId64s(variableId: string, value: Id64String[]): Promise<void>;\n\n /** Unsets variable with given id. */\n unset(variableId: string): Promise<void>;\n\n /** Retrieves all variables.\n * @internal\n */\n getAllVariables(): RulesetVariable[];\n}\n\n/** @internal */\nexport class RulesetVariablesManagerImpl implements RulesetVariablesManager {\n\n private _clientValues = new Map<string, RulesetVariable>();\n private _rulesetId: string;\n private _ipcHandler?: IpcRequestsHandler;\n public onVariableChanged = new BeEvent<(variableId: string, prevValue: VariableValue | undefined, currValue: VariableValue | undefined) => void>();\n\n public constructor(rulesetId: string, ipcHandler?: IpcRequestsHandler) {\n this._rulesetId = rulesetId;\n this._ipcHandler = ipcHandler;\n }\n\n public getAllVariables(): RulesetVariable[] {\n const variables: RulesetVariable[] = [];\n for (const entry of this._clientValues)\n variables.push(entry[1]);\n return variables;\n }\n\n private changeValueType(variable: RulesetVariable, toType: VariableValueTypes): VariableValue | undefined {\n switch (toType) {\n case VariableValueTypes.Bool:\n switch (variable.type) {\n case VariableValueTypes.Int: return (0 !== variable.value);\n case VariableValueTypes.Id64: return Id64.isValidId64(variable.value);\n default: return undefined;\n }\n case VariableValueTypes.Int:\n switch (variable.type) {\n case VariableValueTypes.Bool: return variable.value ? 1 : 0;\n case VariableValueTypes.Id64: return Id64.getUpperUint32(variable.value);\n default: return undefined;\n }\n case VariableValueTypes.IntArray:\n switch (variable.type) {\n case VariableValueTypes.Id64Array: return variable.value.map((id) => Id64.getUpperUint32(id));\n default: return undefined;\n }\n case VariableValueTypes.Id64:\n switch (variable.type) {\n case VariableValueTypes.Bool: return Id64.fromLocalAndBriefcaseIds(variable.value ? 1 : 0, 0);\n case VariableValueTypes.Int: return Id64.fromLocalAndBriefcaseIds(variable.value, 0);\n default: return undefined;\n }\n case VariableValueTypes.Id64Array:\n switch (variable.type) {\n case VariableValueTypes.IntArray: return variable.value.map((int) => Id64.fromLocalAndBriefcaseIds(int, 0));\n default: return undefined;\n }\n case VariableValueTypes.String:\n switch (variable.type) {\n case VariableValueTypes.IntArray:\n case VariableValueTypes.Id64Array:\n return undefined;\n default: variable.value.toString();\n }\n }\n return undefined;\n }\n\n private async getValue(id: string, type: VariableValueTypes): Promise<VariableValue | undefined> {\n const variable = this._clientValues.get(id);\n if (!variable)\n return undefined;\n if (variable.type !== type)\n return this.changeValueType(variable, type);\n return variable.value;\n }\n\n private async setValue(variable: RulesetVariable): Promise<void> {\n const oldVariable = this._clientValues.get(variable.id);\n if (oldVariable && variablesEqual(oldVariable, variable))\n return;\n\n this._clientValues.set(variable.id, variable);\n if (this._ipcHandler) {\n await this._ipcHandler.setRulesetVariable({ rulesetId: this._rulesetId, variable });\n }\n\n this.onVariableChanged.raiseEvent(variable.id, oldVariable?.value, variable.value);\n }\n\n public async unset(variableId: string): Promise<void> {\n const variable = this._clientValues.get(variableId);\n if (variable === undefined)\n return;\n\n this._clientValues.delete(variable.id);\n if (this._ipcHandler) {\n await this._ipcHandler.unsetRulesetVariable({ rulesetId: this._rulesetId, variableId });\n }\n this.onVariableChanged.raiseEvent(variable.id, variable.value, undefined);\n }\n\n /**\n * Retrieves `string` variable value.\n * Returns empty string if variable does not exist or does not convert to string.\n */\n public async getString(variableId: string): Promise<string> {\n return (await this.getValue(variableId, VariableValueTypes.String) as string) || \"\";\n }\n\n /**\n * Sets `string` variable value\n */\n public async setString(variableId: string, value: string): Promise<void> {\n await this.setValue({ id: variableId, type: VariableValueTypes.String, value });\n }\n\n /**\n * Retrieves `boolean` variable value.\n * Returns `false` if variable does not exist or does not convert to boolean.\n */\n public async getBool(variableId: string): Promise<boolean> {\n return (await this.getValue(variableId, VariableValueTypes.Bool) as boolean) || false;\n }\n\n /**\n * Sets `boolean` variable value\n */\n public async setBool(variableId: string, value: boolean): Promise<void> {\n await this.setValue({ id: variableId, type: VariableValueTypes.Bool, value });\n }\n\n /**\n * Retrieves `number` variable value.\n * Returns `0` if variable does not exist or does not convert to integer.\n */\n public async getInt(variableId: string): Promise<number> {\n return (await this.getValue(variableId, VariableValueTypes.Int) as number) || 0;\n }\n\n /**\n * Sets `number` variable value\n */\n public async setInt(variableId: string, value: number): Promise<void> {\n await this.setValue({ id: variableId, type: VariableValueTypes.Int, value });\n }\n\n /**\n * Retrieves `number[]` variable value.\n * Returns empty array if variable does not exist or does not convert to integer array.\n */\n public async getInts(variableId: string): Promise<number[]> {\n return (await this.getValue(variableId, VariableValueTypes.IntArray) as number[]) || [];\n }\n\n /**\n * Sets `number[]` variable value\n */\n public async setInts(variableId: string, value: number[]): Promise<void> {\n await this.setValue({ id: variableId, type: VariableValueTypes.IntArray, value: [...value] });\n }\n\n /**\n * Retrieves `Id64String` variable value.\n * Returns invalid Id64String if variable does not exist or does not convert to Id64String.\n */\n public async getId64(variableId: string): Promise<Id64String> {\n return (await this.getValue(variableId, VariableValueTypes.Id64) as Id64String) || Id64.invalid;\n }\n\n /**\n * Sets `Id64String` variable value\n */\n public async setId64(variableId: string, value: Id64String): Promise<void> {\n await this.setValue({ id: variableId, type: VariableValueTypes.Id64, value });\n }\n\n /**\n * Retrieves `Id64String[]` variable value.\n * Returns empty array if variable does not exist or does not convert to Id64String array.\n */\n public async getId64s(variableId: string): Promise<Id64String[]> {\n return (await this.getValue(variableId, VariableValueTypes.Id64Array) as Id64String[]) || [];\n }\n\n /**\n * Sets `Id64String[]` variable value\n */\n public async setId64s(variableId: string, value: Id64String[]): Promise<void> {\n await this.setValue({ id: variableId, type: VariableValueTypes.Id64Array, value: [...OrderedId64Iterable.sortArray(value)] });\n }\n}\n\nfunction variablesEqual(lhs: RulesetVariable, rhs: RulesetVariable) {\n if (lhs.type !== rhs.type)\n return false;\n\n switch (lhs.type) {\n case VariableValueTypes.IntArray:\n case VariableValueTypes.Id64Array:\n assert(rhs.type === lhs.type);\n return arraysEqual(lhs.value, rhs.value);\n\n default:\n return lhs.value === rhs.value;\n }\n}\n\nfunction arraysEqual(lhs: any[], rhs: any[]) {\n if (lhs.length !== rhs.length)\n return false;\n\n for (let i = 0; i < lhs.length; ++i) {\n if (lhs[i] !== rhs[i])\n return false;\n }\n return true;\n}\n"]}
|
|
1
|
+
{"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E,CAAC;IACjG,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,QAAQ,CAAC,UAAkB,EAAE,KAAmB;QAC3D,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,wCAAkB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,kCAAmB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IAChI,CAAC;CACF;AAzMD,kEAyMC;AAED,SAAS,cAAc,CAAC,GAAoB,EAAE,GAAoB;IAChE,IAAI,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,QAAQ,GAAG,CAAC,IAAI,EAAE;QAChB,KAAK,wCAAkB,CAAC,QAAQ,CAAC;QACjC,KAAK,wCAAkB,CAAC,SAAS;YAC/B,IAAA,qBAAM,EAAC,GAAG,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC;YAC9B,OAAO,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QAE3C;YACE,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;KAClC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,GAAU,EAAE,GAAU;IACzC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QACnC,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;YACrB,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { assert, BeEvent, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\r\nimport { RulesetVariable, VariableValue, VariableValueTypes } from \"@itwin/presentation-common\";\r\nimport { IpcRequestsHandler } from \"./IpcRequestsHandler\";\r\n\r\n/**\r\n * Presentation ruleset variables' registry.\r\n * @public\r\n */\r\nexport interface RulesetVariablesManager {\r\n /**\r\n * An event that is raised when variable changes.\r\n */\r\n onVariableChanged: BeEvent<(variableId: string, prevValue: VariableValue | undefined, currValue: VariableValue | undefined) => void>;\r\n\r\n /**\r\n * Retrieves `string` variable value.\r\n * Returns empty string if variable does not exist or does not convert to string.\r\n */\r\n getString(variableId: string): Promise<string>;\r\n /**\r\n * Sets `string` variable value\r\n */\r\n setString(variableId: string, value: string): Promise<void>;\r\n\r\n /**\r\n * Retrieves `boolean` variable value.\r\n * Returns `false` if variable does not exist or does not convert to boolean.\r\n */\r\n getBool(variableId: string): Promise<boolean>;\r\n /**\r\n * Sets `boolean` variable value\r\n */\r\n setBool(variableId: string, value: boolean): Promise<void>;\r\n\r\n /**\r\n * Retrieves `number` variable value.\r\n * Returns `0` if variable does not exist or does not convert to integer.\r\n */\r\n getInt(variableId: string): Promise<number>;\r\n /**\r\n * Sets `number` variable value\r\n */\r\n setInt(variableId: string, value: number): Promise<void>;\r\n\r\n /**\r\n * Retrieves `number[]` variable value.\r\n * Returns empty array if variable does not exist or does not convert to integer array.\r\n */\r\n getInts(variableId: string): Promise<number[]>;\r\n /**\r\n * Sets `number[]` variable value\r\n */\r\n setInts(variableId: string, value: number[]): Promise<void>;\r\n\r\n /**\r\n * Retrieves `Id64String` variable value.\r\n * Returns invalid Id64String if variable does not exist or does not convert to Id64String.\r\n */\r\n getId64(variableId: string): Promise<Id64String>;\r\n /**\r\n * Sets `Id64String` variable value\r\n */\r\n setId64(variableId: string, value: Id64String): Promise<void>;\r\n\r\n /**\r\n * Retrieves `Id64String[]` variable value.\r\n * Returns empty array if variable does not exist or does not convert to Id64String array.\r\n */\r\n getId64s(variableId: string): Promise<Id64String[]>;\r\n /**\r\n * Sets `Id64String[]` variable value\r\n */\r\n setId64s(variableId: string, value: Id64String[]): Promise<void>;\r\n\r\n /** Unsets variable with given id. */\r\n unset(variableId: string): Promise<void>;\r\n\r\n /** Retrieves all variables.\r\n * @internal\r\n */\r\n getAllVariables(): RulesetVariable[];\r\n}\r\n\r\n/** @internal */\r\nexport class RulesetVariablesManagerImpl implements RulesetVariablesManager {\r\n private _clientValues = new Map<string, RulesetVariable>();\r\n private _rulesetId: string;\r\n private _ipcHandler?: IpcRequestsHandler;\r\n public onVariableChanged = new BeEvent<(variableId: string, prevValue: VariableValue | undefined, currValue: VariableValue | undefined) => void>();\r\n\r\n public constructor(rulesetId: string, ipcHandler?: IpcRequestsHandler) {\r\n this._rulesetId = rulesetId;\r\n this._ipcHandler = ipcHandler;\r\n }\r\n\r\n public getAllVariables(): RulesetVariable[] {\r\n const variables: RulesetVariable[] = [];\r\n for (const entry of this._clientValues) {\r\n variables.push(entry[1]);\r\n }\r\n return variables;\r\n }\r\n\r\n private changeValueType(variable: RulesetVariable, toType: VariableValueTypes): VariableValue | undefined {\r\n switch (toType) {\r\n case VariableValueTypes.Bool:\r\n switch (variable.type) {\r\n case VariableValueTypes.Int:\r\n return 0 !== variable.value;\r\n case VariableValueTypes.Id64:\r\n return Id64.isValidId64(variable.value);\r\n default:\r\n return undefined;\r\n }\r\n case VariableValueTypes.Int:\r\n switch (variable.type) {\r\n case VariableValueTypes.Bool:\r\n return variable.value ? 1 : 0;\r\n case VariableValueTypes.Id64:\r\n return Id64.getUpperUint32(variable.value);\r\n default:\r\n return undefined;\r\n }\r\n case VariableValueTypes.IntArray:\r\n switch (variable.type) {\r\n case VariableValueTypes.Id64Array:\r\n return variable.value.map((id) => Id64.getUpperUint32(id));\r\n default:\r\n return undefined;\r\n }\r\n case VariableValueTypes.Id64:\r\n switch (variable.type) {\r\n case VariableValueTypes.Bool:\r\n return Id64.fromLocalAndBriefcaseIds(variable.value ? 1 : 0, 0);\r\n case VariableValueTypes.Int:\r\n return Id64.fromLocalAndBriefcaseIds(variable.value, 0);\r\n default:\r\n return undefined;\r\n }\r\n case VariableValueTypes.Id64Array:\r\n switch (variable.type) {\r\n case VariableValueTypes.IntArray:\r\n return variable.value.map((int) => Id64.fromLocalAndBriefcaseIds(int, 0));\r\n default:\r\n return undefined;\r\n }\r\n case VariableValueTypes.String:\r\n switch (variable.type) {\r\n case VariableValueTypes.IntArray:\r\n case VariableValueTypes.Id64Array:\r\n return undefined;\r\n default:\r\n variable.value.toString();\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n private async getValue(id: string, type: VariableValueTypes): Promise<VariableValue | undefined> {\r\n const variable = this._clientValues.get(id);\r\n if (!variable) {\r\n return undefined;\r\n }\r\n if (variable.type !== type) {\r\n return this.changeValueType(variable, type);\r\n }\r\n return variable.value;\r\n }\r\n\r\n private async setValue(variable: RulesetVariable): Promise<void> {\r\n const oldVariable = this._clientValues.get(variable.id);\r\n if (oldVariable && variablesEqual(oldVariable, variable)) {\r\n return;\r\n }\r\n\r\n this._clientValues.set(variable.id, variable);\r\n if (this._ipcHandler) {\r\n await this._ipcHandler.setRulesetVariable({ rulesetId: this._rulesetId, variable });\r\n }\r\n\r\n this.onVariableChanged.raiseEvent(variable.id, oldVariable?.value, variable.value);\r\n }\r\n\r\n public async unset(variableId: string): Promise<void> {\r\n const variable = this._clientValues.get(variableId);\r\n if (variable === undefined) {\r\n return;\r\n }\r\n\r\n this._clientValues.delete(variable.id);\r\n if (this._ipcHandler) {\r\n await this._ipcHandler.unsetRulesetVariable({ rulesetId: this._rulesetId, variableId });\r\n }\r\n this.onVariableChanged.raiseEvent(variable.id, variable.value, undefined);\r\n }\r\n\r\n /**\r\n * Retrieves `string` variable value.\r\n * Returns empty string if variable does not exist or does not convert to string.\r\n */\r\n public async getString(variableId: string): Promise<string> {\r\n return ((await this.getValue(variableId, VariableValueTypes.String)) as string) || \"\";\r\n }\r\n\r\n /**\r\n * Sets `string` variable value\r\n */\r\n public async setString(variableId: string, value: string): Promise<void> {\r\n await this.setValue({ id: variableId, type: VariableValueTypes.String, value });\r\n }\r\n\r\n /**\r\n * Retrieves `boolean` variable value.\r\n * Returns `false` if variable does not exist or does not convert to boolean.\r\n */\r\n public async getBool(variableId: string): Promise<boolean> {\r\n return ((await this.getValue(variableId, VariableValueTypes.Bool)) as boolean) || false;\r\n }\r\n\r\n /**\r\n * Sets `boolean` variable value\r\n */\r\n public async setBool(variableId: string, value: boolean): Promise<void> {\r\n await this.setValue({ id: variableId, type: VariableValueTypes.Bool, value });\r\n }\r\n\r\n /**\r\n * Retrieves `number` variable value.\r\n * Returns `0` if variable does not exist or does not convert to integer.\r\n */\r\n public async getInt(variableId: string): Promise<number> {\r\n return ((await this.getValue(variableId, VariableValueTypes.Int)) as number) || 0;\r\n }\r\n\r\n /**\r\n * Sets `number` variable value\r\n */\r\n public async setInt(variableId: string, value: number): Promise<void> {\r\n await this.setValue({ id: variableId, type: VariableValueTypes.Int, value });\r\n }\r\n\r\n /**\r\n * Retrieves `number[]` variable value.\r\n * Returns empty array if variable does not exist or does not convert to integer array.\r\n */\r\n public async getInts(variableId: string): Promise<number[]> {\r\n return ((await this.getValue(variableId, VariableValueTypes.IntArray)) as number[]) || [];\r\n }\r\n\r\n /**\r\n * Sets `number[]` variable value\r\n */\r\n public async setInts(variableId: string, value: number[]): Promise<void> {\r\n await this.setValue({ id: variableId, type: VariableValueTypes.IntArray, value: [...value] });\r\n }\r\n\r\n /**\r\n * Retrieves `Id64String` variable value.\r\n * Returns invalid Id64String if variable does not exist or does not convert to Id64String.\r\n */\r\n public async getId64(variableId: string): Promise<Id64String> {\r\n return ((await this.getValue(variableId, VariableValueTypes.Id64)) as Id64String) || Id64.invalid;\r\n }\r\n\r\n /**\r\n * Sets `Id64String` variable value\r\n */\r\n public async setId64(variableId: string, value: Id64String): Promise<void> {\r\n await this.setValue({ id: variableId, type: VariableValueTypes.Id64, value });\r\n }\r\n\r\n /**\r\n * Retrieves `Id64String[]` variable value.\r\n * Returns empty array if variable does not exist or does not convert to Id64String array.\r\n */\r\n public async getId64s(variableId: string): Promise<Id64String[]> {\r\n return ((await this.getValue(variableId, VariableValueTypes.Id64Array)) as Id64String[]) || [];\r\n }\r\n\r\n /**\r\n * Sets `Id64String[]` variable value\r\n */\r\n public async setId64s(variableId: string, value: Id64String[]): Promise<void> {\r\n await this.setValue({ id: variableId, type: VariableValueTypes.Id64Array, value: [...OrderedId64Iterable.sortArray(value)] });\r\n }\r\n}\r\n\r\nfunction variablesEqual(lhs: RulesetVariable, rhs: RulesetVariable) {\r\n if (lhs.type !== rhs.type) {\r\n return false;\r\n }\r\n\r\n switch (lhs.type) {\r\n case VariableValueTypes.IntArray:\r\n case VariableValueTypes.Id64Array:\r\n assert(rhs.type === lhs.type);\r\n return arraysEqual(lhs.value, rhs.value);\r\n\r\n default:\r\n return lhs.value === rhs.value;\r\n }\r\n}\r\n\r\nfunction arraysEqual(lhs: any[], rhs: any[]) {\r\n if (lhs.length !== rhs.length) {\r\n return false;\r\n }\r\n\r\n for (let i = 0; i < lhs.length; ++i) {\r\n if (lhs[i] !== rhs[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n"]}
|
package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoritePropertiesManager.d.ts","sourceRoot":"","sources":["../../../../src/presentation-frontend/favorite-properties/FavoritePropertiesManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAiB,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAW,KAAK,EAAuC,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAEzE;;;GAGG;AACH,oBAAY,uBAAuB;IACjC,MAAM,IAAA;IACN,KAAK,IAAA;IACL,MAAM,IAAA;CACP;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,IAAI,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,OAAO,EAAE,0BAA0B,CAAC;CACrC;AAED;;;;;GAKG;AACH,qBAAa,yBAA0B,YAAW,WAAW;IAC3D;;;OAGG;IACH,OAAc,2BAA2B,SAAM;IAE/C,2DAA2D;IACpD,kBAAkB,gBAAqB,IAAI,EAAI;IAEtD,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,gBAAgB,CAAqC;IAC7D,OAAO,CAAC,iBAAiB,CAAqC;IAC9D,OAAO,CAAC,yBAAyB,CAAiD;IAElF,mDAAmD;IACnD,OAAO,CAAC,gBAAgB,CAA6C;gBAElD,KAAK,EAAE,8BAA8B;IAQjD,OAAO;
|
|
1
|
+
{"version":3,"file":"FavoritePropertiesManager.d.ts","sourceRoot":"","sources":["../../../../src/presentation-frontend/favorite-properties/FavoritePropertiesManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAiB,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAW,KAAK,EAAuC,MAAM,4BAA4B,CAAC;AACjG,OAAO,EAAE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