@itwin/presentation-common 5.5.0-dev.2 → 5.5.0-dev.4

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 (160) hide show
  1. package/CHANGELOG.md +8 -1
  2. package/lib/assets/locales/en/Presentation.json +19 -19
  3. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  4. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
  5. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  6. package/lib/cjs/presentation-common/EC.js.map +1 -1
  7. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  8. package/lib/cjs/presentation-common/Error.js.map +1 -1
  9. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  10. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  11. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  12. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  13. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  14. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  15. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  16. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  17. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  18. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  19. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  20. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  21. package/lib/cjs/presentation-common/Update.js.map +1 -1
  22. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  23. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  24. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  25. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +2 -2
  26. package/lib/cjs/presentation-common/content/ContentTraverser.js +2 -2
  27. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  28. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  29. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  30. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  31. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  32. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  33. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  34. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  35. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  36. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  37. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  38. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  39. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  40. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  41. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  42. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  43. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  44. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  45. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  46. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  47. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  48. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  49. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  50. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  51. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  52. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  53. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  54. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  55. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  56. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  57. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  58. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  59. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  60. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  61. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  62. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  63. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  64. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  65. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  66. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  67. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  68. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  69. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  70. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  71. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  72. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  73. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  74. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  75. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  76. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  77. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  78. package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
  79. package/lib/cjs/presentation-common-internal.js.map +1 -1
  80. package/lib/cjs/presentation-common.js.map +1 -1
  81. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  82. package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
  83. package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
  84. package/lib/esm/presentation-common/EC.js.map +1 -1
  85. package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
  86. package/lib/esm/presentation-common/Error.js.map +1 -1
  87. package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
  88. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  89. package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  90. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  91. package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
  92. package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
  93. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  94. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  95. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  96. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  97. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  98. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  99. package/lib/esm/presentation-common/Update.js.map +1 -1
  100. package/lib/esm/presentation-common/Utils.js.map +1 -1
  101. package/lib/esm/presentation-common/content/Category.js.map +1 -1
  102. package/lib/esm/presentation-common/content/Content.js.map +1 -1
  103. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +2 -2
  104. package/lib/esm/presentation-common/content/ContentTraverser.js +2 -2
  105. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  106. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  107. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  108. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  109. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  110. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  111. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  112. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  113. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  114. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  115. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  116. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  117. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  118. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  119. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  120. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  121. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  122. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  123. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  124. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  125. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  126. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  127. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  128. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  129. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  130. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  131. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  132. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  133. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  134. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  135. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  136. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  137. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  138. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  139. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  140. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  141. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  142. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  143. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  144. package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  145. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  146. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  147. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  148. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  149. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  150. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  151. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  152. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  153. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  154. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  155. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  156. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  157. package/lib/esm/presentation-common-internal.js.map +1 -1
  158. package/lib/esm/presentation-common.js.map +1 -1
  159. package/lib/public/locales/en/Presentation.json +19 -19
  160. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyValueFormatter.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/PropertyValueFormatter.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA4CH,wDAGC;AA7CD,sDAA6C;AAK7C,6CAAuC;AAIvC,yCAA+G;AA6B/G;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,KAA4B;IACjE,MAAM,sBAAsB,GAAG,IAAI,6BAA6B,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC/F,OAAO,IAAI,oBAAoB,CAAC,sBAAsB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;AAC5E,CAAC;AAED,MAAa,oBAAoB;IAErB;IACA;IAFV,YACU,uBAAmI,EACnI,WAA2B;QAD3B,4BAAuB,GAAvB,uBAAuB,CAA4G;QACnI,gBAAW,GAAX,WAAW,CAAgB;IAClC,CAAC;IAEG,KAAK,CAAC,aAAa,CAAC,OAAgB;QACzC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;QAC7F,OAAO,IAAI,oBAAO,CAAC,OAAO,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IACzD,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,KAAa,EAAE,UAAsB;QACnE,OAAO,OAAO,CAAC,GAAG,CAChB,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACvB,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,C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sEAoGC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC;AAYD,SAAS,cAAc,CAAC,KAAY;IAClC,OAAO,KAAK,CAAC,iBAAiB,EAAE,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,KAAK,SAAS,CAAC;AAC/H,CAAC;AAED,SAAS,SAAS,CAAC,GAAU;IAC3B,OAAO,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,CAAC;AACnF,CAAC;AAED,SAAS,SAAS,CAAC,GAAU;IAC3B,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAE,GAAW,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,QAAQ,CAAC,GAAU;IAC1B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { KindOfQuantityInfo, PropertyInfo } from \"../EC.js\";\nimport { FormatOptions } from \"../KoqPropertyValueFormatter.js\";\nimport { ValuesDictionary } from \"../Utils.js\";\nimport { Content } from \"./Content.js\";\nimport { Descriptor } from \"./Descriptor.js\";\nimport { ArrayPropertiesField, Field, PropertiesField, StructPropertiesField } from \"./Fields.js\";\nimport { Item } from \"./Item.js\";\nimport { DisplayValue, DisplayValuesMap, NestedContentValue, Value, ValuesArray, ValuesMap } from \"./Value.js\";\n\n/**\n * An interface for something that can format `Content` and its `Item`s.\n * @public\n */\ninterface ContentFormatter {\n /** Format content in place and return it. */\n formatContent(content: Content): Promise<Content>;\n /** Format content `Item`s in place and return them. */\n formatContentItems(items: Item[], descriptor: Descriptor): Promise<Item[]>;\n}\n\n/**\n * Props for `createContentFormatter`.\n * @public\n */\ninterface ContentFormatterProps {\n /**\n * An interface for something that knows how to format a single numeric value using\n * a given kind-of-quantity (contained within the options object argument).\n */\n propertyValueFormatter: {\n format(value: number, options: FormatOptions): Promise<string | undefined>;\n };\n /** An optional unit system to format content in. */\n unitSystem?: UnitSystemKey;\n}\n\n/**\n * Create a `ContentFormatter` that knows how to format `Content` and its `Item`s.\n * @public\n */\nexport function createContentFormatter(props: ContentFormatterProps): ContentFormatter {\n const propertyValueFormatter = new ContentPropertyValueFormatter(props.propertyValueFormatter);\n return new ContentFormatterImpl(propertyValueFormatter, props.unitSystem);\n}\n\nexport class ContentFormatterImpl implements ContentFormatter {\n constructor(\n private _propertyValueFormatter: { formatPropertyValue: (field: Field, value: Value, unitSystem?: UnitSystemKey) => Promise<DisplayValue> },\n private _unitSystem?: UnitSystemKey,\n ) {}\n\n public async formatContent(content: Content) {\n const formattedItems = await this.formatContentItems(content.contentSet, content.descriptor);\n return new Content(content.descriptor, formattedItems);\n }\n\n public async formatContentItems(items: Item[], descriptor: Descriptor) {\n return Promise.all(\n items.map(async (item) => {\n await this.formatValues(item.values, item.displayValues, descriptor.fields, item.mergedFieldNames);\n return item;\n }),\n );\n }\n\n private async formatValues(values: ValuesDictionary<Value>, displayValues: ValuesDictionary<DisplayValue>, fields: Field[], mergedFields: string[]) {\n for (const field of fields) {\n const value = values[field.name];\n\n // format display value of merged values\n if (mergedFields.includes(field.name)) {\n displayValues[field.name] = \"@Presentation:label.varies@\";\n continue;\n }\n\n // do not add undefined value to display values\n if (value === undefined) {\n continue;\n }\n\n // format display values of nested content field\n if (field.isNestedContentField()) {\n assert(Value.isNestedContent(value));\n await this.formatNestedContentDisplayValues(value, field.nestedFields);\n continue;\n }\n\n // format property items\n if (field.isPropertiesField()) {\n displayValues[field.name] = await this.formatPropertyValue(value, field);\n continue;\n }\n\n displayValues[field.name] = await this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\n }\n }\n\n private async formatNestedContentDisplayValues(nestedValues: NestedContentValue[], fields: Field[]) {\n for (const nestedValue of nestedValues) {\n await this.formatValues(nestedValue.values, nestedValue.displayValues, fields, nestedValue.mergedFieldNames);\n }\n }\n\n private async formatPropertyValue(value: Value, field: PropertiesField): Promise<DisplayValue> {\n if (field.isArrayPropertiesField()) {\n assert(Value.isArray(value));\n return this.formatArrayItems(value, field);\n }\n if (field.isStructPropertiesField()) {\n assert(Value.isMap(value));\n return this.formatStructMembers(value, field);\n }\n return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\n }\n\n private async formatArrayItems(itemValues: ValuesArray, field: ArrayPropertiesField) {\n return Promise.all(itemValues.map(async (value) => this.formatPropertyValue(value, field.itemsField)));\n }\n\n private async formatStructMembers(memberValues: ValuesMap, field: StructPropertiesField) {\n const displayValues: DisplayValuesMap = {};\n await Promise.all(\n field.memberFields.map(async (memberField) => {\n const memberValue = memberValues[memberField.name];\n // do not add undefined value to display values\n if (memberValue === undefined) {\n return;\n }\n displayValues[memberField.name] = await this.formatPropertyValue(memberValue, memberField);\n }),\n );\n return displayValues;\n }\n}\n\nexport class ContentPropertyValueFormatter {\n constructor(private _propertyValueFormatter: ContentFormatterProps[\"propertyValueFormatter\"]) {}\n\n public async formatPropertyValue(field: Field, value: Value, unitSystem?: UnitSystemKey): Promise<DisplayValue> {\n const doubleFormatter = isFieldWithKoq(field)\n ? async (rawValue: number) => {\n const koq = field.properties[0].property.kindOfQuantity;\n const formattedValue = await this._propertyValueFormatter.format(rawValue, { koqName: koq.name, unitSystem });\n if (formattedValue !== undefined) {\n return formattedValue;\n }\n return formatDouble(rawValue);\n }\n : async (rawValue: number) => formatDouble(rawValue);\n\n return this.formatValue(field, value, { doubleFormatter });\n }\n\n private async formatValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }): Promise<DisplayValue> {\n if (field.isPropertiesField()) {\n if (field.isArrayPropertiesField()) {\n return this.formatArrayValue(field, value);\n }\n\n if (field.isStructPropertiesField()) {\n return this.formatStructValue(field, value);\n }\n }\n\n return this.formatPrimitiveValue(field, value, ctx);\n }\n\n private async formatPrimitiveValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }) {\n if (value === undefined) {\n return \"\";\n }\n\n const formatDoubleValue = async (raw: number) => (ctx ? ctx.doubleFormatter(raw) : formatDouble(raw));\n\n if (field.type.typeName === \"point2d\" && isPoint2d(value)) {\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}`;\n }\n if (field.type.typeName === \"point3d\" && isPoint3d(value)) {\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}; Z: ${await formatDoubleValue(value.z)}`;\n }\n if (field.type.typeName === \"dateTime\") {\n assert(typeof value === \"string\");\n return value;\n }\n if (field.type.typeName === \"bool\" || field.type.typeName === \"boolean\") {\n assert(typeof value === \"boolean\");\n return value ? \"@Presentation:value.true@\" : \"@Presentation:value.false@\";\n }\n if (field.type.typeName === \"int\" || field.type.typeName === \"long\") {\n assert(isNumber(value));\n return value.toFixed(0);\n }\n if (field.type.typeName === \"double\") {\n assert(isNumber(value));\n return formatDoubleValue(value);\n }\n if (field.type.typeName === \"navigation\") {\n assert(Value.isNavigationValue(value));\n return value.label.displayValue;\n }\n\n if (field.type.typeName === \"enum\" && field.isPropertiesField()) {\n const defaultValue = !field.properties[0].property.enumerationInfo?.isStrict\n ? value.toString() // eslint-disable-line @typescript-eslint/no-base-to-string\n : undefined;\n\n return field.properties[0].property.enumerationInfo?.choices.find(({ value: enumValue }) => enumValue === value)?.label ?? defaultValue;\n }\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n return value.toString();\n }\n\n private async formatStructValue(field: StructPropertiesField, value: Value) {\n if (!Value.isMap(value)) {\n return {};\n }\n\n const formattedMember: DisplayValuesMap = {};\n for (const member of field.memberFields) {\n formattedMember[member.name] = await this.formatValue(member, value[member.name]);\n }\n return formattedMember;\n }\n\n private async formatArrayValue(field: ArrayPropertiesField, value: Value) {\n if (!Value.isArray(value)) {\n return [];\n }\n\n return Promise.all(\n value.map(async (arrayVal) => {\n return this.formatValue(field.itemsField, arrayVal);\n }),\n );\n }\n}\n\nfunction formatDouble(value: number) {\n return value.toFixed(2);\n}\n\ntype FieldWithKoq = PropertiesField & {\n properties: [\n {\n property: PropertyInfo & {\n kindOfQuantity: KindOfQuantityInfo;\n };\n },\n ];\n};\n\nfunction isFieldWithKoq(field: Field): field is FieldWithKoq {\n return field.isPropertiesField() && field.properties.length > 0 && field.properties[0].property.kindOfQuantity !== undefined;\n}\n\nfunction isPoint2d(obj: Value): obj is { x: number; y: number } {\n return obj !== undefined && isNumber((obj as any).x) && isNumber((obj as any).y);\n}\n\nfunction isPoint3d(obj: Value): obj is { x: number; y: number; z: number } {\n return isPoint2d(obj) && isNumber((obj as any).z);\n}\n\nfunction isNumber(obj: Value): obj is number {\n return !isNaN(Number(obj));\n}\n"]}
