@itwin/presentation-hierarchies 1.7.12 → 1.7.13

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 (162) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +13 -6
  3. package/lib/cjs/hierarchies/HierarchyFiltering.d.ts.map +1 -1
  4. package/lib/cjs/hierarchies/HierarchyFiltering.js +18 -10
  5. package/lib/cjs/hierarchies/HierarchyFiltering.js.map +1 -1
  6. package/lib/cjs/hierarchies/HierarchyNode.d.ts.map +1 -1
  7. package/lib/cjs/hierarchies/HierarchyNode.js.map +1 -1
  8. package/lib/cjs/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
  9. package/lib/cjs/hierarchies/HierarchyNodeKey.js.map +1 -1
  10. package/lib/cjs/hierarchies/HierarchyProvider.d.ts.map +1 -1
  11. package/lib/cjs/hierarchies/HierarchyProvider.js.map +1 -1
  12. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
  13. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js +16 -7
  14. package/lib/cjs/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
  15. package/lib/cjs/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
  16. package/lib/cjs/hierarchies/imodel/HierarchyCache.js +1 -4
  17. package/lib/cjs/hierarchies/imodel/HierarchyCache.js.map +1 -1
  18. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
  19. package/lib/cjs/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
  20. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
  21. package/lib/cjs/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
  22. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
  23. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js +28 -26
  24. package/lib/cjs/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
  25. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
  26. package/lib/cjs/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
  27. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
  28. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js +13 -44
  29. package/lib/cjs/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
  30. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
  31. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +2 -1
  32. package/lib/cjs/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
  33. package/lib/cjs/hierarchies/imodel/Utils.d.ts.map +1 -1
  34. package/lib/cjs/hierarchies/imodel/Utils.js +19 -7
  35. package/lib/cjs/hierarchies/imodel/Utils.js.map +1 -1
  36. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
  37. package/lib/cjs/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
  38. package/lib/cjs/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
  39. package/lib/cjs/hierarchies/imodel/operators/Grouping.js +5 -5
  40. package/lib/cjs/hierarchies/imodel/operators/Grouping.js.map +1 -1
  41. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
  42. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js +10 -3
  43. package/lib/cjs/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
  44. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
  45. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js +2 -1
  46. package/lib/cjs/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
  47. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
  48. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +1 -4
  49. package/lib/cjs/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
  50. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
  51. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js +2 -8
  52. package/lib/cjs/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
  53. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
  54. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -5
  55. package/lib/cjs/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
  56. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
  57. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -10
  58. package/lib/cjs/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
  59. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
  60. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +20 -22
  61. package/lib/cjs/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
  62. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
  63. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js +3 -1
  64. package/lib/cjs/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
  65. package/lib/cjs/hierarchies/internal/Common.d.ts.map +1 -1
  66. package/lib/cjs/hierarchies/internal/Common.js.map +1 -1
  67. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
  68. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js +3 -1
  69. package/lib/cjs/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
  70. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
  71. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js +1 -4
  72. package/lib/cjs/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
  73. package/lib/cjs/hierarchies/internal/operators/Partition.d.ts.map +1 -1
  74. package/lib/cjs/hierarchies/internal/operators/Partition.js.map +1 -1
  75. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
  76. package/lib/cjs/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
  77. package/lib/cjs/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
  78. package/lib/cjs/presentation-hierarchies.d.ts +2 -2
  79. package/lib/cjs/presentation-hierarchies.d.ts.map +1 -1
  80. package/lib/cjs/presentation-hierarchies.js.map +1 -1
  81. package/lib/esm/hierarchies/HierarchyFiltering.d.ts.map +1 -1
  82. package/lib/esm/hierarchies/HierarchyFiltering.js +18 -10
  83. package/lib/esm/hierarchies/HierarchyFiltering.js.map +1 -1
  84. package/lib/esm/hierarchies/HierarchyNode.d.ts.map +1 -1
  85. package/lib/esm/hierarchies/HierarchyNode.js.map +1 -1
  86. package/lib/esm/hierarchies/HierarchyNodeKey.d.ts.map +1 -1
  87. package/lib/esm/hierarchies/HierarchyNodeKey.js.map +1 -1
  88. package/lib/esm/hierarchies/HierarchyProvider.d.ts.map +1 -1
  89. package/lib/esm/hierarchies/HierarchyProvider.js.map +1 -1
  90. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.d.ts.map +1 -1
  91. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js +17 -8
  92. package/lib/esm/hierarchies/imodel/FilteringHierarchyDefinition.js.map +1 -1
  93. package/lib/esm/hierarchies/imodel/HierarchyCache.d.ts.map +1 -1
  94. package/lib/esm/hierarchies/imodel/HierarchyCache.js +1 -4
  95. package/lib/esm/hierarchies/imodel/HierarchyCache.js.map +1 -1
  96. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.d.ts.map +1 -1
  97. package/lib/esm/hierarchies/imodel/IModelHierarchyDefinition.js.map +1 -1
  98. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.d.ts.map +1 -1
  99. package/lib/esm/hierarchies/imodel/IModelHierarchyNode.js.map +1 -1
  100. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.d.ts.map +1 -1
  101. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js +29 -27
  102. package/lib/esm/hierarchies/imodel/IModelHierarchyProvider.js.map +1 -1
  103. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.d.ts.map +1 -1
  104. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js +1 -1
  105. package/lib/esm/hierarchies/imodel/LimitingECSqlQueryExecutor.js.map +1 -1
  106. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.d.ts.map +1 -1
  107. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js +13 -44
  108. package/lib/esm/hierarchies/imodel/NodeSelectQueryFactory.js.map +1 -1
  109. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.d.ts.map +1 -1
  110. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js +2 -1
  111. package/lib/esm/hierarchies/imodel/PredicateBasedHierarchyDefinition.js.map +1 -1
  112. package/lib/esm/hierarchies/imodel/Utils.d.ts.map +1 -1
  113. package/lib/esm/hierarchies/imodel/Utils.js +19 -7
  114. package/lib/esm/hierarchies/imodel/Utils.js.map +1 -1
  115. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.d.ts.map +1 -1
  116. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js +1 -1
  117. package/lib/esm/hierarchies/imodel/operators/DetermineChildren.js.map +1 -1
  118. package/lib/esm/hierarchies/imodel/operators/Grouping.d.ts.map +1 -1
  119. package/lib/esm/hierarchies/imodel/operators/Grouping.js +6 -6
  120. package/lib/esm/hierarchies/imodel/operators/Grouping.js.map +1 -1
  121. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.d.ts.map +1 -1
  122. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js +12 -5
  123. package/lib/esm/hierarchies/imodel/operators/HideIfNoChildren.js.map +1 -1
  124. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.d.ts.map +1 -1
  125. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js +4 -3
  126. package/lib/esm/hierarchies/imodel/operators/HideNodesInHierarchy.js.map +1 -1
  127. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.d.ts.map +1 -1
  128. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js +2 -5
  129. package/lib/esm/hierarchies/imodel/operators/grouping/BaseClassGrouping.js.map +1 -1
  130. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.d.ts.map +1 -1
  131. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js +2 -8
  132. package/lib/esm/hierarchies/imodel/operators/grouping/ClassGrouping.js.map +1 -1
  133. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.d.ts.map +1 -1
  134. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js +1 -5
  135. package/lib/esm/hierarchies/imodel/operators/grouping/GroupHiding.js.map +1 -1
  136. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.d.ts.map +1 -1
  137. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js +2 -10
  138. package/lib/esm/hierarchies/imodel/operators/grouping/LabelGrouping.js.map +1 -1
  139. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.d.ts.map +1 -1
  140. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js +20 -22
  141. package/lib/esm/hierarchies/imodel/operators/grouping/PropertiesGrouping.js.map +1 -1
  142. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.d.ts.map +1 -1
  143. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js +3 -1
  144. package/lib/esm/hierarchies/imodel/operators/grouping/Shared.js.map +1 -1
  145. package/lib/esm/hierarchies/internal/Common.d.ts.map +1 -1
  146. package/lib/esm/hierarchies/internal/Common.js.map +1 -1
  147. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.d.ts.map +1 -1
  148. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js +3 -1
  149. package/lib/esm/hierarchies/internal/RxjsHierarchyDefinition.js.map +1 -1
  150. package/lib/esm/hierarchies/internal/SubscriptionScheduler.d.ts.map +1 -1
  151. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js +1 -4
  152. package/lib/esm/hierarchies/internal/SubscriptionScheduler.js.map +1 -1
  153. package/lib/esm/hierarchies/internal/operators/Partition.d.ts.map +1 -1
  154. package/lib/esm/hierarchies/internal/operators/Partition.js.map +1 -1
  155. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.d.ts.map +1 -1
  156. package/lib/esm/hierarchies/internal/operators/ReduceToMergeMap.js.map +1 -1
  157. package/lib/esm/hierarchies/internal/operators/ReleaseMainThread.d.ts.map +1 -1
  158. package/lib/esm/presentation-hierarchies.d.ts +2 -2
  159. package/lib/esm/presentation-hierarchies.d.ts.map +1 -1
  160. package/lib/esm/presentation-hierarchies.js +2 -2
  161. package/lib/esm/presentation-hierarchies.js.map +1 -1
  162. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"file":"PropertiesGrouping.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/PropertiesGrouping.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAmDhG,oDAqKC;AA0ED,oEAyDC;AAqCD,8DAaC;AAGD,sCAwBC;AAGD,4EAYC;AArbD,sDAA6C;AAC7C,oEAUoC;AACpC,gEAA+E;AAC/E,sEAAyF;AAmCzF,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CACxC,YAA8C,EAC9C,mBAA8D,EAC9D,qBAAwC,EACxC,cAAwC,EACxC,gBAAoD,EAC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AC,SAAS,KAAK,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,UAAU,KAAK,QAAQ,CAAC,UAAU,CAChJ,CACF;QACD,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CACzB,OAAO,CAAC,IAAI,CACV,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,OAAO,KAAK,QAAQ,CAAC,OAAO,IAAI,QAAQ,CAAC,UAAU,KAAK,QAAQ,CAAC,UAAU,CAChJ,CACF,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,gCAAgC,CACpD,YAA0D,EAC1D,UAA2C,EAC3C,KAAuC,EACvC,cAAwC,EACxC,gBAAoD;IAEpD,MAAM,mBAAmB,GAAG,MAAM,4BAA4B,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAChG,OAAO,mBAAmB,CAAC,GAAG,CAC5B,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,EAAE,CAC5D,oBAAoB,CAAC,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,CAAC,CACxH,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { assert } from \"@itwin/core-bentley\";\nimport {\n ArrayElement,\n createMainThreadReleaseOnTimePassedHandler,\n EC,\n ECClassHierarchyInspector,\n ECSchemaProvider,\n formatConcatenatedValue,\n getClass,\n IPrimitiveValueFormatter,\n TypedPrimitiveValue,\n} from \"@itwin/presentation-shared\";\nimport { HierarchyNode, ParentHierarchyNode } from \"../../../HierarchyNode.js\";\nimport { HierarchyNodeKey, PropertyGroupingNodeKey } from \"../../../HierarchyNodeKey.js\";\nimport {\n HierarchyNodePropertiesGroupingParams,\n HierarchyNodePropertyGroup,\n HierarchyNodePropertyValueRange,\n ProcessedInstanceHierarchyNode,\n} from \"../../IModelHierarchyNode.js\";\nimport { GroupingHandler, GroupingHandlerResult, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping.js\";\n\ninterface DisplayablePropertyGroupingInfo {\n label: string;\n propertyGroupingNodeKey: PropertyGroupingNodeKey;\n}\n\ninterface PropertyGroupingInformation {\n ungrouped: ProcessedInstanceHierarchyNode[];\n grouped: Map<string, { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }>;\n}\n\n/** @internal */\nexport interface PropertiesGroupingLocalizedStrings {\n other: string;\n unspecified: string;\n}\n\n/** @internal */\nexport interface PropertyGroupInfo {\n ecClass: EC.Class;\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo;\n propertyGroup: Omit<HierarchyNodePropertyGroup, \"propertyValue\">;\n}\n\n/** @internal */\nexport type PreviousPropertiesGroupingInfo = Array<{ propertiesClassName: string; propertyName: string; isRange?: boolean }>;\n\n/** @internal */\nexport async function createPropertyGroups(\n nodesToGroup: ProcessedInstanceHierarchyNode[],\n nodesAlreadyGrouped: ProcessedInstancesGroupingHierarchyNode[],\n handlerGroupingParams: PropertyGroupInfo,\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n classHierarchyInspector: ECClassHierarchyInspector,\n): Promise<GroupingHandlerResult> {\n let otherValuesGrouping: { node: ProcessedInstancesGroupingHierarchyNode; new: boolean } | undefined;\n const getOtherValuesGroupingNode = () => {\n if (!otherValuesGrouping) {\n const node = nodesAlreadyGrouped.find((n) => HierarchyNodeKey.isPropertyOtherValuesGrouping(n.key));\n if (node) {\n otherValuesGrouping = { node, new: false };\n }\n }\n otherValuesGrouping ??= {\n node: {\n key: {\n type: \"property-grouping:other\" as const,\n properties: [],\n },\n parentKeys: [],\n groupedInstanceKeys: [],\n label: localizedStrings.other,\n children: [],\n },\n new: true,\n };\n return otherValuesGrouping.node;\n };\n\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const groupings: PropertyGroupingInformation = { ungrouped: [], grouped: new Map() };\n for (const node of nodesToGroup) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n groupings.ungrouped.push(node);\n continue;\n }\n if (!(await shouldCreatePropertyGroup(handlerGroupingParams, byProperties, node.key.instanceKeys[0].className, classHierarchyInspector))) {\n groupings.ungrouped.push(node);\n continue;\n }\n const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n const propertyIdentifier = {\n propertyName: currentProperty.propertyName,\n propertyClassName: byProperties.propertiesClassName,\n };\n\n const propertyClass = handlerGroupingParams.ecClass;\n const property = await propertyClass.getProperty(currentProperty.propertyName);\n\n if (!property?.isNavigation() && (!property?.isPrimitive() || property.primitiveType === \"Binary\" || property.primitiveType === \"IGeometry\")) {\n groupings.ungrouped.push(node);\n continue;\n }\n\n const extendedTypeName = \"extendedTypeName\" in property ? property.extendedTypeName : undefined;\n const primitiveType = \"primitiveType\" in property ? property.primitiveType : \"String\";\n assert(primitiveType !== \"Binary\" && primitiveType !== \"IGeometry\");\n\n if (!currentProperty.propertyValue) {\n if (byProperties.createGroupForUnspecifiedValues) {\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:Unspecified`,\n {\n label: localizedStrings.unspecified,\n propertyGroupingNodeKey: {\n type: \"property-grouping:value\",\n ...propertyIdentifier,\n formattedPropertyValue: \"\",\n },\n },\n node,\n );\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const koqName = (await property.kindOfQuantity)?.fullName;\n if (currentProperty.ranges) {\n if (typeof currentProperty.propertyValue === \"number\") {\n const propValue = currentProperty.propertyValue;\n const matchingRange = currentProperty.ranges.find((range) => propValue >= range.fromValue && propValue <= range.toValue);\n\n if (matchingRange) {\n const fromValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.fromValue) ? \"Integer\" : \"Double\",\n extendedType: extendedTypeName,\n koqName,\n value: matchingRange.fromValue,\n };\n const toValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.toValue) ? \"Integer\" : \"Double\",\n extendedType: extendedTypeName,\n koqName,\n value: matchingRange.toValue,\n };\n\n const rangeLabel = matchingRange.rangeLabel ?? `${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:[${matchingRange.fromValue}-${matchingRange.toValue}]${matchingRange.rangeLabel ? `(${matchingRange.rangeLabel})` : \"\"}`,\n {\n label: rangeLabel,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:range\",\n fromValue: matchingRange.fromValue,\n toValue: matchingRange.toValue,\n },\n },\n node,\n );\n continue;\n }\n }\n if (byProperties.createGroupForOutOfRangeValues) {\n const groupingNode = getOtherValuesGroupingNode();\n assert(HierarchyNodeKey.isPropertyOtherValuesGrouping(groupingNode.key));\n const thisPropertyIdentifier = {\n className: propertyIdentifier.propertyClassName,\n propertyName: propertyIdentifier.propertyName,\n };\n const hasPropertyIdentifier = groupingNode.key.properties.find(\n (x) => x.className === thisPropertyIdentifier.className && x.propertyName === thisPropertyIdentifier.propertyName,\n );\n if (!hasPropertyIdentifier) {\n groupingNode.key.properties.push(thisPropertyIdentifier);\n }\n node.key.instanceKeys.forEach((k) => groupingNode.groupedInstanceKeys.push(k));\n groupingNode.parentKeys = node.parentKeys;\n groupingNode.children.push(Object.assign(node, { parentKeys: [...node.parentKeys, groupingNode.key] }));\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const formattedValue =\n currentProperty.propertyValue instanceof Array\n ? await formatConcatenatedValue({ value: currentProperty.propertyValue, valueFormatter })\n : await valueFormatter(TypedPrimitiveValue.create(currentProperty.propertyValue, primitiveType, koqName, extendedTypeName));\n\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:${formattedValue}`,\n {\n label: formattedValue,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:value\",\n formattedPropertyValue: formattedValue,\n },\n },\n node,\n );\n }\n return createGroupingNodes(groupings, otherValuesGrouping?.new ? otherValuesGrouping.node : undefined);\n}\n\nfunction addGroupingToMap(\n groupingMap: Map<string, { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }>,\n mapKey: string,\n propertyToAdd: DisplayablePropertyGroupingInfo,\n node: ProcessedInstanceHierarchyNode,\n): void {\n let groupingInfo = groupingMap.get(mapKey);\n if (!groupingInfo) {\n groupingInfo = {\n displayablePropertyGroupingInfo: propertyToAdd,\n groupedNodes: [node],\n };\n groupingMap.set(mapKey, groupingInfo);\n return;\n }\n groupingInfo.groupedNodes.push(node);\n}\n\nfunction createGroupingNodes(\n groupings: PropertyGroupingInformation,\n otherValuesGroupingNode: ProcessedInstancesGroupingHierarchyNode | undefined,\n): GroupingHandlerResult {\n const groupedNodes = new Array<ProcessedInstancesGroupingHierarchyNode>();\n groupings.grouped.forEach((entry) => {\n const groupedNodeParentKeys = entry.groupedNodes[0].parentKeys;\n groupedNodes.push({\n label: entry.displayablePropertyGroupingInfo.label,\n key: entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey,\n parentKeys: groupedNodeParentKeys,\n groupedInstanceKeys: entry.groupedNodes.flatMap((groupedInstanceNode) => groupedInstanceNode.key.instanceKeys),\n children: entry.groupedNodes.map((gn) => ({\n ...gn,\n parentKeys: [...groupedNodeParentKeys, entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey],\n })),\n });\n });\n if (otherValuesGroupingNode) {\n groupedNodes.push(otherValuesGroupingNode);\n }\n return { grouped: groupedNodes, ungrouped: groupings.ungrouped, groupingType: \"property\" };\n}\n\nfunction createNodePropertyGroupPathMatchers(node: ParentHierarchyNode): Array<(x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean> {\n if (!HierarchyNode.isPropertyGroupingNode(node)) {\n return [];\n }\n\n const keys = [...node.parentKeys, node.key];\n const propertyGroupingNodeKeys: PropertyGroupingNodeKey[] = [];\n for (let i = keys.length - 1; i >= 0; --i) {\n const key = keys[i];\n if (HierarchyNodeKey.isPropertyGrouping(key)) {\n propertyGroupingNodeKeys.push(key);\n } else {\n break;\n }\n }\n propertyGroupingNodeKeys.reverse();\n\n return propertyGroupingNodeKeys.map((key): ((x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean) => {\n switch (key.type) {\n case \"property-grouping:other\":\n return (x) => key.properties.some((p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange);\n case \"property-grouping:range\":\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n case \"property-grouping:value\":\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n }\n });\n}\n\n/** @internal */\nexport async function getUniquePropertiesGroupInfo(\n schemaProvider: ECSchemaProvider,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n): Promise<Array<PropertyGroupInfo>> {\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const parentPropertyGroupPath = parentNode ? createNodePropertyGroupPathMatchers(parentNode) : [];\n const uniqueProperties = new Map<string, PropertyGroupInfo>();\n for (const node of nodes) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n continue;\n }\n\n let propertyGroupIndex = 0;\n const previousPropertiesInfo = new Array<{ propertyGroup: HierarchyNodePropertyGroup; propertyGroupKey: string }>();\n for (const propertyGroup of byProperties.propertyGroups) {\n const mapKeyRanges = getRangesAsString(propertyGroup.ranges);\n const lastKey = previousPropertiesInfo.length > 0 ? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey : \"\";\n const propertyGroupKey = `${lastKey}:${propertyGroup.propertyName}(${mapKeyRanges})`;\n const mapKey = `${byProperties.propertiesClassName}:${propertyGroupKey}`;\n\n let isAlreadyGrouped = false;\n if (!isAlreadyGrouped && parentPropertyGroupPath.length > 0 && propertyGroupIndex < parentPropertyGroupPath.length) {\n const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];\n isAlreadyGrouped = groupMatcher({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: propertyGroup.propertyName,\n isRange: !!propertyGroup.ranges,\n });\n }\n if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {\n uniqueProperties.set(mapKey, {\n ecClass: await getClass(schemaProvider, byProperties.propertiesClassName),\n propertyGroup: {\n propertyName: propertyGroup.propertyName,\n ranges: propertyGroup.ranges,\n },\n previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: groupingInfo.propertyGroup.propertyName,\n isRange: !!groupingInfo.propertyGroup.ranges,\n })),\n });\n }\n\n previousPropertiesInfo.push({\n propertyGroup,\n propertyGroupKey,\n });\n ++propertyGroupIndex;\n }\n }\n // Order might change in uniqueProperties, resorting to make sure that properties with fewer previous properties are returned first.\n return [...uniqueProperties.values()].sort((lhs, rhs) => lhs.previousPropertiesGroupingInfo.length - rhs.previousPropertiesGroupingInfo.length);\n}\n\nfunction getRangesAsString(ranges?: HierarchyNodePropertyValueRange[]): string {\n return ranges\n ? ranges\n .map((range) => `${range.fromValue}-${range.toValue}(${range.rangeLabel ?? \"\"})`)\n .sort()\n .join(\";\")\n : \"\";\n}\n\nasync function shouldCreatePropertyGroup(\n handlerGroupingParams: PropertyGroupInfo,\n nodePropertyGroupingParams: HierarchyNodePropertiesGroupingParams,\n nodeFullClassName: string,\n classHierarchyInspector: ECClassHierarchyInspector,\n): Promise<boolean> {\n if (\n nodePropertyGroupingParams.propertiesClassName !== handlerGroupingParams.ecClass.fullName ||\n nodePropertyGroupingParams.propertyGroups.length < handlerGroupingParams.previousPropertiesGroupingInfo.length + 1\n ) {\n return false;\n }\n const currentProperty = nodePropertyGroupingParams.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n if (\n currentProperty.propertyName !== handlerGroupingParams.propertyGroup.propertyName ||\n !doRangesMatch(currentProperty.ranges, handlerGroupingParams.propertyGroup.ranges)\n ) {\n return false;\n }\n if (!doPreviousPropertiesMatch(handlerGroupingParams.previousPropertiesGroupingInfo, nodePropertyGroupingParams)) {\n return false;\n }\n return classHierarchyInspector.classDerivesFrom(nodeFullClassName, handlerGroupingParams.ecClass.fullName);\n}\n\n/** @internal */\nexport function doPreviousPropertiesMatch(\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo,\n nodesProperties: HierarchyNodePropertiesGroupingParams,\n): boolean {\n return (\n previousPropertiesGroupingInfo.length <= nodesProperties.propertyGroups.length &&\n previousPropertiesGroupingInfo.every(\n (groupingInfo, index) =>\n groupingInfo.propertiesClassName === nodesProperties.propertiesClassName &&\n groupingInfo.propertyName === nodesProperties.propertyGroups[index].propertyName &&\n !!groupingInfo.isRange === !!nodesProperties.propertyGroups[index].ranges,\n )\n );\n}\n\n/** @internal */\nexport function doRangesMatch(ranges1: HierarchyNodePropertyValueRange[] | undefined, ranges2: HierarchyNodePropertyValueRange[] | undefined): boolean {\n if (typeof ranges1 !== typeof ranges2) {\n return false;\n }\n if (!ranges1) {\n return true;\n }\n assert(Array.isArray(ranges2));\n if (ranges1.length !== ranges2.length) {\n return false;\n }\n return (\n // Check twice, to validate if both ranges have the same elements (elements can be in a different order)\n ranges1.every((lhsRange) =>\n ranges2.some(\n (rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n ) &&\n ranges2.every((lhsRange) =>\n ranges1.some(\n (rhsRange) => lhsRange.fromValue === rhsRange.fromValue && lhsRange.toValue === rhsRange.toValue && lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n )\n );\n}\n\n/** @internal */\nexport async function createPropertiesGroupingHandlers(\n imodelAccess: ECSchemaProvider & ECClassHierarchyInspector,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n): Promise<GroupingHandler[]> {\n const propertiesGroupInfo = await getUniquePropertiesGroupInfo(imodelAccess, parentNode, nodes);\n return propertiesGroupInfo.map(\n (propertyInfo) => async (nodesToGroup, nodesAlreadyGrouped) =>\n createPropertyGroups(nodesToGroup, nodesAlreadyGrouped, propertyInfo, valueFormatter, localizedStrings, imodelAccess),\n );\n}\n"]}
