@itwin/presentation-common 5.0.0-dev.7 → 5.0.0-dev.8

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 (161) hide show
  1. package/lib/cjs/assets/locales/en/Presentation.json +19 -19
  2. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  3. package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
  4. package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
  5. package/lib/cjs/presentation-common/EC.js.map +1 -1
  6. package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
  7. package/lib/cjs/presentation-common/Error.js.map +1 -1
  8. package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
  9. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  10. package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
  11. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  12. package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
  13. package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
  14. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  15. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  16. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  17. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  18. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  19. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  20. package/lib/cjs/presentation-common/Update.js.map +1 -1
  21. package/lib/cjs/presentation-common/Utils.js.map +1 -1
  22. package/lib/cjs/presentation-common/content/Category.js.map +1 -1
  23. package/lib/cjs/presentation-common/content/Content.js.map +1 -1
  24. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  25. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  26. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  27. package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
  28. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  29. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  30. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  31. package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  32. package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
  33. package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
  34. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  35. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  36. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  37. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  38. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  39. package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
  40. package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  41. package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
  42. package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  43. package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
  44. package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
  45. package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
  46. package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
  47. package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  48. package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  49. package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
  50. package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  51. package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  52. package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  53. package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  54. package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  55. package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  56. package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  57. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  58. package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  59. package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  60. package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  61. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  62. package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  63. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  64. package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
  65. package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
  66. package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
  67. package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
  68. package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  69. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  70. package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  71. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  72. package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  73. package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  74. package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  75. package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  76. package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  77. package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  78. package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  79. package/lib/cjs/presentation-common/selection/SelectionScope.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.js.map +1 -1
  104. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  105. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  106. package/lib/esm/presentation-common/content/Editor.js.map +1 -1
  107. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  108. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  109. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  110. package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
  111. package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
  112. package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
  113. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  114. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  115. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  116. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  117. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  118. package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
  119. package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
  120. package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
  121. package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
  122. package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
  123. package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
  124. package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
  125. package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
  126. package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
  127. package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
  128. package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
  129. package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
  130. package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
  131. package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
  132. package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
  133. package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
  134. package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
  135. package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
  136. package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
  137. package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
  138. package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
  139. package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
  140. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  141. package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
  142. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  143. package/lib/esm/presentation-common/rules/customization/ImageIdOverride.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/LabelOverride.js.map +1 -1
  146. package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
  147. package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
  148. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
  149. package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
  150. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  151. package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
  152. package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
  153. package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
  154. package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
  155. package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
  156. package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
  157. package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
  158. package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
  159. package/lib/esm/presentation-common.js.map +1 -1
  160. package/lib/public/locales/en/Presentation.json +19 -19
  161. package/package.json +10 -10
