@itwin/presentation-common 3.6.0-dev.51 → 3.6.0-dev.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/assets/locales/en/BisCore.json +18 -18
- package/lib/cjs/assets/locales/en/ECPresentation.json +9 -9
- package/lib/cjs/assets/locales/en/RulesEngine.json +5 -5
- package/lib/cjs/presentation-common/AsyncTasks.d.ts +22 -22
- package/lib/cjs/presentation-common/AsyncTasks.js +38 -38
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts +12 -12
- package/lib/cjs/presentation-common/CommonLoggerCategory.js +20 -20
- package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.d.ts +125 -125
- package/lib/cjs/presentation-common/Diagnostics.js +72 -72
- package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts +315 -315
- package/lib/cjs/presentation-common/EC.js +270 -270
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.d.ts +123 -123
- package/lib/cjs/presentation-common/ElementProperties.js +9 -9
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.d.ts +45 -45
- package/lib/cjs/presentation-common/Error.js +62 -62
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +59 -59
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js +9 -9
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.d.ts +146 -146
- package/lib/cjs/presentation-common/KeySet.js +423 -423
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.d.ts +79 -79
- package/lib/cjs/presentation-common/LabelDefinition.js +76 -76
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.d.ts +29 -29
- package/lib/cjs/presentation-common/LocalizationHelper.js +110 -110
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +40 -40
- package/lib/cjs/presentation-common/PresentationIpcInterface.js +12 -12
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +256 -250
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js +23 -23
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +188 -181
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +107 -102
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +26 -26
- package/lib/cjs/presentation-common/RegisteredRuleset.js +33 -33
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +83 -82
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +161 -155
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts +166 -166
- package/lib/cjs/presentation-common/RulesetVariables.js +55 -55
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.d.ts +44 -44
- package/lib/cjs/presentation-common/RulesetsFactory.js +223 -223
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts +196 -196
- package/lib/cjs/presentation-common/Update.js +196 -196
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.d.ts +62 -62
- package/lib/cjs/presentation-common/Utils.js +43 -43
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.d.ts +49 -49
- package/lib/cjs/presentation-common/content/Category.js +49 -49
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.d.ts +38 -38
- package/lib/cjs/presentation-common/content/Content.js +56 -56
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +101 -101
- package/lib/cjs/presentation-common/content/ContentTraverser.js +420 -420
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +279 -275
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +195 -195
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +21 -21
- package/lib/cjs/presentation-common/content/DisplayTypes.js +29 -29
- package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/cjs/presentation-common/content/Editor.d.ts +15 -15
- package/lib/cjs/presentation-common/content/Editor.js +9 -9
- package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +282 -282
- package/lib/cjs/presentation-common/content/Fields.js +394 -394
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +87 -87
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +86 -86
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +51 -51
- package/lib/cjs/presentation-common/content/Property.js +36 -36
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/Renderer.d.ts +11 -11
- package/lib/cjs/presentation-common/content/Renderer.js +9 -9
- package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.d.ts +72 -72
- package/lib/cjs/presentation-common/content/TypeDescription.js +23 -23
- package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +157 -157
- package/lib/cjs/presentation-common/content/Value.js +217 -217
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +31 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +24 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +185 -185
- package/lib/cjs/presentation-common/hierarchy/Key.js +112 -112
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +149 -141
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +97 -97
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +85 -85
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +98 -98
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts +45 -45
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js +9 -9
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipDirection.d.ts +13 -13
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js +21 -21
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +53 -53
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.d.ts +74 -74
- package/lib/cjs/presentation-common/rules/Rule.js +35 -35
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.d.ts +66 -66
- package/lib/cjs/presentation-common/rules/Ruleset.js +9 -9
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +41 -41
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.d.ts +55 -55
- package/lib/cjs/presentation-common/rules/Variables.js +25 -25
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +30 -30
- package/lib/cjs/presentation-common/rules/content/ContentRule.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +55 -55
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +20 -20
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +105 -105
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +21 -21
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +93 -93
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +43 -43
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +200 -200
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +51 -51
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +156 -156
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +25 -25
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +58 -58
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +15 -15
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +97 -97
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +22 -22
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +76 -76
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +19 -19
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +17 -17
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +36 -36
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +25 -25
- package/lib/cjs/presentation-common/selection/SelectionScope.js +9 -9
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +112 -111
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +128 -127
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts +22 -22
- package/lib/esm/presentation-common/AsyncTasks.js +34 -34
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/CommonLoggerCategory.d.ts +12 -12
- package/lib/esm/presentation-common/CommonLoggerCategory.js +17 -17
- package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.d.ts +125 -125
- package/lib/esm/presentation-common/Diagnostics.js +67 -67
- package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +315 -315
- package/lib/esm/presentation-common/EC.js +267 -267
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.d.ts +123 -123
- package/lib/esm/presentation-common/ElementProperties.js +8 -8
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.d.ts +45 -45
- package/lib/esm/presentation-common/Error.js +58 -58
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +59 -59
- package/lib/esm/presentation-common/InstanceFilterDefinition.js +8 -8
- package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.d.ts +146 -146
- package/lib/esm/presentation-common/KeySet.js +419 -419
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.d.ts +79 -79
- package/lib/esm/presentation-common/LabelDefinition.js +73 -73
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.d.ts +29 -29
- package/lib/esm/presentation-common/LocalizationHelper.js +106 -106
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +40 -40
- package/lib/esm/presentation-common/PresentationIpcInterface.js +9 -9
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +256 -250
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js +18 -18
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +188 -181
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +103 -98
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +26 -26
- package/lib/esm/presentation-common/RegisteredRuleset.js +29 -29
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +83 -82
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +157 -151
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts +166 -166
- package/lib/esm/presentation-common/RulesetVariables.js +52 -52
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.d.ts +44 -44
- package/lib/esm/presentation-common/RulesetsFactory.js +219 -219
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts +196 -196
- package/lib/esm/presentation-common/Update.js +193 -193
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.d.ts +62 -62
- package/lib/esm/presentation-common/Utils.js +39 -39
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.d.ts +49 -49
- package/lib/esm/presentation-common/content/Category.js +46 -46
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.d.ts +38 -38
- package/lib/esm/presentation-common/content/Content.js +52 -52
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts +101 -101
- package/lib/esm/presentation-common/content/ContentTraverser.js +411 -411
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +279 -275
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +191 -191
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.d.ts +21 -21
- package/lib/esm/presentation-common/content/DisplayTypes.js +26 -26
- package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/esm/presentation-common/content/Editor.d.ts +15 -15
- package/lib/esm/presentation-common/content/Editor.js +8 -8
- package/lib/esm/presentation-common/content/Editor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +282 -282
- package/lib/esm/presentation-common/content/Fields.js +387 -387
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +87 -87
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +82 -82
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +51 -51
- package/lib/esm/presentation-common/content/Property.js +33 -33
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/Renderer.d.ts +11 -11
- package/lib/esm/presentation-common/content/Renderer.js +8 -8
- package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.d.ts +72 -72
- package/lib/esm/presentation-common/content/TypeDescription.js +20 -20
- package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +157 -157
- package/lib/esm/presentation-common/content/Value.js +214 -214
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +31 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +21 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +185 -185
- package/lib/esm/presentation-common/hierarchy/Key.js +109 -109
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +149 -141
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +94 -94
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +85 -85
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +95 -95
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts +45 -45
- package/lib/esm/presentation-common/rules/ClassSpecifications.js +8 -8
- package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipDirection.d.ts +13 -13
- package/lib/esm/presentation-common/rules/RelationshipDirection.js +18 -18
- package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +53 -53
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.d.ts +74 -74
- package/lib/esm/presentation-common/rules/Rule.js +32 -32
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.d.ts +66 -66
- package/lib/esm/presentation-common/rules/Ruleset.js +8 -8
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +41 -41
- package/lib/esm/presentation-common/rules/SchemasSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.d.ts +55 -55
- package/lib/esm/presentation-common/rules/Variables.js +22 -22
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +30 -30
- package/lib/esm/presentation-common/rules/content/ContentRule.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +55 -55
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js +17 -17
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +8 -8
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +105 -105
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +18 -18
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +93 -93
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +40 -40
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +200 -200
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +48 -48
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +156 -156
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +22 -22
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +58 -58
- package/lib/esm/presentation-common/rules/customization/SortingRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +15 -15
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +97 -97
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +19 -19
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +76 -76
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +16 -16
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +17 -17
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +36 -36
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +25 -25
- package/lib/esm/presentation-common/selection/SelectionScope.js +8 -8
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +112 -111
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +116 -115
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/BisCore.json +18 -18
- package/lib/public/locales/en/ECPresentation.json +9 -9
- package/lib/public/locales/en/RulesEngine.json +5 -5
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAmB,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,MAAM,KAAW,OAAO,CA4GvB;AA5GD,WAAiB,OAAO;IACtB,0CAA0C;IAC1C,SAAgB,MAAM,CAAC,GAAY;QACjC,IAAI,kBAAkB,CAAC,GAAG,CAAC;YACzB,OAAO,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC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,SAAS,KAAK,GAAG,CAAC,SAAS,CAAC;SACxC;QACD,IAAI,yBAAyB,CAAC,GAAG,CAAC,EAAE;YAClC,MAAM,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,OAAO,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,SAAS,IAAI,GAAG,CAAC,YAAY,KAAK,GAAG,CAAC,YAAY,CAAC;SACjF;QACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA5GgB,OAAO,KAAP,OAAO,QA4GvB","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 } from \"@itwin/core-bentley\";\r\nimport { InstanceKey, InstanceKeyJSON } 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\nexport namespace NodeKey { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Serialize given [[NodeKey]] to JSON */\r\n export function toJSON(key: NodeKey): NodeKeyJSON {\r\n if (isInstancesNodeKey(key))\r\n return { ...key, instanceKeys: key.instanceKeys.map(InstanceKey.toJSON) };\r\n return { ...key };\r\n }\r\n\r\n /** Deserialize node key from JSON */\r\n export function fromJSON(json: NodeKeyJSON): NodeKey {\r\n if (isInstancesNodeKey(json))\r\n return { version: 1, ...json, instanceKeys: json.instanceKeys.map(InstanceKey.fromJSON) };\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]] */\r\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\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]] */\r\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\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]] */\r\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\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]] */\r\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\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 */\r\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\r\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\r\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\r\n }\r\n\r\n /**\r\n * Checks if two given node keys are equal, taking their versions into account.\r\n *\r\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\r\n * which is the most accurate way of checking equality. However, when version are different,\r\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\r\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\r\n * label, grouping class, property name, etc.).\r\n */\r\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\r\n // types must always be equal\r\n if (lhs.type !== rhs.type)\r\n return false;\r\n\r\n // `pathFromRoot` lengths must always be equal\r\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length)\r\n return false;\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 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 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 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/**\r\n * Serialized [[BaseNodeKey]] JSON representation.\r\n * @public\r\n */\r\nexport interface BaseNodeKeyJSON {\r\n type: string;\r\n version?: number;\r\n pathFromRoot: string[];\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 */\r\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKeyJSON {\r\n type: StandardNodeTypes.ECInstancesNode;\r\n instanceKeys: InstanceKeyJSON[];\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 */\r\nexport interface GroupingNodeKeyJSON extends BaseNodeKeyJSON {\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 */\r\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\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 */\r\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\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 */\r\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\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 */\r\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\r\n"]}
|
|
1
|
+
{"version":3,"file":"Key.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Key.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAmB,MAAM,OAAO,CAAC;AAErD;;;GAGG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,gEAA2C,CAAA;IAC3C,sEAAiD,CAAA;IACjD,0EAAqD,CAAA;AACvD,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAOD,cAAc;AACd,MAAM,KAAW,OAAO,CA4GvB;AA5GD,WAAiB,OAAO;IACtB,0CAA0C;IAC1C,SAAgB,MAAM,CAAC,GAAY;QACjC,IAAI,kBAAkB,CAAC,GAAG,CAAC;YACzB,OAAO,EAAE,GAAG,GAAG,EAAE,YAAY,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAJe,cAAM,SAIrB,CAAA;IAED,qCAAqC;IACrC,SAAgB,QAAQ,CAAC,IAAiB;QACxC,IAAI,kBAAkB,CAAC,IAAI,CAAC;YAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,YAAY,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ACD,IAAI,sBAAsB,CAAC,GAAG,CAAC,EAAE;YAC/B,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;YACpC,OAAO,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA3Ce,cAAM,SA2CrB,CAAA;AACH,CAAC,EA5GgB,OAAO,KAAP,OAAO,QA4GvB","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 } from \"@itwin/core-bentley\";\nimport { InstanceKey, InstanceKeyJSON } 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 */\nexport namespace NodeKey { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Serialize given [[NodeKey]] to JSON */\n export function toJSON(key: NodeKey): NodeKeyJSON {\n if (isInstancesNodeKey(key))\n return { ...key, instanceKeys: key.instanceKeys.map(InstanceKey.toJSON) };\n return { ...key };\n }\n\n /** Deserialize node key from JSON */\n export function fromJSON(json: NodeKeyJSON): NodeKey {\n if (isInstancesNodeKey(json))\n return { version: 1, ...json, instanceKeys: json.instanceKeys.map(InstanceKey.fromJSON) };\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]] */\n export function isInstancesNodeKey(key: NodeKeyJSON): key is ECInstancesNodeKeyJSON;\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]] */\n export function isClassGroupingNodeKey(key: NodeKeyJSON): key is ECClassGroupingNodeKeyJSON;\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]] */\n export function isPropertyGroupingNodeKey(key: NodeKeyJSON): key is ECPropertyGroupingNodeKeyJSON;\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]] */\n export function isLabelGroupingNodeKey(key: NodeKeyJSON): key is LabelGroupingNodeKeyJSON;\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 */\n export function isGroupingNodeKey(key: NodeKeyJSON): key is GroupingNodeKeyJSON;\n export function isGroupingNodeKey(key: NodeKey | NodeKeyJSON) {\n return isClassGroupingNodeKey(key) || isPropertyGroupingNodeKey(key) || isLabelGroupingNodeKey(key);\n }\n\n /**\n * Checks if two given node keys are equal, taking their versions into account.\n *\n * When comparing two keys of the same version, the algorithm uses [[NodeKey.pathFromRoot]] array\n * which is the most accurate way of checking equality. However, when version are different,\n * [[NodeKey.pathFromRoot]] array may contain different strings even though keys represent the same node.\n * In that case equality is checked using other key attributes, depending on the type of the node (type,\n * label, grouping class, property name, etc.).\n */\n export function equals(lhs: NodeKey, rhs: NodeKey): boolean {\n // types must always be equal\n if (lhs.type !== rhs.type)\n return false;\n\n // `pathFromRoot` lengths must always be equal\n if (lhs.pathFromRoot.length !== rhs.pathFromRoot.length)\n return false;\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 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 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 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/**\n * Serialized [[BaseNodeKey]] JSON representation.\n * @public\n */\nexport interface BaseNodeKeyJSON {\n type: string;\n version?: number;\n pathFromRoot: string[];\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 */\nexport interface ECInstancesNodeKeyJSON extends BaseNodeKeyJSON {\n type: StandardNodeTypes.ECInstancesNode;\n instanceKeys: InstanceKeyJSON[];\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 */\nexport interface GroupingNodeKeyJSON extends BaseNodeKeyJSON {\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 */\nexport interface ECClassGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\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 */\nexport interface ECPropertyGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\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 */\nexport interface LabelGroupingNodeKeyJSON extends GroupingNodeKeyJSON {\n type: StandardNodeTypes.DisplayLabelGroupingNode;\n label: string;\n}\n\n/**\n * One of the serialized node key types\n * @public\n */\nexport type NodeKeyJSON = BaseNodeKeyJSON | ECInstancesNodeKeyJSON | ECClassGroupingNodeKeyJSON | ECPropertyGroupingNodeKeyJSON | LabelGroupingNodeKeyJSON;\n"]}
|
|
@@ -1,142 +1,150 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Hierarchies
|
|
3
|
-
*/
|
|
4
|
-
import { LabelDefinition, LabelDefinitionJSON } from "../LabelDefinition";
|
|
5
|
-
import { NodeKey, NodeKeyJSON } from "./Key";
|
|
6
|
-
/**
|
|
7
|
-
* Data structure that describes a tree node.
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export interface Node {
|
|
11
|
-
/** A key that uniquely identifies a node. */
|
|
12
|
-
key: NodeKey;
|
|
13
|
-
/** Definition of node display label */
|
|
14
|
-
label: LabelDefinition;
|
|
15
|
-
/** Extensive description */
|
|
16
|
-
description?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Image ID
|
|
19
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
20
|
-
*/
|
|
21
|
-
imageId?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Foreground color
|
|
24
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
25
|
-
*/
|
|
26
|
-
foreColor?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Background color
|
|
29
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
30
|
-
*/
|
|
31
|
-
backColor?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Font style
|
|
34
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
35
|
-
*/
|
|
36
|
-
fontStyle?: string;
|
|
37
|
-
/** Does this node have child nodes */
|
|
38
|
-
hasChildren?: boolean;
|
|
39
|
-
/** Is this node selectable */
|
|
40
|
-
isSelectionDisabled?: boolean;
|
|
41
|
-
/** Is this node editable */
|
|
42
|
-
isEditable?: boolean;
|
|
43
|
-
/** Is this node expanded */
|
|
44
|
-
isExpanded?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Is checkbox visible for this node
|
|
47
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
48
|
-
*/
|
|
49
|
-
isCheckboxVisible?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Is this node's checkbox checked
|
|
52
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
53
|
-
*/
|
|
54
|
-
isChecked?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Is this node's checkbox enabled
|
|
57
|
-
* @deprecated Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
58
|
-
*/
|
|
59
|
-
isCheckboxEnabled?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
/** @deprecated */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/** @deprecated */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* @internal
|
|
131
|
-
*/
|
|
132
|
-
function
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Hierarchies
|
|
3
|
+
*/
|
|
4
|
+
import { LabelDefinition, LabelDefinitionJSON } from "../LabelDefinition";
|
|
5
|
+
import { NodeKey, NodeKeyJSON } from "./Key";
|
|
6
|
+
/**
|
|
7
|
+
* Data structure that describes a tree node.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export interface Node {
|
|
11
|
+
/** A key that uniquely identifies a node. */
|
|
12
|
+
key: NodeKey;
|
|
13
|
+
/** Definition of node display label */
|
|
14
|
+
label: LabelDefinition;
|
|
15
|
+
/** Extensive description */
|
|
16
|
+
description?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Image ID
|
|
19
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
20
|
+
*/
|
|
21
|
+
imageId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Foreground color
|
|
24
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
25
|
+
*/
|
|
26
|
+
foreColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Background color
|
|
29
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
30
|
+
*/
|
|
31
|
+
backColor?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Font style
|
|
34
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
35
|
+
*/
|
|
36
|
+
fontStyle?: string;
|
|
37
|
+
/** Does this node have child nodes */
|
|
38
|
+
hasChildren?: boolean;
|
|
39
|
+
/** Is this node selectable */
|
|
40
|
+
isSelectionDisabled?: boolean;
|
|
41
|
+
/** Is this node editable */
|
|
42
|
+
isEditable?: boolean;
|
|
43
|
+
/** Is this node expanded */
|
|
44
|
+
isExpanded?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Is checkbox visible for this node
|
|
47
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
48
|
+
*/
|
|
49
|
+
isCheckboxVisible?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Is this node's checkbox checked
|
|
52
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
53
|
+
*/
|
|
54
|
+
isChecked?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Is this node's checkbox enabled
|
|
57
|
+
* @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
58
|
+
*/
|
|
59
|
+
isCheckboxEnabled?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or
|
|
62
|
+
* a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.
|
|
63
|
+
* @alpha
|
|
64
|
+
*/
|
|
65
|
+
supportsFiltering?: boolean;
|
|
66
|
+
/** Extended data injected into this node */
|
|
67
|
+
extendedData?: {
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Serialized [[Node]] JSON representation.
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export interface NodeJSON {
|
|
76
|
+
key: NodeKeyJSON;
|
|
77
|
+
labelDefinition: LabelDefinitionJSON;
|
|
78
|
+
description?: string;
|
|
79
|
+
/** @deprecated in 3.x. */
|
|
80
|
+
imageId?: string;
|
|
81
|
+
/** @deprecated in 3.x. */
|
|
82
|
+
foreColor?: string;
|
|
83
|
+
/** @deprecated in 3.x. */
|
|
84
|
+
backColor?: string;
|
|
85
|
+
/** @deprecated in 3.x. */
|
|
86
|
+
fontStyle?: string;
|
|
87
|
+
hasChildren?: boolean;
|
|
88
|
+
isSelectionDisabled?: boolean;
|
|
89
|
+
isEditable?: boolean;
|
|
90
|
+
isExpanded?: boolean;
|
|
91
|
+
/** @deprecated in 3.x. */
|
|
92
|
+
isCheckboxVisible?: boolean;
|
|
93
|
+
/** @deprecated in 3.x. */
|
|
94
|
+
isChecked?: boolean;
|
|
95
|
+
/** @deprecated in 3.x. */
|
|
96
|
+
isCheckboxEnabled?: boolean;
|
|
97
|
+
/** @alpha */
|
|
98
|
+
supportsFiltering?: boolean;
|
|
99
|
+
extendedData?: {
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Partial node definition.
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export declare type PartialNode = AllOrNone<Partial<Node>, "key" | "label">;
|
|
108
|
+
/**
|
|
109
|
+
* Serialized [[PartialNode]] JSON representation.
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export declare type PartialNodeJSON = AllOrNone<Partial<NodeJSON>, "key" | "labelDefinition">;
|
|
113
|
+
declare type AllOrNone<T, P extends keyof T> = Omit<T, P> & ({
|
|
114
|
+
[K in P]?: never;
|
|
115
|
+
} | Required<Pick<T, P>>);
|
|
116
|
+
/** @public */
|
|
117
|
+
export declare namespace Node {
|
|
118
|
+
/** Serialize given [[Node]] to JSON */
|
|
119
|
+
function toJSON(node: Node): NodeJSON;
|
|
120
|
+
/** @internal */
|
|
121
|
+
function toPartialJSON(node: PartialNode): PartialNodeJSON;
|
|
122
|
+
/** Deserialize [[Node]] from JSON */
|
|
123
|
+
function fromJSON(json: NodeJSON | string): Node;
|
|
124
|
+
/** @internal */
|
|
125
|
+
function fromPartialJSON(json: PartialNodeJSON): PartialNode;
|
|
126
|
+
/**
|
|
127
|
+
* Reviver function that can be used as a second argument for
|
|
128
|
+
* `JSON.parse` method when parsing [[Node]] objects.
|
|
129
|
+
*
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
function reviver(key: string, value: any): any;
|
|
133
|
+
/**
|
|
134
|
+
* Deserialize nodes list from JSON
|
|
135
|
+
* @param json JSON or JSON serialized to string to deserialize from
|
|
136
|
+
* @returns Deserialized nodes list
|
|
137
|
+
*
|
|
138
|
+
* @internal
|
|
139
|
+
*/
|
|
140
|
+
function listFromJSON(json: NodeJSON[] | string): Node[];
|
|
141
|
+
/**
|
|
142
|
+
* Reviver function that can be used as a second argument for
|
|
143
|
+
* `JSON.parse` method when parsing [[Node]][] objects.
|
|
144
|
+
*
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
function listReviver(key: string, value: any): any;
|
|
148
|
+
}
|
|
149
|
+
export {};
|
|
142
150
|
//# sourceMappingURL=Node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,YAAY,CAAC,EAAE;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,WAAW,CAAC;IACjB,eAAe,EAAE,mBAAmB,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,IAAI;IACnB,6CAA6C;IAC7C,GAAG,EAAE,OAAO,CAAC;IACb,uCAAuC;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAC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aAAK,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAElG,cAAc;AACd,yBAAiB,IAAI,CAAC;IACpB,uCAAuC;IACvC,SAAgB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAO3C;IAED,gBAAgB;IAChB,SAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,eAAe,CAWhE;IAED,qCAAqC;IACrC,SAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAStD;IAED,gBAAgB;IAChB,SAAgB,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAWlE;IAED;;;;;OAKG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAEpD;IAED;;;;;;OAMG;IACH,SAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,GAAG,IAAI,EAAE,CAI9D;IAED;;;;;OAKG;IACH,SAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG,CAExD;CACF"}
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Hierarchies
|
|
7
|
-
*/
|
|
8
|
-
import { LabelDefinition } from "../LabelDefinition";
|
|
9
|
-
import { NodeKey } from "./Key";
|
|
10
|
-
/** @public */
|
|
11
|
-
export var Node;
|
|
12
|
-
(function (Node) {
|
|
13
|
-
/** Serialize given [[Node]] to JSON */
|
|
14
|
-
function toJSON(node) {
|
|
15
|
-
const { key, label, ...baseNode } = node;
|
|
16
|
-
return {
|
|
17
|
-
...baseNode,
|
|
18
|
-
key: NodeKey.toJSON(key),
|
|
19
|
-
labelDefinition: LabelDefinition.toJSON(label),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
Node.toJSON = toJSON;
|
|
23
|
-
/** @internal */
|
|
24
|
-
function toPartialJSON(node) {
|
|
25
|
-
if (node.key === undefined) {
|
|
26
|
-
return node;
|
|
27
|
-
}
|
|
28
|
-
const { key, label, ...baseNode } = node;
|
|
29
|
-
return {
|
|
30
|
-
...baseNode,
|
|
31
|
-
key: NodeKey.toJSON(key),
|
|
32
|
-
labelDefinition: LabelDefinition.toJSON(label),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
Node.toPartialJSON = toPartialJSON;
|
|
36
|
-
/** Deserialize [[Node]] from JSON */
|
|
37
|
-
function fromJSON(json) {
|
|
38
|
-
if (typeof json === "string")
|
|
39
|
-
return JSON.parse(json, reviver);
|
|
40
|
-
const { labelDefinition, ...baseJson } = json;
|
|
41
|
-
return {
|
|
42
|
-
...baseJson,
|
|
43
|
-
key: NodeKey.fromJSON(json.key),
|
|
44
|
-
label: LabelDefinition.fromJSON(labelDefinition),
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
Node.fromJSON = fromJSON;
|
|
48
|
-
/** @internal */
|
|
49
|
-
function fromPartialJSON(json) {
|
|
50
|
-
if (json.key === undefined) {
|
|
51
|
-
return json;
|
|
52
|
-
}
|
|
53
|
-
const { key, labelDefinition, ...baseJson } = json;
|
|
54
|
-
return {
|
|
55
|
-
...baseJson,
|
|
56
|
-
key: NodeKey.fromJSON(key),
|
|
57
|
-
label: LabelDefinition.fromJSON(labelDefinition),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
Node.fromPartialJSON = fromPartialJSON;
|
|
61
|
-
/**
|
|
62
|
-
* Reviver function that can be used as a second argument for
|
|
63
|
-
* `JSON.parse` method when parsing [[Node]] objects.
|
|
64
|
-
*
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
function reviver(key, value) {
|
|
68
|
-
return key === "" ? fromJSON(value) : value;
|
|
69
|
-
}
|
|
70
|
-
Node.reviver = reviver;
|
|
71
|
-
/**
|
|
72
|
-
* Deserialize nodes list from JSON
|
|
73
|
-
* @param json JSON or JSON serialized to string to deserialize from
|
|
74
|
-
* @returns Deserialized nodes list
|
|
75
|
-
*
|
|
76
|
-
* @internal
|
|
77
|
-
*/
|
|
78
|
-
function listFromJSON(json) {
|
|
79
|
-
if (typeof json === "string")
|
|
80
|
-
return JSON.parse(json, listReviver);
|
|
81
|
-
return json.map((m) => fromJSON(m));
|
|
82
|
-
}
|
|
83
|
-
Node.listFromJSON = listFromJSON;
|
|
84
|
-
/**
|
|
85
|
-
* Reviver function that can be used as a second argument for
|
|
86
|
-
* `JSON.parse` method when parsing [[Node]][] objects.
|
|
87
|
-
*
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
function listReviver(key, value) {
|
|
91
|
-
return key === "" ? listFromJSON(value) : value;
|
|
92
|
-
}
|
|
93
|
-
Node.listReviver = listReviver;
|
|
94
|
-
})(Node || (Node = {}));
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Hierarchies
|
|
7
|
+
*/
|
|
8
|
+
import { LabelDefinition } from "../LabelDefinition";
|
|
9
|
+
import { NodeKey } from "./Key";
|
|
10
|
+
/** @public */
|
|
11
|
+
export var Node;
|
|
12
|
+
(function (Node) {
|
|
13
|
+
/** Serialize given [[Node]] to JSON */
|
|
14
|
+
function toJSON(node) {
|
|
15
|
+
const { key, label, ...baseNode } = node;
|
|
16
|
+
return {
|
|
17
|
+
...baseNode,
|
|
18
|
+
key: NodeKey.toJSON(key),
|
|
19
|
+
labelDefinition: LabelDefinition.toJSON(label),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
Node.toJSON = toJSON;
|
|
23
|
+
/** @internal */
|
|
24
|
+
function toPartialJSON(node) {
|
|
25
|
+
if (node.key === undefined) {
|
|
26
|
+
return node;
|
|
27
|
+
}
|
|
28
|
+
const { key, label, ...baseNode } = node;
|
|
29
|
+
return {
|
|
30
|
+
...baseNode,
|
|
31
|
+
key: NodeKey.toJSON(key),
|
|
32
|
+
labelDefinition: LabelDefinition.toJSON(label),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
Node.toPartialJSON = toPartialJSON;
|
|
36
|
+
/** Deserialize [[Node]] from JSON */
|
|
37
|
+
function fromJSON(json) {
|
|
38
|
+
if (typeof json === "string")
|
|
39
|
+
return JSON.parse(json, reviver);
|
|
40
|
+
const { labelDefinition, ...baseJson } = json;
|
|
41
|
+
return {
|
|
42
|
+
...baseJson,
|
|
43
|
+
key: NodeKey.fromJSON(json.key),
|
|
44
|
+
label: LabelDefinition.fromJSON(labelDefinition),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
Node.fromJSON = fromJSON;
|
|
48
|
+
/** @internal */
|
|
49
|
+
function fromPartialJSON(json) {
|
|
50
|
+
if (json.key === undefined) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
const { key, labelDefinition, ...baseJson } = json;
|
|
54
|
+
return {
|
|
55
|
+
...baseJson,
|
|
56
|
+
key: NodeKey.fromJSON(key),
|
|
57
|
+
label: LabelDefinition.fromJSON(labelDefinition),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
Node.fromPartialJSON = fromPartialJSON;
|
|
61
|
+
/**
|
|
62
|
+
* Reviver function that can be used as a second argument for
|
|
63
|
+
* `JSON.parse` method when parsing [[Node]] objects.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
function reviver(key, value) {
|
|
68
|
+
return key === "" ? fromJSON(value) : value;
|
|
69
|
+
}
|
|
70
|
+
Node.reviver = reviver;
|
|
71
|
+
/**
|
|
72
|
+
* Deserialize nodes list from JSON
|
|
73
|
+
* @param json JSON or JSON serialized to string to deserialize from
|
|
74
|
+
* @returns Deserialized nodes list
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
*/
|
|
78
|
+
function listFromJSON(json) {
|
|
79
|
+
if (typeof json === "string")
|
|
80
|
+
return JSON.parse(json, listReviver);
|
|
81
|
+
return json.map((m) => fromJSON(m));
|
|
82
|
+
}
|
|
83
|
+
Node.listFromJSON = listFromJSON;
|
|
84
|
+
/**
|
|
85
|
+
* Reviver function that can be used as a second argument for
|
|
86
|
+
* `JSON.parse` method when parsing [[Node]][] objects.
|
|
87
|
+
*
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
function listReviver(key, value) {
|
|
91
|
+
return key === "" ? listFromJSON(value) : value;
|
|
92
|
+
}
|
|
93
|
+
Node.listReviver = listReviver;
|
|
94
|
+
})(Node || (Node = {}));
|
|
95
95
|
//# sourceMappingURL=Node.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAuB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,eAA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,CAAC;IACJ,CAAC;IATe,aAAQ,WASvB,CAAA;IAED,gBAAgB;IAChB,SAAgB,eAAe,CAAC,IAAqB;QACnD,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QAED,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACnD,OAAO;YACL,GAAG,QAAQ;YACX,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC1B,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC,eAAe,CAAC;SACjD,CAAC;IACJ,CAAC;IAXe,oBAAe,kBAW9B,CAAA;IAED;;;;;OAKG;IACH,SAAgB,OAAO,CAAC,GAAW,EAAE,KAAU;QAC7C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9C,CAAC;IAFe,YAAO,UAEtB,CAAA;IAED;;;;;;OAMG;IACH,SAAgB,YAAY,CAAC,IAAyB;QACpD,IAAI,OAAO,IAAI,KAAK,QAAQ;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAJe,iBAAY,eAI3B,CAAA;IAED;;;;;OAKG;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,EAnFgB,IAAI,KAAJ,IAAI,QAmFpB","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 * @alpha\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 */\nexport interface NodeJSON {\n key: NodeKeyJSON;\n labelDefinition: LabelDefinitionJSON;\n description?: string;\n /** @deprecated in 3.x. */\n imageId?: string;\n /** @deprecated in 3.x. */\n foreColor?: string;\n /** @deprecated in 3.x. */\n backColor?: string;\n /** @deprecated in 3.x. */\n fontStyle?: string;\n hasChildren?: boolean;\n isSelectionDisabled?: boolean;\n isEditable?: boolean;\n isExpanded?: boolean;\n /** @deprecated in 3.x. */\n isCheckboxVisible?: boolean;\n /** @deprecated in 3.x. */\n isChecked?: boolean;\n /** @deprecated in 3.x. */\n isCheckboxEnabled?: boolean;\n /** @alpha */\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 */\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 /** Serialize given [[Node]] to JSON */\n export function toJSON(node: Node): NodeJSON {\n const { key, label, ...baseNode } = node;\n return {\n ...baseNode,\n key: NodeKey.toJSON(key),\n labelDefinition: LabelDefinition.toJSON(label),\n };\n }\n\n /** @internal */\n export function toPartialJSON(node: PartialNode): PartialNodeJSON {\n if (node.key === undefined) {\n return node;\n }\n\n const { key, label, ...baseNode } = node;\n return {\n ...baseNode,\n key: NodeKey.toJSON(key),\n labelDefinition: LabelDefinition.toJSON(label),\n };\n }\n\n /** Deserialize [[Node]] from JSON */\n export function fromJSON(json: NodeJSON | string): Node {\n if (typeof json === \"string\")\n return JSON.parse(json, reviver);\n const { labelDefinition, ...baseJson } = json;\n return {\n ...baseJson,\n key: NodeKey.fromJSON(json.key),\n label: LabelDefinition.fromJSON(labelDefinition),\n };\n }\n\n /** @internal */\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 key: NodeKey.fromJSON(key),\n label: LabelDefinition.fromJSON(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 *\n * @internal\n */\n export function reviver(key: string, value: any): any {\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 *\n * @internal\n */\n export function listFromJSON(json: NodeJSON[] | string): Node[] {\n if (typeof json === \"string\")\n return JSON.parse(json, listReviver);\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 *\n * @internal\n */\n export function listReviver(key: string, value: any): any {\n return key === \"\" ? listFromJSON(value) : value;\n }\n}\n"]}
|