@itwin/presentation-common 4.10.0-dev.8 → 5.0.0-dev.0

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 (119) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/lib/cjs/presentation-common/Diagnostics.js +3 -3
  3. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  4. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  5. package/lib/cjs/presentation-common/EC.js +4 -4
  6. package/lib/cjs/presentation-common/EC.js.map +1 -1
  7. package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
  8. package/lib/cjs/presentation-common/Error.js +0 -1
  9. package/lib/cjs/presentation-common/Error.js.map +1 -1
  10. package/lib/cjs/presentation-common/KeySet.js +5 -5
  11. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  12. package/lib/cjs/presentation-common/LabelDefinition.js +4 -4
  13. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  14. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +3 -3
  15. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  16. package/lib/cjs/presentation-common/PresentationManagerOptions.js +2 -3
  17. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  18. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  19. package/lib/cjs/presentation-common/PresentationRpcInterface.js +4 -5
  20. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  21. package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  22. package/lib/cjs/presentation-common/RpcRequestsHandler.js +5 -5
  23. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  24. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  25. package/lib/cjs/presentation-common/RulesetsFactory.js +0 -1
  26. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  27. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  28. package/lib/cjs/presentation-common/Update.js +14 -14
  29. package/lib/cjs/presentation-common/Update.js.map +1 -1
  30. package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
  31. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +1 -1
  32. package/lib/cjs/presentation-common/content/ContentTraverser.js +10 -10
  33. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  34. package/lib/cjs/presentation-common/content/Descriptor.js +6 -6
  35. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  36. package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +1 -1
  37. package/lib/cjs/presentation-common/content/DisplayTypes.d.ts.map +1 -1
  38. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  39. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  40. package/lib/cjs/presentation-common/content/Fields.js +2 -2
  41. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  42. package/lib/cjs/presentation-common/content/Item.js +7 -7
  43. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  44. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  45. package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  46. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +4 -0
  47. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  48. package/lib/cjs/presentation-common/content/Value.js +34 -34
  49. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  50. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +2 -2
  51. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  52. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  53. package/lib/cjs/presentation-common/hierarchy/Key.js +8 -8
  54. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  55. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  56. package/lib/cjs/presentation-common/hierarchy/Node.js +9 -9
  57. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  58. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +13 -13
  59. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  60. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  61. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  62. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  63. package/lib/esm/presentation-common/EC.js +4 -4
  64. package/lib/esm/presentation-common/EC.js.map +1 -1
  65. package/lib/esm/presentation-common/Error.d.ts.map +1 -1
  66. package/lib/esm/presentation-common/Error.js +0 -1
  67. package/lib/esm/presentation-common/Error.js.map +1 -1
  68. package/lib/esm/presentation-common/KeySet.js +5 -5
  69. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  70. package/lib/esm/presentation-common/LabelDefinition.js +4 -4
  71. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  72. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +3 -3
  73. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  74. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  75. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  76. package/lib/esm/presentation-common/PresentationRpcInterface.js +4 -5
  77. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  78. package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
  79. package/lib/esm/presentation-common/RpcRequestsHandler.js +5 -5
  80. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  81. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  82. package/lib/esm/presentation-common/RulesetsFactory.js +0 -1
  83. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  84. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  85. package/lib/esm/presentation-common/Update.js +14 -14
  86. package/lib/esm/presentation-common/Update.js.map +1 -1
  87. package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
  88. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +1 -1
  89. package/lib/esm/presentation-common/content/ContentTraverser.js +2 -2
  90. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  91. package/lib/esm/presentation-common/content/Descriptor.js +6 -6
  92. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  93. package/lib/esm/presentation-common/content/DisplayTypes.d.ts +1 -1
  94. package/lib/esm/presentation-common/content/DisplayTypes.d.ts.map +1 -1
  95. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  96. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  97. package/lib/esm/presentation-common/content/Fields.js +2 -2
  98. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  99. package/lib/esm/presentation-common/content/Item.js +7 -7
  100. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  101. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  102. package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
  103. package/lib/esm/presentation-common/content/PropertyValueFormatter.js +4 -0
  104. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  105. package/lib/esm/presentation-common/content/Value.js +34 -34
  106. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  107. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +2 -2
  108. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  109. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  110. package/lib/esm/presentation-common/hierarchy/Key.js +8 -8
  111. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  112. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  113. package/lib/esm/presentation-common/hierarchy/Node.js +9 -9
  114. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  115. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +13 -13
  116. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  117. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  118. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  119. package/package.json +14 -14