1
+ {"version":3,"file":"PropertiesGrouping.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/PropertiesGrouping.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AA0DhG,oDAmLC;AA+ED,oEA4DC;AAsCD,8DAaC;AAGD,sCAiCC;AAGD,4EAmBC;AAneD,sDAA6C;AAC7C,oEAUoC;AACpC,gEAA+E;AAC/E,sEAAyF;AA0CzF,gBAAgB;AACT,KAAK,UAAU,oBAAoB,CACxC,YAA8C,EAC9C,mBAA8D,EAC9D,qBAAwC,EACxC,cAAwC,EACxC,gBAAoD,EACpD,uBAAkD;IAElD,IAAI,mBAAgG,CAAC;IACrG,MAAM,0BAA0B,GAAG,GAAG,EAAE;QACtC,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,MAAM,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,sCAAgB,CAAC,6BAA6B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACpG,IAAI,IAAI,EAAE,CAAC;gBACT,mBAAmB,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAA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rC,QAAQ,CAAC,UAAU,KAAK,QAAQ,CAAC,UAAU,CAC9C,CACF,CACF,CAAC;AACJ,CAAC;AAED,gBAAgB;AACT,KAAK,UAAU,gCAAgC,CACpD,YAA0D,EAC1D,UAA2C,EAC3C,KAAuC,EACvC,cAAwC,EACxC,gBAAoD;IAEpD,MAAM,mBAAmB,GAAG,MAAM,4BAA4B,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAChG,OAAO,mBAAmB,CAAC,GAAG,CAC5B,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,EAAE,CAC5D,oBAAoB,CAClB,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,YAAY,CACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { assert } from \"@itwin/core-bentley\";\nimport {\n ArrayElement,\n createMainThreadReleaseOnTimePassedHandler,\n EC,\n ECClassHierarchyInspector,\n ECSchemaProvider,\n formatConcatenatedValue,\n getClass,\n IPrimitiveValueFormatter,\n TypedPrimitiveValue,\n} from \"@itwin/presentation-shared\";\nimport { HierarchyNode, ParentHierarchyNode } from \"../../../HierarchyNode.js\";\nimport { HierarchyNodeKey, PropertyGroupingNodeKey } from \"../../../HierarchyNodeKey.js\";\nimport {\n HierarchyNodePropertiesGroupingParams,\n HierarchyNodePropertyGroup,\n HierarchyNodePropertyValueRange,\n ProcessedInstanceHierarchyNode,\n} from \"../../IModelHierarchyNode.js\";\nimport { GroupingHandler, GroupingHandlerResult, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping.js\";\n\ninterface DisplayablePropertyGroupingInfo {\n label: string;\n propertyGroupingNodeKey: PropertyGroupingNodeKey;\n}\n\ninterface PropertyGroupingInformation {\n ungrouped: ProcessedInstanceHierarchyNode[];\n grouped: Map<\n string,\n { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }\n >;\n}\n\n/** @internal */\nexport interface PropertiesGroupingLocalizedStrings {\n other: string;\n unspecified: string;\n}\n\n/** @internal */\nexport interface PropertyGroupInfo {\n ecClass: EC.Class;\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo;\n propertyGroup: Omit<HierarchyNodePropertyGroup, \"propertyValue\">;\n}\n\n/** @internal */\nexport type PreviousPropertiesGroupingInfo = Array<{\n propertiesClassName: string;\n propertyName: string;\n isRange?: boolean;\n}>;\n\n/** @internal */\nexport async function createPropertyGroups(\n nodesToGroup: ProcessedInstanceHierarchyNode[],\n nodesAlreadyGrouped: ProcessedInstancesGroupingHierarchyNode[],\n handlerGroupingParams: PropertyGroupInfo,\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n classHierarchyInspector: ECClassHierarchyInspector,\n): Promise<GroupingHandlerResult> {\n let otherValuesGrouping: { node: ProcessedInstancesGroupingHierarchyNode; new: boolean } | undefined;\n const getOtherValuesGroupingNode = () => {\n if (!otherValuesGrouping) {\n const node = nodesAlreadyGrouped.find((n) => HierarchyNodeKey.isPropertyOtherValuesGrouping(n.key));\n if (node) {\n otherValuesGrouping = { node, new: false };\n }\n }\n otherValuesGrouping ??= {\n node: {\n key: { type: \"property-grouping:other\" as const, properties: [] },\n parentKeys: [],\n groupedInstanceKeys: [],\n label: localizedStrings.other,\n children: [],\n },\n new: true,\n };\n return otherValuesGrouping.node;\n };\n\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const groupings: PropertyGroupingInformation = { ungrouped: [], grouped: new Map() };\n for (const node of nodesToGroup) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n groupings.ungrouped.push(node);\n continue;\n }\n if (\n !(await shouldCreatePropertyGroup(\n handlerGroupingParams,\n byProperties,\n node.key.instanceKeys[0].className,\n classHierarchyInspector,\n ))\n ) {\n groupings.ungrouped.push(node);\n continue;\n }\n const currentProperty = byProperties.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n const propertyIdentifier = {\n propertyName: currentProperty.propertyName,\n propertyClassName: byProperties.propertiesClassName,\n };\n\n const propertyClass = handlerGroupingParams.ecClass;\n const property = await propertyClass.getProperty(currentProperty.propertyName);\n\n if (\n !property?.isNavigation() &&\n (!property?.isPrimitive() || property.primitiveType === \"Binary\" || property.primitiveType === \"IGeometry\")\n ) {\n groupings.ungrouped.push(node);\n continue;\n }\n\n const extendedTypeName = \"extendedTypeName\" in property ? property.extendedTypeName : undefined;\n const primitiveType = \"primitiveType\" in property ? property.primitiveType : \"String\";\n assert(primitiveType !== \"Binary\" && primitiveType !== \"IGeometry\");\n\n if (!currentProperty.propertyValue) {\n if (byProperties.createGroupForUnspecifiedValues) {\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:Unspecified`,\n {\n label: localizedStrings.unspecified,\n propertyGroupingNodeKey: {\n type: \"property-grouping:value\",\n ...propertyIdentifier,\n formattedPropertyValue: \"\",\n },\n },\n node,\n );\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const koqName = (await property.kindOfQuantity)?.fullName;\n if (currentProperty.ranges) {\n if (typeof currentProperty.propertyValue === \"number\") {\n const propValue = currentProperty.propertyValue;\n const matchingRange = currentProperty.ranges.find(\n (range) => propValue >= range.fromValue && propValue <= range.toValue,\n );\n\n if (matchingRange) {\n const fromValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.fromValue) ? \"Integer\" : \"Double\",\n extendedType: extendedTypeName,\n koqName,\n value: matchingRange.fromValue,\n };\n const toValueTypedPrimitive: TypedPrimitiveValue = {\n type: Number.isInteger(matchingRange.toValue) ? \"Integer\" : \"Double\",\n extendedType: extendedTypeName,\n koqName,\n value: matchingRange.toValue,\n };\n\n const rangeLabel =\n matchingRange.rangeLabel ??\n `${await valueFormatter(fromValueTypedPrimitive)} - ${await valueFormatter(toValueTypedPrimitive)}`;\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:[${matchingRange.fromValue}-${matchingRange.toValue}]${matchingRange.rangeLabel ? `(${matchingRange.rangeLabel})` : \"\"}`,\n {\n label: rangeLabel,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:range\",\n fromValue: matchingRange.fromValue,\n toValue: matchingRange.toValue,\n },\n },\n node,\n );\n continue;\n }\n }\n if (byProperties.createGroupForOutOfRangeValues) {\n const groupingNode = getOtherValuesGroupingNode();\n assert(HierarchyNodeKey.isPropertyOtherValuesGrouping(groupingNode.key));\n const thisPropertyIdentifier = {\n className: propertyIdentifier.propertyClassName,\n propertyName: propertyIdentifier.propertyName,\n };\n const hasPropertyIdentifier = groupingNode.key.properties.find(\n (x) =>\n x.className === thisPropertyIdentifier.className && x.propertyName === thisPropertyIdentifier.propertyName,\n );\n if (!hasPropertyIdentifier) {\n groupingNode.key.properties.push(thisPropertyIdentifier);\n }\n node.key.instanceKeys.forEach((k) => groupingNode.groupedInstanceKeys.push(k));\n groupingNode.parentKeys = node.parentKeys;\n groupingNode.children.push(Object.assign(node, { parentKeys: [...node.parentKeys, groupingNode.key] }));\n continue;\n }\n groupings.ungrouped.push(node);\n continue;\n }\n\n const formattedValue =\n currentProperty.propertyValue instanceof Array\n ? await formatConcatenatedValue({ value: currentProperty.propertyValue, valueFormatter })\n : await valueFormatter(\n TypedPrimitiveValue.create(currentProperty.propertyValue, primitiveType, koqName, extendedTypeName),\n );\n\n addGroupingToMap(\n groupings.grouped,\n `${currentProperty.propertyName}:${formattedValue}`,\n {\n label: formattedValue,\n propertyGroupingNodeKey: {\n ...propertyIdentifier,\n type: \"property-grouping:value\",\n formattedPropertyValue: formattedValue,\n },\n },\n node,\n );\n }\n return createGroupingNodes(groupings, otherValuesGrouping?.new ? otherValuesGrouping.node : undefined);\n}\n\nfunction addGroupingToMap(\n groupingMap: Map<\n string,\n { displayablePropertyGroupingInfo: DisplayablePropertyGroupingInfo; groupedNodes: ProcessedInstanceHierarchyNode[] }\n >,\n mapKey: string,\n propertyToAdd: DisplayablePropertyGroupingInfo,\n node: ProcessedInstanceHierarchyNode,\n): void {\n let groupingInfo = groupingMap.get(mapKey);\n if (!groupingInfo) {\n groupingInfo = { displayablePropertyGroupingInfo: propertyToAdd, groupedNodes: [node] };\n groupingMap.set(mapKey, groupingInfo);\n return;\n }\n groupingInfo.groupedNodes.push(node);\n}\n\nfunction createGroupingNodes(\n groupings: PropertyGroupingInformation,\n otherValuesGroupingNode: ProcessedInstancesGroupingHierarchyNode | undefined,\n): GroupingHandlerResult {\n const groupedNodes = new Array<ProcessedInstancesGroupingHierarchyNode>();\n groupings.grouped.forEach((entry) => {\n const groupedNodeParentKeys = entry.groupedNodes[0].parentKeys;\n groupedNodes.push({\n label: entry.displayablePropertyGroupingInfo.label,\n key: entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey,\n parentKeys: groupedNodeParentKeys,\n groupedInstanceKeys: entry.groupedNodes.flatMap((groupedInstanceNode) => groupedInstanceNode.key.instanceKeys),\n children: entry.groupedNodes.map((gn) => ({\n ...gn,\n parentKeys: [...groupedNodeParentKeys, entry.displayablePropertyGroupingInfo.propertyGroupingNodeKey],\n })),\n });\n });\n if (otherValuesGroupingNode) {\n groupedNodes.push(otherValuesGroupingNode);\n }\n return { grouped: groupedNodes, ungrouped: groupings.ungrouped, groupingType: \"property\" };\n}\n\nfunction createNodePropertyGroupPathMatchers(\n node: ParentHierarchyNode,\n): Array<(x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean> {\n if (!HierarchyNode.isPropertyGroupingNode(node)) {\n return [];\n }\n\n const keys = [...node.parentKeys, node.key];\n const propertyGroupingNodeKeys: PropertyGroupingNodeKey[] = [];\n for (let i = keys.length - 1; i >= 0; --i) {\n const key = keys[i];\n if (HierarchyNodeKey.isPropertyGrouping(key)) {\n propertyGroupingNodeKeys.push(key);\n } else {\n break;\n }\n }\n propertyGroupingNodeKeys.reverse();\n\n return propertyGroupingNodeKeys.map((key): ((x: ArrayElement<PreviousPropertiesGroupingInfo>) => boolean) => {\n switch (key.type) {\n case \"property-grouping:other\":\n return (x) =>\n key.properties.some(\n (p) => p.className === x.propertiesClassName && p.propertyName === x.propertyName && !!x.isRange,\n );\n case \"property-grouping:range\":\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n case \"property-grouping:value\":\n return (x) => key.propertyClassName === x.propertiesClassName && key.propertyName === x.propertyName;\n }\n });\n}\n\n/** @internal */\nexport async function getUniquePropertiesGroupInfo(\n schemaProvider: ECSchemaProvider,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n): Promise<Array<PropertyGroupInfo>> {\n const releaseMainThread = createMainThreadReleaseOnTimePassedHandler();\n const parentPropertyGroupPath = parentNode ? createNodePropertyGroupPathMatchers(parentNode) : [];\n const uniqueProperties = new Map<string, PropertyGroupInfo>();\n for (const node of nodes) {\n await releaseMainThread();\n\n const byProperties = node.processingParams?.grouping?.byProperties;\n if (!byProperties) {\n continue;\n }\n\n let propertyGroupIndex = 0;\n const previousPropertiesInfo = new Array<{ propertyGroup: HierarchyNodePropertyGroup; propertyGroupKey: string }>();\n for (const propertyGroup of byProperties.propertyGroups) {\n const mapKeyRanges = getRangesAsString(propertyGroup.ranges);\n const lastKey =\n previousPropertiesInfo.length > 0\n ? previousPropertiesInfo[previousPropertiesInfo.length - 1].propertyGroupKey\n : \"\";\n const propertyGroupKey = `${lastKey}:${propertyGroup.propertyName}(${mapKeyRanges})`;\n const mapKey = `${byProperties.propertiesClassName}:${propertyGroupKey}`;\n\n let isAlreadyGrouped = false;\n if (\n !isAlreadyGrouped &&\n parentPropertyGroupPath.length > 0 &&\n propertyGroupIndex < parentPropertyGroupPath.length\n ) {\n const groupMatcher = parentPropertyGroupPath[propertyGroupIndex];\n isAlreadyGrouped = groupMatcher({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: propertyGroup.propertyName,\n isRange: !!propertyGroup.ranges,\n });\n }\n if (!isAlreadyGrouped && !uniqueProperties.get(mapKey)) {\n uniqueProperties.set(mapKey, {\n ecClass: await getClass(schemaProvider, byProperties.propertiesClassName),\n propertyGroup: { propertyName: propertyGroup.propertyName, ranges: propertyGroup.ranges },\n previousPropertiesGroupingInfo: previousPropertiesInfo.map((groupingInfo) => ({\n propertiesClassName: byProperties.propertiesClassName,\n propertyName: groupingInfo.propertyGroup.propertyName,\n isRange: !!groupingInfo.propertyGroup.ranges,\n })),\n });\n }\n\n previousPropertiesInfo.push({ propertyGroup, propertyGroupKey });\n ++propertyGroupIndex;\n }\n }\n // Order might change in uniqueProperties, resorting to make sure that properties with fewer previous properties are returned first.\n return [...uniqueProperties.values()].sort(\n (lhs, rhs) => lhs.previousPropertiesGroupingInfo.length - rhs.previousPropertiesGroupingInfo.length,\n );\n}\n\nfunction getRangesAsString(ranges?: HierarchyNodePropertyValueRange[]): string {\n return ranges\n ? ranges\n .map((range) => `${range.fromValue}-${range.toValue}(${range.rangeLabel ?? \"\"})`)\n .sort()\n .join(\";\")\n : \"\";\n}\n\nasync function shouldCreatePropertyGroup(\n handlerGroupingParams: PropertyGroupInfo,\n nodePropertyGroupingParams: HierarchyNodePropertiesGroupingParams,\n nodeFullClassName: string,\n classHierarchyInspector: ECClassHierarchyInspector,\n): Promise<boolean> {\n if (\n nodePropertyGroupingParams.propertiesClassName !== handlerGroupingParams.ecClass.fullName ||\n nodePropertyGroupingParams.propertyGroups.length < handlerGroupingParams.previousPropertiesGroupingInfo.length + 1\n ) {\n return false;\n }\n const currentProperty =\n nodePropertyGroupingParams.propertyGroups[handlerGroupingParams.previousPropertiesGroupingInfo.length];\n if (\n currentProperty.propertyName !== handlerGroupingParams.propertyGroup.propertyName ||\n !doRangesMatch(currentProperty.ranges, handlerGroupingParams.propertyGroup.ranges)\n ) {\n return false;\n }\n if (!doPreviousPropertiesMatch(handlerGroupingParams.previousPropertiesGroupingInfo, nodePropertyGroupingParams)) {\n return false;\n }\n return classHierarchyInspector.classDerivesFrom(nodeFullClassName, handlerGroupingParams.ecClass.fullName);\n}\n\n/** @internal */\nexport function doPreviousPropertiesMatch(\n previousPropertiesGroupingInfo: PreviousPropertiesGroupingInfo,\n nodesProperties: HierarchyNodePropertiesGroupingParams,\n): boolean {\n return (\n previousPropertiesGroupingInfo.length <= nodesProperties.propertyGroups.length &&\n previousPropertiesGroupingInfo.every(\n (groupingInfo, index) =>\n groupingInfo.propertiesClassName === nodesProperties.propertiesClassName &&\n groupingInfo.propertyName === nodesProperties.propertyGroups[index].propertyName &&\n !!groupingInfo.isRange === !!nodesProperties.propertyGroups[index].ranges,\n )\n );\n}\n\n/** @internal */\nexport function doRangesMatch(\n ranges1: HierarchyNodePropertyValueRange[] | undefined,\n ranges2: HierarchyNodePropertyValueRange[] | undefined,\n): boolean {\n if (typeof ranges1 !== typeof ranges2) {\n return false;\n }\n if (!ranges1) {\n return true;\n }\n assert(Array.isArray(ranges2));\n if (ranges1.length !== ranges2.length) {\n return false;\n }\n return (\n // Check twice, to validate if both ranges have the same elements (elements can be in a different order)\n ranges1.every((lhsRange) =>\n ranges2.some(\n (rhsRange) =>\n lhsRange.fromValue === rhsRange.fromValue &&\n lhsRange.toValue === rhsRange.toValue &&\n lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n ) &&\n ranges2.every((lhsRange) =>\n ranges1.some(\n (rhsRange) =>\n lhsRange.fromValue === rhsRange.fromValue &&\n lhsRange.toValue === rhsRange.toValue &&\n lhsRange.rangeLabel === rhsRange.rangeLabel,\n ),\n )\n );\n}\n\n/** @internal */\nexport async function createPropertiesGroupingHandlers(\n imodelAccess: ECSchemaProvider & ECClassHierarchyInspector,\n parentNode: ParentHierarchyNode | undefined,\n nodes: ProcessedInstanceHierarchyNode[],\n valueFormatter: IPrimitiveValueFormatter,\n localizedStrings: PropertiesGroupingLocalizedStrings,\n): Promise<GroupingHandler[]> {\n const propertiesGroupInfo = await getUniquePropertiesGroupInfo(imodelAccess, parentNode, nodes);\n return propertiesGroupInfo.map(\n (propertyInfo) => async (nodesToGroup, nodesAlreadyGrouped) =>\n createPropertyGroups(\n nodesToGroup,\n nodesAlreadyGrouped,\n propertyInfo,\n valueFormatter,\n localizedStrings,\n imodelAccess,\n ),\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Shared.d.ts","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAyC,MAAM,8BAA8B,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,uCAAuC,EAAE,MAAM,gBAAgB,CAAC;AAEvF,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,uCAAuC,EACnD,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,CAAC,cAAc,EAAE,+BAA+B,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,GACvF,IAAI,CAmBN"}
1
+ {"version":3,"file":"Shared.d.ts","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAyC,MAAM,8BAA8B,CAAC;AACtH,OAAO,EAAE,YAAY,EAAE,uCAAuC,EAAE,MAAM,gBAAgB,CAAC;AAEvF,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,uCAAuC,EACnD,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,CAAC,cAAc,EAAE,+BAA+B,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,GACvF,IAAI,CAqBN"}
@@ -14,7 +14,9 @@ function iterateChildNodeGroupingParams(parentNode, groupingType, cb) {
14
14
  case "class":
15
15
  return typeof params?.grouping?.byClass === "object" ? params.grouping.byClass : undefined;
16
16
  case "label":
17
- return typeof params?.grouping?.byLabel === "object" && params.grouping.byLabel.action !== "merge" ? params.grouping.byLabel : undefined;
17
+ return typeof params?.grouping?.byLabel === "object" && params.grouping.byLabel.action !== "merge"
18
+ ? params.grouping.byLabel
19
+ : undefined;
18
20
  case "property":
19
21
  return params?.grouping?.byProperties;
20
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Shared.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAMhG,wEAuBC;AAxBD,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,UAAmD,EACnD,YAA0B,EAC1B,EAAwF;IAExF,SAAS,iBAAiB,CAAC,MAAyD;QAClF,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,YAAY;gBACf,OAAO,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC;YACzC,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7F,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC3I,KAAK,UAAU;gBACb,OAAO,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACrE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { HierarchyNodeGroupingParamsBase, InstanceHierarchyNodeProcessingParams } from \"../../IModelHierarchyNode.js\";\nimport { GroupingType, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping.js\";\n\n/** @internal */\nexport function iterateChildNodeGroupingParams(\n parentNode: ProcessedInstancesGroupingHierarchyNode,\n groupingType: GroupingType,\n cb: (groupingParams: HierarchyNodeGroupingParamsBase | undefined) => boolean | undefined,\n): void {\n function getGroupingParams(params: InstanceHierarchyNodeProcessingParams | undefined) {\n switch (groupingType) {\n case \"base-class\":\n return params?.grouping?.byBaseClasses;\n case \"class\":\n return typeof params?.grouping?.byClass === \"object\" ? params.grouping.byClass : undefined;\n case \"label\":\n return typeof params?.grouping?.byLabel === \"object\" && params.grouping.byLabel.action !== \"merge\" ? params.grouping.byLabel : undefined;\n case \"property\":\n return params?.grouping?.byProperties;\n }\n }\n for (const childNode of parentNode.children) {\n const groupingParams = getGroupingParams(childNode.processingParams);\n if (cb(groupingParams)) {\n return;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"Shared.js","sourceRoot":"","sources":["../../../../../../src/hierarchies/imodel/operators/grouping/Shared.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAMhG,wEAyBC;AA1BD,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,UAAmD,EACnD,YAA0B,EAC1B,EAAwF;IAExF,SAAS,iBAAiB,CAAC,MAAyD;QAClF,QAAQ,YAAY,EAAE,CAAC;YACrB,KAAK,YAAY;gBACf,OAAO,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC;YACzC,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC7F,KAAK,OAAO;gBACV,OAAO,OAAO,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,OAAO;oBAChG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO;oBACzB,CAAC,CAAC,SAAS,CAAC;YAChB,KAAK,UAAU;gBACb,OAAO,MAAM,EAAE,QAAQ,EAAE,YAAY,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACrE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { HierarchyNodeGroupingParamsBase, InstanceHierarchyNodeProcessingParams } from \"../../IModelHierarchyNode.js\";\nimport { GroupingType, ProcessedInstancesGroupingHierarchyNode } from \"../Grouping.js\";\n\n/** @internal */\nexport function iterateChildNodeGroupingParams(\n parentNode: ProcessedInstancesGroupingHierarchyNode,\n groupingType: GroupingType,\n cb: (groupingParams: HierarchyNodeGroupingParamsBase | undefined) => boolean | undefined,\n): void {\n function getGroupingParams(params: InstanceHierarchyNodeProcessingParams | undefined) {\n switch (groupingType) {\n case \"base-class\":\n return params?.grouping?.byBaseClasses;\n case \"class\":\n return typeof params?.grouping?.byClass === \"object\" ? params.grouping.byClass : undefined;\n case \"label\":\n return typeof params?.grouping?.byLabel === \"object\" && params.grouping.byLabel.action !== \"merge\"\n ? params.grouping.byLabel\n : undefined;\n case \"property\":\n return params?.grouping?.byProperties;\n }\n }\n for (const childNode of parentNode.children) {\n const groupingParams = getGroupingParams(childNode.processingParams);\n if (cb(groupingParams)) {\n return;\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Common.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":"AAKA,OAAO,sBAAsB,CAAC;AAG9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,6BAA6B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,yCAAqC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,sCAAsC,iDAA8C,CAAC;AAElG,gBAAgB;AAChB,wBAAgB,8BAA8B,CAC5C,YAAY,EAAE,MAAM,EACpB,YAAY,EACR,OAAO,iBAAiB,GACxB,OAAO,6BAA6B,GACpC,OAAO,0BAA0B,GACjC,OAAO,sCAAsC,UAGlD;AAED,gBAAgB;AAEhB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAAC,GAAG,EAAE,gBAAgB,CAAC;IAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAAG,SAAS,UAQhH;AAGD,gBAAgB;AAChB,wBAAgB,WAAW,CAAC,KAAK,SAAS;IAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAA;CAAE,EAAE,IAAI,EAAE,KAAK,WAE7F;AAED,gBAAgB;AAChB,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAAE,QAAQ,SAAS;IAAE,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,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACxE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AACpD,CAAC;AACD,oBAAoB;AAEpB,gBAAgB;AAChB,SAAgB,WAAW,CAAwD,IAAW;IAC5F,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,gBAAgB;AAChB,SAAgB,mBAAmB,CAAyE,GAAa,EAAE,GAAa;IACtI,OAAO,IAAA,8BAAc,EAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACtF,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,WAAW,CAAC,UAA2E;IACrG,IAAI,SAAS,IAAI,UAAU,EAAE,CAAC;QAC5B,UAAU,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;SAAM,IAAI,MAAM,CAAC,OAAO,IAAI,UAAU,EAAE,CAAC;QACxC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport \"./DisposePolyfill.js\";\n\nimport naturalCompare from \"natural-compare-lite\";\nimport { ConcatenatedValue } from \"@itwin/presentation-shared\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * This is a logging namespace for public log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE = \"Presentation.Hierarchies\";\n\n/**\n * This is a logging namespace for public performance-related log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE = `${LOGGING_NAMESPACE}.Performance`;\n\n/**\n * This is a logging namespace for internal log messages that are only interesting to package contributors,\n * but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_INTERNAL = \"Presentation.HierarchiesInternal\";\n\n/**\n * This is a logging namespace for internal performance-related log messages that are only interesting\n * to package contributors, but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE_INTERNAL = `${LOGGING_NAMESPACE_INTERNAL}.Performance`;\n\n/** @internal */\nexport function createOperatorLoggingNamespace(\n operatorName: string,\n baseCategory:\n | typeof LOGGING_NAMESPACE\n | typeof LOGGING_NAMESPACE_PERFORMANCE\n | typeof LOGGING_NAMESPACE_INTERNAL\n | typeof LOGGING_NAMESPACE_PERFORMANCE_INTERNAL,\n) {\n return `${baseCategory}.Operators.${operatorName}`;\n}\n\n/** @internal */\n/* v8 ignore start */\nexport function createNodeIdentifierForLogging(\n node: { label: string | ConcatenatedValue; key: HierarchyNodeKey; parentKeys?: HierarchyNodeKey[] } | undefined,\n) {\n if (!node) {\n return \"<root>\";\n }\n const { label, key } = node;\n const parentKeys = \"parentKeys\" in node ? node.parentKeys : \"<unknown>\";\n return JSON.stringify({ label, key, parentKeys });\n}\n/* v8 ignore stop */\n\n/** @internal */\nexport function hasChildren<TNode extends { children?: boolean | Array<unknown> }>(node: TNode) {\n return node.children === true || (Array.isArray(node.children) && node.children.length > 0);\n}\n\n/** @internal */\nexport function compareNodesByLabel<TLhsNode extends { label: string }, TRhsNode extends { label: string }>(lhs: TLhsNode, rhs: TRhsNode): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n\n/**\n * A helper that disposes the given object, if it's disposable.\n *\n * The first option is to dispose using the deprecated `dispose` method if it exists on the object.\n * If not, we use the new `Symbol.dispose` method. If that doesn't exist either, the object is\n * considered as non-disposable and nothing is done with it.\n *\n * @internal\n */\nexport function safeDispose(disposable: {} | { [Symbol.dispose]: () => void } | { dispose: () => void }) {\n if (\"dispose\" in disposable) {\n disposable.dispose();\n } else if (Symbol.dispose in disposable) {\n disposable[Symbol.dispose]();\n }\n}\n"]}
1
+ {"version":3,"file":"Common.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/Common.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;AAmChG,wEASC;AAID,wEASC;AAID,kCAEC;AAGD,kDAKC;AAWD,kCAMC;AAtFD,gCAA8B;AAE9B,gFAAkD;AAIlD;;;GAGG;AACU,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAE5D;;;GAGG;AACU,QAAA,6BAA6B,GAAG,GAAG,yBAAiB,cAAc,CAAC;AAEhF;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E;;;;GAIG;AACU,QAAA,sCAAsC,GAAG,GAAG,kCAA0B,cAAc,CAAC;AAElG,gBAAgB;AAChB,SAAgB,8BAA8B,CAC5C,YAAoB,EACpB,YAIiD;IAEjD,OAAO,GAAG,YAAY,cAAc,YAAY,EAAE,CAAC;AACrD,CAAC;AAED,gBAAgB;AAChB,qBAAqB;AACrB,SAAgB,8BAA8B,CAC5C,IAA+G;IAE/G,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,UAAU,GAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC;IACxE,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;AACpD,CAAC;AACD,oBAAoB;AAEpB,gBAAgB;AAChB,SAAgB,WAAW,CAAwD,IAAW;IAC5F,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED,gBAAgB;AAChB,SAAgB,mBAAmB,CACjC,GAAa,EACb,GAAa;IAEb,OAAO,IAAA,8BAAc,EAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACtF,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,WAAW,CAAC,UAA2E;IACrG,IAAI,SAAS,IAAI,UAAU,EAAE,CAAC;QAC5B,UAAU,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC;SAAM,IAAI,MAAM,CAAC,OAAO,IAAI,UAAU,EAAE,CAAC;QACxC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport \"./DisposePolyfill.js\";\n\nimport naturalCompare from \"natural-compare-lite\";\nimport { ConcatenatedValue } from \"@itwin/presentation-shared\";\nimport { HierarchyNodeKey } from \"../HierarchyNodeKey.js\";\n\n/**\n * This is a logging namespace for public log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE = \"Presentation.Hierarchies\";\n\n/**\n * This is a logging namespace for public performance-related log messages that may be interesting to consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE = `${LOGGING_NAMESPACE}.Performance`;\n\n/**\n * This is a logging namespace for internal log messages that are only interesting to package contributors,\n * but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_INTERNAL = \"Presentation.HierarchiesInternal\";\n\n/**\n * This is a logging namespace for internal performance-related log messages that are only interesting\n * to package contributors, but not the consumers.\n * @internal\n */\nexport const LOGGING_NAMESPACE_PERFORMANCE_INTERNAL = `${LOGGING_NAMESPACE_INTERNAL}.Performance`;\n\n/** @internal */\nexport function createOperatorLoggingNamespace(\n operatorName: string,\n baseCategory:\n | typeof LOGGING_NAMESPACE\n | typeof LOGGING_NAMESPACE_PERFORMANCE\n | typeof LOGGING_NAMESPACE_INTERNAL\n | typeof LOGGING_NAMESPACE_PERFORMANCE_INTERNAL,\n) {\n return `${baseCategory}.Operators.${operatorName}`;\n}\n\n/** @internal */\n/* v8 ignore start */\nexport function createNodeIdentifierForLogging(\n node: { label: string | ConcatenatedValue; key: HierarchyNodeKey; parentKeys?: HierarchyNodeKey[] } | undefined,\n) {\n if (!node) {\n return \"<root>\";\n }\n const { label, key } = node;\n const parentKeys = \"parentKeys\" in node ? node.parentKeys : \"<unknown>\";\n return JSON.stringify({ label, key, parentKeys });\n}\n/* v8 ignore stop */\n\n/** @internal */\nexport function hasChildren<TNode extends { children?: boolean | Array<unknown> }>(node: TNode) {\n return node.children === true || (Array.isArray(node.children) && node.children.length > 0);\n}\n\n/** @internal */\nexport function compareNodesByLabel<TLhsNode extends { label: string }, TRhsNode extends { label: string }>(\n lhs: TLhsNode,\n rhs: TRhsNode,\n): number {\n return naturalCompare(lhs.label.toLocaleLowerCase(), rhs.label.toLocaleLowerCase());\n}\n\n/**\n * A helper that disposes the given object, if it's disposable.\n *\n * The first option is to dispose using the deprecated `dispose` method if it exists on the object.\n * If not, we use the new `Symbol.dispose` method. If that doesn't exist either, the object is\n * considered as non-disposable and nothing is done with it.\n *\n * @internal\n */\nexport function safeDispose(disposable: {} | { [Symbol.dispose]: () => void } | { dispose: () => void }) {\n if (\"dispose\" in disposable) {\n disposable.dispose();\n } else if (Symbol.dispose in disposable) {\n disposable[Symbol.dispose]();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAM,MAAM,MAAM,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,UAAU,CAAC,EAAE,6BAA6B,KAAK,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAEzJ;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,SAAS,6BAA6B,GAAG,8BAA8B,EAAE,IAAI,EAAE,KAAK,KAAK,UAAU,CAAC,KAAK,CAAC,CAAC;AAEpJ;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,sBAAsB,KAAK,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAEzG;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAEtC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC,+EAA+E;IAC/E,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;CAC9F;AAED,gBAAgB;AAChB,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,uBAAuB,CAc5G"}
1
+ {"version":3,"file":"RxjsHierarchyDefinition.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAM,MAAM,MAAM,CAAC;AACpD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,kCAAkC,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE;IAAE,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAClC,UAAU,CAAC,EAAE,6BAA6B,KACvC,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,SAAS,6BAA6B,GAAG,8BAA8B,EAC9G,IAAI,EAAE,KAAK,KACR,UAAU,CAAC,KAAK,CAAC,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,sBAAsB,KAAK,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAEzG;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAEtC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;IAExC,+EAA+E;IAC/E,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;CAC9F;AAED,gBAAgB;AAChB,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,mBAAmB,GAAG,uBAAuB,CAgB5G"}
@@ -18,7 +18,9 @@ function getRxjsHierarchyDefinition(hierarchyDefinition) {
18
18
  preProcessNode: hierarchyDefinition.preProcessNode
19
19
  ? (node) => (0, rxjs_1.from)(hierarchyDefinition.preProcessNode(node)).pipe((0, rxjs_1.filter)((preprocessedNode) => !!preprocessedNode))
20
20
  : undefined,
21
- postProcessNode: hierarchyDefinition.postProcessNode ? (node) => (0, rxjs_1.from)(hierarchyDefinition.postProcessNode(node)) : undefined,
21
+ postProcessNode: hierarchyDefinition.postProcessNode
22
+ ? (node) => (0, rxjs_1.from)(hierarchyDefinition.postProcessNode(node))
23
+ : undefined,
22
24
  defineHierarchyLevel: (props) => (0, rxjs_1.from)(hierarchyDefinition.defineHierarchyLevel(props)),
23
25
  };
