@itwin/presentation-common 3.6.0-dev.8 → 4.0.0-dev.2
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/CHANGELOG.md +26 -1
- package/LICENSE.md +1 -1
- package/Ruleset.schema.json +236 -309
- package/lib/cjs/presentation-common/EC.d.ts +52 -17
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +74 -54
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.d.ts +14 -14
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +43 -9
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js +5 -0
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.d.ts +24 -16
- package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js +26 -29
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +7 -4
- package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +30 -11
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +24 -19
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +7 -5
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +9 -8
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +17 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts +5 -0
- package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts +23 -4
- package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Update.js +34 -4
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Category.js +1 -2
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +194 -24
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js +63 -44
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +76 -23
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +5 -7
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +24 -5
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +10 -7
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +8 -10
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +6 -8
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +8 -2
- package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js +12 -8
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +43 -11
- package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Value.js +72 -16
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +32 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +75 -14
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js +15 -6
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +32 -19
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +23 -14
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +33 -9
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.d.ts +6 -4
- package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.d.ts +0 -1
- package/lib/cjs/presentation-common/rules/Ruleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.d.ts +5 -2
- package/lib/cjs/presentation-common/rules/Variables.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +6 -3
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +20 -13
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +17 -4
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +1 -0
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +1 -0
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +52 -17
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +75 -55
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.d.ts +14 -14
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +43 -9
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/esm/presentation-common/KeySet.js +5 -0
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.d.ts +24 -16
- package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js +26 -29
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +7 -4
- package/lib/esm/presentation-common/PresentationIpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +30 -11
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +24 -19
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +7 -5
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +9 -8
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +17 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts +5 -0
- package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts +23 -4
- package/lib/esm/presentation-common/Update.d.ts.map +1 -1
- package/lib/esm/presentation-common/Update.js +34 -4
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Category.js +1 -2
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts +194 -24
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js +60 -42
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +76 -23
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +5 -7
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +24 -5
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +11 -8
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +8 -10
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +6 -8
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +8 -2
- package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Property.js +12 -8
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +43 -11
- package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Value.js +72 -16
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +38 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +29 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +75 -14
- package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js +15 -6
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +32 -19
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +23 -14
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +18 -7
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +33 -9
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +5 -2
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.d.ts +6 -4
- package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.d.ts +0 -1
- package/lib/esm/presentation-common/rules/Ruleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.d.ts +5 -2
- package/lib/esm/presentation-common/rules/Variables.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +3 -3
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +2 -2
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +2 -2
- package/lib/esm/presentation-common/rules/content/ContentRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +6 -3
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +2 -2
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +2 -2
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +2 -2
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +9 -6
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +6 -3
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +3 -3
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +2 -2
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +20 -13
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +3 -3
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +17 -15
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +3 -3
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +3 -3
- package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +3 -3
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +1 -2
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +5 -4
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +0 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -2
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +9 -6
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +2 -2
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +2 -2
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +1 -2
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +0 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +17 -4
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +1 -0
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +1 -0
- package/lib/esm/presentation-common.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Content
|
|
3
3
|
*/
|
|
4
|
-
import { InstanceKey
|
|
4
|
+
import { InstanceKey } from "../EC";
|
|
5
5
|
import { ValuesDictionary } from "../Utils";
|
|
6
6
|
/**
|
|
7
7
|
* Raw value type
|
|
@@ -18,9 +18,15 @@ export declare namespace Value {
|
|
|
18
18
|
function isMap(value: Value): value is ValuesMap;
|
|
19
19
|
/** Is the value a nested content value */
|
|
20
20
|
function isNestedContent(value: Value): value is NestedContentValue[];
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Serialize [[Value]] to JSON
|
|
23
|
+
* @deprecated in 3.x. Use [[Value]]
|
|
24
|
+
*/
|
|
22
25
|
function fromJSON(json: ValueJSON): Value;
|
|
23
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Deserialize [[Value]] from JSON
|
|
28
|
+
* @deprecated in 3.x. Use [[Value]]
|
|
29
|
+
*/
|
|
24
30
|
function toJSON(value: Value): ValueJSON;
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
@@ -48,9 +54,15 @@ export declare namespace DisplayValue {
|
|
|
48
54
|
function isArray(value: DisplayValue): value is DisplayValuesArray;
|
|
49
55
|
/** Is the value a map / struct */
|
|
50
56
|
function isMap(value: DisplayValue): value is DisplayValuesMap;
|
|
51
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Serialize [[DisplayValue]] to JSON
|
|
59
|
+
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
60
|
+
*/
|
|
52
61
|
function fromJSON(json: DisplayValueJSON): DisplayValue;
|
|
53
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Deserialize [[DisplayValue]] from JSON
|
|
64
|
+
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
65
|
+
*/
|
|
54
66
|
function toJSON(value: DisplayValue): DisplayValueJSON;
|
|
55
67
|
}
|
|
56
68
|
/**
|
|
@@ -81,51 +93,64 @@ export interface NestedContentValue {
|
|
|
81
93
|
}
|
|
82
94
|
/** @public */
|
|
83
95
|
export declare namespace NestedContentValue {
|
|
84
|
-
/**
|
|
85
|
-
|
|
86
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Serialize [[NestedContentValue]] to JSON
|
|
98
|
+
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
99
|
+
*/
|
|
100
|
+
function toJSON(value: NestedContentValue): NestedContentValueJSON;
|
|
101
|
+
/**
|
|
102
|
+
* Deserialize [[NestedContentValue]] from JSON
|
|
103
|
+
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
104
|
+
*/
|
|
87
105
|
function fromJSON(json: NestedContentValueJSON): NestedContentValue;
|
|
88
106
|
}
|
|
89
107
|
/**
|
|
90
108
|
* JSON representation of [[Value]]
|
|
91
109
|
* @public
|
|
110
|
+
* @deprecated in 3.x. Use [[Value]]
|
|
92
111
|
*/
|
|
93
112
|
export declare type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];
|
|
94
113
|
/**
|
|
95
114
|
* JSON representation of [[ValuesMap]]
|
|
96
115
|
* @public
|
|
116
|
+
* @deprecated in 3.x. Use [[ValuesMap]]
|
|
97
117
|
*/
|
|
98
118
|
export interface ValuesMapJSON extends ValuesDictionary<ValueJSON> {
|
|
99
119
|
}
|
|
100
120
|
/**
|
|
101
121
|
* JSON representation of [[ValuesArray]]
|
|
102
122
|
* @public
|
|
123
|
+
* @deprecated in 3.x. Use [[ValuesArray]]
|
|
103
124
|
*/
|
|
104
125
|
export interface ValuesArrayJSON extends Array<ValueJSON> {
|
|
105
126
|
}
|
|
106
127
|
/**
|
|
107
128
|
* JSON representation of [[DisplayValue]]
|
|
108
129
|
* @public
|
|
130
|
+
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
109
131
|
*/
|
|
110
132
|
export declare type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;
|
|
111
133
|
/**
|
|
112
134
|
* JSON representation of [[DisplayValuesMap]]
|
|
113
135
|
* @public
|
|
136
|
+
* @deprecated in 3.x. Use [[DisplayValuesMap]]
|
|
114
137
|
*/
|
|
115
138
|
export interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> {
|
|
116
139
|
}
|
|
117
140
|
/**
|
|
118
141
|
* JSON representation of [[DisplayValuesArray]]
|
|
119
142
|
* @public
|
|
143
|
+
* @deprecated in 3.x. Use [[DisplayValuesArray]]
|
|
120
144
|
*/
|
|
121
145
|
export interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> {
|
|
122
146
|
}
|
|
123
147
|
/**
|
|
124
148
|
* JSON representation of [[NestedContentValue]]
|
|
125
149
|
* @public
|
|
150
|
+
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
126
151
|
*/
|
|
127
152
|
export interface NestedContentValueJSON {
|
|
128
|
-
primaryKeys:
|
|
153
|
+
primaryKeys: InstanceKey[];
|
|
129
154
|
values: ValuesDictionary<ValueJSON>;
|
|
130
155
|
displayValues: ValuesDictionary<DisplayValueJSON>;
|
|
131
156
|
mergedFieldNames: string[];
|
|
@@ -143,6 +168,7 @@ export interface DisplayValueGroup {
|
|
|
143
168
|
/**
|
|
144
169
|
* JSON representation of [[DisplayValueGroup]].
|
|
145
170
|
* @public
|
|
171
|
+
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
146
172
|
*/
|
|
147
173
|
export interface DisplayValueGroupJSON {
|
|
148
174
|
displayValue: DisplayValueJSON;
|
|
@@ -150,9 +176,15 @@ export interface DisplayValueGroupJSON {
|
|
|
150
176
|
}
|
|
151
177
|
/** @public */
|
|
152
178
|
export declare namespace DisplayValueGroup {
|
|
153
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Serialize [[DisplayValueGroup]] to JSON
|
|
181
|
+
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
182
|
+
*/
|
|
154
183
|
function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON;
|
|
155
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Deserialize [[DisplayValueGroup]] from JSON
|
|
186
|
+
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
187
|
+
*/
|
|
156
188
|
function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup;
|
|
157
189
|
}
|
|
158
190
|
//# sourceMappingURL=Value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,oBAAY,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,kBAAkB,EAAE,CAAC;AAE3G,cAAc;AACd,yBAAiB,KAAK,CAAC;IACrB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAExF;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,WAAW,CAE1D;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,SAAS,CAEtD;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,kBAAkB,EAAE,CAE3E;IAED;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,CAW/C;IAED;;;OAGG;IAEH,SAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAW9C;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,gBAAgB,CAAC,KAAK,CAAC;CAAI;AAE9D;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,KAAK,CAAC;CAAI;AAErD;;;GAGG;AACH,oBAAY,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,kBAAkB,CAAC;AA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__esModule", { value: true });
|
|
10
10
|
exports.DisplayValueGroup = exports.NestedContentValue = exports.DisplayValue = exports.Value = void 0;
|
|
11
|
-
const EC_1 = require("../EC");
|
|
12
11
|
/** @public */
|
|
13
12
|
var Value;
|
|
14
13
|
(function (Value) {
|
|
@@ -32,11 +31,16 @@ var Value;
|
|
|
32
31
|
return isNestedContentValue(value);
|
|
33
32
|
}
|
|
34
33
|
Value.isNestedContent = isNestedContent;
|
|
35
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Serialize [[Value]] to JSON
|
|
36
|
+
* @deprecated in 3.x. Use [[Value]]
|
|
37
|
+
*/
|
|
38
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
36
39
|
function fromJSON(json) {
|
|
37
40
|
if (json === null)
|
|
38
41
|
return undefined;
|
|
39
42
|
if (isNestedContentValue(json))
|
|
43
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
40
44
|
return json.map(NestedContentValue.fromJSON);
|
|
41
45
|
if (isArrayValue(json))
|
|
42
46
|
return valuesArrayFromJSON(json);
|
|
@@ -45,11 +49,16 @@ var Value;
|
|
|
45
49
|
return json;
|
|
46
50
|
}
|
|
47
51
|
Value.fromJSON = fromJSON;
|
|
48
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Deserialize [[Value]] from JSON
|
|
54
|
+
* @deprecated in 3.x. Use [[Value]]
|
|
55
|
+
*/
|
|
56
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
49
57
|
function toJSON(value) {
|
|
50
58
|
if (undefined === value)
|
|
51
59
|
return null;
|
|
52
60
|
if (isNestedContentValue(value))
|
|
61
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
53
62
|
return value.map(NestedContentValue.toJSON);
|
|
54
63
|
if (isArrayValue(value))
|
|
55
64
|
return valuesArrayToJSON(value);
|
|
@@ -77,7 +86,11 @@ var DisplayValue;
|
|
|
77
86
|
return isMapValue(value);
|
|
78
87
|
}
|
|
79
88
|
DisplayValue.isMap = isMap;
|
|
80
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Serialize [[DisplayValue]] to JSON
|
|
91
|
+
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
92
|
+
*/
|
|
93
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
81
94
|
function fromJSON(json) {
|
|
82
95
|
if (json === null)
|
|
83
96
|
return undefined;
|
|
@@ -88,7 +101,11 @@ var DisplayValue;
|
|
|
88
101
|
return json;
|
|
89
102
|
}
|
|
90
103
|
DisplayValue.fromJSON = fromJSON;
|
|
91
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Deserialize [[DisplayValue]] from JSON
|
|
106
|
+
* @deprecated in 3.x. Use [[DisplayValue]]
|
|
107
|
+
*/
|
|
108
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
92
109
|
function toJSON(value) {
|
|
93
110
|
if (undefined === value)
|
|
94
111
|
return null;
|
|
@@ -103,23 +120,29 @@ var DisplayValue;
|
|
|
103
120
|
/** @public */
|
|
104
121
|
var NestedContentValue;
|
|
105
122
|
(function (NestedContentValue) {
|
|
106
|
-
/**
|
|
107
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Serialize [[NestedContentValue]] to JSON
|
|
125
|
+
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
126
|
+
*/
|
|
127
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
128
|
+
function toJSON(value) {
|
|
108
129
|
return {
|
|
109
|
-
|
|
110
|
-
values: valuesMapToJSON(
|
|
111
|
-
displayValues: displayValuesMapToJSON(
|
|
112
|
-
mergedFieldNames: json.mergedFieldNames,
|
|
130
|
+
...value,
|
|
131
|
+
values: valuesMapToJSON(value.values),
|
|
132
|
+
displayValues: displayValuesMapToJSON(value.displayValues),
|
|
113
133
|
};
|
|
114
134
|
}
|
|
115
135
|
NestedContentValue.toJSON = toJSON;
|
|
116
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Deserialize [[NestedContentValue]] from JSON
|
|
138
|
+
* @deprecated in 3.x. Use [[NestedContentValue]]
|
|
139
|
+
*/
|
|
140
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
117
141
|
function fromJSON(json) {
|
|
118
142
|
return {
|
|
119
|
-
|
|
143
|
+
...json,
|
|
120
144
|
values: valuesMapFromJSON(json.values),
|
|
121
145
|
displayValues: displayValuesMapFromJSON(json.displayValues),
|
|
122
|
-
mergedFieldNames: json.mergedFieldNames,
|
|
123
146
|
};
|
|
124
147
|
}
|
|
125
148
|
NestedContentValue.fromJSON = fromJSON;
|
|
@@ -127,23 +150,36 @@ var NestedContentValue;
|
|
|
127
150
|
/** @public */
|
|
128
151
|
var DisplayValueGroup;
|
|
129
152
|
(function (DisplayValueGroup) {
|
|
130
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Serialize [[DisplayValueGroup]] to JSON
|
|
155
|
+
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
156
|
+
*/
|
|
157
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
131
158
|
function toJSON(group) {
|
|
132
159
|
return {
|
|
160
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
133
161
|
displayValue: DisplayValue.toJSON(group.displayValue),
|
|
162
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
134
163
|
groupedRawValues: group.groupedRawValues.map(Value.toJSON),
|
|
135
164
|
};
|
|
136
165
|
}
|
|
137
166
|
DisplayValueGroup.toJSON = toJSON;
|
|
138
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* Deserialize [[DisplayValueGroup]] from JSON
|
|
169
|
+
* @deprecated in 3.x. Use [[DisplayValueGroup]]
|
|
170
|
+
*/
|
|
171
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
139
172
|
function fromJSON(json) {
|
|
140
173
|
return {
|
|
174
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
141
175
|
displayValue: DisplayValue.fromJSON(json.displayValue),
|
|
176
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
142
177
|
groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
|
|
143
178
|
};
|
|
144
179
|
}
|
|
145
180
|
DisplayValueGroup.fromJSON = fromJSON;
|
|
146
181
|
})(DisplayValueGroup = exports.DisplayValueGroup || (exports.DisplayValueGroup = {}));
|
|
182
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
147
183
|
function isNestedContentValue(v) {
|
|
148
184
|
return (v !== undefined) && Array.isArray(v)
|
|
149
185
|
&& ((v.length === 0)
|
|
@@ -152,64 +188,84 @@ function isNestedContentValue(v) {
|
|
|
152
188
|
&& v[0].displayValues !== undefined
|
|
153
189
|
&& v[0].mergedFieldNames !== undefined);
|
|
154
190
|
}
|
|
191
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
155
192
|
function isArrayValue(v) {
|
|
156
193
|
// note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.
|
|
157
194
|
// we have other means to determine the type of value.
|
|
158
195
|
return (v !== undefined) && Array.isArray(v);
|
|
159
196
|
}
|
|
197
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
160
198
|
function isMapValue(v) {
|
|
161
199
|
return (v !== undefined) && (typeof v === "object") && !Array.isArray(v);
|
|
162
200
|
}
|
|
163
201
|
function isPrimitiveValue(v) {
|
|
164
202
|
return !isArrayValue(v) && !isMapValue(v);
|
|
165
203
|
}
|
|
204
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
166
205
|
function valuesArrayFromJSON(json) {
|
|
206
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
167
207
|
return json.map(Value.fromJSON);
|
|
168
208
|
}
|
|
209
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
169
210
|
function valuesArrayToJSON(values) {
|
|
211
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
170
212
|
return values.map(Value.toJSON);
|
|
171
213
|
}
|
|
214
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
172
215
|
function valuesMapFromJSON(json) {
|
|
173
216
|
const map = {};
|
|
174
217
|
for (const key in json) {
|
|
175
218
|
/* istanbul ignore else */
|
|
176
219
|
if (json.hasOwnProperty(key)) {
|
|
220
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
177
221
|
map[key] = Value.fromJSON(json[key]);
|
|
178
222
|
}
|
|
179
223
|
}
|
|
180
224
|
return map;
|
|
181
225
|
}
|
|
226
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
182
227
|
function valuesMapToJSON(values) {
|
|
228
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
183
229
|
const map = {};
|
|
184
230
|
for (const key in values) {
|
|
185
231
|
/* istanbul ignore else */
|
|
186
232
|
if (values.hasOwnProperty(key)) {
|
|
233
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
187
234
|
map[key] = Value.toJSON(values[key]);
|
|
188
235
|
}
|
|
189
236
|
}
|
|
190
237
|
return map;
|
|
191
238
|
}
|
|
239
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
192
240
|
function displayValuesArrayFromJSON(json) {
|
|
241
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
193
242
|
return json.map(DisplayValue.fromJSON);
|
|
194
243
|
}
|
|
244
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
195
245
|
function displayValuesArrayToJSON(values) {
|
|
246
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
196
247
|
return values.map(DisplayValue.toJSON);
|
|
197
248
|
}
|
|
249
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
198
250
|
function displayValuesMapFromJSON(json) {
|
|
199
251
|
const map = {};
|
|
200
252
|
for (const key in json) {
|
|
201
253
|
/* istanbul ignore else */
|
|
202
254
|
if (json.hasOwnProperty(key)) {
|
|
255
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
203
256
|
map[key] = DisplayValue.fromJSON(json[key]);
|
|
204
257
|
}
|
|
205
258
|
}
|
|
206
259
|
return map;
|
|
207
260
|
}
|
|
261
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
208
262
|
function displayValuesMapToJSON(values) {
|
|
263
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
209
264
|
const map = {};
|
|
210
265
|
for (const key in values) {
|
|
211
266
|
/* istanbul ignore else */
|
|
212
267
|
if (values.hasOwnProperty(key)) {
|
|
268
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
213
269
|
map[key] = DisplayValue.toJSON(values[key]);
|
|
214
270
|
}
|
|
215
271
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAAqD;AASrD,cAAc;AACd,IAAiB,KAAK,CA8CrB;AA9CD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,kCAAkC;IAClC,SAAgB,QAAQ,CAAC,IAAe;QACtC,IAAI,IAAI,KAAK,IAAI;YACf,OAAO,SAAS,CAAC;QACnB,IAAI,oBAAoB,CAAC,IAAI,CAAC;YAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,YAAY,CAAC,IAAI,CAAC;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C9B,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SACtC;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,0BAA0B,CAAC,IAA4B;IAC9D,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC5B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;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 { InstanceKey, InstanceKeyJSON } from \"../EC\";\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 | NestedContentValue[];\r\n\r\n/** @public */\r\nexport namespace Value { // eslint-disable-line @typescript-eslint/no-redeclare\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 /** Serialize [[Value]] to JSON */\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null)\r\n return undefined;\r\n if (isNestedContentValue(json))\r\n return json.map(NestedContentValue.fromJSON);\r\n if (isArrayValue(json))\r\n return valuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return valuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /** Deserialize [[Value]] from JSON */\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isNestedContentValue(value))\r\n return value.map(NestedContentValue.toJSON);\r\n if (isArrayValue(value))\r\n return valuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return valuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\nexport namespace DisplayValue { // eslint-disable-line @typescript-eslint/no-redeclare\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 /** Serialize [[DisplayValue]] to JSON */\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null)\r\n return undefined;\r\n if (isArrayValue(json))\r\n return displayValuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return displayValuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /** Deserialize [[DisplayValue]] from JSON */\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isArrayValue(value))\r\n return displayValuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return displayValuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /** Serialize [[NestedContentValue]] to JSON */\r\n export function toJSON(json: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n primaryKeys: json.primaryKeys.map(InstanceKey.toJSON),\r\n values: valuesMapToJSON(json.values),\r\n displayValues: displayValuesMapToJSON(json.displayValues),\r\n mergedFieldNames: json.mergedFieldNames,\r\n };\r\n }\r\n\r\n /** Deserialize [[NestedContentValue]] from JSON */\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n primaryKeys: json.primaryKeys.map(InstanceKey.fromJSON),\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n mergedFieldNames: json.mergedFieldNames,\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n */\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];\r\n\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n */\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n */\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n */\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n */\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n */\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKeyJSON[];\r\n values: ValuesDictionary<ValueJSON>;\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 */\r\nexport interface DisplayValueGroupJSON {\r\n displayValue: DisplayValueJSON;\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /** Serialize [[DisplayValueGroup]] to JSON */\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /** Deserialize [[DisplayValueGroup]] from JSON */\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (v !== undefined) && Array.isArray(v)\r\n && ((v.length === 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\nfunction isArrayValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): 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\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\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n return json.map(Value.fromJSON);\r\n}\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n return values.map(Value.toJSON);\r\n}\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 map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\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 map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n return values.map(DisplayValue.toJSON);\r\n}\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 map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\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 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;;;+FAG+F;AAC/F;;GAEG;;;AAWH,cAAc;AACd,IAAiB,KAAK,CAwDrB;AAxDD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAe;QACtC,IAAI,IAAI,KAAK,IAAI;YACf,OAAO,SAAS,CAAC;QACnB,IAAI,oBAAoB,CAAC,IAAI,CAAC;YAC5B,mDAAmD;YACnD,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,YAAY,CAAC,IAAI,CAAC;YACpB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,UAAU,CAAC,IAAI,CAAC;YAClB,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IA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AAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SACtC;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,mDAAmD;AACnD,SAAS,0BAA0B,CAAC,IAA4B;IAC9D,mDAAmD;IACnD,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,mDAAmD;AACnD,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,mDAAmD;IACnD,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,mDAAmD;AACnD,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC5B,mDAAmD;YACnD,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,mDAAmD;AACnD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,mDAAmD;IACnD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,mDAAmD;YACnD,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;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 { InstanceKey } from \"../EC\";\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 | NestedContentValue[];\r\n\r\n/** @public */\r\nexport namespace Value { // eslint-disable-line @typescript-eslint/no-redeclare\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 /**\r\n * Serialize [[Value]] to JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null)\r\n return undefined;\r\n if (isNestedContentValue(json))\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(NestedContentValue.fromJSON);\r\n if (isArrayValue(json))\r\n return valuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return valuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[Value]] from JSON\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isNestedContentValue(value))\r\n // eslint-disable-next-line deprecation/deprecation\r\n return value.map(NestedContentValue.toJSON);\r\n if (isArrayValue(value))\r\n return valuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return valuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\nexport namespace DisplayValue { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /**\r\n * Serialize [[DisplayValue]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null)\r\n return undefined;\r\n if (isArrayValue(json))\r\n return displayValuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return displayValuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValue]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isArrayValue(value))\r\n return displayValuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return displayValuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /**\r\n * Serialize [[NestedContentValue]] to JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(value: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n ...value,\r\n values: valuesMapToJSON(value.values),\r\n displayValues: displayValuesMapToJSON(value.displayValues),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentValue]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n ...json,\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n * @deprecated in 3.x. Use [[Value]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesMap]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[ValuesArray]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValue]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesMap]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValuesArray]]\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n * @deprecated in 3.x. Use [[NestedContentValue]]\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKey[];\r\n // eslint-disable-next-line deprecation/deprecation\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValueJSON;\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /**\r\n * Serialize [[DisplayValueGroup]] to JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[DisplayValueGroup]] from JSON\r\n * @deprecated in 3.x. Use [[DisplayValueGroup]]\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n // eslint-disable-next-line deprecation/deprecation\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (v !== undefined) && Array.isArray(v)\r\n && ((v.length === 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// eslint-disable-next-line deprecation/deprecation\r\nfunction isArrayValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return (v !== undefined) && Array.isArray(v);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return (v !== undefined) && (typeof v === \"object\") && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(Value.fromJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return values.map(Value.toJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return values.map(DisplayValue.toJSON);\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n// eslint-disable-next-line deprecation/deprecation\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Hierarchies
|
|
3
|
+
*/
|
|
4
|
+
import { Node, NodeJSON } from "./Node";
|
|
5
|
+
/**
|
|
6
|
+
* Defines a hierarchy level that consists of an array of nodes and possibly other information.
|
|
7
|
+
* @beta
|
|
8
|
+
*/
|
|
9
|
+
export interface HierarchyLevel {
|
|
10
|
+
/** A list of nodes in a hierarchy level. */
|
|
11
|
+
nodes: Node[];
|
|
12
|
+
/**
|
|
13
|
+
* Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or
|
|
14
|
+
* a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.
|
|
15
|
+
*/
|
|
16
|
+
supportsFiltering?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* JSON representation of [[HierarchyLevel]].
|
|
20
|
+
* @beta
|
|
21
|
+
* @deprecated in 3.x. Use [[HierarchyLevel]]
|
|
22
|
+
*/
|
|
23
|
+
export interface HierarchyLevelJSON {
|
|
24
|
+
nodes: NodeJSON[];
|
|
25
|
+
supportsFiltering?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Contains helper functions for working with objects of [[HierarchyLevel]] type.
|
|
29
|
+
* @beta
|
|
30
|
+
*/
|
|
31
|
+
export declare namespace HierarchyLevel {
|
|
32
|
+
/**
|
|
33
|
+
* Deserialize [[HierarchyLevel]] from JSON
|
|
34
|
+
* @deprecated in 3.x. Use [[HierarchyLevel]].
|
|
35
|
+
*/
|
|
36
|
+
function fromJSON(json: HierarchyLevelJSON): HierarchyLevel;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=HierarchyLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyLevel.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAEjC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,yBAAiB,cAAc,CAAC;IAC9B;;;OAGG;IAEH,SAAgB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAMjE;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Hierarchies
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.HierarchyLevel = void 0;
|
|
11
|
+
const Node_1 = require("./Node");
|
|
12
|
+
/**
|
|
13
|
+
* Contains helper functions for working with objects of [[HierarchyLevel]] type.
|
|
14
|
+
* @beta
|
|
15
|
+
*/
|
|
16
|
+
var HierarchyLevel;
|
|
17
|
+
(function (HierarchyLevel) {
|
|
18
|
+
/**
|
|
19
|
+
* Deserialize [[HierarchyLevel]] from JSON
|
|
20
|
+
* @deprecated in 3.x. Use [[HierarchyLevel]].
|
|
21
|
+
*/
|
|
22
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
23
|
+
function fromJSON(json) {
|
|
24
|
+
return {
|
|
25
|
+
...json,
|
|
26
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
27
|
+
nodes: json.nodes.map(Node_1.Node.fromJSON),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
HierarchyLevel.fromJSON = fromJSON;
|
|
31
|
+
})(HierarchyLevel = exports.HierarchyLevel || (exports.HierarchyLevel = {}));
|
|
32
|
+
//# sourceMappingURL=HierarchyLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iCAAwC;AA2BxC;;;GAGG;AACH,IAAiB,cAAc,CAa9B;AAbD,WAAiB,cAAc;IAC7B;;;OAGG;IACH,mDAAmD;IACnD,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,mDAAmD;YACnD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IANe,uBAAQ,WAMvB,CAAA;AACH,CAAC,EAbgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAa9B","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 * @beta\r\n */\r\nexport interface HierarchyLevel {\r\n /** A list of nodes in a hierarchy level. */\r\n nodes: Node[];\r\n /**\r\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\r\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\r\n */\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * JSON representation of [[HierarchyLevel]].\r\n * @beta\r\n * @deprecated in 3.x. Use [[HierarchyLevel]]\r\n */\r\nexport interface HierarchyLevelJSON {\r\n // eslint-disable-next-line deprecation/deprecation\r\n nodes: NodeJSON[];\r\n supportsFiltering?: boolean;\r\n}\r\n\r\n/**\r\n * Contains helper functions for working with objects of [[HierarchyLevel]] type.\r\n * @beta\r\n */\r\nexport namespace HierarchyLevel {\r\n /**\r\n * Deserialize [[HierarchyLevel]] from JSON\r\n * @deprecated in 3.x. Use [[HierarchyLevel]].\r\n */\r\n // eslint-disable-next-line deprecation/deprecation\r\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\r\n return {\r\n ...json,\r\n // eslint-disable-next-line deprecation/deprecation\r\n nodes: json.nodes.map(Node.fromJSON),\r\n };\r\n }\r\n}\r\n"]}
|