@@ -41,13 +41,13 @@ export var Value;
41
41
  * Serialize [[Value]] to JSON
42
42
  * @deprecated in 3.x. Use [[Value]]
43
43
  */
44
- // eslint-disable-next-line deprecation/deprecation
44
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
45
45
  function fromJSON(json) {
46
46
  if (json === null) {
47
47
  return undefined;
48
48
  }
49
49
  if (isNestedContentValue(json)) {
50
- // eslint-disable-next-line deprecation/deprecation
50
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
51
51
  return json.map(NestedContentValue.fromJSON);
52
52
  }
53
53
  if (isArrayValue(json)) {
@@ -63,13 +63,13 @@ export var Value;
63
63
  * Deserialize [[Value]] from JSON
64
64
  * @deprecated in 3.x. Use [[Value]]
65
65
  */
66
- // eslint-disable-next-line deprecation/deprecation
66
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
67
67
  function toJSON(value) {
68
68
  if (undefined === value) {
69
69
  return null;
70
70
  }
71
71
  if (isNestedContentValue(value)) {
72
- // eslint-disable-next-line deprecation/deprecation
72
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
73
73
  return value.map(NestedContentValue.toJSON);
74
74
  }
75
75
  if (isArrayValue(value)) {
@@ -105,7 +105,7 @@ export var DisplayValue;
105
105
  * Serialize [[DisplayValue]] to JSON
106
106
  * @deprecated in 3.x. Use [[DisplayValue]]
107
107
  */
108
- // eslint-disable-next-line deprecation/deprecation
108
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
109
109
  function fromJSON(json) {
110
110
  if (json === null) {
111
111
  return undefined;
@@ -123,7 +123,7 @@ export var DisplayValue;
123
123
  * Deserialize [[DisplayValue]] from JSON
124
124
  * @deprecated in 3.x. Use [[DisplayValue]]
125
125
  */
126
- // eslint-disable-next-line deprecation/deprecation
126
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
127
127
  function toJSON(value) {
128
128
  if (undefined === value) {
129
129
  return null;
@@ -145,7 +145,7 @@ export var NestedContentValue;
145
145
  * Serialize [[NestedContentValue]] to JSON
146
146
  * @deprecated in 3.x. Use [[NestedContentValue]]
147
147
  */
148
- // eslint-disable-next-line deprecation/deprecation
148
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
149
149
  function toJSON(value) {
150
150
  return {
151
151
  ...value,
@@ -158,7 +158,7 @@ export var NestedContentValue;
158
158
  * Deserialize [[NestedContentValue]] from JSON
159
159
  * @deprecated in 3.x. Use [[NestedContentValue]]
160
160
  */
161
- // eslint-disable-next-line deprecation/deprecation
161
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
162
162
  function fromJSON(json) {
163
163
  return {
164
164
  ...json,
@@ -175,12 +175,12 @@ export var DisplayValueGroup;
175
175
  * Serialize [[DisplayValueGroup]] to JSON
176
176
  * @deprecated in 3.x. Use [[DisplayValueGroup]]
177
177
  */
178
- // eslint-disable-next-line deprecation/deprecation
178
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
179
179
  function toJSON(group) {
180
180
  return {
181
- // eslint-disable-next-line deprecation/deprecation
181
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
182
182
  displayValue: DisplayValue.toJSON(group.displayValue),
183
- // eslint-disable-next-line deprecation/deprecation
183
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
184
184
  groupedRawValues: group.groupedRawValues.map(Value.toJSON),
185
185
  };
186
186
  }
@@ -189,18 +189,18 @@ export var DisplayValueGroup;
189
189
  * Deserialize [[DisplayValueGroup]] from JSON
190
190
  * @deprecated in 3.x. Use [[DisplayValueGroup]]
191
191
  */
192
- // eslint-disable-next-line deprecation/deprecation
192
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
193
193
  function fromJSON(json) {
194
194
  return {
195
- // eslint-disable-next-line deprecation/deprecation
195
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
196
196
  displayValue: DisplayValue.fromJSON(json.displayValue),
197
- // eslint-disable-next-line deprecation/deprecation
197
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
198
198
  groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
199
199
  };
200
200
  }
201
201
  DisplayValueGroup.fromJSON = fromJSON;
202
202
  })(DisplayValueGroup || (DisplayValueGroup = {}));
203
- // eslint-disable-next-line deprecation/deprecation
203
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
204
204
  function isNestedContentValue(v) {
205
205
  return (v !== undefined &&
206
206
  Array.isArray(v) &&
@@ -216,78 +216,78 @@ function isArrayValue(v) {
216
216
  // we have other means to determine the type of value.
217
217
  return v !== undefined && Array.isArray(v);
218
218
  }
219
- // eslint-disable-next-line deprecation/deprecation
219
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
220
220
  function isMapValue(v) {
221
221
  return v !== undefined && typeof v === "object" && !Array.isArray(v);
222
222
  }
223
223
  function isPrimitiveValue(v) {
224
224
  return !isArrayValue(v) && !isMapValue(v);
225
225
  }
226
- // eslint-disable-next-line deprecation/deprecation
226
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
227
227
  function valuesArrayFromJSON(json) {
228
- // eslint-disable-next-line deprecation/deprecation
228
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
229
229
  return json.map(Value.fromJSON);
230
230
  }
231
- // eslint-disable-next-line deprecation/deprecation
231
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
232
232
  function valuesArrayToJSON(values) {
233
- // eslint-disable-next-line deprecation/deprecation
233
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
234
234
  return values.map(Value.toJSON);
235
235
  }
236
- // eslint-disable-next-line deprecation/deprecation
236
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
237
237
  function valuesMapFromJSON(json) {
238
238
  const map = {};
239
239
  for (const key in json) {
240
240
  /* istanbul ignore else */
241
241
  if (json.hasOwnProperty(key)) {
242
- // eslint-disable-next-line deprecation/deprecation
242
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
243
243
  map[key] = Value.fromJSON(json[key]);
244
244
  }
245
245
  }
246
246
  return map;
247
247
  }
248
- // eslint-disable-next-line deprecation/deprecation
248
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
249
249
  function valuesMapToJSON(values) {
250
- // eslint-disable-next-line deprecation/deprecation
250
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
251
251
  const map = {};
252
252
  for (const key in values) {
253
253
  /* istanbul ignore else */
254
254
  if (values.hasOwnProperty(key)) {
255
- // eslint-disable-next-line deprecation/deprecation
255
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
256
256
  map[key] = Value.toJSON(values[key]);
257
257
  }
258
258
  }
259
259
  return map;
260
260
  }
261
- // eslint-disable-next-line deprecation/deprecation
261
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
262
262
  function displayValuesArrayFromJSON(json) {
263
- // eslint-disable-next-line deprecation/deprecation
263
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
264
264
  return json.map(DisplayValue.fromJSON);
265
265
  }
266
- // eslint-disable-next-line deprecation/deprecation
266
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
267
267
  function displayValuesArrayToJSON(values) {
268
- // eslint-disable-next-line deprecation/deprecation
268
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
269
269
  return values.map(DisplayValue.toJSON);
270
270
  }
271
- // eslint-disable-next-line deprecation/deprecation
271
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
272
272
  function displayValuesMapFromJSON(json) {
273
273
  const map = {};
274
274
  for (const key in json) {
275
275
  /* istanbul ignore else */
276
276
  if (json.hasOwnProperty(key)) {
277
- // eslint-disable-next-line deprecation/deprecation
277
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
278
278
  map[key] = DisplayValue.fromJSON(json[key]);
279
279
  }
280
280
  }
281
281
  return map;
282
282
  }
283
- // eslint-disable-next-line deprecation/deprecation
283
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
284
284
  function displayValuesMapToJSON(values) {
285
- // eslint-disable-next-line deprecation/deprecation
285
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
286
286
  const map = {};
287
287
  for (const key in values) {
288
288
  /* istanbul ignore else */
289
289
  if (values.hasOwnProperty(key)) {
290
- // eslint-disable-next-line deprecation/deprecation
290
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
291
291
  map[key] = DisplayValue.toJSON(values[key]);
292
292
  }
293
293
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAYH,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,KAAK,CA0ErB;AA1ED,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,sCAAsC;IACtC,SAAgB,iBAAiB,CAAC,KAAY;QAC5C,OAAO,CACL,KAAK,KAAK,SAAS;YAClB,KAAiC,CAAC,EAAE,KAAK,SAAS;YAClD,KAAiC,CAAC,SAAS,KAAK,SAAS;YACzD,KAAiC,CAAC,KAAK,KAAK,SAAS,CACvD,C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AAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,mDAAmD;YACnD,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,mDAAmD;AACnD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,mDAAmD;IACnD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,mDAAmD;YACnD,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,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 Content\r\n */\r\n\r\nimport { InstanceId, InstanceKey } from \"../EC\";\r\nimport { LabelDefinition } from \"../LabelDefinition\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace Value {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /** Is the value a navigation value */\r\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\r\n return (\r\n value !== undefined &&\r\n (value as NavigationPropertyValue).id !== undefined &&\r\n (value as NavigationPropertyValue).className !== undefined &&\r\n (value as NavigationPropertyValue).label !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Serialize [[Value]] to JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null) {\r\n return undefined;\r\n }\r\n if (isNestedContentValue(json)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(NestedContentValue.fromJSON);\r\n }\r\n if (isArrayValue(json)) {\r\n return valuesArrayFromJSON(json);\r\n }\r\n if (isMapValue(json)) {\r\n return valuesMapFromJSON(json);\r\n }\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[Value]] from JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value) {\r\n return null;\r\n }\r\n if (isNestedContentValue(value)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return value.map(NestedContentValue.toJSON);\r\n }\r\n if (isArrayValue(value)) {\r\n return valuesArrayToJSON(value);\r\n }\r\n if (isMapValue(value)) {\r\n return valuesMapToJSON(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace DisplayValue {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /**\r\n * Serialize [[DisplayValue]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null) {\r\n return undefined;\r\n }\r\n if (isArrayValue(json)) {\r\n return displayValuesArrayFromJSON(json);\r\n }\r\n if (isMapValue(json)) {\r\n return displayValuesMapFromJSON(json);\r\n }\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValue]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value) {\r\n return null;\r\n }\r\n if (isArrayValue(value)) {\r\n return displayValuesArrayToJSON(value);\r\n }\r\n if (isMapValue(value)) {\r\n return displayValuesMapToJSON(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n /** Label of the ECInstance that this `NestedContentValue` is based on. */\r\n labelDefinition?: LabelDefinition;\r\n}\r\n\r\n/**\r\n * Data structure that describes value of the navigation property.\r\n * @public\r\n */\r\nexport interface NavigationPropertyValue {\r\n /** Label of target instance. */\r\n label: LabelDefinition;\r\n /** Full class name of target instance in format `SchemaName:ClassName` */\r\n className: string;\r\n /** Id of target instance. */\r\n id: InstanceId;\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /**\r\n * Serialize [[NestedContentValue]] to JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n ...value,\r\n values: valuesMapToJSON(value.values),\r\n displayValues: displayValuesMapToJSON(value.displayValues),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentValue]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n ...json,\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesMap]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesArray]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKey[];\r\n // eslint-disable-next-line deprecation/deprecation\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValueJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /**\r\n * Serialize [[DisplayValueGroup]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValueGroup]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (\r\n v !== undefined &&\r\n Array.isArray(v) &&\r\n (v.length === 0 ||\r\n (!!v[0] &&\r\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\r\n (v[0] as NestedContentValue).values !== undefined &&\r\n (v[0] as NestedContentValue).displayValues !== undefined &&\r\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\r\n );\r\n}\r\n\r\nfunction isArrayValue(\r\n v: Value | ValueJSON | DisplayValue | DisplayValueJSON, // eslint-disable-line deprecation/deprecation\r\n // eslint-disable-next-line deprecation/deprecation\r\n): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return v !== undefined && Array.isArray(v);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(Value.fromJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return values.map(Value.toJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return values.map(DisplayValue.toJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
1
+ {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAYH,cAAc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4D;IAC5D,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,4DAA4D;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,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 Content\r\n */\r\n\r\nimport { InstanceId, InstanceKey } from \"../EC\";\r\nimport { LabelDefinition } from \"../LabelDefinition\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace Value {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /** Is the value a navigation value */\r\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\r\n return (\r\n value !== undefined &&\r\n (value as NavigationPropertyValue).id !== undefined &&\r\n (value as NavigationPropertyValue).className !== undefined &&\r\n (value as NavigationPropertyValue).label !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Serialize [[Value]] to JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null) {\r\n return undefined;\r\n }\r\n if (isNestedContentValue(json)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map(NestedContentValue.fromJSON);\r\n }\r\n if (isArrayValue(json)) {\r\n return valuesArrayFromJSON(json);\r\n }\r\n if (isMapValue(json)) {\r\n return valuesMapFromJSON(json);\r\n }\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[Value]] from JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value) {\r\n return null;\r\n }\r\n if (isNestedContentValue(value)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return value.map(NestedContentValue.toJSON);\r\n }\r\n if (isArrayValue(value)) {\r\n return valuesArrayToJSON(value);\r\n }\r\n if (isMapValue(value)) {\r\n return valuesMapToJSON(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace DisplayValue {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /**\r\n * Serialize [[DisplayValue]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null) {\r\n return undefined;\r\n }\r\n if (isArrayValue(json)) {\r\n return displayValuesArrayFromJSON(json);\r\n }\r\n if (isMapValue(json)) {\r\n return displayValuesMapFromJSON(json);\r\n }\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValue]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value) {\r\n return null;\r\n }\r\n if (isArrayValue(value)) {\r\n return displayValuesArrayToJSON(value);\r\n }\r\n if (isMapValue(value)) {\r\n return displayValuesMapToJSON(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n /** Label of the ECInstance that this `NestedContentValue` is based on. */\r\n labelDefinition?: LabelDefinition;\r\n}\r\n\r\n/**\r\n * Data structure that describes value of the navigation property.\r\n * @public\r\n */\r\nexport interface NavigationPropertyValue {\r\n /** Label of target instance. */\r\n label: LabelDefinition;\r\n /** Full class name of target instance in format `SchemaName:ClassName` */\r\n className: string;\r\n /** Id of target instance. */\r\n id: InstanceId;\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /**\r\n * Serialize [[NestedContentValue]] to JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n ...value,\r\n values: valuesMapToJSON(value.values),\r\n displayValues: displayValuesMapToJSON(value.displayValues),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentValue]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n ...json,\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesMap]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesArray]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKey[];\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValue: DisplayValueJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /**\r\n * Serialize [[DisplayValueGroup]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValueGroup]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (\r\n v !== undefined &&\r\n Array.isArray(v) &&\r\n (v.length === 0 ||\r\n (!!v[0] &&\r\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\r\n (v[0] as NestedContentValue).values !== undefined &&\r\n (v[0] as NestedContentValue).displayValues !== undefined &&\r\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\r\n );\r\n}\r\n\r\nfunction isArrayValue(\r\n v: Value | ValueJSON | DisplayValue | DisplayValueJSON, // eslint-disable-line @typescript-eslint/no-deprecated\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return v !== undefined && Array.isArray(v);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map(Value.fromJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return values.map(Value.toJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return values.map(DisplayValue.toJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
@@ -17,11 +17,11 @@ export var HierarchyLevel;
17
17
  * @beta
18
18
  * @deprecated in 3.x. Use [[HierarchyLevel]].
19
19
  */
20
- // eslint-disable-next-line deprecation/deprecation
20
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
21
21
  function fromJSON(json) {
22
22
  return {
23
23
  ...json,
24
- // eslint-disable-next-line deprecation/deprecation
24
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
25
25
  nodes: json.nodes.map(Node.fromJSON),
26
26
  };
27
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AA2BxC;;;GAGG;AACH,MAAM,KAAW,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAC7B;;;;OAIG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,mDAAmD;YACnD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IANe,uBAAQ,WAMvB,CAAA;AACH,CAAC,EAdgB,cAAc,KAAd,cAAc,QAc9B","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 Hierarchies\r\n */\r\n\r\nimport { Node, NodeJSON } from \"./Node\";\r\n\r\n/**\r\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\r\n * @public\r\n */\r\nexport interface HierarchyLevel {\r\n /** A list of nodes in a hierarchy level. */\r\n nodes: Node[];\r\n /**\r\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n */\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyLevel]].\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]]\r\n */\r\nexport interface HierarchyLevelJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n nodes: NodeJSON[];\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * Contains helper functions for working with objects of [[HierarchyLevel]] type.\r\n * @public\r\n */\r\nexport namespace HierarchyLevel {\r\n /**\r\n * Deserialize [[HierarchyLevel]] from JSON\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\r\n return {\r\n ...json,\r\n // eslint-disable-next-line deprecation/deprecation\r\n nodes: json.nodes.map(Node.fromJSON),\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AA2BxC;;;GAGG;AACH,MAAM,KAAW,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAC7B;;;;OAIG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,4DAA4D;YAC5D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IANe,uBAAQ,WAMvB,CAAA;AACH,CAAC,EAdgB,cAAc,KAAd,cAAc,QAc9B","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 Hierarchies\r\n */\r\n\r\nimport { Node, NodeJSON } from \"./Node\";\r\n\r\n/**\r\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\r\n * @public\r\n */\r\nexport interface HierarchyLevel {\r\n /** A list of nodes in a hierarchy level. */\r\n nodes: Node[];\r\n /**\r\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n */\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyLevel]].\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]]\r\n */\r\nexport interface HierarchyLevelJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n nodes: NodeJSON[];\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * Contains helper functions for working with objects of [[HierarchyLevel]] type.\r\n * @public\r\n */\r\nexport namespace HierarchyLevel {\r\n /**\r\n * Deserialize [[HierarchyLevel]] from JSON\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\r\n return {\r\n ...json,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n nodes: json.nodes.map(Node.fromJSON),\r\n };\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Key.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,eAAe,oBAAoB;IACnC,mBAAmB,wBAAwB;IAC3C,sBAAsB,2BAA2B;IACjD,wBAAwB,6BAA6B;CACtD;AAED;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,kBA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,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,GAAG,EAAE,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,iBAAiB,CAAC"}
@@ -26,7 +26,7 @@ export var NodeKey;
26
26
  * Serialize given [[NodeKey]] to JSON
27
27
  * @deprecated in 3.x. Use [[NodeKey]].
28
28
  */
29
- // eslint-disable-next-line deprecation/deprecation
29
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
30
30
  function toJSON(key) {
31
31
  return { ...key };
32
32
  }
@@ -35,34 +35,34 @@ export var NodeKey;
35
35
  * Deserialize node key from JSON
36
36
  * @deprecated in 3.x. Use [[NodeKey]].
37
37
  */
38
- // eslint-disable-next-line deprecation/deprecation
38
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
39
39
  function fromJSON(json) {
40
40
  return { version: 1, ...json };
41
41
  }
42
42
  NodeKey.fromJSON = fromJSON;
43
- // eslint-disable-next-line deprecation/deprecation
43
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
44
44
  function isInstancesNodeKey(key) {
45
45
  return key.type === StandardNodeTypes.ECInstancesNode;
46
46
  }
47
47
  NodeKey.isInstancesNodeKey = isInstancesNodeKey;
48
- // eslint-disable-next-line deprecation/deprecation
48
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
49
49
  function isClassGroupingNodeKey(key) {
50
50
  return key.type === StandardNodeTypes.ECClassGroupingNode;
51
51
  }
52
52
  NodeKey.isClassGroupingNodeKey = isClassGroupingNodeKey;
53
- // eslint-disable-next-line deprecation/deprecation
53
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
54
54
  function isPropertyGroupingNodeKey(key) {
55
55
  return key.type === StandardNodeTypes.ECPropertyGroupingNode;
56
56
  }
57
57
  NodeKey.isPropertyGroupingNodeKey = isPropertyGroupingNodeKey;
58
- // eslint-disable-next-line deprecation/deprecation
58
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
59
59
  function isLabelGroupingNodeKey(key) {
60
60
  return key.type === StandardNodeTypes.DisplayLabelGroupingNode;
61
61
  }
62
62
  NodeKey.isLabelGroupingNodeKey = isLabelGroupingNodeKey;
63
- // eslint-disable-next-line deprecation/deprecation
63
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
64
64
  function isGroupingNodeKey(key) {
65
- return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key); // eslint-disable-line deprecation/deprecation
65
+ return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key); // eslint-disable-line @typescript-eslint/no-deprecated
66
66
  }
67
67
  NodeKey.isGroupingNodeKey = isGroupingNodeKey;
68
68
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,OAAO,CA+HvB;AA/HD,WAAiB,OAAO;IACtB;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,MAAM,CAAC,GAAY;QACjC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,cAAM,SAErB,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAA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C,EAAE,CAAC;YACnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;QAClF,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAhDe,cAAM,SAgDrB,CAAA;AACH,CAAC,EA/HgB,OAAO,KAAP,OAAO,QA+HvB","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 Hierarchies\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { InstanceKey } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace NodeKey {\r\n /**\r\n * Serialize given [[NodeKey]] to JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n return { ...key };\r\n }\r\n\r\n /**\r\n * Deserialize node key from JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key); // eslint-disable-line deprecation/deprecation\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type) {\r\n return false;\r\n }\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length) {\r\n return false;\r\n }\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n\r\n /** Query that returns all selected instance keys */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[BaseNodeKey]].\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n // TODO: make this required\r\n version?: number;\r\n pathFromRoot: string[];\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECInstancesNodeKey]].\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKey[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[GroupingNodeKey]].\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKey {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n\r\n/**\r\n * Data structure that describes a presentation query\r\n * @public\r\n */\r\nexport interface PresentationQuery {\r\n /** ECSQL query */\r\n query: string;\r\n /** The query bindings */\r\n bindings?: PresentationQueryBinding[];\r\n}\r\n\r\n/**\r\n * Defines an [[Id64String]] value binding.\r\n * @public\r\n */\r\nexport interface IdBinding {\r\n type: \"Id\";\r\n value: Id64String;\r\n}\r\n\r\n/**\r\n * Defines an [[IdSet]] value binding for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface IdSetBinding {\r\n type: \"IdSet\";\r\n value: Id64String[];\r\n}\r\n\r\n/**\r\n * Defines an EC value binding.\r\n * @public\r\n */\r\nexport interface ECValueBinding {\r\n type: \"ECValue\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any;\r\n}\r\n\r\n/**\r\n * Defines a binding for a list of EC values for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface ECValueSetBinding {\r\n type: \"ValueSet\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any[];\r\n}\r\n\r\n/**\r\n * One of the [[PresentationQuery]] binding types.\r\n * @public\r\n */\r\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\r\n"]}
1
+ {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,2DAA2D;AAC3D,MAAM,KAAW,OAAO,CA0HvB;AA1HD,WAAiB,OAAO;IACtB;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,GAAY;QACjC,OAAO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GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzC,CAAC;QACD,IAAI,yBAAyB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,MAAM,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;QAClF,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAhDe,cAAM,SAgDrB,CAAA;AACH,CAAC,EA1HgB,OAAO,KAAP,OAAO,QA0HvB","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 Hierarchies\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { InstanceKey } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace NodeKey {\r\n /**\r\n * Serialize given [[NodeKey]] to JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n return { ...key };\r\n }\r\n\r\n /**\r\n * Deserialize node key from JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type) {\r\n return false;\r\n }\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length) {\r\n return false;\r\n }\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n\r\n /** Query that returns all selected instance keys */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[BaseNodeKey]].\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n // TODO: make this required\r\n version?: number;\r\n pathFromRoot: string[];\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECInstancesNodeKey]].\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKey[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[GroupingNodeKey]].\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKey {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n\r\n/**\r\n * Data structure that describes a presentation query\r\n * @public\r\n */\r\nexport interface PresentationQuery {\r\n /** ECSQL query */\r\n query: string;\r\n /** The query bindings */\r\n bindings?: PresentationQueryBinding[];\r\n}\r\n\r\n/**\r\n * Defines an [[Id64String]] value binding.\r\n * @public\r\n */\r\nexport interface IdBinding {\r\n type: \"Id\";\r\n value: Id64String;\r\n}\r\n\r\n/**\r\n * Defines an [[IdSet]] value binding for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface IdSetBinding {\r\n type: \"IdSet\";\r\n value: Id64String[];\r\n}\r\n\r\n/**\r\n * Defines an EC value binding.\r\n * @public\r\n */\r\nexport interface ECValueBinding {\r\n type: \"ECValue\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any;\r\n}\r\n\r\n/**\r\n * Defines a binding for a list of EC values for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface ECValueSetBinding {\r\n type: \"ValueSet\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any[];\r\n}\r\n\r\n/**\r\n * One of the [[PresentationQuery]] binding types.\r\n * @public\r\n */\r\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MA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ACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF"}
1
+ {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,YAAY,CAAC,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED;;;;GAIG;AACH,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AC;AAElG,cAAc;AACd,yBAAiB,IAAI,CAAC;IACpB;;;OAGG;IAEH,SAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAM3C;IAED,gBAAgB;IAEhB,SAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CAUhE;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAWtD;IAED,gBAAgB;IAEhB,SAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAYlE;IAED;;;;OAIG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAGpD;IAED;;;;;OAKG;IAEH,SAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,GAAG,IAAI,EAAE,CAM9D;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF"}
@@ -13,7 +13,7 @@ export var Node;
13
13
  * Serialize given [[Node]] to JSON
14
14
  * @deprecated in 3.x. Use [[Node]].
15
15
  */
16
- // eslint-disable-next-line deprecation/deprecation
16
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
17
17
  function toJSON(node) {
18
18
  const { label, ...baseNode } = node;
19
19
  return {
@@ -23,7 +23,7 @@ export var Node;
23
23
  }
24
24
  Node.toJSON = toJSON;
25
25
  /** @internal */
26
- // eslint-disable-next-line deprecation/deprecation
26
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
27
27
  function toPartialJSON(node) {
28
28
  if (node.key === undefined) {
29
29
  return node;
@@ -39,7 +39,7 @@ export var Node;
39
39
  * Deserialize [[Node]] from JSON
40
40
  * @deprecated in 3.x. Use [[Node]].
41
41
  */
42
- // eslint-disable-next-line deprecation/deprecation
42
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
43
43
  function fromJSON(json) {
44
44
  if (typeof json === "string") {
45
45
  return JSON.parse(json, reviver);
@@ -47,14 +47,14 @@ export var Node;
47
47
  const { labelDefinition, ...baseJson } = json;
48
48
  return {
49
49
  ...baseJson,
50
- // eslint-disable-next-line deprecation/deprecation
50
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
51
51
  key: NodeKey.fromJSON(json.key),
52
52
  label: labelDefinition,
53
53
  };
54
54
  }
55
55
  Node.fromJSON = fromJSON;
56
56
  /** @internal */
57
- // eslint-disable-next-line deprecation/deprecation
57
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
58
58
  function fromPartialJSON(json) {
59
59
  if (json.key === undefined) {
60
60
  return json;
@@ -62,7 +62,7 @@ export var Node;
62
62
  const { key, labelDefinition, ...baseJson } = json;
63
63
  return {
64
64
  ...baseJson,
65
- // eslint-disable-next-line deprecation/deprecation
65
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
66
66
  key: NodeKey.fromJSON(key),
67
67
  label: labelDefinition,
68
68
  };
@@ -74,7 +74,7 @@ export var Node;
74
74
  * @internal
75
75
  */
76
76
  function reviver(key, value) {
77
- // eslint-disable-next-line deprecation/deprecation
77
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
78
78
  return key === "" ? fromJSON(value) : value;
79
79
  }
80
80
  Node.reviver = reviver;
@@ -84,12 +84,12 @@ export var Node;
84
84
  * @returns Deserialized nodes list
85
85
  * @internal
86
86
  */
87
- // eslint-disable-next-line deprecation/deprecation
87
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
88
88
  function listFromJSON(json) {
89
89
  if (typeof json === "string") {
90
90
  return JSON.parse(json, listReviver);
91
91
  }
92
- // eslint-disable-next-line deprecation/deprecation
92
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
93
93
  return json.map((m) => fromJSON(m));
94
94
  }
95
95
  Node.listFromJSON = listFromJSON;