@itwin/presentation-common 3.6.0-dev.7 → 4.0.0-dev.1
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
|
@@ -8,95 +8,265 @@ import { Field } from "./Fields";
|
|
|
8
8
|
import { Item } from "./Item";
|
|
9
9
|
import { TypeDescription } from "./TypeDescription";
|
|
10
10
|
import { DisplayValue, DisplayValuesArray, DisplayValuesMap, Value, ValuesArray, ValuesMap } from "./Value";
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* A data structure to define a hierarchy of [[Field]] objects.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
12
15
|
export interface FieldHierarchy {
|
|
16
|
+
/** Parent field. */
|
|
13
17
|
field: Field;
|
|
18
|
+
/** Nested fields. */
|
|
14
19
|
childFields: FieldHierarchy[];
|
|
15
20
|
}
|
|
16
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Props for the [[IContentVisitor.startContent]] call.
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
17
25
|
export interface StartContentProps {
|
|
26
|
+
/** Descriptor of the visited content. */
|
|
18
27
|
descriptor: Descriptor;
|
|
19
28
|
}
|
|
20
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Props for the [[IContentVisitor.processFieldHierarchies]] call.
|
|
31
|
+
* @public
|
|
32
|
+
*/
|
|
21
33
|
export interface ProcessFieldHierarchiesProps {
|
|
34
|
+
/**
|
|
35
|
+
* The root list of fields, which may be mutated by the visitor to change order or the fields,
|
|
36
|
+
* add new fields, etc.
|
|
37
|
+
*/
|
|
22
38
|
hierarchies: FieldHierarchy[];
|
|
23
39
|
}
|
|
24
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Props for the [[IContentVisitor.startItem]] call.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
25
44
|
export interface StartItemProps {
|
|
45
|
+
/** The content item that's about to be visited. */
|
|
26
46
|
item: Item;
|
|
27
47
|
}
|
|
28
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Props for the [[IContentVisitor.startCategory]] call.
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
29
52
|
export interface StartCategoryProps {
|
|
53
|
+
/** The content category that's about to be visited. */
|
|
30
54
|
category: CategoryDescription;
|
|
31
55
|
}
|
|
32
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Props for the [[IContentVisitor.startField]] call.
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
33
60
|
export interface StartFieldProps {
|
|
61
|
+
/** The field that's about to be visited. */
|
|
34
62
|
hierarchy: FieldHierarchy;
|
|
35
63
|
}
|
|
36
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Props for the [[IContentVisitor.startStruct]] call.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
37
68
|
export interface StartStructProps {
|
|
69
|
+
/** Field that describes the struct. */
|
|
38
70
|
hierarchy: FieldHierarchy;
|
|
71
|
+
/** Type of the struct. */
|
|
39
72
|
valueType: TypeDescription;
|
|
40
|
-
|
|
73
|
+
/** Name of the parent field (if there is one). */
|
|
74
|
+
parentFieldName?: string;
|
|
75
|
+
/** Member raw values. */
|
|
41
76
|
rawValues: ValuesMap;
|
|
77
|
+
/** Member display values. */
|
|
42
78
|
displayValues: DisplayValuesMap;
|
|
43
79
|
}
|
|
44
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* Props for the [[IContentVisitor.startArray]] call.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
45
84
|
export interface StartArrayProps {
|
|
85
|
+
/** Field that describes the array. */
|
|
46
86
|
hierarchy: FieldHierarchy;
|
|
87
|
+
/** Type of the array. */
|
|
47
88
|
valueType: TypeDescription;
|
|
48
|
-
|
|
89
|
+
/** Name of the parent field (if there is one). */
|
|
90
|
+
parentFieldName?: string;
|
|
91
|
+
/** Item raw values. */
|
|
49
92
|
rawValues: ValuesArray;
|
|
93
|
+
/** Item display values. */
|
|
50
94
|
displayValues: DisplayValuesArray;
|
|
51
95
|
}
|
|
52
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Props for the [[IContentVisitor.processMergedValue]] call.
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
53
100
|
export interface ProcessMergedValueProps {
|
|
101
|
+
/** The field whose values are merged. */
|
|
54
102
|
mergedField: Field;
|
|
103
|
+
/**
|
|
104
|
+
* Generally this matches the [[mergedField]], but there are situations when a nested field is propagated
|
|
105
|
+
* up to display it as if it wasn't nested its parent fields. In those cases, if one of the parent fields
|
|
106
|
+
* is merged, the merged parent is going to be represented by [[mergedField]] and the field we wanted to
|
|
107
|
+
* process is going to be represented by [[requestedField]].
|
|
108
|
+
*/
|
|
55
109
|
requestedField: Field;
|
|
56
|
-
|
|
110
|
+
/** Name of the parent field (if there is one). */
|
|
111
|
+
parentFieldName?: string;
|
|
57
112
|
}
|
|
58
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* Props for the [[IContentVisitor.processPrimitiveValue]] call.
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
59
117
|
export interface ProcessPrimitiveValueProps {
|
|
118
|
+
/** Field whose value is being processed. */
|
|
60
119
|
field: Field;
|
|
120
|
+
/** Type of the value. */
|
|
61
121
|
valueType: TypeDescription;
|
|
62
|
-
|
|
122
|
+
/** Name of the parent field (if there is one). */
|
|
123
|
+
parentFieldName?: string;
|
|
124
|
+
/** Raw value. */
|
|
63
125
|
rawValue: Value;
|
|
126
|
+
/** Display value. */
|
|
64
127
|
displayValue: DisplayValue;
|
|
65
128
|
}
|
|
66
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* An interface for a visitor that can be passed to the [[traverseContent]] function
|
|
131
|
+
* to be called on each piece of content.
|
|
132
|
+
*
|
|
133
|
+
* The order of calls when using the visitor with [[traverseContent]] or [[traverseContentItem]]:
|
|
134
|
+
*
|
|
135
|
+
* ```
|
|
136
|
+
* startContent
|
|
137
|
+
* processFieldHierarchies
|
|
138
|
+
* for each content item:
|
|
139
|
+
* startItem
|
|
140
|
+
* for each field in root level:
|
|
141
|
+
* for each category in field's category stack from root to field's category:
|
|
142
|
+
* startCategory
|
|
143
|
+
* startField
|
|
144
|
+
* valueProcessing:
|
|
145
|
+
* if item's value for this field is merged:
|
|
146
|
+
* processMergedValue
|
|
147
|
+
* else if the field is struct:
|
|
148
|
+
* startStruct
|
|
149
|
+
* for each struct member:
|
|
150
|
+
* recurse into the valueProcessing step
|
|
151
|
+
* finishStruct
|
|
152
|
+
* else if the field is array:
|
|
153
|
+
* startArray
|
|
154
|
+
* for each array item:
|
|
155
|
+
* recurse into the valueProcessing step
|
|
156
|
+
* finishArray
|
|
157
|
+
* else if the field is primitive:
|
|
158
|
+
* processPrimitiveValue
|
|
159
|
+
* finishField
|
|
160
|
+
* finishItem
|
|
161
|
+
* finishContent
|
|
162
|
+
* ```
|
|
163
|
+
* @public
|
|
164
|
+
*/
|
|
67
165
|
export interface IContentVisitor {
|
|
166
|
+
/**
|
|
167
|
+
* Called before starting [[Content]] processing. This is a good place to initialize various caches and prepare
|
|
168
|
+
* for parsing content.
|
|
169
|
+
*
|
|
170
|
+
* Processing is skipped if the function returns `false` and [[finishContent]] is not called in that case.
|
|
171
|
+
*/
|
|
68
172
|
startContent(props: StartContentProps): boolean;
|
|
173
|
+
/** Called after processing of [[Content]] is complete. */
|
|
69
174
|
finishContent(): void;
|
|
175
|
+
/** Called to post-process field hierarchies after they're extracted from [[Descriptor]] in processed [[Content]]. */
|
|
70
176
|
processFieldHierarchies(props: ProcessFieldHierarchiesProps): void;
|
|
177
|
+
/**
|
|
178
|
+
* Called before starting each [[Item]] processing. This is a good place to initialize for a new content item, e.g.
|
|
179
|
+
* set up a new row in table.
|
|
180
|
+
*
|
|
181
|
+
* Processing is skipped if the function returns `false` and [[finishItem]] is not called in that case.
|
|
182
|
+
*/
|
|
71
183
|
startItem(props: StartItemProps): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Called after processing of [[Item]] is complete. May be used to do any kind of post-processing after all
|
|
186
|
+
* values for one content item have been processed.
|
|
187
|
+
*/
|
|
72
188
|
finishItem(): void;
|
|
189
|
+
/**
|
|
190
|
+
* Called before processing a content item field ([[startField]] call) for each category in the field's
|
|
191
|
+
* category stack, starting from the root and finishing with the field's category.
|
|
192
|
+
*
|
|
193
|
+
* Processing is skipped if the function returns `false` and [[finishCategory]] is not called in that case.
|
|
194
|
+
*/
|
|
73
195
|
startCategory(props: StartCategoryProps): boolean;
|
|
196
|
+
/** Called after processing of field is complete for every category in the field's category stack. */
|
|
74
197
|
finishCategory(): void;
|
|
198
|
+
/**
|
|
199
|
+
* Called before starting [[Field]] processing for each individual [[Item]]. This is a good callback
|
|
200
|
+
* to skip a field if it doesn't need to be handled.
|
|
201
|
+
*
|
|
202
|
+
* Processing is skipped if the function returns `false` and [[finishField]] is not called in that case.
|
|
203
|
+
*/
|
|
75
204
|
startField(props: StartFieldProps): boolean;
|
|
205
|
+
/** Called after processing of [[Field]] for individual [[Item]] is complete. */
|
|
76
206
|
finishField(): void;
|
|
207
|
+
/**
|
|
208
|
+
* Called before processing a struct value. This is a good callback to skip handling the value or set up
|
|
209
|
+
* for struct member values handling.
|
|
210
|
+
*
|
|
211
|
+
* Processing is skipped if the function returns `false` and [[finishStruct]] is not called in that case.
|
|
212
|
+
*/
|
|
77
213
|
startStruct(props: StartStructProps): boolean;
|
|
214
|
+
/** Called after processing of struct value is complete. */
|
|
78
215
|
finishStruct(): void;
|
|
216
|
+
/**
|
|
217
|
+
* Called before processing an array value. This is a good callback to skip handling the value or set up
|
|
218
|
+
* for array items handling.
|
|
219
|
+
*
|
|
220
|
+
* Processing is skipped if the function returns `false` and [[finishArray]] is not called in that case.
|
|
221
|
+
*/
|
|
79
222
|
startArray(props: StartArrayProps): boolean;
|
|
223
|
+
/** Called after processing of array value is complete. */
|
|
80
224
|
finishArray(): void;
|
|
225
|
+
/** Called to process a [merged value]($docs/presentation/content/Terminology.md#value-merging). */
|
|
81
226
|
processMergedValue(props: ProcessMergedValueProps): void;
|
|
227
|
+
/** Called to process a primitive value. */
|
|
82
228
|
processPrimitiveValue(props: ProcessPrimitiveValueProps): void;
|
|
83
229
|
}
|
|
84
|
-
/**
|
|
230
|
+
/**
|
|
231
|
+
* An utility for traversing field hierarchy. Stops traversal as soon as `cb` returns `false`.
|
|
232
|
+
* @public
|
|
233
|
+
*/
|
|
85
234
|
export declare function traverseFieldHierarchy(hierarchy: FieldHierarchy, cb: (h: FieldHierarchy) => boolean): void;
|
|
86
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* An utility to traverse content using provided visitor. Provides means to parse content into different formats,
|
|
237
|
+
* for different components.
|
|
238
|
+
* @public
|
|
239
|
+
*/
|
|
87
240
|
export declare function traverseContent(visitor: IContentVisitor, content: Content): void;
|
|
88
|
-
/**
|
|
241
|
+
/**
|
|
242
|
+
* An utility for calling [[traverseContent]] when there's only one content item.
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
89
245
|
export declare function traverseContentItem(visitor: IContentVisitor, descriptor: Descriptor, item: Item): void;
|
|
90
246
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
247
|
+
* Parses a list of [[Field]] objects into a list of [[FieldHierarchy]].
|
|
248
|
+
*
|
|
249
|
+
* @param ignoreCategories Enables adding all of the `nestedFields` to parent field's `childFields`
|
|
250
|
+
* without considering categories.
|
|
251
|
+
*
|
|
252
|
+
* @public
|
|
94
253
|
*/
|
|
95
254
|
export declare function createFieldHierarchies(fields: Field[], ignoreCategories?: Boolean): FieldHierarchy[];
|
|
96
|
-
/**
|
|
255
|
+
/**
|
|
256
|
+
* Adds a field hierarchy into root field hierarchies list. *
|
|
257
|
+
* @public
|
|
258
|
+
*/
|
|
97
259
|
export declare function addFieldHierarchy(rootHierarchies: FieldHierarchy[], hierarchy: FieldHierarchy): void;
|
|
98
260
|
/** @internal */
|
|
99
261
|
export declare const FIELD_NAMES_SEPARATOR = "$";
|
|
100
|
-
/**
|
|
101
|
-
|
|
262
|
+
/**
|
|
263
|
+
* Combines given field names in a way that allows them to be parsed back into a list of individual names using the [[parseCombinedFieldNames]] function.
|
|
264
|
+
* @public
|
|
265
|
+
*/
|
|
266
|
+
export declare function combineFieldNames(fieldName: string, parentFieldName?: string): string;
|
|
267
|
+
/**
|
|
268
|
+
* Parses given combined field names string, constructed using [[combineFieldNames]], into a list of individual field names.
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
271
|
+
export declare function parseCombinedFieldNames(combinedName: string): string[];
|
|
102
272
|
//# sourceMappingURL=ContentTraverser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAsB,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhI
|
|
1
|
+
{"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAsB,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhI;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,oBAAoB;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,qBAAqB;IACrB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,yCAAyC;IACzC,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,uDAAuD;IACvD,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,SAAS,EAAE,cAAc,CAAC;IAC1B,0BAA0B;IAC1B,SAAS,EAAE,eAAe,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,6BAA6B;IAC7B,aAAa,EAAE,gBAAgB,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,SAAS,EAAE,cAAc,CAAC;IAC1B,yBAAyB;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB;IACvB,SAAS,EAAE,WAAW,CAAC;IACvB,2BAA2B;IAC3B,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,yCAAyC;IACzC,WAAW,EAAE,KAAK,CAAC;IACnB;;;;;OAKG;IACH,cAAc,EAAE,KAAK,CAAC;IACtB,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,4CAA4C;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,yBAAyB;IACzB,SAAS,EAAE,eAAe,CAAC;IAC3B,kDAAkD;IAClD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB;IACjB,QAAQ,EAAE,KAAK,CAAC;IAChB,qBAAqB;IACrB,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC;IAChD,0DAA0D;IAC1D,aAAa,IAAI,IAAI,CAAC;IAEtB,qHAAqH;IACrH,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAEnE;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC;IAC1C;;;OAGG;IACH,UAAU,IAAI,IAAI,CAAC;IAEnB;;;;;OAKG;IACH,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC;IAClD,qGAAqG;IACrG,cAAc,IAAI,IAAI,CAAC;IAEvB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;IAC5C,gFAAgF;IAChF,WAAW,IAAI,IAAI,CAAC;IAEpB;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC;IAC9C,2DAA2D;IAC3D,YAAY,IAAI,IAAI,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;IAC5C,0DAA0D;IAC1D,WAAW,IAAI,IAAI,CAAC;IAEpB,mGAAmG;IACnG,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACzD,2CAA2C;IAC3C,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,OAAO,QAGnG;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,QAazE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,QAE/F;AA2KD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,gBAAgB,CAAC,EAAE,OAAO,oBA8BjF;AAmED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,cAAc,EAAE,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI,CAapG;AAaD,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,UAE5E;AACD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,YAE3D"}
|
|
@@ -7,19 +7,27 @@
|
|
|
7
7
|
* @module Content
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.
|
|
10
|
+
exports.parseCombinedFieldNames = exports.combineFieldNames = exports.FIELD_NAMES_SEPARATOR = exports.addFieldHierarchy = exports.createFieldHierarchies = exports.traverseContentItem = exports.traverseContent = exports.traverseFieldHierarchy = void 0;
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
|
+
const Content_1 = require("./Content");
|
|
12
13
|
const Fields_1 = require("./Fields");
|
|
13
14
|
const Item_1 = require("./Item");
|
|
14
15
|
const TypeDescription_1 = require("./TypeDescription");
|
|
15
16
|
const Value_1 = require("./Value");
|
|
16
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* An utility for traversing field hierarchy. Stops traversal as soon as `cb` returns `false`.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
17
21
|
function traverseFieldHierarchy(hierarchy, cb) {
|
|
18
22
|
if (cb(hierarchy))
|
|
19
23
|
hierarchy.childFields.forEach((childHierarchy) => traverseFieldHierarchy(childHierarchy, cb));
|
|
20
24
|
}
|
|
21
25
|
exports.traverseFieldHierarchy = traverseFieldHierarchy;
|
|
22
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* An utility to traverse content using provided visitor. Provides means to parse content into different formats,
|
|
28
|
+
* for different components.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
23
31
|
function traverseContent(visitor, content) {
|
|
24
32
|
if (!visitor.startContent({ descriptor: content.descriptor }))
|
|
25
33
|
return;
|
|
@@ -35,18 +43,12 @@ function traverseContent(visitor, content) {
|
|
|
35
43
|
}
|
|
36
44
|
}
|
|
37
45
|
exports.traverseContent = traverseContent;
|
|
38
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* An utility for calling [[traverseContent]] when there's only one content item.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
39
50
|
function traverseContentItem(visitor, descriptor, item) {
|
|
40
|
-
|
|
41
|
-
return;
|
|
42
|
-
try {
|
|
43
|
-
const fieldHierarchies = createFieldHierarchies(descriptor.fields);
|
|
44
|
-
visitor.processFieldHierarchies({ hierarchies: fieldHierarchies });
|
|
45
|
-
traverseContentItemFields(visitor, fieldHierarchies, item);
|
|
46
|
-
}
|
|
47
|
-
finally {
|
|
48
|
-
visitor.finishContent();
|
|
49
|
-
}
|
|
51
|
+
traverseContent(visitor, new Content_1.Content(descriptor, [item]));
|
|
50
52
|
}
|
|
51
53
|
exports.traverseContentItem = traverseContentItem;
|
|
52
54
|
class VisitedCategories {
|
|
@@ -97,27 +99,27 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
|
|
|
97
99
|
return;
|
|
98
100
|
try {
|
|
99
101
|
const rootToThisField = createFieldPath(fieldHierarchy.field);
|
|
100
|
-
let
|
|
102
|
+
let parentFieldName;
|
|
101
103
|
const pathUpToField = rootToThisField.slice(undefined, -1);
|
|
102
104
|
for (let i = 0; i < pathUpToField.length; ++i) {
|
|
103
105
|
const parentField = pathUpToField[i];
|
|
104
106
|
const nextField = rootToThisField[i + 1];
|
|
105
107
|
if (item.isFieldMerged(parentField.name)) {
|
|
106
|
-
visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: parentField,
|
|
108
|
+
visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: parentField, parentFieldName });
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
111
|
const { emptyNestedItem, convertedItem } = convertNestedContentItemToStructArrayItem(item, parentField, nextField);
|
|
110
112
|
if (emptyNestedItem)
|
|
111
113
|
return;
|
|
112
114
|
item = convertedItem;
|
|
113
|
-
|
|
115
|
+
parentFieldName = combineFieldNames(parentField.name, parentFieldName);
|
|
114
116
|
}
|
|
115
117
|
if (item.isFieldMerged(fieldHierarchy.field.name)) {
|
|
116
|
-
visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: fieldHierarchy.field,
|
|
118
|
+
visitor.processMergedValue({ requestedField: fieldHierarchy.field, mergedField: fieldHierarchy.field, parentFieldName });
|
|
117
119
|
return;
|
|
118
120
|
}
|
|
119
121
|
if (fieldHierarchy.field.isNestedContentField()) {
|
|
120
|
-
fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy,
|
|
122
|
+
fieldHierarchy = convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName);
|
|
121
123
|
const { emptyNestedItem, convertedItem } = convertNestedContentFieldHierarchyItemToStructArrayItem(item, fieldHierarchy);
|
|
122
124
|
if (emptyNestedItem)
|
|
123
125
|
return;
|
|
@@ -135,49 +137,49 @@ function traverseContentItemField(visitor, fieldHierarchy, item) {
|
|
|
135
137
|
}),
|
|
136
138
|
};
|
|
137
139
|
}
|
|
138
|
-
traverseContentItemFieldValue(visitor, fieldHierarchy, item.mergedFieldNames, fieldHierarchy.field.type,
|
|
140
|
+
traverseContentItemFieldValue(visitor, fieldHierarchy, item.mergedFieldNames, fieldHierarchy.field.type, parentFieldName, item.values[fieldHierarchy.field.name], item.displayValues[fieldHierarchy.field.name]);
|
|
139
141
|
}
|
|
140
142
|
finally {
|
|
141
143
|
visitor.finishField();
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
|
-
function traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
146
|
+
function traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue) {
|
|
145
147
|
if (rawValue !== undefined) {
|
|
146
148
|
if (valueType.valueFormat === TypeDescription_1.PropertyValueFormat.Array) {
|
|
147
149
|
(0, core_bentley_1.assert)(Value_1.Value.isArray(rawValue));
|
|
148
150
|
(0, core_bentley_1.assert)(Value_1.DisplayValue.isArray(displayValue));
|
|
149
|
-
return traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
151
|
+
return traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);
|
|
150
152
|
}
|
|
151
153
|
if (valueType.valueFormat === TypeDescription_1.PropertyValueFormat.Struct) {
|
|
152
154
|
(0, core_bentley_1.assert)(Value_1.Value.isMap(rawValue));
|
|
153
155
|
(0, core_bentley_1.assert)(Value_1.DisplayValue.isMap(displayValue));
|
|
154
|
-
return traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
156
|
+
return traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);
|
|
155
157
|
}
|
|
156
158
|
}
|
|
157
|
-
traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
159
|
+
traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue);
|
|
158
160
|
}
|
|
159
|
-
function traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
161
|
+
function traverseContentItemArrayFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValues, displayValues) {
|
|
160
162
|
(0, core_bentley_1.assert)(rawValues.length === displayValues.length);
|
|
161
163
|
(0, core_bentley_1.assert)(valueType.valueFormat === TypeDescription_1.PropertyValueFormat.Array);
|
|
162
|
-
if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType,
|
|
164
|
+
if (!visitor.startArray({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))
|
|
163
165
|
return;
|
|
164
166
|
try {
|
|
165
167
|
const itemType = valueType.memberType;
|
|
166
168
|
rawValues.forEach((_, i) => {
|
|
167
|
-
traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, itemType,
|
|
169
|
+
traverseContentItemFieldValue(visitor, fieldHierarchy, mergedFieldNames, itemType, parentFieldName, rawValues[i], displayValues[i]);
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
172
|
finally {
|
|
171
173
|
visitor.finishArray();
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
|
-
function traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
176
|
+
function traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValues, displayValues) {
|
|
175
177
|
(0, core_bentley_1.assert)(valueType.valueFormat === TypeDescription_1.PropertyValueFormat.Struct);
|
|
176
|
-
if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType,
|
|
178
|
+
if (!visitor.startStruct({ hierarchy: fieldHierarchy, valueType, parentFieldName, rawValues, displayValues }))
|
|
177
179
|
return;
|
|
178
180
|
try {
|
|
179
181
|
if (fieldHierarchy.field.isNestedContentField())
|
|
180
|
-
|
|
182
|
+
parentFieldName = combineFieldNames(fieldHierarchy.field.name, parentFieldName);
|
|
181
183
|
valueType.members.forEach((memberDescription) => {
|
|
182
184
|
let memberField = fieldHierarchy.childFields.find((f) => f.field.name === memberDescription.name);
|
|
183
185
|
if (!memberField) {
|
|
@@ -188,24 +190,27 @@ function traverseContentItemStructFieldValue(visitor, fieldHierarchy, mergedFiel
|
|
|
188
190
|
childFields: [],
|
|
189
191
|
};
|
|
190
192
|
}
|
|
191
|
-
traverseContentItemFieldValue(visitor, memberField, mergedFieldNames, memberDescription.type,
|
|
193
|
+
traverseContentItemFieldValue(visitor, memberField, mergedFieldNames, memberDescription.type, parentFieldName, rawValues[memberDescription.name], displayValues[memberDescription.name]);
|
|
192
194
|
});
|
|
193
195
|
}
|
|
194
196
|
finally {
|
|
195
197
|
visitor.finishStruct();
|
|
196
198
|
}
|
|
197
199
|
}
|
|
198
|
-
function traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType,
|
|
200
|
+
function traverseContentItemPrimitiveFieldValue(visitor, fieldHierarchy, mergedFieldNames, valueType, parentFieldName, rawValue, displayValue) {
|
|
199
201
|
if (-1 !== mergedFieldNames.indexOf(fieldHierarchy.field.name)) {
|
|
200
|
-
visitor.processMergedValue({ mergedField: fieldHierarchy.field, requestedField: fieldHierarchy.field,
|
|
202
|
+
visitor.processMergedValue({ mergedField: fieldHierarchy.field, requestedField: fieldHierarchy.field, parentFieldName });
|
|
201
203
|
return;
|
|
202
204
|
}
|
|
203
|
-
visitor.processPrimitiveValue({ field: fieldHierarchy.field, valueType,
|
|
205
|
+
visitor.processPrimitiveValue({ field: fieldHierarchy.field, valueType, parentFieldName, rawValue, displayValue });
|
|
204
206
|
}
|
|
205
207
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
* Parses a list of [[Field]] objects into a list of [[FieldHierarchy]].
|
|
209
|
+
*
|
|
210
|
+
* @param ignoreCategories Enables adding all of the `nestedFields` to parent field's `childFields`
|
|
211
|
+
* without considering categories.
|
|
212
|
+
*
|
|
213
|
+
* @public
|
|
209
214
|
*/
|
|
210
215
|
function createFieldHierarchies(fields, ignoreCategories) {
|
|
211
216
|
const hierarchies = new Array();
|
|
@@ -298,7 +303,10 @@ function mergeHierarchies(lhs, rhs) {
|
|
|
298
303
|
});
|
|
299
304
|
return result;
|
|
300
305
|
}
|
|
301
|
-
/**
|
|
306
|
+
/**
|
|
307
|
+
* Adds a field hierarchy into root field hierarchies list. *
|
|
308
|
+
* @public
|
|
309
|
+
*/
|
|
302
310
|
function addFieldHierarchy(rootHierarchies, hierarchy) {
|
|
303
311
|
var _a;
|
|
304
312
|
const match = findRelatedFields(rootHierarchies, hierarchy);
|
|
@@ -326,11 +334,22 @@ function createFieldPath(field) {
|
|
|
326
334
|
}
|
|
327
335
|
/** @internal */
|
|
328
336
|
exports.FIELD_NAMES_SEPARATOR = "$";
|
|
329
|
-
/**
|
|
330
|
-
|
|
331
|
-
|
|
337
|
+
/**
|
|
338
|
+
* Combines given field names in a way that allows them to be parsed back into a list of individual names using the [[parseCombinedFieldNames]] function.
|
|
339
|
+
* @public
|
|
340
|
+
*/
|
|
341
|
+
function combineFieldNames(fieldName, parentFieldName) {
|
|
342
|
+
return parentFieldName ? `${parentFieldName}${exports.FIELD_NAMES_SEPARATOR}${fieldName}` : fieldName;
|
|
343
|
+
}
|
|
344
|
+
exports.combineFieldNames = combineFieldNames;
|
|
345
|
+
/**
|
|
346
|
+
* Parses given combined field names string, constructed using [[combineFieldNames]], into a list of individual field names.
|
|
347
|
+
* @public
|
|
348
|
+
*/
|
|
349
|
+
function parseCombinedFieldNames(combinedName) {
|
|
350
|
+
return combinedName ? combinedName.split(exports.FIELD_NAMES_SEPARATOR) : [];
|
|
332
351
|
}
|
|
333
|
-
exports.
|
|
352
|
+
exports.parseCombinedFieldNames = parseCombinedFieldNames;
|
|
334
353
|
function convertNestedContentItemToStructArrayItem(item, field, nextField) {
|
|
335
354
|
var _a;
|
|
336
355
|
const value = (_a = item.values[field.name]) !== null && _a !== void 0 ? _a : [];
|
|
@@ -355,11 +374,11 @@ function convertNestedContentItemToStructArrayItem(item, field, nextField) {
|
|
|
355
374
|
const convertedItem = new Item_1.Item(item.primaryKeys, item.label, item.imageId, item.classInfo, { [nextField.name]: nextFieldValues.raw }, { [nextField.name]: nextFieldValues.display }, item.mergedFieldNames, item.extendedData); // eslint-disable-line deprecation/deprecation
|
|
356
375
|
return { emptyNestedItem: false, convertedItem };
|
|
357
376
|
}
|
|
358
|
-
function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy,
|
|
377
|
+
function convertNestedContentFieldHierarchyToStructArrayHierarchy(fieldHierarchy, parentFieldName) {
|
|
359
378
|
const fieldName = fieldHierarchy.field.name;
|
|
360
379
|
const convertedChildFieldHierarchies = fieldHierarchy.childFields.map((child) => {
|
|
361
380
|
if (child.field.isNestedContentField())
|
|
362
|
-
return convertNestedContentFieldHierarchyToStructArrayHierarchy(child,
|
|
381
|
+
return convertNestedContentFieldHierarchyToStructArrayHierarchy(child, combineFieldNames(fieldName, parentFieldName));
|
|
363
382
|
return child;
|
|
364
383
|
});
|
|
365
384
|
const convertedFieldHierarchy = {
|