1
+ {"version":3,"file":"PropertyValueFormatter.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/PropertyValueFormatter.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA4CH,wDAGC;AA7CD,sDAA6C;AAK7C,6CAAuC;AAIvC,yCAA+G;AA6B/G;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,KAA4B;IACjE,MAAM,sBAAsB,GAAG,IAAI,6BAA6B,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC/F,OAAO,IAAI,oBAAoB,CAAC,sBAAsB,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;AAC5E,CAAC;AAED,MAAa,oBAAoB;IAErB;IACA;IAFV,YAC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AAED,SAAS,QAAQ,CAAC,GAAU;IAC1B,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\r\nimport { KindOfQuantityInfo, PropertyInfo } from \"../EC.js\";\r\nimport { FormatOptions } from \"../KoqPropertyValueFormatter.js\";\r\nimport { ValuesDictionary } from \"../Utils.js\";\r\nimport { Content } from \"./Content.js\";\r\nimport { Descriptor } from \"./Descriptor.js\";\r\nimport { ArrayPropertiesField, Field, PropertiesField, StructPropertiesField } from \"./Fields.js\";\r\nimport { Item } from \"./Item.js\";\r\nimport { DisplayValue, DisplayValuesMap, NestedContentValue, Value, ValuesArray, ValuesMap } from \"./Value.js\";\r\n\r\n/**\r\n * An interface for something that can format `Content` and its `Item`s.\r\n * @public\r\n */\r\ninterface ContentFormatter {\r\n /** Format content in place and return it. */\r\n formatContent(content: Content): Promise<Content>;\r\n /** Format content `Item`s in place and return them. */\r\n formatContentItems(items: Item[], descriptor: Descriptor): Promise<Item[]>;\r\n}\r\n\r\n/**\r\n * Props for `createContentFormatter`.\r\n * @public\r\n */\r\ninterface ContentFormatterProps {\r\n /**\r\n * An interface for something that knows how to format a single numeric value using\r\n * a given kind-of-quantity (contained within the options object argument).\r\n */\r\n propertyValueFormatter: {\r\n format(value: number, options: FormatOptions): Promise<string | undefined>;\r\n };\r\n /** An optional unit system to format content in. */\r\n unitSystem?: UnitSystemKey;\r\n}\r\n\r\n/**\r\n * Create a `ContentFormatter` that knows how to format `Content` and its `Item`s.\r\n * @public\r\n */\r\nexport function createContentFormatter(props: ContentFormatterProps): ContentFormatter {\r\n const propertyValueFormatter = new ContentPropertyValueFormatter(props.propertyValueFormatter);\r\n return new ContentFormatterImpl(propertyValueFormatter, props.unitSystem);\r\n}\r\n\r\nexport class ContentFormatterImpl implements ContentFormatter {\r\n constructor(\r\n private _propertyValueFormatter: { formatPropertyValue: (field: Field, value: Value, unitSystem?: UnitSystemKey) => Promise<DisplayValue> },\r\n private _unitSystem?: UnitSystemKey,\r\n ) {}\r\n\r\n public async formatContent(content: Content) {\r\n const formattedItems = await this.formatContentItems(content.contentSet, content.descriptor);\r\n return new Content(content.descriptor, formattedItems);\r\n }\r\n\r\n public async formatContentItems(items: Item[], descriptor: Descriptor) {\r\n return Promise.all(\r\n items.map(async (item) => {\r\n await this.formatValues(item.values, item.displayValues, descriptor.fields, item.mergedFieldNames);\r\n return item;\r\n }),\r\n );\r\n }\r\n\r\n private async formatValues(values: ValuesDictionary<Value>, displayValues: ValuesDictionary<DisplayValue>, fields: Field[], mergedFields: string[]) {\r\n for (const field of fields) {\r\n const value = values[field.name];\r\n\r\n // format display value of merged values\r\n if (mergedFields.includes(field.name)) {\r\n displayValues[field.name] = \"@Presentation:label.varies@\";\r\n continue;\r\n }\r\n\r\n // do not add undefined value to display values\r\n if (value === undefined) {\r\n continue;\r\n }\r\n\r\n // format display values of nested content field\r\n if (field.isNestedContentField()) {\r\n assert(Value.isNestedContent(value));\r\n await this.formatNestedContentDisplayValues(value, field.nestedFields);\r\n continue;\r\n }\r\n\r\n // format property items\r\n if (field.isPropertiesField()) {\r\n displayValues[field.name] = await this.formatPropertyValue(value, field);\r\n continue;\r\n }\r\n\r\n displayValues[field.name] = await this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\r\n }\r\n }\r\n\r\n private async formatNestedContentDisplayValues(nestedValues: NestedContentValue[], fields: Field[]) {\r\n for (const nestedValue of nestedValues) {\r\n await this.formatValues(nestedValue.values, nestedValue.displayValues, fields, nestedValue.mergedFieldNames);\r\n }\r\n }\r\n\r\n private async formatPropertyValue(value: Value, field: PropertiesField): Promise<DisplayValue> {\r\n if (field.isArrayPropertiesField()) {\r\n assert(Value.isArray(value));\r\n return this.formatArrayItems(value, field);\r\n }\r\n if (field.isStructPropertiesField()) {\r\n assert(Value.isMap(value));\r\n return this.formatStructMembers(value, field);\r\n }\r\n return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);\r\n }\r\n\r\n private async formatArrayItems(itemValues: ValuesArray, field: ArrayPropertiesField) {\r\n return Promise.all(itemValues.map(async (value) => this.formatPropertyValue(value, field.itemsField)));\r\n }\r\n\r\n private async formatStructMembers(memberValues: ValuesMap, field: StructPropertiesField) {\r\n const displayValues: DisplayValuesMap = {};\r\n await Promise.all(\r\n field.memberFields.map(async (memberField) => {\r\n const memberValue = memberValues[memberField.name];\r\n // do not add undefined value to display values\r\n if (memberValue === undefined) {\r\n return;\r\n }\r\n displayValues[memberField.name] = await this.formatPropertyValue(memberValue, memberField);\r\n }),\r\n );\r\n return displayValues;\r\n }\r\n}\r\n\r\nexport class ContentPropertyValueFormatter {\r\n constructor(private _propertyValueFormatter: ContentFormatterProps[\"propertyValueFormatter\"]) {}\r\n\r\n public async formatPropertyValue(field: Field, value: Value, unitSystem?: UnitSystemKey): Promise<DisplayValue> {\r\n const doubleFormatter = isFieldWithKoq(field)\r\n ? async (rawValue: number) => {\r\n const koq = field.properties[0].property.kindOfQuantity;\r\n const formattedValue = await this._propertyValueFormatter.format(rawValue, { koqName: koq.name, unitSystem });\r\n if (formattedValue !== undefined) {\r\n return formattedValue;\r\n }\r\n return formatDouble(rawValue);\r\n }\r\n : async (rawValue: number) => formatDouble(rawValue);\r\n\r\n return this.formatValue(field, value, { doubleFormatter });\r\n }\r\n\r\n private async formatValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }): Promise<DisplayValue> {\r\n if (field.isPropertiesField()) {\r\n if (field.isArrayPropertiesField()) {\r\n return this.formatArrayValue(field, value);\r\n }\r\n\r\n if (field.isStructPropertiesField()) {\r\n return this.formatStructValue(field, value);\r\n }\r\n }\r\n\r\n return this.formatPrimitiveValue(field, value, ctx);\r\n }\r\n\r\n private async formatPrimitiveValue(field: Field, value: Value, ctx?: { doubleFormatter: (raw: number) => Promise<string> }) {\r\n if (value === undefined) {\r\n return \"\";\r\n }\r\n\r\n const formatDoubleValue = async (raw: number) => (ctx ? ctx.doubleFormatter(raw) : formatDouble(raw));\r\n\r\n if (field.type.typeName === \"point2d\" && isPoint2d(value)) {\r\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}`;\r\n }\r\n if (field.type.typeName === \"point3d\" && isPoint3d(value)) {\r\n return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}; Z: ${await formatDoubleValue(value.z)}`;\r\n }\r\n if (field.type.typeName === \"dateTime\") {\r\n assert(typeof value === \"string\");\r\n return value;\r\n }\r\n if (field.type.typeName === \"bool\" || field.type.typeName === \"boolean\") {\r\n assert(typeof value === \"boolean\");\r\n return value ? \"@Presentation:value.true@\" : \"@Presentation:value.false@\";\r\n }\r\n if (field.type.typeName === \"int\" || field.type.typeName === \"long\") {\r\n assert(isNumber(value));\r\n return value.toFixed(0);\r\n }\r\n if (field.type.typeName === \"double\") {\r\n assert(isNumber(value));\r\n return formatDoubleValue(value);\r\n }\r\n if (field.type.typeName === \"navigation\") {\r\n assert(Value.isNavigationValue(value));\r\n return value.label.displayValue;\r\n }\r\n\r\n if (field.type.typeName === \"enum\" && field.isPropertiesField()) {\r\n const defaultValue = !field.properties[0].property.enumerationInfo?.isStrict\r\n ? value.toString() // eslint-disable-line @typescript-eslint/no-base-to-string\r\n : undefined;\r\n\r\n return field.properties[0].property.enumerationInfo?.choices.find(({ value: enumValue }) => enumValue === value)?.label ?? defaultValue;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n return value.toString();\r\n }\r\n\r\n private async formatStructValue(field: StructPropertiesField, value: Value) {\r\n if (!Value.isMap(value)) {\r\n return {};\r\n }\r\n\r\n const formattedMember: DisplayValuesMap = {};\r\n for (const member of field.memberFields) {\r\n formattedMember[member.name] = await this.formatValue(member, value[member.name]);\r\n }\r\n return formattedMember;\r\n }\r\n\r\n private async formatArrayValue(field: ArrayPropertiesField, value: Value) {\r\n if (!Value.isArray(value)) {\r\n return [];\r\n }\r\n\r\n return Promise.all(\r\n value.map(async (arrayVal) => {\r\n return this.formatValue(field.itemsField, arrayVal);\r\n }),\r\n );\r\n }\r\n}\r\n\r\nfunction formatDouble(value: number) {\r\n return value.toFixed(2);\r\n}\r\n\r\ntype FieldWithKoq = PropertiesField & {\r\n properties: [\r\n {\r\n property: PropertyInfo & {\r\n kindOfQuantity: KindOfQuantityInfo;\r\n };\r\n },\r\n ];\r\n};\r\n\r\nfunction isFieldWithKoq(field: Field): field is FieldWithKoq {\r\n return field.isPropertiesField() && field.properties.length > 0 && field.properties[0].property.kindOfQuantity !== undefined;\r\n}\r\n\r\nfunction isPoint2d(obj: Value): obj is { x: number; y: number } {\r\n return obj !== undefined && isNumber((obj as any).x) && isNumber((obj as any).y);\r\n}\r\n\r\nfunction isPoint3d(obj: Value): obj is { x: number; y: number; z: number } {\r\n return isPoint2d(obj) && isNumber((obj as any).z);\r\n}\r\n\r\nfunction isNumber(obj: Value): obj is number {\r\n return !isNaN(Number(obj));\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Renderer.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Renderer.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\n/**\n * Describes property renderer used for a content [[Field]].\n * @public\n */\nexport interface RendererDescription {\n /** Renderer name. */\n name: string;\n}\n"]}
1
+ {"version":3,"file":"Renderer.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Renderer.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\n/**\r\n * Describes property renderer used for a content [[Field]].\r\n * @public\r\n */\r\nexport interface RendererDescription {\r\n /** Renderer name. */\r\n name: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TypeDescription.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/TypeDescription.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,8CAAuB,CAAA;IACvB,kBAAkB;IAClB,sCAAe,CAAA;IACf,mBAAmB;IACnB,wCAAiB,CAAA;AACnB,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\n/**\n * Format of the property value.\n * @public\n */\nexport enum PropertyValueFormat {\n /** Primitive value */\n Primitive = \"Primitive\",\n /** Array value */\n Array = \"Array\",\n /** Struct value */\n Struct = \"Struct\",\n}\n\n/**\n * Data structure for base content field type description. Not\n * meant to be used directly, see `TypeDescription`.\n *\n * @public\n */\nexport interface BaseTypeDescription {\n /** Value format */\n valueFormat: PropertyValueFormat;\n /** Type name */\n typeName: string;\n}\n\n/**\n * Type description for primitive properties.\n * @public\n */\nexport interface PrimitiveTypeDescription extends BaseTypeDescription {\n /** Primitive format */\n valueFormat: PropertyValueFormat.Primitive;\n}\n\n/**\n * Type description for array properties.\n * @public\n */\nexport interface ArrayTypeDescription extends BaseTypeDescription {\n /** Array format */\n valueFormat: PropertyValueFormat.Array;\n /** Type of array items */\n memberType: TypeDescription;\n}\n\n/**\n * A data structure that describes a struct member.\n * @public\n */\nexport interface StructFieldMemberDescription {\n /** Unique name of a struct member */\n name: string;\n /** Label of the struct member */\n label: string;\n /** Type of the struct member */\n type: TypeDescription;\n}\n\n/**\n * Type description for struct properties.\n * @public\n */\nexport interface StructTypeDescription extends BaseTypeDescription {\n /** Struct format */\n valueFormat: PropertyValueFormat.Struct;\n /** Type descriptions of struct members */\n members: StructFieldMemberDescription[];\n}\n\n/**\n * One of content field type descriptions.\n * @public\n */\nexport type TypeDescription = PrimitiveTypeDescription | ArrayTypeDescription | StructTypeDescription;\n"]}
1
+ {"version":3,"file":"TypeDescription.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/TypeDescription.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,sBAAsB;IACtB,8CAAuB,CAAA;IACvB,kBAAkB;IAClB,sCAAe,CAAA;IACf,mBAAmB;IACnB,wCAAiB,CAAA;AACnB,CAAC,EAPW,mBAAmB,mCAAnB,mBAAmB,QAO9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\n/**\r\n * Format of the property value.\r\n * @public\r\n */\r\nexport enum PropertyValueFormat {\r\n /** Primitive value */\r\n Primitive = \"Primitive\",\r\n /** Array value */\r\n Array = \"Array\",\r\n /** Struct value */\r\n Struct = \"Struct\",\r\n}\r\n\r\n/**\r\n * Data structure for base content field type description. Not\r\n * meant to be used directly, see `TypeDescription`.\r\n *\r\n * @public\r\n */\r\nexport interface BaseTypeDescription {\r\n /** Value format */\r\n valueFormat: PropertyValueFormat;\r\n /** Type name */\r\n typeName: string;\r\n}\r\n\r\n/**\r\n * Type description for primitive properties.\r\n * @public\r\n */\r\nexport interface PrimitiveTypeDescription extends BaseTypeDescription {\r\n /** Primitive format */\r\n valueFormat: PropertyValueFormat.Primitive;\r\n}\r\n\r\n/**\r\n * Type description for array properties.\r\n * @public\r\n */\r\nexport interface ArrayTypeDescription extends BaseTypeDescription {\r\n /** Array format */\r\n valueFormat: PropertyValueFormat.Array;\r\n /** Type of array items */\r\n memberType: TypeDescription;\r\n}\r\n\r\n/**\r\n * A data structure that describes a struct member.\r\n * @public\r\n */\r\nexport interface StructFieldMemberDescription {\r\n /** Unique name of a struct member */\r\n name: string;\r\n /** Label of the struct member */\r\n label: string;\r\n /** Type of the struct member */\r\n type: TypeDescription;\r\n}\r\n\r\n/**\r\n * Type description for struct properties.\r\n * @public\r\n */\r\nexport interface StructTypeDescription extends BaseTypeDescription {\r\n /** Struct format */\r\n valueFormat: PropertyValueFormat.Struct;\r\n /** Type descriptions of struct members */\r\n members: StructFieldMemberDescription[];\r\n}\r\n\r\n/**\r\n * One of content field type descriptions.\r\n * @public\r\n */\r\nexport type TypeDescription = PrimitiveTypeDescription | ArrayTypeDescription | StructTypeDescription;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAYH,cAAc;AACd,2DAA2D;AAC3D,IAAiB,KAAK,CA8BrB;AA9BD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CA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AAC,CAAC,MAAM,KAAK,CAAC;YACb,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC,CAAwB,CAAC,WAAW,KAAK,SAAS;gBACrD,CAAC,CAAC,CAAC,CAAwB,CAAC,MAAM,KAAK,SAAS;gBAChD,CAAC,CAAC,CAAC,CAAwB,CAAC,aAAa,KAAK,SAAS;gBACvD,CAAC,CAAC,CAAC,CAAwB,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,CAAuB;IAC3C,+GAA+G;IAC/G,sDAAsD;IACtD,OAAO,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AACD,SAAS,UAAU,CAAC,CAAuB;IACzC,OAAO,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC;AACD,SAAS,gBAAgB,CAAC,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { InstanceId, InstanceKey } from \"../EC.js\";\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { ValuesDictionary } from \"../Utils.js\";\n\n/**\n * Raw value type\n * @public\n */\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace Value {\n /** Is the value a primitive */\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: Value): value is ValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: Value): value is ValuesMap {\n return isMapValue(value);\n }\n\n /** Is the value a nested content value */\n export function isNestedContent(value: Value): value is NestedContentValue[] {\n return isNestedContentValue(value);\n }\n\n /** Is the value a navigation value */\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\n return (\n value !== undefined &&\n (value as NavigationPropertyValue).id !== undefined &&\n (value as NavigationPropertyValue).className !== undefined &&\n (value as NavigationPropertyValue).label !== undefined\n );\n }\n}\n\n/**\n * A map of raw values\n * @public\n */\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of raw values\n * @public\n */\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Display value type.\n * @public\n */\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace DisplayValue {\n /** Is the value a primitive */\n export function isPrimitive(value: DisplayValue): value is string | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\n return isMapValue(value);\n }\n}\n\n/**\n * A map of display values\n * @public\n */\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of display values\n * @public\n */\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Data structure that describes nested content value.\n * @public\n */\nexport interface NestedContentValue {\n /** Keys of instances whose content is contained in this value */\n primaryKeys: InstanceKey[];\n /** Content values map */\n values: ValuesDictionary<Value>;\n /** Content display values map */\n displayValues: ValuesDictionary<DisplayValue>;\n /** Names of fields whose values are merged */\n mergedFieldNames: string[];\n /**\n * Label of the ECInstance that this `NestedContentValue` is based on.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[label]] instead.\n */\n labelDefinition?: LabelDefinition;\n label?: LabelDefinition;\n}\n\n/**\n * Data structure that describes value of the navigation property.\n * @public\n */\nexport interface NavigationPropertyValue {\n /** Label of target instance. */\n label: LabelDefinition;\n /** Full class name of target instance in format `SchemaName:ClassName` */\n className: string;\n /** Id of target instance. */\n id: InstanceId;\n}\n\n/**\n * A group of raw values and their common display value.\n * @public\n */\nexport interface DisplayValueGroup {\n /** Common display value for all grouped raw values */\n displayValue: DisplayValue;\n /** A list of grouped raw values */\n groupedRawValues: Value[];\n}\n\nfunction isNestedContentValue(v: Value): v is NestedContentValue[] {\n return (\n v !== undefined &&\n Array.isArray(v) &&\n (v.length === 0 ||\n (!!v[0] &&\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\n (v[0] as NestedContentValue).values !== undefined &&\n (v[0] as NestedContentValue).displayValues !== undefined &&\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\n );\n}\n\nfunction isArrayValue(v: Value | DisplayValue): v is ValuesArray | DisplayValuesArray {\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\n // we have other means to determine the type of value.\n return v !== undefined && Array.isArray(v);\n}\nfunction isMapValue(v: Value | DisplayValue): v is ValuesMap | DisplayValuesMap {\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\n}\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\n return !isArrayValue(v) && !isMapValue(v);\n}\n"]}
1
+ {"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAYH,cAAc;AACd,2DAA2D;AAC3D,IAAiB,KAAK,CA8BrB;A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KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,kBAAK,QAEpB,CAAA;AACH,CAAC,EAfgB,YAAY,4BAAZ,YAAY,QAe5B;AA2DD,SAAS,oBAAoB,CAAC,CAAQ;IACpC,OAAO,CACL,CAAC,KAAK,SAAS;QACf,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;YACb,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC,CAAwB,CAAC,WAAW,KAAK,SAAS;gBACrD,CAAC,CAAC,CAAC,CAAwB,CAAC,MAAM,KAAK,SAAS;gBAChD,CAAC,CAAC,CAAC,CAAwB,CAAC,aAAa,KAAK,SAAS;gBACvD,CAAC,CAAC,CAAC,CAAwB,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,CAAuB;IAC3C,+GAA+G;IAC/G,sDAAsD;IACtD,OAAO,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AACD,SAAS,UAAU,CAAC,CAAuB;IACzC,OAAO,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC;AACD,SAAS,gBAAgB,CAAC,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { InstanceId, InstanceKey } from \"../EC.js\";\r\nimport { LabelDefinition } from \"../LabelDefinition.js\";\r\nimport { ValuesDictionary } from \"../Utils.js\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace Value {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /** Is the value a navigation value */\r\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\r\n return (\r\n value !== undefined &&\r\n (value as NavigationPropertyValue).id !== undefined &&\r\n (value as NavigationPropertyValue).className !== undefined &&\r\n (value as NavigationPropertyValue).label !== undefined\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace DisplayValue {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n /**\r\n * Label of the ECInstance that this `NestedContentValue` is based on.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[label]] instead.\r\n */\r\n labelDefinition?: LabelDefinition;\r\n label?: LabelDefinition;\r\n}\r\n\r\n/**\r\n * Data structure that describes value of the navigation property.\r\n * @public\r\n */\r\nexport interface NavigationPropertyValue {\r\n /** Label of target instance. */\r\n label: LabelDefinition;\r\n /** Full class name of target instance in format `SchemaName:ClassName` */\r\n className: string;\r\n /** Id of target instance. */\r\n id: InstanceId;\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\nfunction isNestedContentValue(v: Value): v is NestedContentValue[] {\r\n return (\r\n v !== undefined &&\r\n Array.isArray(v) &&\r\n (v.length === 0 ||\r\n (!!v[0] &&\r\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\r\n (v[0] as NestedContentValue).values !== undefined &&\r\n (v[0] as NestedContentValue).displayValues !== undefined &&\r\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\r\n );\r\n}\r\n\r\nfunction isArrayValue(v: Value | DisplayValue): v is ValuesArray | DisplayValuesArray {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return v !== undefined && Array.isArray(v);\r\n}\r\nfunction isMapValue(v: Value | DisplayValue): v is ValuesMap | DisplayValuesMap {\r\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG","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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module Hierarchies\n */\n\nimport { Node } from \"./Node.js\";\n\n/**\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface HierarchyLevel {\n /** A list of nodes in a hierarchy level. */\n nodes: Node[];\n /**\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\n */\n supportsFiltering?: boolean;\n}\n"]}
1
+ {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { Node } from \"./Node.js\";\r\n\r\n/**\r\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface HierarchyLevel {\r\n /** A list of nodes in a hierarchy level. */\r\n nodes: Node[];\r\n /**\r\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n */\r\n supportsFiltering?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG;;;AAEH,sDAAyD;AACzD,oCAAuC;AAEvC;;;;;GAKG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AASD;;;;GAIG;AACH,2DAA2D;AAC3D,IAAiB,OAAO,CAoFvB;AApFD,WAAiB,OAAO;IACtB,8DAA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,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;QAClF,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,IAAA,qBAAM,EAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAhDe,cAAM,SAgDrB,CAAA;AACH,CAAC,EApFgB,OAAO,uBAAP,OAAO,QAoFvB","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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module Hierarchies\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { InstanceKey } from \"../EC.js\";\n\n/**\n * Standard node types\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport enum StandardNodeTypes {\n ECInstancesNode = \"ECInstancesNode\",\n ECClassGroupingNode = \"ECClassGroupingNode\",\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\n}\n\n/**\n * One of the node key types\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\n/**\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace NodeKey {\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey {\n return key.type === StandardNodeTypes.ECInstancesNode;\n }\n\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey {\n return key.type === StandardNodeTypes.ECClassGroupingNode;\n }\n\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey {\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\n }\n\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey {\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\n }\n\n /** Checks if the supplied key is a grouping node key */\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey {\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\n }\n\n /**\n * Checks if two given node keys are equal, taking their versions into account.\n *\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\n * which is the most accurate way of checking equality. However, when version are different,\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\n * label, grouping class, property name, etc.).\n */\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\n // types must always be equal\n if (lhs.type !== rhs.type) {\n return false;\n }\n\n // `pathFromRoot` lengths must always be equal\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length) {\n return false;\n }\n\n // when versions are equal, compare using contents of `pathFromRoot` array\n if (lhs.version === rhs.version) {\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i]) {\n return false;\n }\n }\n return true;\n }\n\n // when versions aren't equal, compare using other key information, because key hashes\n // of different key versions can't be compared\n if (isInstancesNodeKey(lhs)) {\n assert(isInstancesNodeKey(rhs));\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\n return false;\n }\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i])) {\n return false;\n }\n }\n return true;\n }\n if (isClassGroupingNodeKey(lhs)) {\n assert(isClassGroupingNodeKey(rhs));\n return lhs.className === rhs.className;\n }\n if (isPropertyGroupingNodeKey(lhs)) {\n assert(isPropertyGroupingNodeKey(rhs));\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\n }\n if (isLabelGroupingNodeKey(lhs)) {\n assert(isLabelGroupingNodeKey(rhs));\n return lhs.label === rhs.label;\n }\n return true;\n }\n}\n\n/**\n * Node key path. Can be used to define path from one node to another.\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport type NodeKeyPath = NodeKey[];\n\n/**\n * Data structure that describes a basic node key\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface BaseNodeKey {\n /** Node type */\n type: string;\n\n /**\n * Version of the key. Different versions suggest that node keys were created by two different\n * versions of the library. In that case, keys representing the same node may be different.\n */\n version: number;\n\n /** Node hash path from root to the node whose key this is */\n pathFromRoot: string[];\n\n /** Query that returns all selected instance keys */\n instanceKeysSelectQuery?: PresentationQuery;\n}\n\n/**\n * Data structure that describes a node ECInstance node key\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface ECInstancesNodeKey extends BaseNodeKey {\n type: StandardNodeTypes.ECInstancesNode;\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\n instanceKeys: InstanceKey[];\n}\n\n/**\n * Data structure that describes a grouping node key\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface GroupingNodeKey extends BaseNodeKey {\n /**\n * Get the number of instances grouped by the node represented\n * by this key.\n *\n * **Note:** this property is just a helper and is not involved\n * in identifying a node.\n */\n groupedInstancesCount: number;\n}\n\n/**\n * Data structure that describes an ECClass grouping node key\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\n type: StandardNodeTypes.ECClassGroupingNode;\n /** Full name of the grouping ECClass */\n className: string;\n}\n\n/**\n * Data structure that describes an ECProperty grouping node key\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\n type: StandardNodeTypes.ECPropertyGroupingNode;\n /** Full name of the grouping ECProperty class */\n className: string;\n /** Name of the ECProperty */\n propertyName: string;\n /** Raw grouping values */\n groupingValues: any[];\n}\n\n/**\n * Data structure that describes a display label grouping node key\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\n type: StandardNodeTypes.DisplayLabelGroupingNode;\n /** Grouping display label */\n label: string;\n}\n\n/**\n * Data structure that describes a presentation query\n * @public\n */\nexport interface PresentationQuery {\n /** ECSQL query */\n query: string;\n /** The query bindings */\n bindings?: PresentationQueryBinding[];\n}\n\n/**\n * Defines an [[Id64String]] value binding.\n * @public\n */\nexport interface IdBinding {\n type: \"Id\";\n value: Id64String;\n}\n\n/**\n * Defines an [[IdSet]] value binding for use with `InVirtualSet` ECSQL function.\n * @public\n */\nexport interface IdSetBinding {\n type: \"IdSet\";\n value: Id64String[];\n}\n\n/**\n * Defines an EC value binding.\n * @public\n */\nexport interface ECValueBinding {\n type: \"ECValue\";\n valueType: string;\n valueTypeExtended?: string;\n value: any;\n}\n\n/**\n * Defines a binding for a list of EC values for use with `InVirtualSet` ECSQL function.\n * @public\n */\nexport interface ECValueSetBinding {\n type: \"ValueSet\";\n valueType: string;\n valueTypeExtended?: string;\n value: any[];\n}\n\n/**\n * One of the [[PresentationQuery]] binding types.\n * @public\n */\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\n"]}
1
+ {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG;;;AAEH,sDAAyD;AACzD,oCAAuC;AAEvC;;;;;GAKG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AASD;;;;GAIG;AACH,2DAA2D;AAC3D,IAAiB,OAAO,CAoFvB;AApFD,WAAiB,OAAO;IACtB,8DAA8D;IAC9D,SAAgB,kBAAkB,CAAC,GAAY;QAC7C,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,eAAe,CAAC;IACxD,CAAC;IAFe,0BA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AAA,qBAAM,EAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;QACjC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAhDe,cAAM,SAgDrB,CAAA;AACH,CAAC,EApFgB,OAAO,uBAAP,OAAO,QAoFvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { InstanceKey } from \"../EC.js\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/**\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace NodeKey {\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type) {\r\n return false;\r\n }\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length) {\r\n return false;\r\n }\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n\r\n /** Query that returns all selected instance keys */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes a presentation query\r\n * @public\r\n */\r\nexport interface PresentationQuery {\r\n /** ECSQL query */\r\n query: string;\r\n /** The query bindings */\r\n bindings?: PresentationQueryBinding[];\r\n}\r\n\r\n/**\r\n * Defines an [[Id64String]] value binding.\r\n * @public\r\n */\r\nexport interface IdBinding {\r\n type: \"Id\";\r\n value: Id64String;\r\n}\r\n\r\n/**\r\n * Defines an [[IdSet]] value binding for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface IdSetBinding {\r\n type: \"IdSet\";\r\n value: Id64String[];\r\n}\r\n\r\n/**\r\n * Defines an EC value binding.\r\n * @public\r\n */\r\nexport interface ECValueBinding {\r\n type: \"ECValue\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any;\r\n}\r\n\r\n/**\r\n * Defines a binding for a list of EC values for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface ECValueSetBinding {\r\n type: \"ValueSet\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any[];\r\n}\r\n\r\n/**\r\n * One of the [[PresentationQuery]] binding types.\r\n * @public\r\n */\r\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG","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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module Hierarchies\n */\n\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { NodeKey } from \"./Key.js\";\n\n/**\n * Data structure that describes a tree node.\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface Node {\n /** A key that uniquely identifies a node. */\n key: NodeKey;\n /** Definition of node display label */\n label: LabelDefinition;\n /** Extensive description */\n description?: string;\n /**\n * Image ID\n * @deprecated in 3.3.0 - might be removed in next major version. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. Will\n * be removed with [[PropertyGroup.imageId]] and [[PropertyRangeGroupSpecification.imageId]].\n */\n imageId?: string;\n /** Does this node have child nodes */\n hasChildren?: boolean;\n /** Is this node selectable */\n isSelectionDisabled?: boolean;\n /** Is this node editable */\n isEditable?: boolean;\n /** Is this node expanded */\n isExpanded?: boolean;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\n */\n supportsFiltering?: boolean;\n /** Extended data injected into this node */\n extendedData?: {\n [key: string]: any;\n };\n}\n\n/**\n * Partial node definition.\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\n\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\n"]}
1
+ {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { LabelDefinition } from \"../LabelDefinition.js\";\r\nimport { NodeKey } from \"./Key.js\";\r\n\r\n/**\r\n * Data structure that describes a tree node.\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface Node {\r\n /** A key that uniquely identifies a node. */\r\n key: NodeKey;\r\n /** Definition of node display label */\r\n label: LabelDefinition;\r\n /** Extensive description */\r\n description?: string;\r\n /**\r\n * Image ID\r\n * @deprecated in 3.3.0 - might be removed in next major version. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. Will\r\n * be removed with [[PropertyGroup.imageId]] and [[PropertyRangeGroupSpecification.imageId]].\r\n */\r\n imageId?: string;\r\n /** Does this node have child nodes */\r\n hasChildren?: boolean;\r\n /** Is this node selectable */\r\n isSelectionDisabled?: boolean;\r\n /** Is this node editable */\r\n isEditable?: boolean;\r\n /** Is this node expanded */\r\n isExpanded?: boolean;\r\n /**\r\n * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n */\r\n supportsFiltering?: boolean;\r\n /** Extended data injected into this node */\r\n extendedData?: {\r\n [key: string]: any;\r\n };\r\n}\r\n\r\n/**\r\n * Partial node definition.\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\r\n\r\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NodePathElement.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG","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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module Hierarchies\n */\n\nimport { Node } from \"./Node.js\";\n\n/**\n * Describes a single step in the nodes path.\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface NodePathElement {\n /** Node instance */\n node: Node;\n /** Node index */\n index: number;\n /** Is this element part of the marked path */\n isMarked?: boolean;\n /** Child path elements */\n children: NodePathElement[];\n /** Additional filtering-related information */\n filteringData?: NodePathFilteringData;\n}\n\n/**\n * Data related to node hierarchy filtering\n * @public\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\n * package for creating hierarchies.\n */\nexport interface NodePathFilteringData {\n /** Number of filter matches in the current element */\n matchesCount: number;\n /** Number of filter matches in the current element's children (recursively) */\n childMatchesCount: number;\n}\n"]}
1
+ {"version":3,"file":"NodePathElement.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { Node } from \"./Node.js\";\r\n\r\n/**\r\n * Describes a single step in the nodes path.\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface NodePathElement {\r\n /** Node instance */\r\n node: Node;\r\n /** Node index */\r\n index: number;\r\n /** Is this element part of the marked path */\r\n isMarked?: boolean;\r\n /** Child path elements */\r\n children: NodePathElement[];\r\n /** Additional filtering-related information */\r\n filteringData?: NodePathFilteringData;\r\n}\r\n\r\n/**\r\n * Data related to node hierarchy filtering\r\n * @public\r\n * @deprecated in 5.2 - will not be removed until after 2026-10-01. Use the new [@itwin/presentation-hierarchies](https://github.com/iTwin/presentation/blob/master/packages/hierarchies/README.md)\r\n * package for creating hierarchies.\r\n */\r\nexport interface NodePathFilteringData {\r\n /** Number of filter matches in the current element */\r\n matchesCount: number;\r\n /** Number of filter matches in the current element's children (recursively) */\r\n childMatchesCount: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ClassSpecifications.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/ClassSpecifications.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\n/**\n * This specification is used to point to specific ECClass.\n *\n * @see [Single schema class specification reference documentation page]($docs/presentation/SingleSchemaClassSpecification.md)\n * @public\n */\nexport interface SingleSchemaClassSpecification {\n /**\n * Specifies name of the schema which contains the target class.\n *\n * @pattern ^[\\w\\d]+$\n */\n schemaName: string;\n\n /**\n * Specifies name of the target class.\n *\n * @pattern ^[\\w\\d]+$\n */\n className: string;\n}\n\n/**\n * This specification lists ECClasses which should be targeted when creating content or hierarchy nodes.\n *\n * @see [Multi schema classes specification reference documentation page]($docs/presentation/MultiSchemaClassesSpecification.md)\n * @public\n */\nexport interface MultiSchemaClassesSpecification {\n /**\n * Specifies the schema which contains the target classes.\n *\n * @pattern ^[\\w\\d]+$\n */\n schemaName: string;\n\n /**\n * An array of target ECClass names.\n */\n classNames: string[];\n\n /**\n * Defines whether the derived ECClasses should be included in the result.\n */\n arePolymorphic?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ClassSpecifications.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/ClassSpecifications.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\n/**\r\n * This specification is used to point to specific ECClass.\r\n *\r\n * @see [Single schema class specification reference documentation page]($docs/presentation/SingleSchemaClassSpecification.md)\r\n * @public\r\n */\r\nexport interface SingleSchemaClassSpecification {\r\n /**\r\n * Specifies name of the schema which contains the target class.\r\n *\r\n * @pattern ^[\\w\\d]+$\r\n */\r\n schemaName: string;\r\n\r\n /**\r\n * Specifies name of the target class.\r\n *\r\n * @pattern ^[\\w\\d]+$\r\n */\r\n className: string;\r\n}\r\n\r\n/**\r\n * This specification lists ECClasses which should be targeted when creating content or hierarchy nodes.\r\n *\r\n * @see [Multi schema classes specification reference documentation page]($docs/presentation/MultiSchemaClassesSpecification.md)\r\n * @public\r\n */\r\nexport interface MultiSchemaClassesSpecification {\r\n /**\r\n * Specifies the schema which contains the target classes.\r\n *\r\n * @pattern ^[\\w\\d]+$\r\n */\r\n schemaName: string;\r\n\r\n /**\r\n * An array of target ECClass names.\r\n */\r\n classNames: string[];\r\n\r\n /**\r\n * Defines whether the derived ECClasses should be included in the result.\r\n */\r\n arePolymorphic?: boolean;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RelatedInstanceSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelatedInstanceSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { SingleSchemaClassSpecification } from \"./ClassSpecifications.js\";\nimport { RelationshipPathSpecification } from \"./RelationshipPathSpecification.js\";\n\n/**\n * Defines base attributes for [[RelatedInstanceByPathSpecification]] and [[RelatedInstanceByTargetInstancesSpecification]].\n * @public\n */\nexport interface RelatedInstanceSpecificationBase {\n /**\n * Specifies an an alias that given to the related instance. The alias can be used to reference the\n * instance in instance filter and customization rules.\n *\n * @pattern ^\\w[\\w\\d]*$\n */\n alias: string;\n\n /**\n * Specifies whether to omit the primary instance from the result if the other end of [[relationshipPath]]\n * does not yield any related instances.\n */\n isRequired?: boolean;\n}\n\n/**\n * A type of [[RelatedInstanceSpecification]] that joins related instances by a relationship path.\n * @public\n */\nexport interface RelatedInstanceByPathSpecification extends RelatedInstanceSpecificationBase {\n /**\n * Specifies a chain of [relationship path specifications]($docs/presentation/RelationshipPathSpecification.md)\n * that forms a path from the primary instance to the related instances.\n */\n relationshipPath: RelationshipPathSpecification;\n}\n\n/**\n * A type of [[RelatedInstanceSpecification]] that joins related instances by target class and instance IDs.\n * @public\n */\nexport interface RelatedInstanceByTargetInstancesSpecification extends RelatedInstanceSpecificationBase {\n /**\n * Specifies target class and a list of target ECInstance IDs.\n */\n targetInstances: {\n /** Specification for the target class to join. */\n class: SingleSchemaClassSpecification;\n /** Ids of the target instances to join. */\n instanceIds: Id64String[];\n };\n}\n\n/**\n * Related instance specification is used in [content]($docs/presentation/content/ContentRule.md#attribute-specifications)\n * and [hierarchy]($docs/presentation/hierarchies/ChildNodeRule.md#attribute-specifications) specifications to \"join\" the\n * primary instance with its related instance and allow using the related instance for filtering, customization and grouping.\n *\n * @see [Related instance specification reference documentation page]($docs/presentation/RelatedInstanceSpecification.md)\n * @public\n */\nexport type RelatedInstanceSpecification = RelatedInstanceByPathSpecification | RelatedInstanceByTargetInstancesSpecification;\n"]}
1
+ {"version":3,"file":"RelatedInstanceSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelatedInstanceSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { SingleSchemaClassSpecification } from \"./ClassSpecifications.js\";\r\nimport { RelationshipPathSpecification } from \"./RelationshipPathSpecification.js\";\r\n\r\n/**\r\n * Defines base attributes for [[RelatedInstanceByPathSpecification]] and [[RelatedInstanceByTargetInstancesSpecification]].\r\n * @public\r\n */\r\nexport interface RelatedInstanceSpecificationBase {\r\n /**\r\n * Specifies an an alias that given to the related instance. The alias can be used to reference the\r\n * instance in instance filter and customization rules.\r\n *\r\n * @pattern ^\\w[\\w\\d]*$\r\n */\r\n alias: string;\r\n\r\n /**\r\n * Specifies whether to omit the primary instance from the result if the other end of [[relationshipPath]]\r\n * does not yield any related instances.\r\n */\r\n isRequired?: boolean;\r\n}\r\n\r\n/**\r\n * A type of [[RelatedInstanceSpecification]] that joins related instances by a relationship path.\r\n * @public\r\n */\r\nexport interface RelatedInstanceByPathSpecification extends RelatedInstanceSpecificationBase {\r\n /**\r\n * Specifies a chain of [relationship path specifications]($docs/presentation/RelationshipPathSpecification.md)\r\n * that forms a path from the primary instance to the related instances.\r\n */\r\n relationshipPath: RelationshipPathSpecification;\r\n}\r\n\r\n/**\r\n * A type of [[RelatedInstanceSpecification]] that joins related instances by target class and instance IDs.\r\n * @public\r\n */\r\nexport interface RelatedInstanceByTargetInstancesSpecification extends RelatedInstanceSpecificationBase {\r\n /**\r\n * Specifies target class and a list of target ECInstance IDs.\r\n */\r\n targetInstances: {\r\n /** Specification for the target class to join. */\r\n class: SingleSchemaClassSpecification;\r\n /** Ids of the target instances to join. */\r\n instanceIds: Id64String[];\r\n };\r\n}\r\n\r\n/**\r\n * Related instance specification is used in [content]($docs/presentation/content/ContentRule.md#attribute-specifications)\r\n * and [hierarchy]($docs/presentation/hierarchies/ChildNodeRule.md#attribute-specifications) specifications to \"join\" the\r\n * primary instance with its related instance and allow using the related instance for filtering, customization and grouping.\r\n *\r\n * @see [Related instance specification reference documentation page]($docs/presentation/RelatedInstanceSpecification.md)\r\n * @public\r\n */\r\nexport type RelatedInstanceSpecification = RelatedInstanceByPathSpecification | RelatedInstanceByTargetInstancesSpecification;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipDirection.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipDirection.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,iEAAiE;IACjE,4CAAmB,CAAA;IACnB,kEAAkE;IAClE,8CAAqB,CAAA;AACvB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\n/**\n * Defines direction of a relationship that should be followed\n * @public\n */\nexport enum RelationshipDirection {\n /** Relationship should be followed only in forward direction. */\n Forward = \"Forward\",\n /** Relationship should be followed only in backward direction. */\n Backward = \"Backward\",\n}\n"]}
1
+ {"version":3,"file":"RelationshipDirection.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipDirection.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,iEAAiE;IACjE,4CAAmB,CAAA;IACnB,kEAAkE;IAClE,8CAAqB,CAAA;AACvB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\n/**\r\n * Defines direction of a relationship that should be followed\r\n * @public\r\n */\r\nexport enum RelationshipDirection {\r\n /** Relationship should be followed only in forward direction. */\r\n Forward = \"Forward\",\r\n /** Relationship should be followed only in backward direction. */\r\n Backward = \"Backward\",\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RelationshipPathSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipPathSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { SingleSchemaClassSpecification } from \"./ClassSpecifications.js\";\nimport { RelationshipDirection } from \"./RelationshipDirection.js\";\n\n/**\n * Specification of a single step in [[RelationshipPathSpecification]].\n *\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\n * @public\n */\nexport interface RelationshipStepSpecification {\n /** This attribute specifies the ECRelationship that should be used to traverse to target class. */\n relationship: SingleSchemaClassSpecification;\n\n /**\n * This attribute specifies the direction in which the [[relationship]] should be followed.\n * @see RelationshipDirection\n */\n direction: `${RelationshipDirection}`;\n\n /**\n * This attribute may be used to specialize the target of the relationship.\n */\n targetClass?: SingleSchemaClassSpecification;\n}\n\n/**\n * Specification of a single step in [[RepeatableRelationshipPathSpecification]].\n *\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\n * @public\n */\nexport interface RepeatableRelationshipStepSpecification extends RelationshipStepSpecification {\n /**\n * When a number is specified, the relationship is traversed recursively the specified number of times.\n *\n * When it is set to a special value `\"*\"`, the same relationship is traversed recursively unbounded number\n * of times, starting from zero (the relationship is not followed). On each traversal iteration, Presentation\n * rules engine accumulates all indirectly related ECInstances as defined by the remaining relationship path.\n */\n count?: number | \"*\";\n}\n\n/**\n * Relationship path specification is used to define a relationship path to an ECClass.\n *\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\n * @public\n */\nexport type RelationshipPathSpecification = RelationshipStepSpecification | RelationshipStepSpecification[];\n\n/**\n * This specification declares a step in a relationship path between a source and target ECInstances. A step\n * can optionally be repeated a number of times to traverse the same relationship recursively. Multiple\n * specifications of this type can be chained together to express complex indirect relationships.\n *\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\n * @public\n */\nexport type RepeatableRelationshipPathSpecification = RepeatableRelationshipStepSpecification | RepeatableRelationshipStepSpecification[];\n"]}
1
+ {"version":3,"file":"RelationshipPathSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/RelationshipPathSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { SingleSchemaClassSpecification } from \"./ClassSpecifications.js\";\r\nimport { RelationshipDirection } from \"./RelationshipDirection.js\";\r\n\r\n/**\r\n * Specification of a single step in [[RelationshipPathSpecification]].\r\n *\r\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport interface RelationshipStepSpecification {\r\n /** This attribute specifies the ECRelationship that should be used to traverse to target class. */\r\n relationship: SingleSchemaClassSpecification;\r\n\r\n /**\r\n * This attribute specifies the direction in which the [[relationship]] should be followed.\r\n * @see RelationshipDirection\r\n */\r\n direction: `${RelationshipDirection}`;\r\n\r\n /**\r\n * This attribute may be used to specialize the target of the relationship.\r\n */\r\n targetClass?: SingleSchemaClassSpecification;\r\n}\r\n\r\n/**\r\n * Specification of a single step in [[RepeatableRelationshipPathSpecification]].\r\n *\r\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport interface RepeatableRelationshipStepSpecification extends RelationshipStepSpecification {\r\n /**\r\n * When a number is specified, the relationship is traversed recursively the specified number of times.\r\n *\r\n * When it is set to a special value `\"*\"`, the same relationship is traversed recursively unbounded number\r\n * of times, starting from zero (the relationship is not followed). On each traversal iteration, Presentation\r\n * rules engine accumulates all indirectly related ECInstances as defined by the remaining relationship path.\r\n */\r\n count?: number | \"*\";\r\n}\r\n\r\n/**\r\n * Relationship path specification is used to define a relationship path to an ECClass.\r\n *\r\n * @see [Relationship path specification reference documentation page]($docs/presentation/RelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport type RelationshipPathSpecification = RelationshipStepSpecification | RelationshipStepSpecification[];\r\n\r\n/**\r\n * This specification declares a step in a relationship path between a source and target ECInstances. A step\r\n * can optionally be repeated a number of times to traverse the same relationship recursively. Multiple\r\n * specifications of this type can be chained together to express complex indirect relationships.\r\n *\r\n * @see [Repeatable relationship path specification reference documentation page]($docs/presentation/RepeatableRelationshipPathSpecification.md)\r\n * @public\r\n */\r\nexport type RepeatableRelationshipPathSpecification = RepeatableRelationshipStepSpecification | RepeatableRelationshipStepSpecification[];\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Rule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG;;;AA8CH;;;GAGG;AACH,IAAY,SAqBX;AArBD,WAAY,SAAS;IACnB,kBAAkB;IAClB,oCAAuB,CAAA;IACvB,sCAAyB,CAAA;IAEzB,gBAAgB;IAChB,gCAAmB,CAAA;IACnB,gDAAmC,CAAA;IACnC,gFAAmE,CAAA;IAEnE,sBAAsB;IACtB,kCAAqB,CAAA;IACrB,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,4DAA+C,CAAA;IAC/C,4CAA+B,CAAA;IAC/B,kCAAqB,CAAA;IACrB,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,0CAA6B,CAAA;AAC/B,CAAC,EArBW,SAAS,yBAAT,SAAS,QAqBpB","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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { ContentRule } from \"./content/ContentRule.js\";\nimport { DefaultPropertyCategoryOverride } from \"./content/DefaultPropertyCategoryOverride.js\";\nimport { ContentModifier } from \"./content/modifiers/ContentModifier.js\";\nimport { CustomizationRule } from \"./customization/CustomizationRule.js\";\nimport { NavigationRule } from \"./hierarchy/NavigationRule.js\";\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification.js\";\n\n/**\n * Base interface for all [[Rule]] implementations.\n * @public\n */\nexport interface RuleBase {\n /**\n * Used for serializing to JSON.\n * @see RuleTypes\n */\n ruleType: `${RuleTypes}`;\n\n /**\n * Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\n * equal, the rules are handled in the order they're defined.\n *\n * @type integer\n */\n priority?: number;\n\n /**\n * Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\n * priorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.\n */\n onlyIfNotHandled?: boolean;\n\n /**\n * A list of [ECSchema requirements]($docs/presentation/RequiredSchemaSpecification.md) that need to be met for the rule to be used.\n */\n requiredSchemas?: RequiredSchemaSpecification[];\n}\n\n/**\n * A union of all presentation rule types.\n * @public\n */\nexport declare type Rule = CustomizationRule | NavigationRule | ContentRule | ContentModifier | DefaultPropertyCategoryOverride;\n\n/**\n * Used for serializing [[Rule]] objects to JSON.\n * @public\n */\nexport enum RuleTypes {\n // hierarchy rules\n RootNodes = \"RootNodes\",\n ChildNodes = \"ChildNodes\",\n\n // content rules\n Content = \"Content\",\n ContentModifier = \"ContentModifier\", // eslint-disable-line @typescript-eslint/no-shadow\n DefaultPropertyCategoryOverride = \"DefaultPropertyCategoryOverride\", // eslint-disable-line @typescript-eslint/no-shadow\n\n // customization rules\n Grouping = \"Grouping\",\n PropertySorting = \"PropertySorting\",\n DisabledSorting = \"DisabledSorting\",\n NodeArtifacts = \"NodeArtifacts\",\n InstanceLabelOverride = \"InstanceLabelOverride\",\n LabelOverride = \"LabelOverride\",\n CheckBox = \"CheckBox\",\n ImageIdOverride = \"ImageIdOverride\",\n StyleOverride = \"StyleOverride\",\n ExtendedData = \"ExtendedData\",\n}\n"]}
1
+ {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Rule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;GAEG;;;AA8CH;;;GAGG;AACH,IAAY,SAqBX;AArBD,WAAY,SAAS;IACnB,kBAAkB;IAClB,oCAAuB,CAAA;IACvB,sCAAyB,CAAA;IAEzB,gBAAgB;IAChB,gCAAmB,CAAA;IACnB,gDAAmC,CAAA;IACnC,gFAAmE,CAAA;IAEnE,sBAAsB;IACtB,kCAAqB,CAAA;IACrB,gDAAmC,CAAA;IACnC,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,4DAA+C,CAAA;IAC/C,4CAA+B,CAAA;IAC/B,kCAAqB,CAAA;IACrB,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,0CAA6B,CAAA;AAC/B,CAAC,EArBW,SAAS,yBAAT,SAAS,QAqBpB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { ContentRule } from \"./content/ContentRule.js\";\r\nimport { DefaultPropertyCategoryOverride } from \"./content/DefaultPropertyCategoryOverride.js\";\r\nimport { ContentModifier } from \"./content/modifiers/ContentModifier.js\";\r\nimport { CustomizationRule } from \"./customization/CustomizationRule.js\";\r\nimport { NavigationRule } from \"./hierarchy/NavigationRule.js\";\r\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification.js\";\r\n\r\n/**\r\n * Base interface for all [[Rule]] implementations.\r\n * @public\r\n */\r\nexport interface RuleBase {\r\n /**\r\n * Used for serializing to JSON.\r\n * @see RuleTypes\r\n */\r\n ruleType: `${RuleTypes}`;\r\n\r\n /**\r\n * Defines the order in which rules are handled, higher number means the rule is handled first. If priorities are\r\n * equal, the rules are handled in the order they're defined.\r\n *\r\n * @type integer\r\n */\r\n priority?: number;\r\n\r\n /**\r\n * Tells the library that the rule should only be handled if no other rule of the same type was handled previously (based on rule\r\n * priorities and definition order). This allows adding fallback rules which can be overriden by higher-priority rules.\r\n */\r\n onlyIfNotHandled?: boolean;\r\n\r\n /**\r\n * A list of [ECSchema requirements]($docs/presentation/RequiredSchemaSpecification.md) that need to be met for the rule to be used.\r\n */\r\n requiredSchemas?: RequiredSchemaSpecification[];\r\n}\r\n\r\n/**\r\n * A union of all presentation rule types.\r\n * @public\r\n */\r\nexport declare type Rule = CustomizationRule | NavigationRule | ContentRule | ContentModifier | DefaultPropertyCategoryOverride;\r\n\r\n/**\r\n * Used for serializing [[Rule]] objects to JSON.\r\n * @public\r\n */\r\nexport enum RuleTypes {\r\n // hierarchy rules\r\n RootNodes = \"RootNodes\",\r\n ChildNodes = \"ChildNodes\",\r\n\r\n // content rules\r\n Content = \"Content\",\r\n ContentModifier = \"ContentModifier\", // eslint-disable-line @typescript-eslint/no-shadow\r\n DefaultPropertyCategoryOverride = \"DefaultPropertyCategoryOverride\", // eslint-disable-line @typescript-eslint/no-shadow\r\n\r\n // customization rules\r\n Grouping = \"Grouping\",\r\n PropertySorting = \"PropertySorting\",\r\n DisabledSorting = \"DisabledSorting\",\r\n NodeArtifacts = \"NodeArtifacts\",\r\n InstanceLabelOverride = \"InstanceLabelOverride\",\r\n LabelOverride = \"LabelOverride\",\r\n CheckBox = \"CheckBox\",\r\n ImageIdOverride = \"ImageIdOverride\",\r\n StyleOverride = \"StyleOverride\",\r\n ExtendedData = \"ExtendedData\",\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Ruleset.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { Rule } from \"./Rule.js\";\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification.js\";\nimport { VariablesGroup } from \"./Variables.js\";\n\n/**\n * Presentation ruleset is a list of rules that define tree hierarchy and content provided by\n * the presentation library. The ruleset consists of:\n * - Ruleset options\n * - Hierarchy rules:\n * - Root node rules\n * - Child node rules\n * - Content rules for content you see in content controls like property grid and table.\n * - Customization rules used for additional customizations such as styling, labeling, checkboxes, etc.\n * - User-controllable variables.\n *\n * @see [Presentation library documentation page]($docs/presentation/index.md)\n * @public\n */\nexport interface Ruleset {\n /**\n * Ruleset identifier. This ID is used to bind UI components with the specific rule set.\n *\n * @minLength 1\n */\n id: string;\n\n /**\n * Version of the presentation ruleset in SemVer format: `{major}.{minor}.{patch}`.\n *\n * Setting the version is optional, but might be useful when ruleset is persisted\n * somewhere and evolves over time. Having a version helps choose persisting\n * strategy (keep all versions or only latest) and find the latest ruleset from a list\n * of rulesets with the same id.\n *\n * Defaults to `0.0.0`.\n *\n * @pattern ^[\\d]+\\.[\\d]+\\.[\\d]+$\n */\n version?: string;\n\n /**\n * Schema requirements for this ruleset. The ruleset is not used if the requirements are not met.\n */\n requiredSchemas?: RequiredSchemaSpecification[];\n\n /** Supplementation-related information for this ruleset */\n supplementationInfo?: SupplementationInfo;\n\n /** User-controllable variable definitions */\n vars?: VariablesGroup[];\n\n /** Presentation rules used to create hierarchies and content */\n rules: Rule[];\n}\n\n/**\n * Contains supplementation-related information for\n * [supplemental rulesets]($docs/presentation/advanced/RulesetSupplementation.md).\n *\n * @public\n */\nexport interface SupplementationInfo {\n /**\n * Identifies why supplementation is done and uniquely identifies particular supplemental ruleset.\n * There can be only one supplemental rule set with the same [[Ruleset.id]] and [[supplementationPurpose]].\n */\n supplementationPurpose: string;\n}\n"]}
1
+ {"version":3,"file":"Ruleset.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Ruleset.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { Rule } from \"./Rule.js\";\r\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification.js\";\r\nimport { VariablesGroup } from \"./Variables.js\";\r\n\r\n/**\r\n * Presentation ruleset is a list of rules that define tree hierarchy and content provided by\r\n * the presentation library. The ruleset consists of:\r\n * - Ruleset options\r\n * - Hierarchy rules:\r\n * - Root node rules\r\n * - Child node rules\r\n * - Content rules for content you see in content controls like property grid and table.\r\n * - Customization rules used for additional customizations such as styling, labeling, checkboxes, etc.\r\n * - User-controllable variables.\r\n *\r\n * @see [Presentation library documentation page]($docs/presentation/index.md)\r\n * @public\r\n */\r\nexport interface Ruleset {\r\n /**\r\n * Ruleset identifier. This ID is used to bind UI components with the specific rule set.\r\n *\r\n * @minLength 1\r\n */\r\n id: string;\r\n\r\n /**\r\n * Version of the presentation ruleset in SemVer format: `{major}.{minor}.{patch}`.\r\n *\r\n * Setting the version is optional, but might be useful when ruleset is persisted\r\n * somewhere and evolves over time. Having a version helps choose persisting\r\n * strategy (keep all versions or only latest) and find the latest ruleset from a list\r\n * of rulesets with the same id.\r\n *\r\n * Defaults to `0.0.0`.\r\n *\r\n * @pattern ^[\\d]+\\.[\\d]+\\.[\\d]+$\r\n */\r\n version?: string;\r\n\r\n /**\r\n * Schema requirements for this ruleset. The ruleset is not used if the requirements are not met.\r\n */\r\n requiredSchemas?: RequiredSchemaSpecification[];\r\n\r\n /** Supplementation-related information for this ruleset */\r\n supplementationInfo?: SupplementationInfo;\r\n\r\n /** User-controllable variable definitions */\r\n vars?: VariablesGroup[];\r\n\r\n /** Presentation rules used to create hierarchies and content */\r\n rules: Rule[];\r\n}\r\n\r\n/**\r\n * Contains supplementation-related information for\r\n * [supplemental rulesets]($docs/presentation/advanced/RulesetSupplementation.md).\r\n *\r\n * @public\r\n */\r\nexport interface SupplementationInfo {\r\n /**\r\n * Identifies why supplementation is done and uniquely identifies particular supplemental ruleset.\r\n * There can be only one supplemental rule set with the same [[Ruleset.id]] and [[supplementationPurpose]].\r\n */\r\n supplementationPurpose: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SchemasSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/SchemasSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\n/**\n * Specification for a list of ECSchemas\n * @public\n */\nexport interface SchemasSpecification {\n /** ECSchema names */\n schemaNames: string[];\n\n /**\n * Should schemas specified in [[schemaNames]] be excluded rather than included.\n * Exclusion works by including everything except what's specified in [[schemaNames]].\n */\n isExclude?: boolean;\n}\n\n/**\n * This specification is designed for specifying schema requirements for the [[Ruleset]] or specific\n * presentation rules.\n *\n * @see [Required schema specification reference documentation page]($docs/presentation/RequiredSchemaSpecification.md)\n * @public\n */\nexport interface RequiredSchemaSpecification {\n /** Specifies the schema to whom the requirement is being set. */\n name: string;\n\n /**\n * Minimum required schema version (inclusive).\n * Format: `{read version}.{write version}.{minor version}`, e.g. `2.1.15`.\n *\n * @pattern ^[\\d]+\\.[\\d]+\\.[\\d]+$\n */\n minVersion?: string;\n\n /**\n * Maximum allowed schema version (exclusive).\n * Format: `{read version}.{write version}.{minor version}`, e.g. `2.1.15`.\n *\n * @pattern ^[\\d]+\\.[\\d]+\\.[\\d]+$\n */\n maxVersion?: string;\n}\n"]}
1
+ {"version":3,"file":"SchemasSpecification.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/SchemasSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\n/**\r\n * Specification for a list of ECSchemas\r\n * @public\r\n */\r\nexport interface SchemasSpecification {\r\n /** ECSchema names */\r\n schemaNames: string[];\r\n\r\n /**\r\n * Should schemas specified in [[schemaNames]] be excluded rather than included.\r\n * Exclusion works by including everything except what's specified in [[schemaNames]].\r\n */\r\n isExclude?: boolean;\r\n}\r\n\r\n/**\r\n * This specification is designed for specifying schema requirements for the [[Ruleset]] or specific\r\n * presentation rules.\r\n *\r\n * @see [Required schema specification reference documentation page]($docs/presentation/RequiredSchemaSpecification.md)\r\n * @public\r\n */\r\nexport interface RequiredSchemaSpecification {\r\n /** Specifies the schema to whom the requirement is being set. */\r\n name: string;\r\n\r\n /**\r\n * Minimum required schema version (inclusive).\r\n * Format: `{read version}.{write version}.{minor version}`, e.g. `2.1.15`.\r\n *\r\n * @pattern ^[\\d]+\\.[\\d]+\\.[\\d]+$\r\n */\r\n minVersion?: string;\r\n\r\n /**\r\n * Maximum allowed schema version (exclusive).\r\n * Format: `{read version}.{write version}.{minor version}`, e.g. `2.1.15`.\r\n *\r\n * @pattern ^[\\d]+\\.[\\d]+\\.[\\d]+$\r\n */\r\n maxVersion?: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Variables.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Variables.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA0BH;;;GAGG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,uDAAuD;IACvD,oCAAe,CAAA;IAEf,0DAA0D;IAC1D,0CAAqB,CAAA;IAErB,uBAAuB;IACvB,2CAAsB,CAAA;IAEtB,wBAAwB;IACxB,qCAAgB,CAAA;AAClB,CAAC,EAZW,iBAAiB,iCAAjB,iBAAiB,QAY5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\n/**\n * Presentation rules support variables that allow having additional customization of the hierarchy\n * and content based on variables whose values can change during application session.\n *\n * There are [special ECExpression symbols]($docs/presentation/advanced/ECExpressions.md#ruleset-variables-user-settings)\n * that can be used to access variables by their ID, so rule conditions can check for a value and change\n * the behavior. It allows showing / hiding some nodes in the hierarchy, change the grouping, etc.\n *\n * @public\n */\nexport interface VariablesGroup {\n /**\n * Group label to display in the UI.\n * May be [localized]($docs/presentation/advanced/Localization.md).\n */\n label: string;\n\n /** Grouped variables */\n vars: Variable[];\n\n /** Nested variable groups. */\n nestedGroups?: VariablesGroup[];\n}\n\n/**\n * Available value types of user-controllable variables\n * @public\n */\nexport enum VariableValueType {\n /** Bool value, that uses Yes / No strings in the UI */\n YesNo = \"YesNo\",\n\n /** Bool value, that uses Show / Hide strings in the UI */\n ShowHide = \"ShowHide\",\n\n /** Any string value */\n String = \"StringValue\",\n\n /** Any integer value */\n Int = \"IntValue\",\n}\n\n/**\n * Definition for single user-controllable variable\n * @public\n */\nexport interface Variable {\n /** Id of the variable */\n id: string;\n\n /**\n * Label of the variable that is shown in the UI.\n * May be [localized]($docs/presentation/advanced/Localization.md).\n */\n label: string;\n\n /**\n * Defines value type. Defaults to [[VariableValueType.YesNo]].\n * @see VariableValueType\n */\n type?: `${VariableValueType}`;\n\n /** Default value. */\n defaultValue?: string;\n}\n"]}
1
+ {"version":3,"file":"Variables.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Variables.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA0BH;;;GAGG;AACH,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IAC3B,uDAAuD;IACvD,oCAAe,CAAA;IAEf,0DAA0D;IAC1D,0CAAqB,CAAA;IAErB,uBAAuB;IACvB,2CAAsB,CAAA;IAEtB,wBAAwB;IACxB,qCAAgB,CAAA;AAClB,CAAC,EAZW,iBAAiB,iCAAjB,iBAAiB,QAY5B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\n/**\r\n * Presentation rules support variables that allow having additional customization of the hierarchy\r\n * and content based on variables whose values can change during application session.\r\n *\r\n * There are [special ECExpression symbols]($docs/presentation/advanced/ECExpressions.md#ruleset-variables-user-settings)\r\n * that can be used to access variables by their ID, so rule conditions can check for a value and change\r\n * the behavior. It allows showing / hiding some nodes in the hierarchy, change the grouping, etc.\r\n *\r\n * @public\r\n */\r\nexport interface VariablesGroup {\r\n /**\r\n * Group label to display in the UI.\r\n * May be [localized]($docs/presentation/advanced/Localization.md).\r\n */\r\n label: string;\r\n\r\n /** Grouped variables */\r\n vars: Variable[];\r\n\r\n /** Nested variable groups. */\r\n nestedGroups?: VariablesGroup[];\r\n}\r\n\r\n/**\r\n * Available value types of user-controllable variables\r\n * @public\r\n */\r\nexport enum VariableValueType {\r\n /** Bool value, that uses Yes / No strings in the UI */\r\n YesNo = \"YesNo\",\r\n\r\n /** Bool value, that uses Show / Hide strings in the UI */\r\n ShowHide = \"ShowHide\",\r\n\r\n /** Any string value */\r\n String = \"StringValue\",\r\n\r\n /** Any integer value */\r\n Int = \"IntValue\",\r\n}\r\n\r\n/**\r\n * Definition for single user-controllable variable\r\n * @public\r\n */\r\nexport interface Variable {\r\n /** Id of the variable */\r\n id: string;\r\n\r\n /**\r\n * Label of the variable that is shown in the UI.\r\n * May be [localized]($docs/presentation/advanced/Localization.md).\r\n */\r\n label: string;\r\n\r\n /**\r\n * Defines value type. Defaults to [[VariableValueType.YesNo]].\r\n * @see VariableValueType\r\n */\r\n type?: `${VariableValueType}`;\r\n\r\n /** Default value. */\r\n defaultValue?: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentInstancesOfSpecificClassesSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { MultiSchemaClassesSpecification } from \"../ClassSpecifications.js\";\nimport { ContentSpecificationBase } from \"./ContentSpecification.js\";\n\n/**\n * This specification creates content for all instances of specific ECClasses.\n *\n * @see [Content instances of specific classes specification reference documentation page]($docs/presentation/content/ContentInstancesOfSpecificClasses.md)\n * @public\n */\nexport interface ContentInstancesOfSpecificClassesSpecification extends ContentSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"ContentInstancesOfSpecificClasses\";\n\n /**\n * Defines a set of [multi schema classes]($docs/presentation/MultiSchemaClassesSpecification.md) that specify which\n * ECClasses need to be selected to form the result.\n */\n classes: MultiSchemaClassesSpecification | MultiSchemaClassesSpecification[];\n\n /**\n * Defines a set of [multi schema classes]($docs/presentation/MultiSchemaClassesSpecification.md) that prevents specified\n * ECClasses and subclasses from being selected by [[classes]] attribute.\n */\n excludedClasses?: MultiSchemaClassesSpecification | MultiSchemaClassesSpecification[];\n\n /**\n * Specifies whether properties of derived [[classes]] should be included in the content.\n */\n handlePropertiesPolymorphically?: boolean;\n\n /**\n * Specifies an [ECExpression]($docs/presentation/content/ECExpressions.md#instance-filter) for filtering instances\n * of ECClasses specified through the [[classes]] attribute.\n */\n instanceFilter?: string;\n}\n"]}
1
+ {"version":3,"file":"ContentInstancesOfSpecificClassesSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { MultiSchemaClassesSpecification } from \"../ClassSpecifications.js\";\r\nimport { ContentSpecificationBase } from \"./ContentSpecification.js\";\r\n\r\n/**\r\n * This specification creates content for all instances of specific ECClasses.\r\n *\r\n * @see [Content instances of specific classes specification reference documentation page]($docs/presentation/content/ContentInstancesOfSpecificClasses.md)\r\n * @public\r\n */\r\nexport interface ContentInstancesOfSpecificClassesSpecification extends ContentSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: \"ContentInstancesOfSpecificClasses\";\r\n\r\n /**\r\n * Defines a set of [multi schema classes]($docs/presentation/MultiSchemaClassesSpecification.md) that specify which\r\n * ECClasses need to be selected to form the result.\r\n */\r\n classes: MultiSchemaClassesSpecification | MultiSchemaClassesSpecification[];\r\n\r\n /**\r\n * Defines a set of [multi schema classes]($docs/presentation/MultiSchemaClassesSpecification.md) that prevents specified\r\n * ECClasses and subclasses from being selected by [[classes]] attribute.\r\n */\r\n excludedClasses?: MultiSchemaClassesSpecification | MultiSchemaClassesSpecification[];\r\n\r\n /**\r\n * Specifies whether properties of derived [[classes]] should be included in the content.\r\n */\r\n handlePropertiesPolymorphically?: boolean;\r\n\r\n /**\r\n * Specifies an [ECExpression]($docs/presentation/content/ECExpressions.md#instance-filter) for filtering instances\r\n * of ECClasses specified through the [[classes]] attribute.\r\n */\r\n instanceFilter?: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentRelatedInstancesSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentRelatedInstancesSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { RepeatableRelationshipPathSpecification } from \"../RelationshipPathSpecification.js\";\nimport { ContentSpecificationBase } from \"./ContentSpecification.js\";\n\n/**\n * Returns content for instances related to the selected (input) instances.\n *\n * @see [Content related instances specification reference documentation page]($docs/presentation/content/ContentRelatedInstances.md)\n * @public\n */\nexport interface ContentRelatedInstancesSpecification extends ContentSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"ContentRelatedInstances\";\n\n /**\n * Specifies a chain of [relationship path specifications]($docs/presentation/RepeatableRelationshipPathSpecification.md) that\n * forms a path from an input instance to the output instances. When this array is empty, the specification produces no results.\n */\n relationshipPaths: RepeatableRelationshipPathSpecification[];\n\n /**\n * Specifies an [ECExpression]($docs/presentation/content/ECExpressions.md#instance-filter) for filtering instances\n * of ECClasses targeted through the [[relationshipPaths]] attribute.\n */\n instanceFilter?: string;\n}\n"]}
1
+ {"version":3,"file":"ContentRelatedInstancesSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentRelatedInstancesSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { RepeatableRelationshipPathSpecification } from \"../RelationshipPathSpecification.js\";\r\nimport { ContentSpecificationBase } from \"./ContentSpecification.js\";\r\n\r\n/**\r\n * Returns content for instances related to the selected (input) instances.\r\n *\r\n * @see [Content related instances specification reference documentation page]($docs/presentation/content/ContentRelatedInstances.md)\r\n * @public\r\n */\r\nexport interface ContentRelatedInstancesSpecification extends ContentSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: \"ContentRelatedInstances\";\r\n\r\n /**\r\n * Specifies a chain of [relationship path specifications]($docs/presentation/RepeatableRelationshipPathSpecification.md) that\r\n * forms a path from an input instance to the output instances. When this array is empty, the specification produces no results.\r\n */\r\n relationshipPaths: RepeatableRelationshipPathSpecification[];\r\n\r\n /**\r\n * Specifies an [ECExpression]($docs/presentation/content/ECExpressions.md#instance-filter) for filtering instances\r\n * of ECClasses targeted through the [[relationshipPaths]] attribute.\r\n */\r\n instanceFilter?: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentRule.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentRule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { RuleBase } from \"../Rule.js\";\nimport { ContentSpecification } from \"./ContentSpecification.js\";\n\n/**\n * Content rules are used to define content that is displayed for specific type of [input]($docs/presentation/content/Terminology.md#input-instance).\n * Input consists of either ECInstances or [nodes]($docs/presentation/hierarchies/Terminology.md#node) and to make things\n * simpler everything is considered a [node]($docs/presentation/hierarchies/Terminology.md#node) - instances get converted to\n * *ECInstance nodes* (thus the `SelectedNode` symbol in [`condition` ECExpression]($docs/presentation/content/ECExpressions.md#rule-condition)).\n *\n * @see [Content rule reference documentation page]($docs/presentation/content/ContentRule.md)\n * @public\n */\nexport interface ContentRule extends RuleBase {\n /** Used for serializing to JSON. */\n ruleType: \"Content\";\n\n /**\n * Defines a condition which needs to be met in order for the rule to be used. The condition is an\n * [ECExpression]($docs/presentation/content/ECExpressions.md#rule-condition) which has to evaluate to\n * a boolean value.\n */\n condition?: string;\n\n /**\n * A list of content specifications that define what content is going to be returned. This is the most\n * important attribute which is responsible for defining what instances' properties are included in the\n * returned content.\n */\n specifications: ContentSpecification[];\n}\n"]}
1
+ {"version":3,"file":"ContentRule.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentRule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { RuleBase } from \"../Rule.js\";\r\nimport { ContentSpecification } from \"./ContentSpecification.js\";\r\n\r\n/**\r\n * Content rules are used to define content that is displayed for specific type of [input]($docs/presentation/content/Terminology.md#input-instance).\r\n * Input consists of either ECInstances or [nodes]($docs/presentation/hierarchies/Terminology.md#node) and to make things\r\n * simpler everything is considered a [node]($docs/presentation/hierarchies/Terminology.md#node) - instances get converted to\r\n * *ECInstance nodes* (thus the `SelectedNode` symbol in [`condition` ECExpression]($docs/presentation/content/ECExpressions.md#rule-condition)).\r\n *\r\n * @see [Content rule reference documentation page]($docs/presentation/content/ContentRule.md)\r\n * @public\r\n */\r\nexport interface ContentRule extends RuleBase {\r\n /** Used for serializing to JSON. */\r\n ruleType: \"Content\";\r\n\r\n /**\r\n * Defines a condition which needs to be met in order for the rule to be used. The condition is an\r\n * [ECExpression]($docs/presentation/content/ECExpressions.md#rule-condition) which has to evaluate to\r\n * a boolean value.\r\n */\r\n condition?: string;\r\n\r\n /**\r\n * A list of content specifications that define what content is going to be returned. This is the most\r\n * important attribute which is responsible for defining what instances' properties are included in the\r\n * returned content.\r\n */\r\n specifications: ContentSpecification[];\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAQH;;;GAGG;AACH,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,oGAAuE,CAAA;IACvE,gFAAmD,CAAA;IACnD,4EAA+C,CAAA;AACjD,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { RelatedInstanceSpecification } from \"../RelatedInstanceSpecification.js\";\nimport { ContentInstancesOfSpecificClassesSpecification } from \"./ContentInstancesOfSpecificClassesSpecification.js\";\nimport { ContentRelatedInstancesSpecification } from \"./ContentRelatedInstancesSpecification.js\";\nimport { ContentModifiersList } from \"./modifiers/ContentModifier.js\";\nimport { SelectedNodeInstancesSpecification } from \"./SelectedNodeInstancesSpecification.js\";\n\n/**\n * Used for serializing array of [[ContentSpecification]]\n * @public\n */\nexport enum ContentSpecificationTypes {\n ContentInstancesOfSpecificClasses = \"ContentInstancesOfSpecificClasses\",\n ContentRelatedInstances = \"ContentRelatedInstances\",\n SelectedNodeInstances = \"SelectedNodeInstances\",\n}\n\n/**\n * Base interface for all [[ContentSpecification]] implementations. Not\n * meant to be used directly, see `ContentSpecification`.\n *\n * @public\n */\nexport interface ContentSpecificationBase extends ContentModifiersList {\n /**\n * Used for serializing to JSON.\n * @see [[ContentSpecificationTypes]]\n */\n specType: `${ContentSpecificationTypes}`;\n\n /**\n * Controls the order in which specifications are handled — specification with higher priority value is handled\n * first. If priorities are equal, the specifications are handled in the order they appear in the ruleset.\n *\n * @type integer\n */\n priority?: number;\n\n /** Specifications of [related instances]($docs/presentation/RelatedInstanceSpecification.md) that can be used when creating the content. */\n relatedInstances?: RelatedInstanceSpecification[];\n\n /**\n * Specifies whether this specification should be ignored if another specification was handled before as\n * determined by rule and specification priorities. This provides a mechanism for defining a fallback specification.\n */\n onlyIfNotHandled?: boolean;\n}\n\n/**\n * Content rule specifications which define what content is returned\n * when rule is used.\n *\n * @public\n */\nexport declare type ContentSpecification =\n | ContentInstancesOfSpecificClassesSpecification\n | ContentRelatedInstancesSpecification\n | SelectedNodeInstancesSpecification;\n"]}
1
+ {"version":3,"file":"ContentSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/ContentSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAQH;;;GAGG;AACH,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,oGAAuE,CAAA;IACvE,gFAAmD,CAAA;IACnD,4EAA+C,CAAA;AACjD,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { RelatedInstanceSpecification } from \"../RelatedInstanceSpecification.js\";\r\nimport { ContentInstancesOfSpecificClassesSpecification } from \"./ContentInstancesOfSpecificClassesSpecification.js\";\r\nimport { ContentRelatedInstancesSpecification } from \"./ContentRelatedInstancesSpecification.js\";\r\nimport { ContentModifiersList } from \"./modifiers/ContentModifier.js\";\r\nimport { SelectedNodeInstancesSpecification } from \"./SelectedNodeInstancesSpecification.js\";\r\n\r\n/**\r\n * Used for serializing array of [[ContentSpecification]]\r\n * @public\r\n */\r\nexport enum ContentSpecificationTypes {\r\n ContentInstancesOfSpecificClasses = \"ContentInstancesOfSpecificClasses\",\r\n ContentRelatedInstances = \"ContentRelatedInstances\",\r\n SelectedNodeInstances = \"SelectedNodeInstances\",\r\n}\r\n\r\n/**\r\n * Base interface for all [[ContentSpecification]] implementations. Not\r\n * meant to be used directly, see `ContentSpecification`.\r\n *\r\n * @public\r\n */\r\nexport interface ContentSpecificationBase extends ContentModifiersList {\r\n /**\r\n * Used for serializing to JSON.\r\n * @see [[ContentSpecificationTypes]]\r\n */\r\n specType: `${ContentSpecificationTypes}`;\r\n\r\n /**\r\n * Controls the order in which specifications are handled — specification with higher priority value is handled\r\n * first. If priorities are equal, the specifications are handled in the order they appear in the ruleset.\r\n *\r\n * @type integer\r\n */\r\n priority?: number;\r\n\r\n /** Specifications of [related instances]($docs/presentation/RelatedInstanceSpecification.md) that can be used when creating the content. */\r\n relatedInstances?: RelatedInstanceSpecification[];\r\n\r\n /**\r\n * Specifies whether this specification should be ignored if another specification was handled before as\r\n * determined by rule and specification priorities. This provides a mechanism for defining a fallback specification.\r\n */\r\n onlyIfNotHandled?: boolean;\r\n}\r\n\r\n/**\r\n * Content rule specifications which define what content is returned\r\n * when rule is used.\r\n *\r\n * @public\r\n */\r\nexport declare type ContentSpecification =\r\n | ContentInstancesOfSpecificClassesSpecification\r\n | ContentRelatedInstancesSpecification\r\n | SelectedNodeInstancesSpecification;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultPropertyCategoryOverride.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/DefaultPropertyCategoryOverride.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { RuleBase } from \"../Rule.js\";\nimport { PropertyCategorySpecification } from \"./modifiers/PropertyCategorySpecification.js\";\n\n/**\n * A rule that allows overriding the default property category.\n *\n * The default property category is a category that gets assigned to properties that otherwise have no category.\n *\n * @see [Default property category override reference documentation page]($docs/presentation/content/DefaultPropertyCategoryOverride.md)\n * @public\n */\nexport interface DefaultPropertyCategoryOverride extends RuleBase {\n /** Used for serializing to JSON. */\n ruleType: \"DefaultPropertyCategoryOverride\";\n\n /** Specification for the custom property category. */\n specification: PropertyCategorySpecification;\n}\n"]}
1
+ {"version":3,"file":"DefaultPropertyCategoryOverride.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/DefaultPropertyCategoryOverride.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { RuleBase } from \"../Rule.js\";\r\nimport { PropertyCategorySpecification } from \"./modifiers/PropertyCategorySpecification.js\";\r\n\r\n/**\r\n * A rule that allows overriding the default property category.\r\n *\r\n * The default property category is a category that gets assigned to properties that otherwise have no category.\r\n *\r\n * @see [Default property category override reference documentation page]($docs/presentation/content/DefaultPropertyCategoryOverride.md)\r\n * @public\r\n */\r\nexport interface DefaultPropertyCategoryOverride extends RuleBase {\r\n /** Used for serializing to JSON. */\r\n ruleType: \"DefaultPropertyCategoryOverride\";\r\n\r\n /** Specification for the custom property category. */\r\n specification: PropertyCategorySpecification;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertySpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/PropertySpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { CustomRendererSpecification } from \"./modifiers/CustomRendererSpecification.js\";\nimport { CategoryIdentifier } from \"./modifiers/PropertyCategorySpecification.js\";\nimport { PropertyEditorSpecification } from \"./modifiers/PropertyEditorsSpecification.js\";\n\n/**\n * A container structure for possible property overrides\n *\n * @see [Property specification reference documentation page]($docs/presentation/content/PropertySpecification.md)\n * @public\n */\nexport interface PropertyOverrides {\n /**\n * There may be multiple property specifications that apply to a single property and there may be conflicts between\n * different attributes. The `overridesPriority` attribute is here to help solve the problem - if multiple specifications\n * attempt to override the same attribute, the override of specification with highest `overridesPriority` value is used.\n * The order of overrides from specification with the same `overridesPriority` is defined by the order they appear in\n * the overrides list.\n */\n overridesPriority?: number;\n\n /** This is an attribute that allows overriding the property label. May be [localized]($docs/presentation/advanced/Localization.md). */\n labelOverride?: string;\n\n /** The attribute allows moving the property into a different category. */\n categoryId?: string | CategoryIdentifier;\n\n /**\n * This attribute controls whether the particular property is present in the result, even when it is marked as hidden in the\n * ECSchema. The allowed settings are:\n *\n * - Omitted or `undefined`: property visibility is controlled by the ECSchema.\n *\n * - `true`: property is made visible. **Warning:** this will automatically hide all other properties of the same class.\n * If this behavior is not desirable, set [[doNotHideOtherPropertiesOnDisplayOverride]] attribute to `true`.\n *\n * - `false`: property is made hidden.\n *\n * The value can also be set using an ECExpression.\n */\n isDisplayed?: boolean | string;\n\n /**\n * Custom property [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows assigning a\n * custom value renderer to be used in UI. The specification is used to set up [[Field.renderer]] for\n * this property and it's up to the UI component to make sure appropriate renderer is used to render the property.\n */\n renderer?: CustomRendererSpecification;\n\n /**\n * Custom [property editor specification]($docs/presentation/content/PropertyEditorSpecification) that allows assigning\n * a custom value editor to be used in UI.\n */\n editor?: PropertyEditorSpecification;\n\n /**\n * This attribute controls whether making the property visible using [[isDisplayed]] attribute should automatically hide\n * all other properties of the same class. When `true`, this behavior is disabled.\n */\n doNotHideOtherPropertiesOnDisplayOverride?: boolean;\n\n /**\n * This attribute controls whether the property field is read-only. If the attribute value is not set, the field is\n * read-only when at least one of the properties is read-only.\n */\n isReadOnly?: boolean;\n\n /**\n * This attribute controls the order in which property fields should be displayed. Property fields with higher priority\n * will appear before property fields with lower priority. If the attribute value is not set, the field's priority\n * will be the maximum priority of its properties.\n */\n priority?: number;\n}\n\n/**\n * This specification allows overriding some attributes of specific ECProperty or define how it's displayed.\n *\n * @see [Property specification reference documentation page]($docs/presentation/content/PropertySpecification.md)\n * @public\n */\nexport interface PropertySpecification extends PropertyOverrides {\n /**\n * Name of the ECProperty to apply overrides to. A `\"*\"` may be specified to match all properties in current context.\n * The current context is determined based on where the override is specified:\n *\n * - When used in a [content modifier]($docs/presentation/content/ContentModifier.md#attribute-propertyoverrides), the\n * properties of the ECClass specified by the [`class` attribute]($docs/presentation/content/ContentModifier.md#attribute-class) are used.\n *\n * - When used in one of the [content specifications]($docs/presentation/content/ContentRule.md#attribute-specifications),\n * properties produced by that specification are used.\n */\n name: string;\n}\n"]}
1
+ {"version":3,"file":"PropertySpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/PropertySpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { CustomRendererSpecification } from \"./modifiers/CustomRendererSpecification.js\";\r\nimport { CategoryIdentifier } from \"./modifiers/PropertyCategorySpecification.js\";\r\nimport { PropertyEditorSpecification } from \"./modifiers/PropertyEditorsSpecification.js\";\r\n\r\n/**\r\n * A container structure for possible property overrides\r\n *\r\n * @see [Property specification reference documentation page]($docs/presentation/content/PropertySpecification.md)\r\n * @public\r\n */\r\nexport interface PropertyOverrides {\r\n /**\r\n * There may be multiple property specifications that apply to a single property and there may be conflicts between\r\n * different attributes. The `overridesPriority` attribute is here to help solve the problem - if multiple specifications\r\n * attempt to override the same attribute, the override of specification with highest `overridesPriority` value is used.\r\n * The order of overrides from specification with the same `overridesPriority` is defined by the order they appear in\r\n * the overrides list.\r\n */\r\n overridesPriority?: number;\r\n\r\n /** This is an attribute that allows overriding the property label. May be [localized]($docs/presentation/advanced/Localization.md). */\r\n labelOverride?: string;\r\n\r\n /** The attribute allows moving the property into a different category. */\r\n categoryId?: string | CategoryIdentifier;\r\n\r\n /**\r\n * This attribute controls whether the particular property is present in the result, even when it is marked as hidden in the\r\n * ECSchema. The allowed settings are:\r\n *\r\n * - Omitted or `undefined`: property visibility is controlled by the ECSchema.\r\n *\r\n * - `true`: property is made visible. **Warning:** this will automatically hide all other properties of the same class.\r\n * If this behavior is not desirable, set [[doNotHideOtherPropertiesOnDisplayOverride]] attribute to `true`.\r\n *\r\n * - `false`: property is made hidden.\r\n *\r\n * The value can also be set using an ECExpression.\r\n */\r\n isDisplayed?: boolean | string;\r\n\r\n /**\r\n * Custom property [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows assigning a\r\n * custom value renderer to be used in UI. The specification is used to set up [[Field.renderer]] for\r\n * this property and it's up to the UI component to make sure appropriate renderer is used to render the property.\r\n */\r\n renderer?: CustomRendererSpecification;\r\n\r\n /**\r\n * Custom [property editor specification]($docs/presentation/content/PropertyEditorSpecification) that allows assigning\r\n * a custom value editor to be used in UI.\r\n */\r\n editor?: PropertyEditorSpecification;\r\n\r\n /**\r\n * This attribute controls whether making the property visible using [[isDisplayed]] attribute should automatically hide\r\n * all other properties of the same class. When `true`, this behavior is disabled.\r\n */\r\n doNotHideOtherPropertiesOnDisplayOverride?: boolean;\r\n\r\n /**\r\n * This attribute controls whether the property field is read-only. If the attribute value is not set, the field is\r\n * read-only when at least one of the properties is read-only.\r\n */\r\n isReadOnly?: boolean;\r\n\r\n /**\r\n * This attribute controls the order in which property fields should be displayed. Property fields with higher priority\r\n * will appear before property fields with lower priority. If the attribute value is not set, the field's priority\r\n * will be the maximum priority of its properties.\r\n */\r\n priority?: number;\r\n}\r\n\r\n/**\r\n * This specification allows overriding some attributes of specific ECProperty or define how it's displayed.\r\n *\r\n * @see [Property specification reference documentation page]($docs/presentation/content/PropertySpecification.md)\r\n * @public\r\n */\r\nexport interface PropertySpecification extends PropertyOverrides {\r\n /**\r\n * Name of the ECProperty to apply overrides to. A `\"*\"` may be specified to match all properties in current context.\r\n * The current context is determined based on where the override is specified:\r\n *\r\n * - When used in a [content modifier]($docs/presentation/content/ContentModifier.md#attribute-propertyoverrides), the\r\n * properties of the ECClass specified by the [`class` attribute]($docs/presentation/content/ContentModifier.md#attribute-class) are used.\r\n *\r\n * - When used in one of the [content specifications]($docs/presentation/content/ContentRule.md#attribute-specifications),\r\n * properties produced by that specification are used.\r\n */\r\n name: string;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectedNodeInstancesSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/SelectedNodeInstancesSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { ContentSpecificationBase } from \"./ContentSpecification.js\";\n\n/**\n * Returns content for selected (input) instances.\n *\n * @see [Selected node instances specification reference documentation page]($docs/presentation/content/SelectedNodeInstances.md)\n * @public\n */\nexport interface SelectedNodeInstancesSpecification extends ContentSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"SelectedNodeInstances\";\n\n /**\n * Specifies ECSchema name which the input instances have to match for the specification to be used.\n *\n * @pattern ^[\\w\\d]+$\n */\n acceptableSchemaName?: string;\n\n /**\n * Specifies a list of class names which the input instances have to match for the specification to be used.\n */\n acceptableClassNames?: string[];\n\n /**\n * Specifies whether derived classes of [[acceptableClassNames]] should be included in the content.\n */\n acceptablePolymorphically?: boolean;\n}\n"]}
1
+ {"version":3,"file":"SelectedNodeInstancesSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/content/SelectedNodeInstancesSpecification.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { ContentSpecificationBase } from \"./ContentSpecification.js\";\r\n\r\n/**\r\n * Returns content for selected (input) instances.\r\n *\r\n * @see [Selected node instances specification reference documentation page]($docs/presentation/content/SelectedNodeInstances.md)\r\n * @public\r\n */\r\nexport interface SelectedNodeInstancesSpecification extends ContentSpecificationBase {\r\n /** Used for serializing to JSON. */\r\n specType: \"SelectedNodeInstances\";\r\n\r\n /**\r\n * Specifies ECSchema name which the input instances have to match for the specification to be used.\r\n *\r\n * @pattern ^[\\w\\d]+$\r\n */\r\n acceptableSchemaName?: string;\r\n\r\n /**\r\n * Specifies a list of class names which the input instances have to match for the specification to be used.\r\n */\r\n acceptableClassNames?: string[];\r\n\r\n /**\r\n * Specifies whether derived classes of [[acceptableClassNames]] should be included in the content.\r\n */\r\n acceptablePolymorphically?: boolean;\r\n}\r\n"]}