24
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RxjsHierarchyDefinition.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAgFhG,gEAcC;AA5FD,+BAAoD;AA6EpD,gBAAgB;AAChB,SAAgB,0BAA0B,CAAC,mBAAwC;IACjF,OAAO;QACL,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACtC,CAAC,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;gBAClB,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;gBACnE,OAAO,UAAU,YAAY,OAAO,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAA,SAAE,EAAC,UAAU,CAAC,CAAC;YAC3E,CAAC;YACH,CAAC,CAAC,SAAS;QACb,cAAc,EAAE,mBAAmB,CAAC,cAAc;YAChD,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,cAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAA,aAAM,EAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAClH,CAAC,CAAC,SAAS;QACb,eAAe,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,eAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;QAC7H,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;KACvF,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { filter, from, Observable, of } from \"rxjs\";\nimport {\n DefineHierarchyLevelProps,\n HierarchyDefinition,\n HierarchyDefinitionParentNode,\n HierarchyLevelDefinition,\n} from \"../imodel/IModelHierarchyDefinition.js\";\nimport {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"../imodel/IModelHierarchyNode.js\";\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @internal\n */\nexport type RxjsNodeParser = (row: { [columnName: string]: any }, parentNode?: HierarchyDefinitionParentNode) => Observable<SourceInstanceHierarchyNode>;\n\n/**\n * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node\n * from the hierarchy.\n *\n * @internal\n */\nexport type RxjsNodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(node: TNode) => Observable<TNode>;\n\n/**\n * A type for a function that post-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one.\n *\n * @internal\n */\nexport type RxjsNodePostProcessor = (node: ProcessedHierarchyNode) => Observable<ProcessedHierarchyNode>;\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @internal\n */\nexport interface RxjsHierarchyDefinition {\n /**\n * An optional function for parsing ECInstance node from ECSQL row.\n *\n * Should be used in situations when the `HierarchyDefinition` implementation\n * introduces additional ECSQL columns into the select clause and wants to assign additional\n * data to the nodes it produces.\n *\n * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT\n * clause is created using `NodeSelectQueryFactory.createSelectClause`.\n */\n parseNode?: RxjsNodeParser;\n\n /**\n * An optional function for pre-processing nodes.\n *\n * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`\n * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.\n * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.\n */\n preProcessNode?: RxjsNodePreProcessor;\n\n /**\n * An optional function for post-processing nodes.\n *\n * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping\n * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data\n * to nodes after they're processed. This is especially true for grouping nodes as they're only created during\n * processing.\n */\n postProcessNode?: RxjsNodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Observable<HierarchyLevelDefinition>;\n}\n\n/** @internal */\nexport function getRxjsHierarchyDefinition(hierarchyDefinition: HierarchyDefinition): RxjsHierarchyDefinition {\n return {\n parseNode: hierarchyDefinition.parseNode\n ? (row, parentNode) => {\n const parsedNode = hierarchyDefinition.parseNode!(row, parentNode);\n return parsedNode instanceof Promise ? from(parsedNode) : of(parsedNode);\n }\n : undefined,\n preProcessNode: hierarchyDefinition.preProcessNode\n ? (node) => from(hierarchyDefinition.preProcessNode!(node)).pipe(filter((preprocessedNode) => !!preprocessedNode))\n : undefined,\n postProcessNode: hierarchyDefinition.postProcessNode ? (node) => from(hierarchyDefinition.postProcessNode!(node)) : undefined,\n defineHierarchyLevel: (props) => from(hierarchyDefinition.defineHierarchyLevel(props)),\n };\n}\n"]}
1
+ {"version":3,"file":"RxjsHierarchyDefinition.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/RxjsHierarchyDefinition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAqFhG,gEAgBC;AAnGD,+BAAoD;AAkFpD,gBAAgB;AAChB,SAAgB,0BAA0B,CAAC,mBAAwC;IACjF,OAAO;QACL,SAAS,EAAE,mBAAmB,CAAC,SAAS;YACtC,CAAC,CAAC,CAAC,GAAG,EAAE,UAAU,EAAE,EAAE;gBAClB,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;gBACnE,OAAO,UAAU,YAAY,OAAO,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAA,SAAE,EAAC,UAAU,CAAC,CAAC;YAC3E,CAAC;YACH,CAAC,CAAC,SAAS;QACb,cAAc,EAAE,mBAAmB,CAAC,cAAc;YAChD,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,cAAe,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAA,aAAM,EAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;YAClH,CAAC,CAAC,SAAS;QACb,eAAe,EAAE,mBAAmB,CAAC,eAAe;YAClD,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,eAAgB,CAAC,IAAI,CAAC,CAAC;YAC5D,CAAC,CAAC,SAAS;QACb,oBAAoB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;KACvF,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { filter, from, Observable, of } from \"rxjs\";\nimport {\n DefineHierarchyLevelProps,\n HierarchyDefinition,\n HierarchyDefinitionParentNode,\n HierarchyLevelDefinition,\n} from \"../imodel/IModelHierarchyDefinition.js\";\nimport {\n ProcessedGenericHierarchyNode,\n ProcessedHierarchyNode,\n ProcessedInstanceHierarchyNode,\n SourceInstanceHierarchyNode,\n} from \"../imodel/IModelHierarchyNode.js\";\n\n/**\n * A type for a function that parses a `SourceInstanceHierarchyNode` from provided ECSQL `row` object.\n * @internal\n */\nexport type RxjsNodeParser = (\n row: { [columnName: string]: any },\n parentNode?: HierarchyDefinitionParentNode,\n) => Observable<SourceInstanceHierarchyNode>;\n\n/**\n * A type for a function that pre-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one. Returning `undefined` omits the node\n * from the hierarchy.\n *\n * @internal\n */\nexport type RxjsNodePreProcessor = <TNode extends ProcessedGenericHierarchyNode | ProcessedInstanceHierarchyNode>(\n node: TNode,\n) => Observable<TNode>;\n\n/**\n * A type for a function that post-processes given node. Unless the function decides not to make any modifications,\n * it should return a new - modified - node, rather than modifying the given one.\n *\n * @internal\n */\nexport type RxjsNodePostProcessor = (node: ProcessedHierarchyNode) => Observable<ProcessedHierarchyNode>;\n\n/**\n * An interface for a factory that knows how define a hierarchy based on a given parent node.\n * @internal\n */\nexport interface RxjsHierarchyDefinition {\n /**\n * An optional function for parsing ECInstance node from ECSQL row.\n *\n * Should be used in situations when the `HierarchyDefinition` implementation\n * introduces additional ECSQL columns into the select clause and wants to assign additional\n * data to the nodes it produces.\n *\n * Defaults to a function that parses all `HierarchyNode` attributes from a query, whose SELECT\n * clause is created using `NodeSelectQueryFactory.createSelectClause`.\n */\n parseNode?: RxjsNodeParser;\n\n /**\n * An optional function for pre-processing nodes.\n *\n * Pre-processing happens immediately after the nodes are loaded based on `HierarchyLevelDefinition`\n * returned by this `HierarchyDefinition` and before their processing (hiding, grouping, sorting, etc.) starts.\n * The step allows assigning nodes additional data or excluding them from the hierarchy based on some attributes.\n */\n preProcessNode?: RxjsNodePreProcessor;\n\n /**\n * An optional function for post-processing nodes.\n *\n * Post-processing happens after the loaded nodes go through all the merging, hiding and grouping\n * steps, but before sorting them. This step allows `HierarchyDefinition` implementations to assign additional data\n * to nodes after they're processed. This is especially true for grouping nodes as they're only created during\n * processing.\n */\n postProcessNode?: RxjsNodePostProcessor;\n\n /** A function to create a hierarchy level definition for given parent node. */\n defineHierarchyLevel(props: DefineHierarchyLevelProps): Observable<HierarchyLevelDefinition>;\n}\n\n/** @internal */\nexport function getRxjsHierarchyDefinition(hierarchyDefinition: HierarchyDefinition): RxjsHierarchyDefinition {\n return {\n parseNode: hierarchyDefinition.parseNode\n ? (row, parentNode) => {\n const parsedNode = hierarchyDefinition.parseNode!(row, parentNode);\n return parsedNode instanceof Promise ? from(parsedNode) : of(parsedNode);\n }\n : undefined,\n preProcessNode: hierarchyDefinition.preProcessNode\n ? (node) => from(hierarchyDefinition.preProcessNode!(node)).pipe(filter((preprocessedNode) => !!preprocessedNode))\n : undefined,\n postProcessNode: hierarchyDefinition.postProcessNode\n ? (node) => from(hierarchyDefinition.postProcessNode!(node))\n : undefined,\n defineHierarchyLevel: (props) => from(hierarchyDefinition.defineHierarchyLevel(props)),\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SubscriptionScheduler.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,UAAU,EAOX,MAAM,MAAM,CAAC;AAEd,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAuC;gBAC7C,WAAW,EAAE,MAAM;IAwB/B;;;;;;;;OAQG;IACI,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;CAkBrE"}
1
+ {"version":3,"file":"SubscriptionScheduler.d.ts","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":"AAKA,OAAO,EASL,UAAU,EAOX,MAAM,MAAM,CAAC;AAEd,gBAAgB;AAChB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,UAAU,CAAuC;gBAC7C,WAAW,EAAE,MAAM;IAwB/B;;;;;;;;OAQG;IACI,oBAAoB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;CAerE"}
@@ -42,10 +42,7 @@ class SubscriptionScheduler {
42
42
  scheduleSubscription(source) {
43
43
  return (0, rxjs_1.defer)(() => {
44
44
  let unsubscribed = false;
45
- const connectableObservable = (0, rxjs_1.connectable)((0, rxjs_1.iif)(() => unsubscribed, rxjs_1.EMPTY, source), {
46
- connector: () => new rxjs_1.Subject(),
47
- resetOnDisconnect: false,
48
- });
45
+ const connectableObservable = (0, rxjs_1.connectable)((0, rxjs_1.iif)(() => unsubscribed, rxjs_1.EMPTY, source), { connector: () => new rxjs_1.Subject(), resetOnDisconnect: false });
49
46
  this._scheduler.next(connectableObservable);
50
47
  return connectableObservable.pipe((0, rxjs_1.finalize)(() => {
51
48
  unsubscribed = true;
@@ -1 +1 @@
1
- {"version":3,"file":"SubscriptionScheduler.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,+BAgBc;AAEd,gBAAgB;AAChB,MAAa,qBAAqB;IACxB,UAAU,GAAG,IAAI,cAAO,EAAwB,CAAC;IACzD,YAAY,WAAmB;QAC7B,IAAI,CAAC,UAAU;aACZ,IAAI,CACH,IAAA,eAAQ,EAAC,CAAC,gBAAgB,EAAE,EAAE;YAC5B,OAAO,gBAAgB,CAAC,IAAI;YAC1B,sDAAsD;YACtD,IAAA,UAAG,EAAC;gBACF,SAAS,EAAE,GAAG,EAAE;oBACd,gBAAgB,CAAC,OAAO,EAAE,CAAC;gBAC7B,CAAC;aACF,CAAC;YACF,0GAA0G;YAC1G,4EAA4E;YAC5E,IAAA,gBAAS,EAAC,qBAAc,CAAC;YACzB,qDAAqD;YACrD,IAAA,kBAAW,EAAC,oBAAa,CAAC;YAC1B,gFAAgF;YAChF,IAAA,4BAAqB,GAAE,CACxB,CAAC;QACJ,CAAC,EAAE,WAAW,CAAC,CAChB;YACD,wCAAwC;aACvC,SAAS,EAAE,CAAC;IACjB,CAAC;IACD;;;;;;;;OAQG;IACI,oBAAoB,CAAI,MAAqB;QAClD,OAAO,IAAA,YAAK,EAAC,GAAG,EAAE;YAChB,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,MAAM,qBAAqB,GAAG,IAAA,kBAAW,EACvC,IAAA,UAAG,EAAC,GAAG,EAAE,CAAC,YAAY,EAAE,YAAK,EAAE,MAAM,CAAC,EACtC;gBACE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,cAAO,EAAK;gBACjC,iBAAiB,EAAE,KAAK;aACzB,CACF,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAC5C,OAAO,qBAAqB,CAAC,IAAI,CAC/B,IAAA,eAAQ,EAAC,GAAG,EAAE;gBACZ,YAAY,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AArDD,sDAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport {\n asapScheduler,\n Connectable,\n connectable,\n defer,\n EMPTY,\n finalize,\n iif,\n mergeMap,\n Observable,\n observeOn,\n onErrorResumeNextWith,\n queueScheduler,\n Subject,\n subscribeOn,\n tap,\n} from \"rxjs\";\n\n/** @internal */\nexport class SubscriptionScheduler {\n private _scheduler = new Subject<Connectable<unknown>>();\n constructor(concurrency: number) {\n this._scheduler\n .pipe(\n mergeMap((sourceObservable) => {\n return sourceObservable.pipe(\n // connect source observable when scheduler subscribes\n tap({\n subscribe: () => {\n sourceObservable.connect();\n },\n }),\n // Guard against stack overflow when a lot of observables are scheduled. Without this operation `mergeMap`\n // will process each observable that is present in the pipeline recursively.\n observeOn(queueScheduler),\n // Delay the connection until another event loop task\n subscribeOn(asapScheduler),\n // Ignore errors in this pipeline without suppressing them for other subscribers\n onErrorResumeNextWith(),\n );\n }, concurrency),\n )\n // Start consuming scheduled observables\n .subscribe();\n }\n /**\n * Schedules `source` for subscription in the current scheduler.\n *\n * The actual scheduling is performed when the returned observable is subscribed to. To cancel, remove all subscribers\n * from the returned observable.\n *\n * @param source Input observable for which to schedule a subscription.\n * @returns Hot observable which starts emitting `source` values after subscription.\n */\n public scheduleSubscription<T>(source: Observable<T>): Observable<T> {\n return defer(() => {\n let unsubscribed = false;\n const connectableObservable = connectable(\n iif(() => unsubscribed, EMPTY, source),\n {\n connector: () => new Subject<T>(),\n resetOnDisconnect: false,\n },\n );\n this._scheduler.next(connectableObservable);\n return connectableObservable.pipe(\n finalize(() => {\n unsubscribed = true;\n }),\n );\n });\n }\n}\n"]}
1
+ {"version":3,"file":"SubscriptionScheduler.js","sourceRoot":"","sources":["../../../../src/hierarchies/internal/SubscriptionScheduler.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,+BAgBc;AAEd,gBAAgB;AAChB,MAAa,qBAAqB;IACxB,UAAU,GAAG,IAAI,cAAO,EAAwB,CAAC;IACzD,YAAY,WAAmB;QAC7B,IAAI,CAAC,UAAU;aACZ,IAAI,CACH,IAAA,eAAQ,EAAC,CAAC,gBAAgB,EAAE,EAAE;YAC5B,OAAO,gBAAgB,CAAC,IAAI;YAC1B,sDAAsD;YACtD,IAAA,UAAG,EAAC;gBACF,SAAS,EAAE,GAAG,EAAE;oBACd,gBAAgB,CAAC,OAAO,EAAE,CAAC;gBAC7B,CAAC;aACF,CAAC;YACF,0GAA0G;YAC1G,4EAA4E;YAC5E,IAAA,gBAAS,EAAC,qBAAc,CAAC;YACzB,qDAAqD;YACrD,IAAA,kBAAW,EAAC,oBAAa,CAAC;YAC1B,gFAAgF;YAChF,IAAA,4BAAqB,GAAE,CACxB,CAAC;QACJ,CAAC,EAAE,WAAW,CAAC,CAChB;YACD,wCAAwC;aACvC,SAAS,EAAE,CAAC;IACjB,CAAC;IACD;;;;;;;;OAQG;IACI,oBAAoB,CAAI,MAAqB;QAClD,OAAO,IAAA,YAAK,EAAC,GAAG,EAAE;YAChB,IAAI,YAAY,GAAG,KAAK,CAAC;YACzB,MAAM,qBAAqB,GAAG,IAAA,kBAAW,EACvC,IAAA,UAAG,EAAC,GAAG,EAAE,CAAC,YAAY,EAAE,YAAK,EAAE,MAAM,CAAC,EACtC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,cAAO,EAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAChE,CAAC;YACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAC5C,OAAO,qBAAqB,CAAC,IAAI,CAC/B,IAAA,eAAQ,EAAC,GAAG,EAAE;gBACZ,YAAY,GAAG,IAAI,CAAC;YACtB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAlDD,sDAkDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport {\n asapScheduler,\n Connectable,\n connectable,\n defer,\n EMPTY,\n finalize,\n iif,\n mergeMap,\n Observable,\n observeOn,\n onErrorResumeNextWith,\n queueScheduler,\n Subject,\n subscribeOn,\n tap,\n} from \"rxjs\";\n\n/** @internal */\nexport class SubscriptionScheduler {\n private _scheduler = new Subject<Connectable<unknown>>();\n constructor(concurrency: number) {\n this._scheduler\n .pipe(\n mergeMap((sourceObservable) => {\n return sourceObservable.pipe(\n // connect source observable when scheduler subscribes\n tap({\n subscribe: () => {\n sourceObservable.connect();\n },\n }),\n // Guard against stack overflow when a lot of observables are scheduled. Without this operation `mergeMap`\n // will process each observable that is present in the pipeline recursively.\n observeOn(queueScheduler),\n // Delay the connection until another event loop task\n subscribeOn(asapScheduler),\n // Ignore errors in this pipeline without suppressing them for other subscribers\n onErrorResumeNextWith(),\n );\n }, concurrency),\n )\n // Start consuming scheduled observables\n .subscribe();\n }\n /**\n * Schedules `source` for subscription in the current scheduler.\n *\n * The actual scheduling is performed when the returned observable is subscribed to. To cancel, remove all subscribers\n * from the returned observable.\n *\n * @param source Input observable for which to schedule a subscription.\n * @returns Hot observable which starts emitting `source` values after subscription.\n */\n public scheduleSubscription<T>(source: Observable<T>): Observable<T> {\n return defer(() => {\n let unsubscribed = false;\n const connectableObservable = connectable(\n iif(() => unsubscribed, EMPTY, source),\n { connector: () => new Subject<T>(), resetOnDisconnect: false },\n );\n this._scheduler.next(connectableObservable);\n return connectableObservable.pipe(\n finalize(() => {\n unsubscribed = true;\n }),\n );\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Partition.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,UAAU,EAAE,eAAe,EAA+B,MAAM,MAAM,CAAC;AAGtF,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACvJ,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"Partition.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,UAAU,EAAE,eAAe,EAA+B,MAAM,MAAM,CAAC;AAGtF,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,GAClC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,gBAAgB;AAChB,wBAAgB,SAAS,CAAC,CAAC,EACzB,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAC/B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAchG,8BA+CC;AA3DD,+BAAsF;AACtF,sDAA6C;AAO7C;;;GAGG;AACH,SAAgB,SAAS,CAAI,MAA0B,EAAE,SAAgC;IACvF,MAAM,OAAO,GAAG,IAAI,oBAAa,EAAK,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,oBAAa,EAAK,CAAC;IAC1C,IAAI,kBA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C1D,iBAAiB,EAAE,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAClC,qBAAqB,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,CAAC,CAC6B,CAAC;AACtC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { from, Observable, ObservableInput, ReplaySubject, Subscription } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\n/** @internal */\nexport function partition<T, U extends T>(source: ObservableInput<T>, predicate: (value: T) => value is U): [Observable<U>, Observable<Exclude<T, U>>];\n/** @internal */\nexport function partition<T>(source: ObservableInput<T>, predicate: (value: T) => boolean): [Observable<T>, Observable<T>];\n\n/**\n * This is similar to `rxjs` `partition` operator, but it subscribes to source observable only once.\n * @internal\n */\nexport function partition<T>(source: ObservableInput<T>, predicate: (value: T) => boolean): [Observable<T>, Observable<T>] {\n const matches = new ReplaySubject<T>();\n const nonMatches = new ReplaySubject<T>();\n let sourceSubscription: Subscription | undefined;\n let sourceSubscriptionsCount = 0;\n function subscribeToSource() {\n if (sourceSubscriptionsCount++ > 0) {\n return;\n }\n assert(!sourceSubscription);\n sourceSubscription = from(source).subscribe({\n next(value) {\n if (predicate(value)) {\n matches.next(value);\n } else {\n nonMatches.next(value);\n }\n },\n error(error) {\n matches.error(error);\n nonMatches.error(error);\n },\n complete() {\n matches.complete();\n nonMatches.complete();\n },\n });\n }\n function unsubscribeFromSource() {\n assert(sourceSubscriptionsCount > 0);\n if (--sourceSubscriptionsCount === 0) {\n assert(!!sourceSubscription);\n sourceSubscription.unsubscribe();\n sourceSubscription = undefined;\n }\n }\n return [matches, nonMatches].map(\n (subject) =>\n new Observable((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n subscribeToSource();\n return () => {\n subjectSubscription.unsubscribe();\n unsubscribeFromSource();\n };\n }),\n ) as [Observable<T>, Observable<T>];\n}\n"]}
1
+ {"version":3,"file":"Partition.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/Partition.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAoBhG,8BAkDC;AApED,+BAAsF;AACtF,sDAA6C;AAa7C;;;GAGG;AACH,SAAgB,SAAS,CACvB,MAA0B,EAC1B,SAAgC;IAEhC,MAAM,OAAO,GAAG,IAAI,oBAAa,EAAK,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,oBAAa,EAAK,CAAC;IAC1C,IAAI,kBAA4C,CAAC;IACjD,IAAI,wBAAwB,GAAG,CAAC,CAAC;IACjC,SAAS,iBAAiB;QACxB,IAAI,wBAAwB,EAAE,GAAG,CAAC,EAAE,CAAC;YACnC,OAAO;QACT,CAAC;QACD,IAAA,qBAAM,EAAC,CAAC,kBAAkB,CAAC,CAAC;QAC5B,kBAAkB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,SAAS,CAAC;YAC1C,IAAI,CAAC,KAAK;gBACR,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;oBACrB,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;qBAAM,CAAC;oBACN,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC;YACD,KAAK,CAAC,KAAK;gBACT,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACrB,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC1B,CAAC;YACD,QAAQ;gBACN,OAAO,CAAC,QAAQ,EAAE,CAAC;gBACnB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IACD,SAAS,qBAAqB;QAC5B,IAAA,qBAAM,EAAC,wBAAwB,GAAG,CAAC,CAAC,CAAC;QACrC,IAAI,EAAE,wBAAwB,KAAK,CAAC,EAAE,CAAC;YACrC,IAAA,qBAAM,EAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;YAC7B,kBAAkB,CAAC,WAAW,EAAE,CAAC;YACjC,kBAAkB,GAAG,SAAS,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,GAAG,CAC9B,CAAC,OAAO,EAAE,EAAE,CACV,IAAI,iBAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QAC5B,MAAM,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC1D,iBAAiB,EAAE,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAClC,qBAAqB,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,CAAC,CAC6B,CAAC;AACtC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { from, Observable, ObservableInput, ReplaySubject, Subscription } from \"rxjs\";\nimport { assert } from \"@itwin/core-bentley\";\n\n/** @internal */\nexport function partition<T, U extends T>(\n source: ObservableInput<T>,\n predicate: (value: T) => value is U,\n): [Observable<U>, Observable<Exclude<T, U>>];\n/** @internal */\nexport function partition<T>(\n source: ObservableInput<T>,\n predicate: (value: T) => boolean,\n): [Observable<T>, Observable<T>];\n\n/**\n * This is similar to `rxjs` `partition` operator, but it subscribes to source observable only once.\n * @internal\n */\nexport function partition<T>(\n source: ObservableInput<T>,\n predicate: (value: T) => boolean,\n): [Observable<T>, Observable<T>] {\n const matches = new ReplaySubject<T>();\n const nonMatches = new ReplaySubject<T>();\n let sourceSubscription: Subscription | undefined;\n let sourceSubscriptionsCount = 0;\n function subscribeToSource() {\n if (sourceSubscriptionsCount++ > 0) {\n return;\n }\n assert(!sourceSubscription);\n sourceSubscription = from(source).subscribe({\n next(value) {\n if (predicate(value)) {\n matches.next(value);\n } else {\n nonMatches.next(value);\n }\n },\n error(error) {\n matches.error(error);\n nonMatches.error(error);\n },\n complete() {\n matches.complete();\n nonMatches.complete();\n },\n });\n }\n function unsubscribeFromSource() {\n assert(sourceSubscriptionsCount > 0);\n if (--sourceSubscriptionsCount === 0) {\n assert(!!sourceSubscription);\n sourceSubscription.unsubscribe();\n sourceSubscription = undefined;\n }\n }\n return [matches, nonMatches].map(\n (subject) =>\n new Observable((subscriber) => {\n const subjectSubscription = subject.subscribe(subscriber);\n subscribeToSource();\n return () => {\n subjectSubscription.unsubscribe();\n unsubscribeFromSource();\n };\n }),\n ) as [Observable<T>, Observable<T>];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,eAAe,EAAU,MAAM,MAAM,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,QAAQ,gGAQrI;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EACxD,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAClC,SAAS,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,KAAK,QAAQ,YAE/D,eAAe,CAAC,WAAW,CAAC,sDAa7C"}
1
+ {"version":3,"file":"ReduceToMergeMap.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,eAAe,EAAU,MAAM,MAAM,CAAC;AAErD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EACxD,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAClC,KAAK,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,QAAQ,gGASvC;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,QAAQ,EACxD,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,EAClC,SAAS,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,KAAK,QAAQ,IAEvE,QAAQ,eAAe,CAAC,WAAW,CAAC,sDAa7C"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReduceToMergeMap.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAahG,oDAQC;AAWD,oDAiBC;AA/CD,+BAAqD;AAErD;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAwB,GAAkC,EAAE,KAAsC;IACpI,OAAO,oBAAoB,CAA0B,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACvE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,GAAkC,EAClC,SAA+E;IAE/E,OAAO,CAAC,MAAoC,EAAE,EAAE,CAC9C,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,IAAI,CACf,IAAA,aAAM,EAAqC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE;QAC7D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,6EAA6E;YAC7E,0BAA0B;YAC1B,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;AACN,CAAC;AACD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { from, ObservableInput, reduce } from \"rxjs\";\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key\n * and placed into arrays.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to calculate entry value for the item.\n *\n * @internal\n */\nexport function reduceToMergeMapList<TSourceItem, TMapItem>(key: (item: TSourceItem) => string, value: (item: TSourceItem) => TMapItem) {\n return reduceToMergeMapItem<TSourceItem, TMapItem[]>(key, (item, list) => {\n if (!list) {\n list = [];\n }\n list.push(value(item));\n return list;\n });\n}\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem>`, where all input items are grouped based on their key\n * and merged into a single value using provided merge function.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to create map value using the _current_ item and an item already _existing_ in the map with the same key.\n *\n * @internal\n */\nexport function reduceToMergeMapItem<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n mergeFunc: (sourceItem: TSourceItem, mapItem: TMapItem | undefined) => TMapItem,\n) {\n return (source: ObservableInput<TSourceItem>) =>\n from(source).pipe(\n reduce<TSourceItem, Map<string, TMapItem>>((mergedMap, item) => {\n if (mergedMap === EMPTY_MAP) {\n // this helps us avoid creating an empty map for cases when source observable\n // doesn't emit any values\n mergedMap = new Map();\n }\n const mergeKey = key(item);\n mergedMap.set(mergeKey, mergeFunc(item, mergedMap.get(mergeKey)));\n return mergedMap;\n }, EMPTY_MAP),\n );\n}\nconst EMPTY_MAP = new Map();\n"]}
1
+ {"version":3,"file":"ReduceToMergeMap.js","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReduceToMergeMap.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAahG,oDAWC;AAWD,oDAiBC;AAlDD,+BAAqD;AAErD;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,GAAkC,EAClC,KAAsC;IAEtC,OAAO,oBAAoB,CAA0B,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;QACvE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,GAAkC,EAClC,SAA+E;IAE/E,OAAO,CAAC,MAAoC,EAAE,EAAE,CAC9C,IAAA,WAAI,EAAC,MAAM,CAAC,CAAC,IAAI,CACf,IAAA,aAAM,EAAqC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE;QAC7D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,6EAA6E;YAC7E,0BAA0B;YAC1B,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;QACxB,CAAC;QACD,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3B,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;AACN,CAAC;AACD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nimport { from, ObservableInput, reduce } from \"rxjs\";\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem[]>`, where all input items are grouped based on their key\n * and placed into arrays.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to calculate entry value for the item.\n *\n * @internal\n */\nexport function reduceToMergeMapList<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n value: (item: TSourceItem) => TMapItem,\n) {\n return reduceToMergeMapItem<TSourceItem, TMapItem[]>(key, (item, list) => {\n if (!list) {\n list = [];\n }\n list.push(value(item));\n return list;\n });\n}\n\n/**\n * Reduces the source observable into a `Map<string, TMapItem>`, where all input items are grouped based on their key\n * and merged into a single value using provided merge function.\n *\n * @param key A function to calculate map key for the item.\n * @param value A function to create map value using the _current_ item and an item already _existing_ in the map with the same key.\n *\n * @internal\n */\nexport function reduceToMergeMapItem<TSourceItem, TMapItem>(\n key: (item: TSourceItem) => string,\n mergeFunc: (sourceItem: TSourceItem, mapItem: TMapItem | undefined) => TMapItem,\n) {\n return (source: ObservableInput<TSourceItem>) =>\n from(source).pipe(\n reduce<TSourceItem, Map<string, TMapItem>>((mergedMap, item) => {\n if (mergedMap === EMPTY_MAP) {\n // this helps us avoid creating an empty map for cases when source observable\n // doesn't emit any values\n mergedMap = new Map();\n }\n const mergeKey = key(item);\n mergedMap.set(mergeKey, mergeFunc(item, mergedMap.get(mergeKey)));\n return mergedMap;\n }, EMPTY_MAP),\n );\n}\nconst EMPTY_MAP = new Map();\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4C,UAAU,EAAM,MAAM,MAAM,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,SACtD,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,CAa3C"}
1
+ {"version":3,"file":"ReleaseMainThread.d.ts","sourceRoot":"","sources":["../../../../../src/hierarchies/internal/operators/ReleaseMainThread.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4C,UAAU,EAAM,MAAM,MAAM,CAAC;AAEhF;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,IAC3D,KAAK,UAAU,CAAC,CAAC,CAAC,KAAG,UAAU,CAAC,CAAC,CAAC,CAa3C"}
@@ -1,8 +1,8 @@
1
1
  export { GenericInstanceFilter } from "@itwin/core-common";
2
2
  export { DefineHierarchyLevelProps, HierarchyLevelDefinition, HierarchyDefinition, HierarchyNodesDefinition, NodeParser, NodePostProcessor, NodePreProcessor, } from "./hierarchies/imodel/IModelHierarchyDefinition.js";
3
3
  export { DefineGenericNodeChildHierarchyLevelProps, DefineInstanceNodeChildHierarchyLevelProps, DefineRootHierarchyLevelProps, createPredicateBasedHierarchyDefinition, } from "./hierarchies/imodel/PredicateBasedHierarchyDefinition.js";
4
- export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
5
- export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
4
+ export { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor, } from "./hierarchies/imodel/LimitingECSqlQueryExecutor.js";
5
+ export { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory, } from "./hierarchies/imodel/NodeSelectQueryFactory.js";
6
6
  export { createIModelHierarchyProvider } from "./hierarchies/imodel/IModelHierarchyProvider.js";
7
7
  export { SourceHierarchyNode, ProcessedHierarchyNode } from "./hierarchies/imodel/IModelHierarchyNode.js";
8
8
  export { RowsLimitExceededError } from "./hierarchies/HierarchyErrors.js";
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-hierarchies.d.ts","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,yCAAyC,EACzC,0CAA0C,EAC1C,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,gCAAgC,EAAE,MAAM,oDAAoD,CAAC;AAClI,OAAO,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,MAAM,gDAAgD,CAAC;AACrJ,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACjH,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EACL,8BAA8B,EAE9B,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"presentation-hierarchies.d.ts","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EACL,yCAAyC,EACzC,0CAA0C,EAC1C,6BAA6B,EAC7B,uCAAuC,GACxC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iDAAiD,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAE1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAChH,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACjH,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC5B,iCAAiC,EACjC,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC/G,OAAO,EACL,8BAA8B,EAE9B,qBAAqB,EACrB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAE9B,kGAQ2D;AAJzD,wIAAA,wBAAwB,OAAA;AAK1B,kHAKmE;AADjE,+JAAA,uCAAuC,OAAA;AAEzC,oGAAkI;AAA7F,iJAAA,gCAAgC,OAAA;AACrE,4FAAqJ;AAA5I,wIAAA,2BAA2B,OAAA;AAA2B,0IAAA,6BAA6B,OAAA;AAC5F,8FAAgG;AAAvF,2IAAA,6BAA6B,OAAA;AACtC,sFAA0G;AAA5E,gIAAA,sBAAsB,OAAA;AAEpD,uEAA0E;AAAjE,4HAAA,sBAAsB,OAAA;AAC/B,mEAAgH;AAAhF,iHAAA,aAAa,OAAA;AAC7C,uFAAiH;AAAxG,qIAAA,uBAAuB,OAAA;AAChC,yEAY2C;AATzC,uHAAA,gBAAgB,OAAA;AAUlB,2EAA+G;AAA3D,sHAAA,cAAc,OAAA;AAClE,6EAM6C;AAL3C,uIAAA,8BAA8B,OAAA;AAC9B,4DAA4D;AAC5D,8HAAA,qBAAqB,OAAA;AACrB,+HAAA,sBAAsB,OAAA;AAGxB,uDAAgE;AAAvD,uGAAA,SAAS,OAAA;AAAE,uGAAA,SAAS,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nexport { GenericInstanceFilter } from \"@itwin/core-common\";\n\nexport {\n DefineHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n HierarchyNodesDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n} from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n createPredicateBasedHierarchyDefinition,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport { LimitingECSqlQueryExecutor, createLimitingECSqlQueryExecutor } from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport { NodeSelectClauseColumnNames, NodesQueryClauseFactory, createNodesQueryClauseFactory } from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { createIModelHierarchyProvider } from \"./hierarchies/imodel/IModelHierarchyProvider.js\";\nexport { SourceHierarchyNode, ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors.js\";\nexport { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport {\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n InstancesNodeKey,\n ClassGroupingNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n IModelHierarchyNodeKey,\n} from \"./hierarchies/HierarchyNodeKey.js\";\nexport { GetHierarchyNodesProps, HierarchyProvider, mergeProviders } from \"./hierarchies/HierarchyProvider.js\";\nexport {\n createHierarchyFilteringHelper,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n extractFilteringProps,\n HierarchyFilteringPath,\n HierarchyFilteringPathOptions,\n} from \"./hierarchies/HierarchyFiltering.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
1
+ {"version":3,"file":"presentation-hierarchies.js","sourceRoot":"","sources":["../../src/presentation-hierarchies.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,kDAA2D;AAAlD,oHAAA,qBAAqB,OAAA;AAE9B,kGAQ2D;AAJzD,wIAAA,wBAAwB,OAAA;AAK1B,kHAKmE;AADjE,+JAAA,uCAAuC,OAAA;AAEzC,oGAG4D;AAD1D,iJAAA,gCAAgC,OAAA;AAElC,4FAIwD;AAHtD,wIAAA,2BAA2B,OAAA;AAE3B,0IAAA,6BAA6B,OAAA;AAE/B,8FAAgG;AAAvF,2IAAA,6BAA6B,OAAA;AACtC,sFAA0G;AAA5E,gIAAA,sBAAsB,OAAA;AAEpD,uEAA0E;AAAjE,4HAAA,sBAAsB,OAAA;AAC/B,mEAAgH;AAAhF,iHAAA,aAAa,OAAA;AAC7C,uFAAiH;AAAxG,qIAAA,uBAAuB,OAAA;AAChC,yEAY2C;AATzC,uHAAA,gBAAgB,OAAA;AAUlB,2EAA+G;AAA3D,sHAAA,cAAc,OAAA;AAClE,6EAM6C;AAL3C,uIAAA,8BAA8B,OAAA;AAC9B,4DAA4D;AAC5D,8HAAA,qBAAqB,OAAA;AACrB,+HAAA,sBAAsB,OAAA;AAGxB,uDAAgE;AAAvD,uGAAA,SAAS,OAAA;AAAE,uGAAA,SAAS,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n\nexport { GenericInstanceFilter } from \"@itwin/core-common\";\n\nexport {\n DefineHierarchyLevelProps,\n HierarchyLevelDefinition,\n HierarchyDefinition,\n HierarchyNodesDefinition,\n NodeParser,\n NodePostProcessor,\n NodePreProcessor,\n} from \"./hierarchies/imodel/IModelHierarchyDefinition.js\";\nexport {\n DefineGenericNodeChildHierarchyLevelProps,\n DefineInstanceNodeChildHierarchyLevelProps,\n DefineRootHierarchyLevelProps,\n createPredicateBasedHierarchyDefinition,\n} from \"./hierarchies/imodel/PredicateBasedHierarchyDefinition.js\";\nexport {\n LimitingECSqlQueryExecutor,\n createLimitingECSqlQueryExecutor,\n} from \"./hierarchies/imodel/LimitingECSqlQueryExecutor.js\";\nexport {\n NodeSelectClauseColumnNames,\n NodesQueryClauseFactory,\n createNodesQueryClauseFactory,\n} from \"./hierarchies/imodel/NodeSelectQueryFactory.js\";\nexport { createIModelHierarchyProvider } from \"./hierarchies/imodel/IModelHierarchyProvider.js\";\nexport { SourceHierarchyNode, ProcessedHierarchyNode } from \"./hierarchies/imodel/IModelHierarchyNode.js\";\n\nexport { RowsLimitExceededError } from \"./hierarchies/HierarchyErrors.js\";\nexport { GroupingHierarchyNode, HierarchyNode, NonGroupingHierarchyNode } from \"./hierarchies/HierarchyNode.js\";\nexport { HierarchyNodeIdentifier, HierarchyNodeIdentifiersPath } from \"./hierarchies/HierarchyNodeIdentifier.js\";\nexport {\n GenericNodeKey,\n GroupingNodeKey,\n HierarchyNodeKey,\n InstancesNodeKey,\n ClassGroupingNodeKey,\n LabelGroupingNodeKey,\n PropertyGroupingNodeKey,\n PropertyOtherValuesGroupingNodeKey,\n PropertyValueGroupingNodeKey,\n PropertyValueRangeGroupingNodeKey,\n IModelHierarchyNodeKey,\n} from \"./hierarchies/HierarchyNodeKey.js\";\nexport { GetHierarchyNodesProps, HierarchyProvider, mergeProviders } from \"./hierarchies/HierarchyProvider.js\";\nexport {\n createHierarchyFilteringHelper,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n extractFilteringProps,\n HierarchyFilteringPath,\n HierarchyFilteringPathOptions,\n} from \"./hierarchies/HierarchyFiltering.js\";\nexport { getLogger, setLogger } from \"./hierarchies/Logging.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyFiltering.d.ts","sourceRoot":"","sources":["../../../src/hierarchies/HierarchyFiltering.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,eAAe,EAAoB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE5G;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,GAAG,EAAE,eAAe,CAAC;IAErB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;;;;OAiBG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,cAAc;AACd,MAAM,WAAW,kCAAkC;IACjD;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,cAAc;AACd,MAAM,WAAW,uCAAuC;IACtD;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,cAAc;AACd,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;OASG;IACH,UAAU,CAAC,EACP,OAAO,GAEP,4BAA4B,GAE5B,6BAA6B,GAC7B,uCAAuC,GACvC,kCAAkC,CAAC;CACxC;AAmCD;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG;IAAE,IAAI,EAAE,4BAA4B,CAAC;IAAC,OAAO,CAAC,EAAE,6BAA6B,CAAA;CAAE,CAAC;AACpJ,cAAc;AAEd,yBAAiB,sBAAsB,CAAC;IACtC;;;OAGG;IACH,SAAgB,SAAS,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,sB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AY,CAC1B,GAAG,EAAE,6BAA6B,GAAG,SAAS,EAC9C,GAAG,EAAE,6BAA6B,GAAG,SAAS,GAC7C,6BAA6B,GAAG,SAAS,CAM3C;CACF;AAED;;;;;GAKG;AAEH,wBAAgB,qBAAqB,CACnC,uBAAuB,EAAE,sBAAsB,EAAE,EACjD,UAAU,EAAE,IAAI,CAAC,wBAAwB,EAAE,WAAW,CAAC,GAAG,SAAS,GAClE;IAAE,iBAAiB,EAAE,sBAAsB,EAAE,CAAC;IAAC,uBAAuB,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAE/F;AAqBD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,uBAAuB,EAAE,sBAAsB,EAAE,GAAG,SAAS,EAC7D,UAAU,EAAE,IAAI,CAAC,wBAAwB,EAAE,WAAW,GAAG,YAAY,CAAC,GAAG,SAAS;IAKhF;;OAEG;;IAGH;;;;;OAKG;;IAGH;;;OAGG;;IAWH;;;;;;;;OAQG;kCAGG;QAAE,OAAO,EAAE,gBAAgB,GAAG,cAAc,CAAA;KAAE,GAC9C;QAAE,WAAW,EAAE,CAAC,UAAU,EAAE,uBAAuB,KAAK,OAAO,CAAA;KAAE,KACpE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,WAAW,CAAC,GAAG,SAAS;IA2B9D;;OAEG;uCACgC;QACjC,WAAW,EAAE,CAAC,UAAU,EAAE,uBAAuB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;KAClF,KACG,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,WAAW,CAAC,GAAG,SAAS,CAAC,GACpE,IAAI,CAAC,aAAa,EAAE,YAAY,GAAG,WAAW,CAAC,GAC/C,SAAS;EAqChB"}
@@ -17,10 +17,12 @@ var HierarchyFilteringPathOptions;
17
17
  const lhsDepth = "depth" in lhs ? lhs.depth : "depthInPath" in lhs ? lhs.depthInPath : lhs.depthInHierarchy;
18
18
  // eslint-disable-next-line @typescript-eslint/no-deprecated
19
19
  const rhsDepth = "depth" in rhs ? rhs.depth : "depthInPath" in rhs ? rhs.depthInPath : rhs.depthInHierarchy;
20
+ const isLhsDepthBasedOnPath =
20
21
  // eslint-disable-next-line @typescript-eslint/no-deprecated
21
- const isLhsDepthBasedOnPath = "depthInPath" in lhs ? true : !("key" in lhs) && !("depthInHierarchy" in lhs) && !lhs.includeGroupingNodes;
22
+ "depthInPath" in lhs ? true : !("key" in lhs) && !("depthInHierarchy" in lhs) && !lhs.includeGroupingNodes;
23
+ const isRhsDepthBasedOnPath =
22
24
  // eslint-disable-next-line @typescript-eslint/no-deprecated
23
- const isRhsDepthBasedOnPath = "depthInPath" in rhs ? true : !("key" in rhs) && !("depthInHierarchy" in rhs) && !rhs.includeGroupingNodes;
25
+ "depthInPath" in rhs ? true : !("key" in rhs) && !("depthInHierarchy" in rhs) && !rhs.includeGroupingNodes;
24
26
  if (isLhsDepthBasedOnPath) {
25
27
  if (isRhsDepthBasedOnPath) {
26
28
  return lhsDepth > rhsDepth ? lhs : rhs;
@@ -69,9 +71,7 @@ export var HierarchyFilteringPath;
69
71
  if (!lhs || !rhs) {
70
72
  return lhs ?? rhs;
71
73
  }
72
- return {
73
- autoExpand: HierarchyFilteringPathOptions.mergeAutoExpandOptions(lhs.autoExpand, rhs.autoExpand),
74
- };
74
+ return { autoExpand: HierarchyFilteringPathOptions.mergeAutoExpandOptions(lhs.autoExpand, rhs.autoExpand) };
75
75
  }
76
76
  HierarchyFilteringPath.mergeOptions = mergeOptions;
77
77
  })(HierarchyFilteringPath || (HierarchyFilteringPath = {}));
@@ -88,7 +88,9 @@ export function extractFilteringProps(rootLevelFilteringProps, parentNode) {
88
88
  /* v8 ignore stop */
89
89
  function extractFilteringPropsInternal(rootLevelFilteringProps, parentNode) {
90
90
  if (!parentNode) {
91
- return rootLevelFilteringProps ? { filteredNodePaths: rootLevelFilteringProps, hasFilterTargetAncestor: false } : /** v8 ignore next */ undefined;
91
+ return rootLevelFilteringProps
92
+ ? { filteredNodePaths: rootLevelFilteringProps, hasFilterTargetAncestor: false }
93
+ : /** v8 ignore next */ undefined;
92
94
  }
93
95
  return parentNode.filtering?.filteredChildrenIdentifierPaths
94
96
  ? {
@@ -152,8 +154,10 @@ export function createHierarchyFilteringHelper(rootLevelFilteringProps, parentNo
152
154
  // TODO: MISSING_COVERAGE
153
155
  /* v8 ignore start */
154
156
  if ("nodeKey" in props &&
155
- ((HierarchyNodeKey.isGeneric(props.nodeKey) && HierarchyNodeIdentifier.equal(normalizedPath.path[0], props.nodeKey)) ||
156
- (HierarchyNodeKey.isInstances(props.nodeKey) && props.nodeKey.instanceKeys.some((ik) => HierarchyNodeIdentifier.equal(normalizedPath.path[0], ik))))) {
157
+ ((HierarchyNodeKey.isGeneric(props.nodeKey) &&
158
+ HierarchyNodeIdentifier.equal(normalizedPath.path[0], props.nodeKey)) ||
159
+ (HierarchyNodeKey.isInstances(props.nodeKey) &&
160
+ props.nodeKey.instanceKeys.some((ik) => HierarchyNodeIdentifier.equal(normalizedPath.path[0], ik))))) {
157
161
  reducer.accept(normalizedPath);
158
162
  /* v8 ignore stop */
159
163
  }
@@ -257,8 +261,12 @@ class MatchingFilteringPathsReducer {
257
261
  ? {
258
262
  filtering: {
259
263
  ...(this._hasFilterTargetAncestor ? { hasFilterTargetAncestor: true } : undefined),
260
- ...(this._isFilterTarget ? { isFilterTarget: true, filterTargetOptions: this._filterTargetOptions } : undefined),
261
- ...(this._filteredChildrenIdentifierPaths.length > 0 ? { filteredChildrenIdentifierPaths: this._filteredChildrenIdentifierPaths } : undefined),
264
+ ...(this._isFilterTarget
265
+ ? { isFilterTarget: true, filterTargetOptions: this._filterTargetOptions }
266
+ : undefined),
267
+ ...(this._filteredChildrenIdentifierPaths.length > 0
268
+ ? { filteredChildrenIdentifierPaths: this._filteredChildrenIdentifierPaths }
269
+ : undefined),
262
270
  },
263
271
  }
264
272
  : undefined),