@@ -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":["/*---------------------------------------------------------------------------------------------\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
+ {"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 +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,CA0ErB;AA1ED,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CA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AAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,4DAA4D;AAC5D,SAAS,0BAA0B,CAAC,IAA4B;IAC9D,4DAA4D;IAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,4DAA4D;AAC5D,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,4DAA4D;IAC5D,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,4DAA4D;AAC5D,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,4DAA4D;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,4DAA4D;AAC5D,SAAS,sBAAsB,CAAC,MAAwB;IACtD,4DAA4D;IAC5D,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,4DAA4D;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { InstanceId, InstanceKey } from \"../EC\";\r\nimport { LabelDefinition } from \"../LabelDefinition\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace Value {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /** Is the value a navigation value */\r\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\r\n return (\r\n value !== undefined &&\r\n (value as NavigationPropertyValue).id !== undefined &&\r\n (value as NavigationPropertyValue).className !== undefined &&\r\n (value as NavigationPropertyValue).label !== undefined\r\n );\r\n }\r\n\r\n /**\r\n * Serialize [[Value]] to JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null) {\r\n return undefined;\r\n }\r\n if (isNestedContentValue(json)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map(NestedContentValue.fromJSON);\r\n }\r\n if (isArrayValue(json)) {\r\n return valuesArrayFromJSON(json);\r\n }\r\n if (isMapValue(json)) {\r\n return valuesMapFromJSON(json);\r\n }\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[Value]] from JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value) {\r\n return null;\r\n }\r\n if (isNestedContentValue(value)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return value.map(NestedContentValue.toJSON);\r\n }\r\n if (isArrayValue(value)) {\r\n return valuesArrayToJSON(value);\r\n }\r\n if (isMapValue(value)) {\r\n return valuesMapToJSON(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace DisplayValue {\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /**\r\n * Serialize [[DisplayValue]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null) {\r\n return undefined;\r\n }\r\n if (isArrayValue(json)) {\r\n return displayValuesArrayFromJSON(json);\r\n }\r\n if (isMapValue(json)) {\r\n return displayValuesMapFromJSON(json);\r\n }\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValue]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value) {\r\n return null;\r\n }\r\n if (isArrayValue(value)) {\r\n return displayValuesArrayToJSON(value);\r\n }\r\n if (isMapValue(value)) {\r\n return displayValuesMapToJSON(value);\r\n }\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n /** Label of the ECInstance that this `NestedContentValue` is based on. */\r\n labelDefinition?: LabelDefinition;\r\n}\r\n\r\n/**\r\n * Data structure that describes value of the navigation property.\r\n * @public\r\n */\r\nexport interface NavigationPropertyValue {\r\n /** Label of target instance. */\r\n label: LabelDefinition;\r\n /** Full class name of target instance in format `SchemaName:ClassName` */\r\n className: string;\r\n /** Id of target instance. */\r\n id: InstanceId;\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /**\r\n * Serialize [[NestedContentValue]] to JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n ...value,\r\n values: valuesMapToJSON(value.values),\r\n displayValues: displayValuesMapToJSON(value.displayValues),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentValue]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n ...json,\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesMap]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesArray]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKey[];\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValue: DisplayValueJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /**\r\n * Serialize [[DisplayValueGroup]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValueGroup]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (\r\n v !== undefined &&\r\n Array.isArray(v) &&\r\n (v.length === 0 ||\r\n (!!v[0] &&\r\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\r\n (v[0] as NestedContentValue).values !== undefined &&\r\n (v[0] as NestedContentValue).displayValues !== undefined &&\r\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\r\n );\r\n}\r\n\r\nfunction isArrayValue(\r\n v: Value | ValueJSON | DisplayValue | DisplayValueJSON, // eslint-disable-line @typescript-eslint/no-deprecated\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return v !== undefined && Array.isArray(v);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map(Value.fromJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return values.map(Value.toJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return values.map(DisplayValue.toJSON);\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
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,CA0ErB;AA1ED,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,Q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ACvC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,4DAA4D;AAC5D,SAAS,0BAA0B,CAAC,IAA4B;IAC9D,4DAA4D;IAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,4DAA4D;AAC5D,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,4DAA4D;IAC5D,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,4DAA4D;AAC5D,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC7B,4DAA4D;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,4DAA4D;AAC5D,SAAS,sBAAsB,CAAC,MAAwB;IACtD,4DAA4D;IAC5D,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,4DAA4D;YAC5D,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\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\";\nimport { LabelDefinition } from \"../LabelDefinition\";\nimport { ValuesDictionary } from \"../Utils\";\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 * Serialize [[Value]] to JSON\n * @deprecated in 3.x. Use [[Value]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: ValueJSON): Value {\n if (json === null) {\n return undefined;\n }\n if (isNestedContentValue(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map(NestedContentValue.fromJSON);\n }\n if (isArrayValue(json)) {\n return valuesArrayFromJSON(json);\n }\n if (isMapValue(json)) {\n return valuesMapFromJSON(json);\n }\n return json;\n }\n\n /**\n * Deserialize [[Value]] from JSON\n * @deprecated in 3.x. Use [[Value]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(value: Value): ValueJSON {\n if (undefined === value) {\n return null;\n }\n if (isNestedContentValue(value)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return value.map(NestedContentValue.toJSON);\n }\n if (isArrayValue(value)) {\n return valuesArrayToJSON(value);\n }\n if (isMapValue(value)) {\n return valuesMapToJSON(value);\n }\n return value;\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 * Serialize [[DisplayValue]] to JSON\n * @deprecated in 3.x. Use [[DisplayValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\n if (json === null) {\n return undefined;\n }\n if (isArrayValue(json)) {\n return displayValuesArrayFromJSON(json);\n }\n if (isMapValue(json)) {\n return displayValuesMapFromJSON(json);\n }\n return json;\n }\n\n /**\n * Deserialize [[DisplayValue]] from JSON\n * @deprecated in 3.x. Use [[DisplayValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(value: DisplayValue): DisplayValueJSON {\n if (undefined === value) {\n return null;\n }\n if (isArrayValue(value)) {\n return displayValuesArrayToJSON(value);\n }\n if (isMapValue(value)) {\n return displayValuesMapToJSON(value);\n }\n return 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 /** Label of the ECInstance that this `NestedContentValue` is based on. */\n labelDefinition?: 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/** @public */\nexport namespace NestedContentValue {\n /**\n * Serialize [[NestedContentValue]] to JSON\n * @deprecated in 3.x. Use [[NestedContentValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\n return {\n ...value,\n values: valuesMapToJSON(value.values),\n displayValues: displayValuesMapToJSON(value.displayValues),\n };\n }\n\n /**\n * Deserialize [[NestedContentValue]] from JSON\n * @deprecated in 3.x. Use [[NestedContentValue]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\n return {\n ...json,\n values: valuesMapFromJSON(json.values),\n displayValues: displayValuesMapFromJSON(json.displayValues),\n };\n }\n}\n\n/**\n * JSON representation of [[Value]]\n * @public\n * @deprecated in 3.x. Use [[Value]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NavigationPropertyValue | NestedContentValueJSON[];\n/**\n * JSON representation of [[ValuesMap]]\n * @public\n * @deprecated in 3.x. Use [[ValuesMap]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[ValuesArray]]\n * @public\n * @deprecated in 3.x. Use [[ValuesArray]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface ValuesArrayJSON extends Array<ValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[DisplayValue]]\n * @public\n * @deprecated in 3.x. Use [[DisplayValue]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\n\n/**\n * JSON representation of [[DisplayValuesMap]]\n * @public\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[DisplayValuesArray]]\n * @public\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * JSON representation of [[NestedContentValue]]\n * @public\n * @deprecated in 3.x. Use [[NestedContentValue]]\n */\nexport interface NestedContentValueJSON {\n primaryKeys: InstanceKey[];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: ValuesDictionary<ValueJSON>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: ValuesDictionary<DisplayValueJSON>;\n mergedFieldNames: string[];\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\n/**\n * JSON representation of [[DisplayValueGroup]].\n * @public\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\n */\nexport interface DisplayValueGroupJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValue: DisplayValueJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n groupedRawValues: ValueJSON[];\n}\n\n/** @public */\nexport namespace DisplayValueGroup {\n /**\n * Serialize [[DisplayValueGroup]] to JSON\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValue: DisplayValue.toJSON(group.displayValue),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\n };\n }\n\n /**\n * Deserialize [[DisplayValueGroup]] from JSON\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValue: DisplayValue.fromJSON(json.displayValue),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\n };\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\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(\n v: Value | ValueJSON | DisplayValue | DisplayValueJSON, // eslint-disable-line @typescript-eslint/no-deprecated\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\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}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\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\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map(Value.fromJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return values.map(Value.toJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\n const map: ValuesMap = {};\n for (const key in json) {\n /* istanbul ignore else */\n if (json.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = Value.fromJSON(json[key]);\n }\n }\n return map;\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const map: ValuesMapJSON = {};\n for (const key in values) {\n /* istanbul ignore else */\n if (values.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = Value.toJSON(values[key]);\n }\n }\n return map;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map(DisplayValue.fromJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return values.map(DisplayValue.toJSON);\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\n const map: DisplayValuesMap = {};\n for (const key in json) {\n /* istanbul ignore else */\n if (json.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = DisplayValue.fromJSON(json[key]);\n }\n }\n return map;\n}\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const map: DisplayValuesMapJSON = {};\n for (const key in values) {\n /* istanbul ignore else */\n if (values.hasOwnProperty(key)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n map[key] = DisplayValue.toJSON(values[key]);\n }\n }\n return map;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAAwC;AA2BxC;;;GAGG;AACH,IAAiB,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAC7B;;;;OAIG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,4DAA4D;YAC5D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IANe,uBAAQ,WAMvB,CAAA;AACH,CAAC,EAdgB,cAAc,8BAAd,cAAc,QAc9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { Node, NodeJSON } from \"./Node\";\r\n\r\n/**\r\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\r\n * @public\r\n */\r\nexport interface HierarchyLevel {\r\n /** A list of nodes in a hierarchy level. */\r\n nodes: Node[];\r\n /**\r\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n */\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyLevel]].\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]]\r\n */\r\nexport interface HierarchyLevelJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n nodes: NodeJSON[];\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * Contains helper functions for working with objects of [[HierarchyLevel]] type.\r\n * @public\r\n */\r\nexport namespace HierarchyLevel {\r\n /**\r\n * Deserialize [[HierarchyLevel]] from JSON\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\r\n return {\r\n ...json,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n nodes: json.nodes.map(Node.fromJSON),\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAAwC;AA2BxC;;;GAGG;AACH,IAAiB,cAAc,CAc9B;AAdD,WAAiB,cAAc;IAC7B;;;;OAIG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,4DAA4D;YAC5D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IANe,uBAAQ,WAMvB,CAAA;AACH,CAAC,EAdgB,cAAc,8BAAd,cAAc,QAc9B","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 Hierarchies\n */\n\nimport { Node, NodeJSON } from \"./Node\";\n\n/**\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\n * @public\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\n/**\n * JSON representation of [[HierarchyLevel]].\n * @beta\n * @deprecated in 3.x. Use [[HierarchyLevel]]\n */\nexport interface HierarchyLevelJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n nodes: NodeJSON[];\n supportsFiltering?: boolean;\n}\n\n/**\n * Contains helper functions for working with objects of [[HierarchyLevel]] type.\n * @public\n */\nexport namespace HierarchyLevel {\n /**\n * Deserialize [[HierarchyLevel]] from JSON\n * @beta\n * @deprecated in 3.x. Use [[HierarchyLevel]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\n return {\n ...json,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n nodes: json.nodes.map(Node.f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,CAAC,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;gBACxD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;gBACjD,IAAI,CAAC,KAAK,gBAAW,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACxE,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,IAAA,qBAAM,EAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzC,CAAC;QACD,IAAI,yBAAyB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,IAAA,qBAAM,EAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;QAClF,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,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,EA1HgB,OAAO,uBAAP,OAAO,QA0HvB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport { InstanceKey } from \"../EC\";\r\n\r\n/**\r\n * Standard node types\r\n * @public\r\n */\r\nexport enum StandardNodeTypes {\r\n ECInstancesNode = \"ECInstancesNode\",\r\n ECClassGroupingNode = \"ECClassGroupingNode\",\r\n ECPropertyGroupingNode = \"ECPropertyGroupingNode\",\r\n DisplayLabelGroupingNode = \"DisplayLabelGroupingNode\",\r\n}\r\n\r\n/**\r\n * One of the node key types\r\n * @public\r\n */\r\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace NodeKey {\r\n /**\r\n * Serialize given [[NodeKey]] to JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n return { ...key };\r\n }\r\n\r\n /**\r\n * Deserialize node key from JSON\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n return { version: 1, ...json };\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\r\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\r\n /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECInstancesNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]] */\r\n export function isClassGroupingNodeKey(key: NodeKey): key is ECClassGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECClassGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKey): key is ECPropertyGroupingNodeKey;\r\n /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.ECPropertyGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]] */\r\n export function isLabelGroupingNodeKey(key: NodeKey): key is LabelGroupingNodeKey;\r\n /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return key.type === StandardNodeTypes.DisplayLabelGroupingNode;\r\n }\r\n\r\n /** Checks if the supplied key is a grouping node key */\r\n export function isGroupingNodeKey(key: NodeKey): key is GroupingNodeKey;\r\n /** Checks if the supplied key is a grouping node key. @deprecated in 3.x. Use an override for [[NodeKey]]. */\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key); // eslint-disable-line @typescript-eslint/no-deprecated\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type) {\r\n return false;\r\n }\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length) {\r\n return false;\r\n }\r\n\r\n // when versions are equal, compare using contents of `pathFromRoot` array\r\n if (lhs.version === rhs.version) {\r\n for (let i = 0; i < lhs.pathFromRoot.length; ++i) {\r\n if (lhs.pathFromRoot[i] !== rhs.pathFromRoot[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n // when versions aren't equal, compare using other key information, because key hashes\r\n // of different key versions can't be compared\r\n if (isInstancesNodeKey(lhs)) {\r\n assert(isInstancesNodeKey(rhs));\r\n if (lhs.instanceKeys.length !== rhs.instanceKeys.length) {\r\n return false;\r\n }\r\n for (let i = 0; i < lhs.instanceKeys.length; ++i) {\r\n if (0 !== InstanceKey.compare(lhs.instanceKeys[i], rhs.instanceKeys[i])) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n if (isClassGroupingNodeKey(lhs)) {\r\n assert(isClassGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className;\r\n }\r\n if (isPropertyGroupingNodeKey(lhs)) {\r\n assert(isPropertyGroupingNodeKey(rhs));\r\n return lhs.className === rhs.className && lhs.propertyName === rhs.propertyName;\r\n }\r\n if (isLabelGroupingNodeKey(lhs)) {\r\n assert(isLabelGroupingNodeKey(rhs));\r\n return lhs.label === rhs.label;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Node key path. Can be used to define path from one node to another.\r\n * @public\r\n */\r\nexport type NodeKeyPath = NodeKey[];\r\n\r\n/**\r\n * Data structure that describes a basic node key\r\n * @public\r\n */\r\nexport interface BaseNodeKey {\r\n /** Node type */\r\n type: string;\r\n\r\n /**\r\n * Version of the key. Different versions suggest that node keys were created by two different\r\n * versions of the library. In that case, keys representing the same node may be different.\r\n */\r\n version: number;\r\n\r\n /** Node hash path from root to the node whose key this is */\r\n pathFromRoot: string[];\r\n\r\n /** Query that returns all selected instance keys */\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[BaseNodeKey]].\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n // TODO: make this required\r\n version?: number;\r\n pathFromRoot: string[];\r\n instanceKeysSelectQuery?: PresentationQuery;\r\n}\r\n\r\n/**\r\n * Data structure that describes a node ECInstance node key\r\n * @public\r\n */\r\nexport interface ECInstancesNodeKey extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n /** List of [[InstanceKey]] objects of ECInstances represented by the node */\r\n instanceKeys: InstanceKey[];\r\n}\r\n/**\r\n * Serialized [[ECInstancesNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECInstancesNodeKey]].\r\n */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKey {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKey[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a grouping node key\r\n * @public\r\n */\r\nexport interface GroupingNodeKey extends BaseNodeKey {\r\n /**\r\n * Get the number of instances grouped by the node represented\r\n * by this key.\r\n *\r\n * **Note:** this property is just a helper and is not involved\r\n * in identifying a node.\r\n */\r\n groupedInstancesCount: number;\r\n}\r\n/**\r\n * Serialized [[GroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[GroupingNodeKey]].\r\n */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKey {\r\n groupedInstancesCount: number;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECClass grouping node key\r\n * @public\r\n */\r\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n /** Full name of the grouping ECClass */\r\n className: string;\r\n}\r\n/**\r\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].\r\n */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECClassGroupingNode;\r\n className: string;\r\n}\r\n\r\n/**\r\n * Data structure that describes an ECProperty grouping node key\r\n * @public\r\n */\r\nexport interface ECPropertyGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n /** Full name of the grouping ECProperty class */\r\n className: string;\r\n /** Name of the ECProperty */\r\n propertyName: string;\r\n /** Raw grouping values */\r\n groupingValues: any[];\r\n}\r\n/**\r\n * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].\r\n */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.ECPropertyGroupingNode;\r\n className: string;\r\n propertyName: string;\r\n groupingValues: any[];\r\n}\r\n\r\n/**\r\n * Data structure that describes a display label grouping node key\r\n * @public\r\n */\r\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n /** Grouping display label */\r\n label: string;\r\n}\r\n/**\r\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].\r\n */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {\r\n type: StandardNodeTypes.DisplayLabelGroupingNode;\r\n label: string;\r\n}\r\n\r\n/**\r\n * One of the serialized node key types\r\n * @public\r\n * @deprecated in 3.x. Use [[NodeKey]].\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n\r\n/**\r\n * Data structure that describes a presentation query\r\n * @public\r\n */\r\nexport interface PresentationQuery {\r\n /** ECSQL query */\r\n query: string;\r\n /** The query bindings */\r\n bindings?: PresentationQueryBinding[];\r\n}\r\n\r\n/**\r\n * Defines an [[Id64String]] value binding.\r\n * @public\r\n */\r\nexport interface IdBinding {\r\n type: \"Id\";\r\n value: Id64String;\r\n}\r\n\r\n/**\r\n * Defines an [[IdSet]] value binding for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface IdSetBinding {\r\n type: \"IdSet\";\r\n value: Id64String[];\r\n}\r\n\r\n/**\r\n * Defines an EC value binding.\r\n * @public\r\n */\r\nexport interface ECValueBinding {\r\n type: \"ECValue\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any;\r\n}\r\n\r\n/**\r\n * Defines a binding for a list of EC values for use with `InVirtualSet` ECSQL function.\r\n * @public\r\n */\r\nexport interface ECValueSetBinding {\r\n type: \"ValueSet\";\r\n valueType: string;\r\n valueTypeExtended?: string;\r\n value: any[];\r\n}\r\n\r\n/**\r\n * One of the [[PresentationQuery]] binding types.\r\n * @public\r\n */\r\nexport type PresentationQueryBinding = IdBinding | IdSetBinding | ECValueBinding | ECValueSetBinding;\r\n"]}
1
+ {"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AACzD,8BAAoC;AAEpC;;;GAGG;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;AAOD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,OAAO,CA0HvB;AA1HD,WAAiB,OAAO;IACtB;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,GAAY;QACjC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,cAAM,SAErB,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAiB;QACxC,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC;IACjC,CAAC;IAFe,gBAAQ,WAEvB,CAAA;IAMD,4DAA4D;IAC5D,SAAgB,kBAAkB,CAAC,GAA0B;QAC3D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,eAAe,CAAC;IACxD,CAAC;IAFe,0BAAkB,qBAEjC,CAAA;IAMD,4DAA4D;IAC5D,SAAgB,sBAAsB,CAAC,GAA0B;QAC/D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,mBAAmB,CAAC;IAC5D,CAAC;IAFe,8BAAsB,yBAErC,CAAA;IAMD,4DAA4D;IAC5D,SAAgB,yBAAyB,CAAC,GAA0B;QAClE,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC,sBAAsB,CAAC;IAC/D,CAAC;IAFe,iCAAyB,4BAExC,CAAA;IAMD,4DAA4D;I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,CAAC,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;gBACxD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;gBACjD,IAAI,CAAC,KAAK,gBAAW,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBACxE,OAAO,KAAK,CAAC;gBACf,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,IAAA,qBAAM,EAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;QACzC,CAAC;QACD,IAAI,yBAAyB,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,IAAA,qBAAM,EAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;QAClF,CAAC;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,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,EA1HgB,OAAO,uBAAP,OAAO,QA0HvB","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 Hierarchies\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { InstanceKey } from \"../EC\";\n\n/**\n * Standard node types\n * @public\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 */\nexport type NodeKey = BaseNodeKey | ECInstancesNodeKey | ECClassGroupingNodeKey | ECPropertyGroupingNodeKey | LabelGroupingNodeKey;\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace NodeKey {\n /**\n * Serialize given [[NodeKey]] to JSON\n * @deprecated in 3.x. Use [[NodeKey]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(key: NodeKey): NodeKeyJSON {\n return { ...key };\n }\n\n /**\n * Deserialize node key from JSON\n * @deprecated in 3.x. Use [[NodeKey]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: NodeKeyJSON): NodeKey {\n return { version: 1, ...json };\n }\n\n /** Checks if the supplied key is an [[ECInstancesNodeKey]] */\n export function isInstancesNodeKey(key: NodeKey): key is ECInstancesNodeKey;\n /** Checks if the supplied key is an [[ECInstancesNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function isInstancesNodeKey(key: NodeKey | NodeKeyJSON) {\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 /** Checks if the supplied key is an [[ECClassGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function isClassGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\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 /** Checks if the supplied key is an [[ECPropertyGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function isPropertyGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\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 /** Checks if the supplied key is a [[LabelGroupingNodeKey]]. @deprecated in 3.x. Use an override for [[NodeKey]]. */\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function isLabelGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\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 /** Checks if the supplied key is a grouping node key. @deprecated in 3.x. Use an override for [[NodeKey]]. */\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key); // eslint-disable-line @typescript-eslint/no-deprecated\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 */\nexport type NodeKeyPath = NodeKey[];\n\n/**\n * Data structure that describes a basic node key\n * @public\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 * Serialized [[BaseNodeKey]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[BaseNodeKey]].\n */\nexport interface BaseNodeKeyJSON {\n type: string;\n // TODO: make this required\n version?: number;\n pathFromRoot: string[];\n instanceKeysSelectQuery?: PresentationQuery;\n}\n\n/**\n * Data structure that describes a node ECInstance node key\n * @public\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 * Serialized [[ECInstancesNodeKey]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[ECInstancesNodeKey]].\n */\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKey {\n type: StandardNodeTypes.ECInstancesNode;\n instanceKeys: InstanceKey[];\n}\n\n/**\n * Data structure that describes a grouping node key\n * @public\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 * Serialized [[GroupingNodeKey]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[GroupingNodeKey]].\n */\nexport interface GroupingNodeKeyJSON extends BaseNodeKey {\n groupedInstancesCount: number;\n}\n\n/**\n * Data structure that describes an ECClass grouping node key\n * @public\n */\nexport interface ECClassGroupingNodeKey extends GroupingNodeKey {\n type: StandardNodeTypes.ECClassGroupingNode;\n /** Full name of the grouping ECClass */\n className: string;\n}\n/**\n * Serialized [[ECClassGroupingNodeKey]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[ECClassGroupingNodeKey]].\n */\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKey {\n type: StandardNodeTypes.ECClassGroupingNode;\n className: string;\n}\n\n/**\n * Data structure that describes an ECProperty grouping node key\n * @public\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 * Serialized [[ECPropertyGroupingNodeKey]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[ECPropertyGroupingNodeKey]].\n */\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKey {\n type: StandardNodeTypes.ECPropertyGroupingNode;\n className: string;\n propertyName: string;\n groupingValues: any[];\n}\n\n/**\n * Data structure that describes a display label grouping node key\n * @public\n */\nexport interface LabelGroupingNodeKey extends GroupingNodeKey {\n type: StandardNodeTypes.DisplayLabelGroupingNode;\n /** Grouping display label */\n label: string;\n}\n/**\n * Serialized [[LabelGroupingNodeKey]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[LabelGroupingNodeKey]].\n */\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKey {\n type: StandardNodeTypes.DisplayLabelGroupingNode;\n label: string;\n}\n\n/**\n * One of the serialized node key types\n * @public\n * @deprecated in 3.x. Use [[NodeKey]].\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\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 +1 @@
1
- {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,+BAA6C;AAsH7C,cAAc;AACd,IAAiB,IAAI,CA+FpB;AA/FD,WAAiB,IAAI;IACnB;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,IAAU;QAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO;YACL,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;IANe,WAAM,SAMrB,CAAA;IAED,gBAAgB;IAChB,4DAA4D;IAC5D,SAAgB,aAAa,CAAC,IAAiB;QAC7C,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO;YACL,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;IAVe,kBAAa,gBAU5B,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAuB;QAC9C,IAAI,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AC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IANe,iBAAY,eAM3B,CAAA;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAW,EAAE,KAAU;QACjD,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,gBAAW,cAE1B,CAAA;AACH,CAAC,EA/FgB,IAAI,oBAAJ,IAAI,QA+FpB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\r\nimport { NodeKey, NodeKeyJSON } from \"./Key\";\r\n\r\n/**\r\n * Data structure that describes a tree node.\r\n * @public\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.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n imageId?: string;\r\n /**\r\n * Foreground color\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n foreColor?: string;\r\n /**\r\n * Background color\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n backColor?: string;\r\n /**\r\n * Font style\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n fontStyle?: 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 * Is checkbox visible for this node\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isCheckboxVisible?: boolean;\r\n /**\r\n * Is this node's checkbox checked\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isChecked?: boolean;\r\n /**\r\n * Is this node's checkbox enabled\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n isCheckboxEnabled?: 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 * Serialized [[Node]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[Node]].\r\n */\r\nexport interface NodeJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n key: NodeKeyJSON;\r\n // TODO: rename to `label`\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n labelDefinition: LabelDefinitionJSON;\r\n description?: string;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n imageId?: string;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n foreColor?: string;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n backColor?: string;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n fontStyle?: string;\r\n hasChildren?: boolean;\r\n isSelectionDisabled?: boolean;\r\n isEditable?: boolean;\r\n isExpanded?: boolean;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n isCheckboxVisible?: boolean;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n isChecked?: boolean;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n isCheckboxEnabled?: boolean;\r\n supportsFiltering?: boolean;\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 */\r\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\r\n\r\n/**\r\n * Serialized [[PartialNode]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[PartialNode]].\r\n */\r\nexport type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, \"key\" | \"labelDefinition\">;\r\n\r\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\r\n\r\n/** @public */\r\nexport namespace Node {\r\n /**\r\n * Serialize given [[Node]] to JSON\r\n * @deprecated in 3.x. Use [[Node]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(node: Node): NodeJSON {\r\n const { label, ...baseNode } = node;\r\n return {\r\n ...baseNode,\r\n labelDefinition: label,\r\n };\r\n }\r\n\r\n /** @internal */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toPartialJSON(node: PartialNode): PartialNodeJSON {\r\n if (node.key === undefined) {\r\n return node;\r\n }\r\n\r\n const { label, ...baseNode } = node;\r\n return {\r\n ...baseNode,\r\n labelDefinition: label,\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[Node]] from JSON\r\n * @deprecated in 3.x. Use [[Node]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NodeJSON | string): Node {\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, reviver);\r\n }\r\n const { labelDefinition, ...baseJson } = json;\r\n return {\r\n ...baseJson,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n key: NodeKey.fromJSON(json.key),\r\n label: labelDefinition,\r\n };\r\n }\r\n\r\n /** @internal */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromPartialJSON(json: PartialNodeJSON): PartialNode {\r\n if (json.key === undefined) {\r\n return json;\r\n }\r\n\r\n const { key, labelDefinition, ...baseJson } = json;\r\n return {\r\n ...baseJson,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n key: NodeKey.fromJSON(key),\r\n label: labelDefinition,\r\n };\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Node]] objects.\r\n * @internal\r\n */\r\n export function reviver(key: string, value: any): any {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return key === \"\" ? fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize nodes list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized nodes list\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function listFromJSON(json: NodeJSON[] | string): Node[] {\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, listReviver);\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map((m) => fromJSON(m));\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Node]][] objects.\r\n * @internal\r\n */\r\n export function listReviver(key: string, value: any): any {\r\n return key === \"\" ? listFromJSON(value) : value;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,+BAA6C;AAsH7C,cAAc;AACd,IAAiB,IAAI,CA+FpB;AA/FD,WAAiB,IAAI;IACnB;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,IAAU;QAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO;YACL,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;IANe,WAAM,SAMrB,CAAA;IAED,gBAAgB;IAChB,4DAA4D;IAC5D,SAAgB,aAAa,CAAC,IAAiB;QAC7C,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO;YACL,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;SACvB,CAAC;IACJ,CAAC;IAVe,kBAAa,gBAU5B,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAAuB;QAC9C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACnC,CAAC;QACD,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC9C,OAAO;YACL,GAAG,QAAQ;YACX,4DAA4D;YAC5D,GAAG,EAAE,aAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,GA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BAAW,cAE1B,CAAA;AACH,CAAC,EA/FgB,IAAI,oBAAJ,IAAI,QA+FpB","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 Hierarchies\n */\n\nimport { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\nimport { NodeKey, NodeKeyJSON } from \"./Key\";\n\n/**\n * Data structure that describes a tree node.\n * @public\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.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n imageId?: string;\n /**\n * Foreground color\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n foreColor?: string;\n /**\n * Background color\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n backColor?: string;\n /**\n * Font style\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n fontStyle?: 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 * Is checkbox visible for this node\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n isCheckboxVisible?: boolean;\n /**\n * Is this node's checkbox checked\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n isChecked?: boolean;\n /**\n * Is this node's checkbox enabled\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n isCheckboxEnabled?: 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 * Serialized [[Node]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[Node]].\n */\nexport interface NodeJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n key: NodeKeyJSON;\n // TODO: rename to `label`\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelDefinition: LabelDefinitionJSON;\n description?: string;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n imageId?: string;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n foreColor?: string;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n backColor?: string;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n fontStyle?: string;\n hasChildren?: boolean;\n isSelectionDisabled?: boolean;\n isEditable?: boolean;\n isExpanded?: boolean;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n isCheckboxVisible?: boolean;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n isChecked?: boolean;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n isCheckboxEnabled?: boolean;\n supportsFiltering?: boolean;\n extendedData?: {\n [key: string]: any;\n };\n}\n\n/**\n * Partial node definition.\n * @public\n */\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\n\n/**\n * Serialized [[PartialNode]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[PartialNode]].\n */\nexport type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, \"key\" | \"labelDefinition\">;\n\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\n\n/** @public */\nexport namespace Node {\n /**\n * Serialize given [[Node]] to JSON\n * @deprecated in 3.x. Use [[Node]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(node: Node): NodeJSON {\n const { label, ...baseNode } = node;\n return {\n ...baseNode,\n labelDefinition: label,\n };\n }\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toPartialJSON(node: PartialNode): PartialNodeJSON {\n if (node.key === undefined) {\n return node;\n }\n\n const { label, ...baseNode } = node;\n return {\n ...baseNode,\n labelDefinition: label,\n };\n }\n\n /**\n * Deserialize [[Node]] from JSON\n * @deprecated in 3.x. Use [[Node]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: NodeJSON | string): Node {\n if (typeof json === \"string\") {\n return JSON.parse(json, reviver);\n }\n const { labelDefinition, ...baseJson } = json;\n return {\n ...baseJson,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n key: NodeKey.fromJSON(json.key),\n label: labelDefinition,\n };\n }\n\n /** @internal */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromPartialJSON(json: PartialNodeJSON): PartialNode {\n if (json.key === undefined) {\n return json;\n }\n\n const { key, labelDefinition, ...baseJson } = json;\n return {\n ...baseJson,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n key: NodeKey.fromJSON(key),\n label: labelDefinition,\n };\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing [[Node]] objects.\n * @internal\n */\n export function reviver(key: string, value: any): any {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return key === \"\" ? fromJSON(value) : value;\n }\n\n /**\n * Deserialize nodes list from JSON\n * @param json JSON or JSON serialized to string to deserialize from\n * @returns Deserialized nodes list\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function listFromJSON(json: NodeJSON[] | string): Node[] {\n if (typeof json === \"string\") {\n return JSON.parse(json, listReviver);\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map((m) => fromJSON(m));\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing [[Node]][] objects.\n * @internal\n */\n export function listReviver(key: string, value: any): any {\n return key === \"\" ? listFromJSON(value) : value;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NodePathElement.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAAwC;AAmCxC,cAAc;AACd,IAAiB,eAAe,CAmF/B;AAnFD,WAAiB,eAAe;IAC9B;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,GAAoB;QACzC,4DAA4D;QAC5D,MAAM,MAAM,GAAwB;YAClC,4DAA4D;YAC5D,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;YAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,4DAA4D;YAC5D,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,MAAM,CAAC;SACnD,CAAC;QACF,IAAI,SAAS,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAC;YAC/B,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QACjC,CAAC;QACD,IAAI,SAAS,KAAK,GAAG,C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C,IAAoC;QAC/D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvC,CAAC;QACD,4DAA4D;QAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IANe,4BAAY,eAM3B,CAAA;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAW,EAAE,KAAU;QACjD,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,2BAAW,cAE1B,CAAA;AACH,CAAC,EAnFgB,eAAe,+BAAf,eAAe,QAmF/B;AAuBD,cAAc;AACd,IAAiB,qBAAqB,CAwBrC;AAxBD,WAAiB,qBAAqB;IACpC;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,IAA2B;QAChD,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,YAAY;YAC7B,kBAAkB,EAAE,IAAI,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IALe,4BAAM,SAKrB,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAA+B;QACtD,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;SAC3C,CAAC;IACJ,CAAC;IALe,8BAAQ,WAKvB,CAAA;AACH,CAAC,EAxBgB,qBAAqB,qCAArB,qBAAqB,QAwBrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Hierarchies\r\n */\r\n\r\nimport { Node, NodeJSON } from \"./Node\";\r\n\r\n/**\r\n * Serialized [[NodePathElement]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[NodePathElement]].\r\n */\r\nexport interface NodePathElementJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n node: NodeJSON;\r\n index: number;\r\n isMarked?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n children: NodePathElementJSON[];\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n filteringData?: NodePathFilteringDataJSON;\r\n}\r\n\r\n/**\r\n * Describes a single step in the nodes path.\r\n * @public\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/** @public */\r\nexport namespace NodePathElement {\r\n /**\r\n * Serialize given [[NodePathElement]] to JSON\r\n * @deprecated in 3.x. Use [[NodePathElement]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(npe: NodePathElement): NodePathElementJSON {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const result: NodePathElementJSON = {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n node: Node.toJSON(npe.node),\r\n index: npe.index,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n children: npe.children.map(NodePathElement.toJSON),\r\n };\r\n if (undefined !== npe.isMarked) {\r\n result.isMarked = npe.isMarked;\r\n }\r\n if (undefined !== npe.filteringData) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n result.filteringData = NodePathFilteringData.toJSON(npe.filteringData);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathElement]] from JSON\r\n * @deprecated in 3.x. Use [[NodePathElement]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NodePathElementJSON | string): NodePathElement {\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, reviver);\r\n }\r\n const result: NodePathElement = {\r\n index: json.index,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n node: Node.fromJSON(json.node),\r\n children: listFromJSON(json.children),\r\n };\r\n if (undefined !== json.isMarked) {\r\n result.isMarked = json.isMarked;\r\n }\r\n if (undefined !== json.filteringData) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n result.filteringData = NodePathFilteringData.fromJSON(json.filteringData);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[NodePathElement]] objects.\r\n * @internal\r\n */\r\n export function reviver(key: string, value: any): any {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return key === \"\" ? fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathElement]] list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized [[NodePathElement]] list\r\n * @internal\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function listFromJSON(json: NodePathElementJSON[] | string): NodePathElement[] {\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, listReviver);\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return json.map((m) => fromJSON(m));\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[NodePathElement]][] objects.\r\n * @internal\r\n */\r\n export function listReviver(key: string, value: any): any {\r\n return key === \"\" ? listFromJSON(value) : value;\r\n }\r\n}\r\n\r\n/**\r\n * Serialized [[NodePathFilteringData]] JSON representation.\r\n * @public\r\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\r\n */\r\nexport interface NodePathFilteringDataJSON {\r\n occurances: number;\r\n childrenOccurances: number;\r\n}\r\n\r\n/**\r\n * Data related to node hierarchy filtering\r\n * @public\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\r\n/** @public */\r\nexport namespace NodePathFilteringData {\r\n /**\r\n * Serialize given [[NodePathFilteringData]] to JSON\r\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function toJSON(npfd: NodePathFilteringData): NodePathFilteringDataJSON {\r\n return {\r\n occurances: npfd.matchesCount,\r\n childrenOccurances: npfd.childMatchesCount,\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NodePathFilteringData]] from JSON\r\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n export function fromJSON(json: NodePathFilteringDataJSON): NodePathFilteringData {\r\n return {\r\n matchesCount: json.occurances,\r\n childMatchesCount: json.childrenOccurances,\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"NodePathElement.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/NodePathElement.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,iCAAwC;AAmCxC,cAAc;AACd,IAAiB,eAAe,CAmF/B;AAnFD,WAAiB,eAAe;IAC9B;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,GAAoB;QACzC,4DAA4D;QAC5D,MAAM,MAAM,GAAwB;YAClC,4DAA4D;YAC5D,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;YAC3B,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,4DAA4D;YAC5D,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,MAAM,CAAC;SACnD,CAAC;QACF,IAAI,SAAS,KAAK,GAAG,CAAC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AC,CAAC,CAAC,KAAK,CAAC;IAC9C,CAAC;IAHe,uBAAO,UAGtB,CAAA;IAED;;;;;OAKG;IACH,4DAA4D;IAC5D,SAAgB,YAAY,CAAC,IAAoC;QAC/D,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvC,CAAC;QACD,4DAA4D;QAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IANe,4BAAY,eAM3B,CAAA;IAED;;;;OAIG;IACH,SAAgB,WAAW,CAAC,GAAW,EAAE,KAAU;QACjD,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC;IAFe,2BAAW,cAE1B,CAAA;AACH,CAAC,EAnFgB,eAAe,+BAAf,eAAe,QAmF/B;AAuBD,cAAc;AACd,IAAiB,qBAAqB,CAwBrC;AAxBD,WAAiB,qBAAqB;IACpC;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,IAA2B;QAChD,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,YAAY;YAC7B,kBAAkB,EAAE,IAAI,CAAC,iBAAiB;SAC3C,CAAC;IACJ,CAAC;IALe,4BAAM,SAKrB,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAA+B;QACtD,OAAO;YACL,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;SAC3C,CAAC;IACJ,CAAC;IALe,8BAAQ,WAKvB,CAAA;AACH,CAAC,EAxBgB,qBAAqB,qCAArB,qBAAqB,QAwBrC","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 Hierarchies\n */\n\nimport { Node, NodeJSON } from \"./Node\";\n\n/**\n * Serialized [[NodePathElement]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[NodePathElement]].\n */\nexport interface NodePathElementJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n node: NodeJSON;\n index: number;\n isMarked?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n children: NodePathElementJSON[];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n filteringData?: NodePathFilteringDataJSON;\n}\n\n/**\n * Describes a single step in the nodes path.\n * @public\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/** @public */\nexport namespace NodePathElement {\n /**\n * Serialize given [[NodePathElement]] to JSON\n * @deprecated in 3.x. Use [[NodePathElement]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(npe: NodePathElement): NodePathElementJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const result: NodePathElementJSON = {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n node: Node.toJSON(npe.node),\n index: npe.index,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n children: npe.children.map(NodePathElement.toJSON),\n };\n if (undefined !== npe.isMarked) {\n result.isMarked = npe.isMarked;\n }\n if (undefined !== npe.filteringData) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n result.filteringData = NodePathFilteringData.toJSON(npe.filteringData);\n }\n return result;\n }\n\n /**\n * Deserialize [[NodePathElement]] from JSON\n * @deprecated in 3.x. Use [[NodePathElement]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: NodePathElementJSON | string): NodePathElement {\n if (typeof json === \"string\") {\n return JSON.parse(json, reviver);\n }\n const result: NodePathElement = {\n index: json.index,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n node: Node.fromJSON(json.node),\n children: listFromJSON(json.children),\n };\n if (undefined !== json.isMarked) {\n result.isMarked = json.isMarked;\n }\n if (undefined !== json.filteringData) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n result.filteringData = NodePathFilteringData.fromJSON(json.filteringData);\n }\n return result;\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing [[NodePathElement]] objects.\n * @internal\n */\n export function reviver(key: string, value: any): any {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return key === \"\" ? fromJSON(value) : value;\n }\n\n /**\n * Deserialize [[NodePathElement]] list from JSON\n * @param json JSON or JSON serialized to string to deserialize from\n * @returns Deserialized [[NodePathElement]] list\n * @internal\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function listFromJSON(json: NodePathElementJSON[] | string): NodePathElement[] {\n if (typeof json === \"string\") {\n return JSON.parse(json, listReviver);\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return json.map((m) => fromJSON(m));\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing [[NodePathElement]][] objects.\n * @internal\n */\n export function listReviver(key: string, value: any): any {\n return key === \"\" ? listFromJSON(value) : value;\n }\n}\n\n/**\n * Serialized [[NodePathFilteringData]] JSON representation.\n * @public\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\n */\nexport interface NodePathFilteringDataJSON {\n occurances: number;\n childrenOccurances: number;\n}\n\n/**\n * Data related to node hierarchy filtering\n * @public\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\n/** @public */\nexport namespace NodePathFilteringData {\n /**\n * Serialize given [[NodePathFilteringData]] to JSON\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(npfd: NodePathFilteringData): NodePathFilteringDataJSON {\n return {\n occurances: npfd.matchesCount,\n childrenOccurances: npfd.childMatchesCount,\n };\n }\n\n /**\n * Deserialize [[NodePathFilteringData]] from JSON\n * @deprecated in 3.x. Use [[NodePathFilteringData]].\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: NodePathFilteringDataJSON): NodePathFilteringData {\n return {\n matchesCount: json.occurances,\n childMatchesCount: json.childrenOccurances,\n };\n }\n}\n"]}
@@ -1 +1 @@
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
+ {"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 +1 @@
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\";\r\nimport { RelationshipPathSpecification } from \"./RelationshipPathSpecification\";\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
+ {"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\";\nimport { RelationshipPathSpecification } from \"./RelationshipPathSpecification\";\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 +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":["/*---------------------------------------------------------------------------------------------\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
+ {"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 +1 @@
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\";\r\nimport { RelationshipDirection } from \"./RelationshipDirection\";\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
+ {"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\";\nimport { RelationshipDirection } from \"./RelationshipDirection\";\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 +1 @@
1
- {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Rule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA6DH;;;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/** @packageDocumentation\r\n * @module PresentationRules\r\n */\r\n\r\nimport { ContentRule } from \"./content/ContentRule\";\r\nimport { DefaultPropertyCategoryOverride } from \"./content/DefaultPropertyCategoryOverride\";\r\nimport { ContentModifier } from \"./content/modifiers/ContentModifier\";\r\nimport { CustomizationRule } from \"./customization/CustomizationRule\";\r\nimport { NavigationRule } from \"./hierarchy/NavigationRule\";\r\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification\";\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 * Container of a [[condition]] property. Used for rules that support conditions. Not\r\n * meant to be used directly, see [[Rule]].\r\n *\r\n * @deprecated in 3.x. This interface is not used anymore. All interfaces that used to extend it, have the [[condition]]\r\n * attribute of their own.\r\n * @public\r\n */\r\nexport interface ConditionContainer {\r\n /**\r\n * Defines a condition for the rule, which needs to be met in order to execute it.\r\n */\r\n condition?: string;\r\n}\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
+ {"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../../src/presentation-common/rules/Rule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AA6DH;;;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/** @packageDocumentation\n * @module PresentationRules\n */\n\nimport { ContentRule } from \"./content/ContentRule\";\nimport { DefaultPropertyCategoryOverride } from \"./content/DefaultPropertyCategoryOverride\";\nimport { ContentModifier } from \"./content/modifiers/ContentModifier\";\nimport { CustomizationRule } from \"./customization/CustomizationRule\";\nimport { NavigationRule } from \"./hierarchy/NavigationRule\";\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification\";\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 * Container of a [[condition]] property. Used for rules that support conditions. Not\n * meant to be used directly, see [[Rule]].\n *\n * @deprecated in 3.x. This interface is not used anymore. All interfaces that used to extend it, have the [[condition]]\n * attribute of their own.\n * @public\n */\nexport interface ConditionContainer {\n /**\n * Defines a condition for the rule, which needs to be met in order to execute it.\n */\n condition?: string;\n}\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 +1 @@
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\";\r\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification\";\r\nimport { VariablesGroup } from \"./Variables\";\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
+ {"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\";\nimport { RequiredSchemaSpecification } from \"./SchemasSpecification\";\nimport { VariablesGroup } from \"./Variables\";\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 +1 @@
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
+ {"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 +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":["/*---------------------------------------------------------------------------------------------\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
+ {"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 +1 @@
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\";\r\nimport { ContentSpecificationBase } from \"./ContentSpecification\";\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
+ {"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\";\nimport { ContentSpecificationBase } from \"./ContentSpecification\";\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 +1 @@
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\";\r\nimport { ContentSpecificationBase } from \"./ContentSpecification\";\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
+ {"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\";\nimport { ContentSpecificationBase } from \"./ContentSpecification\";\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 +1 @@
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\";\r\nimport { ContentSpecification } from \"./ContentSpecification\";\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
+ {"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\";\nimport { ContentSpecification } from \"./ContentSpecification\";\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 +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":["/*---------------------------------------------------------------------------------------------\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\";\r\nimport { ContentInstancesOfSpecificClassesSpecification } from \"./ContentInstancesOfSpecificClassesSpecification\";\r\nimport { ContentRelatedInstancesSpecification } from \"./ContentRelatedInstancesSpecification\";\r\nimport { ContentModifiersList } from \"./modifiers/ContentModifier\";\r\nimport { SelectedNodeInstancesSpecification } from \"./SelectedNodeInstancesSpecification\";\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 /**\r\n * Should image IDs be calculated for the returned instances. When `true`, [[ImageIdOverride]] rules get applied when\r\n * creating the content.\r\n *\r\n * @deprecated in 3.x. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n showImages?: boolean;\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
+ {"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\";\nimport { ContentInstancesOfSpecificClassesSpecification } from \"./ContentInstancesOfSpecificClassesSpecification\";\nimport { ContentRelatedInstancesSpecification } from \"./ContentRelatedInstancesSpecification\";\nimport { ContentModifiersList } from \"./modifiers/ContentModifier\";\nimport { SelectedNodeInstancesSpecification } from \"./SelectedNodeInstancesSpecification\";\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 /**\n * Should image IDs be calculated for the returned instances. When `true`, [[ImageIdOverride]] rules get applied when\n * creating the content.\n *\n * @deprecated in 3.x. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n showImages?: boolean;\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 +1 @@
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\";\r\nimport { PropertyCategorySpecification } from \"./modifiers/PropertyCategorySpecification\";\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
+ {"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\";\nimport { PropertyCategorySpecification } from \"./modifiers/PropertyCategorySpecification\";\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"]}