@itwin/presentation-common 4.5.0-dev.8 → 4.6.0-dev.0
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 +58 -1
- package/LICENSE.md +1 -1
- package/README.md +1 -1
- package/Ruleset.schema.json +72 -19
- package/lib/cjs/assets/locales/en/Presentation.json +1 -1
- package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/cjs/presentation-common/AsyncTasks.js +6 -4
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/CommonLoggerCategory.js +3 -3
- package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.js +27 -15
- package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts +7 -4
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +22 -17
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.js +3 -3
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Error.js +5 -4
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js +3 -3
- 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 +80 -46
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js +5 -4
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.d.ts +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.d.ts.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.js +18 -1
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.js +3 -3
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js +3 -3
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +53 -21
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js +21 -9
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +19 -15
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js +7 -5
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.js +42 -26
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Update.js +4 -3
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.js +3 -3
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.js +3 -3
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Content.js +10 -9
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js +47 -25
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +56 -21
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.js +3 -3
- package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/cjs/presentation-common/content/Editor.js +3 -3
- package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +78 -2
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +201 -45
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +8 -6
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js +4 -4
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts +6 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +39 -11
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/content/Renderer.js +3 -3
- package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.js +3 -3
- package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Value.js +46 -30
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +3 -3
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js +14 -8
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +7 -5
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +11 -7
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js +3 -3
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +39 -11
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js +3 -3
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js +3 -3
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.js +3 -3
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.js +3 -3
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.js +3 -3
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +3 -3
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +3 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +3 -3
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +3 -3
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.js +3 -3
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common.js +3 -3
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.js +6 -4
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/CommonLoggerCategory.js +3 -3
- package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.d.ts.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.js +27 -15
- package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +7 -4
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +22 -17
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.js +3 -3
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.d.ts.map +1 -1
- package/lib/esm/presentation-common/Error.js +5 -4
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.js +3 -3
- 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 +80 -46
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js +5 -4
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.d.ts +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.d.ts.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.js +19 -2
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.js +3 -3
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js +3 -3
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +53 -21
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js +21 -9
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +20 -16
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js +7 -5
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.js +42 -26
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts.map +1 -1
- package/lib/esm/presentation-common/Update.js +4 -3
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.js +3 -3
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.js +3 -3
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Content.js +10 -9
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js +47 -25
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +56 -21
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.js +3 -3
- package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/esm/presentation-common/content/Editor.js +3 -3
- package/lib/esm/presentation-common/content/Editor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +78 -2
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +198 -44
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +8 -6
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Property.js +4 -4
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts +6 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js +39 -11
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/content/Renderer.js +3 -3
- package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.js +3 -3
- package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Value.js +46 -30
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +3 -3
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js +14 -8
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +7 -5
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +11 -7
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/ClassSpecifications.js +3 -3
- package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +39 -11
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipDirection.js +3 -3
- package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js +3 -3
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.js +3 -3
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.js +3 -3
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.js +3 -3
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +3 -3
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +3 -3
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +3 -3
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +3 -3
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +3 -3
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +3 -3
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +3 -3
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +3 -3
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js +3 -3
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.js +3 -3
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js +3 -3
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +3 -3
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.js +3 -3
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common.js +3 -3
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/Presentation.json +1 -1
- package/package.json +14 -11
|
@@ -30,6 +30,20 @@ export interface BaseFieldJSON {
|
|
|
30
30
|
export interface PropertiesFieldJSON<TClassInfoJSON = ClassInfoJSON> extends BaseFieldJSON {
|
|
31
31
|
properties: PropertyJSON<TClassInfoJSON>[];
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Data structure for a [[ArrayPropertiesField]] serialized to JSON.
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {
|
|
38
|
+
itemsField: PropertiesFieldJSON<TClassInfoJSON>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Data structure for a [[StructPropertiesField]] serialized to JSON.
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {
|
|
45
|
+
memberFields: PropertiesFieldJSON<TClassInfoJSON>[];
|
|
46
|
+
}
|
|
33
47
|
/**
|
|
34
48
|
* Data structure for a [[NestedContentField]] serialized to JSON.
|
|
35
49
|
* @public
|
|
@@ -47,7 +61,7 @@ export interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> extends
|
|
|
47
61
|
* JSON representation of a [[Field]]
|
|
48
62
|
* @public
|
|
49
63
|
*/
|
|
50
|
-
export type FieldJSON<TClassInfoJSON = ClassInfoJSON> = BaseFieldJSON | PropertiesFieldJSON<TClassInfoJSON> | NestedContentFieldJSON<TClassInfoJSON>;
|
|
64
|
+
export type FieldJSON<TClassInfoJSON = ClassInfoJSON> = BaseFieldJSON | PropertiesFieldJSON<TClassInfoJSON> | ArrayPropertiesFieldJSON<TClassInfoJSON> | StructPropertiesFieldJSON<TClassInfoJSON> | NestedContentFieldJSON<TClassInfoJSON>;
|
|
51
65
|
/**
|
|
52
66
|
* Describes a single content field. A field is usually represented as a grid column
|
|
53
67
|
* or a property pane row.
|
|
@@ -101,7 +115,7 @@ export declare class Field {
|
|
|
101
115
|
/** Serialize this object to JSON */
|
|
102
116
|
toJSON(): FieldJSON;
|
|
103
117
|
/** Serialize this object to compressed JSON */
|
|
104
|
-
toCompressedJSON(
|
|
118
|
+
toCompressedJSON(_classesMap: {
|
|
105
119
|
[id: string]: CompressedClassInfoJSON;
|
|
106
120
|
}): FieldJSON<string>;
|
|
107
121
|
/** Deserialize [[Field]] from JSON */
|
|
@@ -149,9 +163,17 @@ export declare class PropertiesField extends Field {
|
|
|
149
163
|
* @param renderer Property renderer used to render values of this field
|
|
150
164
|
*/
|
|
151
165
|
constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
166
|
+
/** Is this a an array property field */
|
|
167
|
+
isArrayPropertiesField(): this is ArrayPropertiesField;
|
|
168
|
+
/** Is this a an struct property field */
|
|
169
|
+
isStructPropertiesField(): this is StructPropertiesField;
|
|
152
170
|
clone(): PropertiesField;
|
|
153
171
|
/** Serialize this object to JSON */
|
|
154
172
|
toJSON(): PropertiesFieldJSON;
|
|
173
|
+
/** Serialize this object to compressed JSON */
|
|
174
|
+
toCompressedJSON(classesMap: {
|
|
175
|
+
[id: string]: CompressedClassInfoJSON;
|
|
176
|
+
}): PropertiesFieldJSON<string>;
|
|
155
177
|
/** Deserialize [[PropertiesField]] from JSON */
|
|
156
178
|
static fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined;
|
|
157
179
|
/**
|
|
@@ -173,6 +195,56 @@ export declare class PropertiesField extends Field {
|
|
|
173
195
|
*/
|
|
174
196
|
matchesDescriptor(descriptor: FieldDescriptor): boolean;
|
|
175
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Describes a content field that's based on one or more similar EC array properties.
|
|
200
|
+
* @public
|
|
201
|
+
*/
|
|
202
|
+
export declare class ArrayPropertiesField extends PropertiesField {
|
|
203
|
+
itemsField: PropertiesField;
|
|
204
|
+
constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, itemsField: PropertiesField, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
205
|
+
isArrayPropertiesField(): this is ArrayPropertiesField;
|
|
206
|
+
clone(): ArrayPropertiesField;
|
|
207
|
+
/** Serialize this object to JSON */
|
|
208
|
+
toJSON(): ArrayPropertiesFieldJSON;
|
|
209
|
+
/** Serialize this object to compressed JSON */
|
|
210
|
+
toCompressedJSON(classesMap: {
|
|
211
|
+
[id: string]: CompressedClassInfoJSON;
|
|
212
|
+
}): ArrayPropertiesFieldJSON<string>;
|
|
213
|
+
/** Deserialize [[ArrayPropertiesField]] from JSON */
|
|
214
|
+
static fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField;
|
|
215
|
+
/**
|
|
216
|
+
* Deserialize an [[ArrayPropertiesField]] from compressed JSON.
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
219
|
+
static fromCompressedJSON(json: ArrayPropertiesFieldJSON<Id64String>, classesMap: {
|
|
220
|
+
[id: string]: CompressedClassInfoJSON;
|
|
221
|
+
}, categories: CategoryDescription[]): ArrayPropertiesField;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Describes a content field that's based on one or more similar EC struct properties.
|
|
225
|
+
* @public
|
|
226
|
+
*/
|
|
227
|
+
export declare class StructPropertiesField extends PropertiesField {
|
|
228
|
+
memberFields: PropertiesField[];
|
|
229
|
+
constructor(category: CategoryDescription, name: string, label: string, description: TypeDescription, memberFields: PropertiesField[], isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
230
|
+
isStructPropertiesField(): this is StructPropertiesField;
|
|
231
|
+
clone(): StructPropertiesField;
|
|
232
|
+
/** Serialize this object to JSON */
|
|
233
|
+
toJSON(): StructPropertiesFieldJSON;
|
|
234
|
+
/** Serialize this object to compressed JSON */
|
|
235
|
+
toCompressedJSON(classesMap: {
|
|
236
|
+
[id: string]: CompressedClassInfoJSON;
|
|
237
|
+
}): StructPropertiesFieldJSON<string>;
|
|
238
|
+
/** Deserialize [[StructPropertiesField]] from JSON */
|
|
239
|
+
static fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField;
|
|
240
|
+
/**
|
|
241
|
+
* Deserialize a [[StructPropertiesField]] from compressed JSON.
|
|
242
|
+
* @public
|
|
243
|
+
*/
|
|
244
|
+
static fromCompressedJSON(json: StructPropertiesFieldJSON<Id64String>, classesMap: {
|
|
245
|
+
[id: string]: CompressedClassInfoJSON;
|
|
246
|
+
}, categories: CategoryDescription[]): StructPropertiesField;
|
|
247
|
+
}
|
|
176
248
|
/**
|
|
177
249
|
* Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).
|
|
178
250
|
*
|
|
@@ -234,6 +306,10 @@ export declare class NestedContentField extends Field {
|
|
|
234
306
|
getFieldByName(name: string, recurse?: boolean): Field | undefined;
|
|
235
307
|
/** Serialize this object to JSON */
|
|
236
308
|
toJSON(): NestedContentFieldJSON;
|
|
309
|
+
/** Serialize this object to compressed JSON */
|
|
310
|
+
toCompressedJSON(classesMap: {
|
|
311
|
+
[id: string]: CompressedClassInfoJSON;
|
|
312
|
+
}): NestedContentFieldJSON<string>;
|
|
237
313
|
/**
|
|
238
314
|
* Deserialize [[NestedContentField]] from JSON
|
|
239
315
|
* @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,SAAS,
|
|
1
|
+
{"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,SAAS,EACT,aAAa,EACb,uBAAuB,EAKvB,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACzB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED;;;GAGG;AAEH,MAAM,WAAW,mBAAmB,CAAC,cAAc,GAAG,aAAa,CAAE,SAAQ,aAAa;IACxF,UAAU,EAA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I,SAAS;IACb,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,yBAAyB,CAAC;AAE/E,cAAc;AAEd,yBAAiB,eAAe,CAAC;IAC/B,uCAAuC;IACvC,SAAgB,OAAO,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,oBAAoB,CAErE;IACD,4CAA4C;IAC5C,SAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,yBAAyB,CAE/E;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC;IACrC,6BAA6B,EAAE,wBAAwB,CAAC;IACxD;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC;QAChB,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,oBAAoB;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Content
|
|
7
7
|
*/
|
|
@@ -10,14 +10,18 @@ import { NavigationPropertyInfo, RelatedClassInfo, RelationshipPath, } from "../
|
|
|
10
10
|
import { PresentationError, PresentationStatus } from "../Error";
|
|
11
11
|
import { RelationshipMeaning } from "../rules/content/modifiers/RelatedPropertiesSpecification";
|
|
12
12
|
import { Property } from "./Property";
|
|
13
|
-
|
|
14
|
-
const isPropertiesField = (field) => {
|
|
13
|
+
function isPropertiesField(field) {
|
|
15
14
|
return !!field.properties;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
}
|
|
16
|
+
function isArrayPropertiesField(field) {
|
|
17
|
+
return !!field.itemsField;
|
|
18
|
+
}
|
|
19
|
+
function isStructPropertiesField(field) {
|
|
20
|
+
return !!field.memberFields;
|
|
21
|
+
}
|
|
22
|
+
function isNestedContentField(field) {
|
|
19
23
|
return !!field.nestedFields;
|
|
20
|
-
}
|
|
24
|
+
}
|
|
21
25
|
/**
|
|
22
26
|
* Describes a single content field. A field is usually represented as a grid column
|
|
23
27
|
* or a property pane row.
|
|
@@ -49,15 +53,21 @@ export class Field {
|
|
|
49
53
|
/**
|
|
50
54
|
* Is this a [[PropertiesField]]
|
|
51
55
|
*/
|
|
52
|
-
isPropertiesField() {
|
|
56
|
+
isPropertiesField() {
|
|
57
|
+
return isPropertiesField(this);
|
|
58
|
+
}
|
|
53
59
|
/**
|
|
54
60
|
* Is this a [[NestedContentField]]
|
|
55
61
|
*/
|
|
56
|
-
isNestedContentField() {
|
|
62
|
+
isNestedContentField() {
|
|
63
|
+
return isNestedContentField(this);
|
|
64
|
+
}
|
|
57
65
|
/**
|
|
58
66
|
* Get parent
|
|
59
67
|
*/
|
|
60
|
-
get parent() {
|
|
68
|
+
get parent() {
|
|
69
|
+
return this._parent;
|
|
70
|
+
}
|
|
61
71
|
clone() {
|
|
62
72
|
const clone = new Field(this.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.editor, this.renderer);
|
|
63
73
|
clone.rebuildParentship(this.parent);
|
|
@@ -77,33 +87,21 @@ export class Field {
|
|
|
77
87
|
};
|
|
78
88
|
}
|
|
79
89
|
/** Serialize this object to compressed JSON */
|
|
80
|
-
toCompressedJSON(
|
|
81
|
-
if (this.isPropertiesField())
|
|
82
|
-
return {
|
|
83
|
-
...this.toJSON(),
|
|
84
|
-
properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),
|
|
85
|
-
};
|
|
86
|
-
if (this.isNestedContentField()) {
|
|
87
|
-
const { id, ...leftOverInfo } = this.contentClassInfo;
|
|
88
|
-
classesMap[id] = leftOverInfo;
|
|
89
|
-
return {
|
|
90
|
-
...this.toJSON(),
|
|
91
|
-
contentClassInfo: id,
|
|
92
|
-
pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),
|
|
93
|
-
nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),
|
|
94
|
-
};
|
|
95
|
-
}
|
|
90
|
+
toCompressedJSON(_classesMap) {
|
|
96
91
|
return this.toJSON();
|
|
97
92
|
}
|
|
98
93
|
/** Deserialize [[Field]] from JSON */
|
|
99
94
|
static fromJSON(json, categories) {
|
|
100
|
-
if (!json)
|
|
95
|
+
if (!json) {
|
|
101
96
|
return undefined;
|
|
102
|
-
|
|
97
|
+
}
|
|
98
|
+
if (isPropertiesField(json)) {
|
|
103
99
|
return PropertiesField.fromJSON(json, categories);
|
|
104
|
-
|
|
100
|
+
}
|
|
101
|
+
if (isNestedContentField(json)) {
|
|
105
102
|
// eslint-disable-next-line deprecation/deprecation
|
|
106
103
|
return NestedContentField.fromJSON(json, categories);
|
|
104
|
+
}
|
|
107
105
|
const field = Object.create(Field.prototype);
|
|
108
106
|
return Object.assign(field, json, {
|
|
109
107
|
category: Field.getCategoryFromFieldJson(json, categories),
|
|
@@ -111,12 +109,15 @@ export class Field {
|
|
|
111
109
|
}
|
|
112
110
|
/** Deserialize a [[Field]] from compressed JSON. */
|
|
113
111
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
114
|
-
if (!json)
|
|
112
|
+
if (!json) {
|
|
115
113
|
return undefined;
|
|
116
|
-
|
|
114
|
+
}
|
|
115
|
+
if (isPropertiesField(json)) {
|
|
117
116
|
return PropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
118
|
-
|
|
117
|
+
}
|
|
118
|
+
if (isNestedContentField(json)) {
|
|
119
119
|
return NestedContentField.fromCompressedJSON(json, classesMap, categories);
|
|
120
|
+
}
|
|
120
121
|
const field = Object.create(Field.prototype);
|
|
121
122
|
return Object.assign(field, json, {
|
|
122
123
|
category: Field.getCategoryFromFieldJson(json, categories),
|
|
@@ -124,8 +125,9 @@ export class Field {
|
|
|
124
125
|
}
|
|
125
126
|
static getCategoryFromFieldJson(fieldJson, categories) {
|
|
126
127
|
const category = categories.find((c) => c.name === fieldJson.category);
|
|
127
|
-
if (!category)
|
|
128
|
+
if (!category) {
|
|
128
129
|
throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);
|
|
130
|
+
}
|
|
129
131
|
return category;
|
|
130
132
|
}
|
|
131
133
|
/** Resets field's parent. */
|
|
@@ -178,6 +180,14 @@ export class PropertiesField extends Field {
|
|
|
178
180
|
super(category, name, label, description, isReadonly, priority, editor, renderer);
|
|
179
181
|
this.properties = properties;
|
|
180
182
|
}
|
|
183
|
+
/** Is this a an array property field */
|
|
184
|
+
isArrayPropertiesField() {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
/** Is this a an struct property field */
|
|
188
|
+
isStructPropertiesField() {
|
|
189
|
+
return false;
|
|
190
|
+
}
|
|
181
191
|
clone() {
|
|
182
192
|
const clone = new PropertiesField(this.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.properties, this.editor, this.renderer);
|
|
183
193
|
clone.rebuildParentship(this.parent);
|
|
@@ -190,10 +200,24 @@ export class PropertiesField extends Field {
|
|
|
190
200
|
properties: this.properties,
|
|
191
201
|
};
|
|
192
202
|
}
|
|
203
|
+
/** Serialize this object to compressed JSON */
|
|
204
|
+
toCompressedJSON(classesMap) {
|
|
205
|
+
return {
|
|
206
|
+
...super.toCompressedJSON(classesMap),
|
|
207
|
+
properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),
|
|
208
|
+
};
|
|
209
|
+
}
|
|
193
210
|
/** Deserialize [[PropertiesField]] from JSON */
|
|
194
211
|
static fromJSON(json, categories) {
|
|
195
|
-
if (!json)
|
|
212
|
+
if (!json) {
|
|
196
213
|
return undefined;
|
|
214
|
+
}
|
|
215
|
+
if (isArrayPropertiesField(json)) {
|
|
216
|
+
return ArrayPropertiesField.fromJSON(json, categories);
|
|
217
|
+
}
|
|
218
|
+
if (isStructPropertiesField(json)) {
|
|
219
|
+
return StructPropertiesField.fromJSON(json, categories);
|
|
220
|
+
}
|
|
197
221
|
const field = Object.create(PropertiesField.prototype);
|
|
198
222
|
return Object.assign(field, json, {
|
|
199
223
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
@@ -204,6 +228,12 @@ export class PropertiesField extends Field {
|
|
|
204
228
|
* @public
|
|
205
229
|
*/
|
|
206
230
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
231
|
+
if (isArrayPropertiesField(json)) {
|
|
232
|
+
return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
233
|
+
}
|
|
234
|
+
if (isStructPropertiesField(json)) {
|
|
235
|
+
return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
236
|
+
}
|
|
207
237
|
const field = Object.create(PropertiesField.prototype);
|
|
208
238
|
return Object.assign(field, json, {
|
|
209
239
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
@@ -262,6 +292,110 @@ export class PropertiesField extends Field {
|
|
|
262
292
|
return true;
|
|
263
293
|
}
|
|
264
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* Describes a content field that's based on one or more similar EC array properties.
|
|
297
|
+
* @public
|
|
298
|
+
*/
|
|
299
|
+
export class ArrayPropertiesField extends PropertiesField {
|
|
300
|
+
constructor(category, name, label, description, itemsField, isReadonly, priority, properties, editor, renderer) {
|
|
301
|
+
super(category, name, label, description, isReadonly, priority, properties, editor, renderer);
|
|
302
|
+
this.itemsField = itemsField;
|
|
303
|
+
}
|
|
304
|
+
isArrayPropertiesField() {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
clone() {
|
|
308
|
+
const clone = new ArrayPropertiesField(this.category, this.name, this.label, this.type, this.itemsField.clone(), this.isReadonly, this.priority, this.properties, this.editor, this.renderer);
|
|
309
|
+
clone.rebuildParentship(this.parent);
|
|
310
|
+
return clone;
|
|
311
|
+
}
|
|
312
|
+
/** Serialize this object to JSON */
|
|
313
|
+
toJSON() {
|
|
314
|
+
return {
|
|
315
|
+
...super.toJSON(),
|
|
316
|
+
itemsField: this.itemsField.toJSON(),
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
/** Serialize this object to compressed JSON */
|
|
320
|
+
toCompressedJSON(classesMap) {
|
|
321
|
+
return {
|
|
322
|
+
...super.toCompressedJSON(classesMap),
|
|
323
|
+
itemsField: this.itemsField.toCompressedJSON(classesMap),
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
/** Deserialize [[ArrayPropertiesField]] from JSON */
|
|
327
|
+
static fromJSON(json, categories) {
|
|
328
|
+
const field = Object.create(ArrayPropertiesField.prototype);
|
|
329
|
+
return Object.assign(field, json, {
|
|
330
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
331
|
+
itemsField: PropertiesField.fromJSON(json.itemsField, categories),
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Deserialize an [[ArrayPropertiesField]] from compressed JSON.
|
|
336
|
+
* @public
|
|
337
|
+
*/
|
|
338
|
+
static fromCompressedJSON(json, classesMap, categories) {
|
|
339
|
+
const field = Object.create(ArrayPropertiesField.prototype);
|
|
340
|
+
return Object.assign(field, json, {
|
|
341
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
342
|
+
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
343
|
+
itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories),
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Describes a content field that's based on one or more similar EC struct properties.
|
|
349
|
+
* @public
|
|
350
|
+
*/
|
|
351
|
+
export class StructPropertiesField extends PropertiesField {
|
|
352
|
+
constructor(category, name, label, description, memberFields, isReadonly, priority, properties, editor, renderer) {
|
|
353
|
+
super(category, name, label, description, isReadonly, priority, properties, editor, renderer);
|
|
354
|
+
this.memberFields = memberFields;
|
|
355
|
+
}
|
|
356
|
+
isStructPropertiesField() {
|
|
357
|
+
return true;
|
|
358
|
+
}
|
|
359
|
+
clone() {
|
|
360
|
+
const clone = new StructPropertiesField(this.category, this.name, this.label, this.type, this.memberFields.map((m) => m.clone()), this.isReadonly, this.priority, this.properties, this.editor, this.renderer);
|
|
361
|
+
clone.rebuildParentship(this.parent);
|
|
362
|
+
return clone;
|
|
363
|
+
}
|
|
364
|
+
/** Serialize this object to JSON */
|
|
365
|
+
toJSON() {
|
|
366
|
+
return {
|
|
367
|
+
...super.toJSON(),
|
|
368
|
+
memberFields: this.memberFields.map((m) => m.toJSON()),
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
/** Serialize this object to compressed JSON */
|
|
372
|
+
toCompressedJSON(classesMap) {
|
|
373
|
+
return {
|
|
374
|
+
...super.toCompressedJSON(classesMap),
|
|
375
|
+
memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
/** Deserialize [[StructPropertiesField]] from JSON */
|
|
379
|
+
static fromJSON(json, categories) {
|
|
380
|
+
const field = Object.create(StructPropertiesField.prototype);
|
|
381
|
+
return Object.assign(field, json, {
|
|
382
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
383
|
+
memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)),
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Deserialize a [[StructPropertiesField]] from compressed JSON.
|
|
388
|
+
* @public
|
|
389
|
+
*/
|
|
390
|
+
static fromCompressedJSON(json, classesMap, categories) {
|
|
391
|
+
const field = Object.create(StructPropertiesField.prototype);
|
|
392
|
+
return Object.assign(field, json, {
|
|
393
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
394
|
+
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
395
|
+
memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)),
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
}
|
|
265
399
|
/**
|
|
266
400
|
* Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).
|
|
267
401
|
*
|
|
@@ -320,13 +454,25 @@ export class NestedContentField extends Field {
|
|
|
320
454
|
autoExpand: this.autoExpand,
|
|
321
455
|
};
|
|
322
456
|
}
|
|
457
|
+
/** Serialize this object to compressed JSON */
|
|
458
|
+
toCompressedJSON(classesMap) {
|
|
459
|
+
const { id, ...leftOverInfo } = this.contentClassInfo;
|
|
460
|
+
classesMap[id] = leftOverInfo;
|
|
461
|
+
return {
|
|
462
|
+
...super.toCompressedJSON(classesMap),
|
|
463
|
+
contentClassInfo: id,
|
|
464
|
+
pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),
|
|
465
|
+
nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),
|
|
466
|
+
};
|
|
467
|
+
}
|
|
323
468
|
/**
|
|
324
469
|
* Deserialize [[NestedContentField]] from JSON
|
|
325
470
|
* @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]
|
|
326
471
|
*/
|
|
327
472
|
static fromJSON(json, categories) {
|
|
328
|
-
if (!json)
|
|
473
|
+
if (!json) {
|
|
329
474
|
return undefined;
|
|
475
|
+
}
|
|
330
476
|
const field = Object.create(NestedContentField.prototype);
|
|
331
477
|
return Object.assign(field, json, this.fromCommonJSON(json, categories), {
|
|
332
478
|
nestedFields: json.nestedFields
|
|
@@ -340,7 +486,8 @@ export class NestedContentField extends Field {
|
|
|
340
486
|
const field = Object.create(NestedContentField.prototype);
|
|
341
487
|
return Object.assign(field, json, this.fromCommonJSON(json, categories), {
|
|
342
488
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
343
|
-
nestedFields: json.nestedFields
|
|
489
|
+
nestedFields: json.nestedFields
|
|
490
|
+
.map((nestedFieldJson) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))
|
|
344
491
|
.filter((nestedField) => !!nestedField),
|
|
345
492
|
contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },
|
|
346
493
|
pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),
|
|
@@ -358,8 +505,9 @@ export class NestedContentField extends Field {
|
|
|
358
505
|
/** Resets parent of this field and all nested fields. */
|
|
359
506
|
resetParentship() {
|
|
360
507
|
super.resetParentship();
|
|
361
|
-
for (const nestedField of this.nestedFields)
|
|
508
|
+
for (const nestedField of this.nestedFields) {
|
|
362
509
|
nestedField.resetParentship();
|
|
510
|
+
}
|
|
363
511
|
}
|
|
364
512
|
/**
|
|
365
513
|
* Sets provided [[NestedContentField]] as parent of this fields and recursively updates
|
|
@@ -367,20 +515,23 @@ export class NestedContentField extends Field {
|
|
|
367
515
|
*/
|
|
368
516
|
rebuildParentship(parentField) {
|
|
369
517
|
super.rebuildParentship(parentField);
|
|
370
|
-
for (const nestedField of this.nestedFields)
|
|
518
|
+
for (const nestedField of this.nestedFields) {
|
|
371
519
|
nestedField.rebuildParentship(this);
|
|
520
|
+
}
|
|
372
521
|
}
|
|
373
522
|
}
|
|
374
523
|
/** @internal */
|
|
375
524
|
export const getFieldByName = (fields, name, recurse) => {
|
|
376
525
|
if (name) {
|
|
377
526
|
for (const field of fields) {
|
|
378
|
-
if (field.name === name)
|
|
527
|
+
if (field.name === name) {
|
|
379
528
|
return field;
|
|
529
|
+
}
|
|
380
530
|
if (recurse && field.isNestedContentField()) {
|
|
381
531
|
const nested = getFieldByName(field.nestedFields, name, recurse);
|
|
382
|
-
if (nested)
|
|
532
|
+
if (nested) {
|
|
383
533
|
return nested;
|
|
534
|
+
}
|
|
384
535
|
}
|
|
385
536
|
}
|
|
386
537
|
}
|
|
@@ -389,12 +540,14 @@ export const getFieldByName = (fields, name, recurse) => {
|
|
|
389
540
|
/** @internal */
|
|
390
541
|
export const getFieldByDescriptor = (fields, fieldDescriptor, recurse) => {
|
|
391
542
|
for (const field of fields) {
|
|
392
|
-
if (field.matchesDescriptor(fieldDescriptor))
|
|
543
|
+
if (field.matchesDescriptor(fieldDescriptor)) {
|
|
393
544
|
return field;
|
|
545
|
+
}
|
|
394
546
|
if (recurse && field.isNestedContentField()) {
|
|
395
547
|
const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);
|
|
396
|
-
if (nested)
|
|
548
|
+
if (nested) {
|
|
397
549
|
return nested;
|
|
550
|
+
}
|
|
398
551
|
}
|
|
399
552
|
}
|
|
400
553
|
return undefined;
|
|
@@ -409,6 +562,7 @@ export var FieldDescriptorType;
|
|
|
409
562
|
FieldDescriptorType["Properties"] = "properties";
|
|
410
563
|
})(FieldDescriptorType || (FieldDescriptorType = {}));
|
|
411
564
|
/** @public */
|
|
565
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
412
566
|
export var FieldDescriptor;
|
|
413
567
|
(function (FieldDescriptor) {
|
|
414
568
|
/** Is this a named field descriptor */
|