@itwin/presentation-common 4.0.0-dev.8 → 4.0.0-dev.80
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 +51 -1
- package/Ruleset.schema.json +11 -0
- package/lib/cjs/assets/locales/en/Presentation.json +15 -0
- package/lib/cjs/assets/locales/en-PSEUDO/Presentation.json +15 -0
- package/lib/cjs/presentation-common/AsyncTasks.d.ts +22 -22
- package/lib/cjs/presentation-common/AsyncTasks.js +38 -38
- package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts +12 -12
- package/lib/cjs/presentation-common/CommonLoggerCategory.js +20 -20
- package/lib/cjs/presentation-common/Diagnostics.d.ts +125 -125
- package/lib/cjs/presentation-common/Diagnostics.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.js +72 -72
- package/lib/cjs/presentation-common/EC.d.ts +347 -350
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +290 -290
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.d.ts +123 -123
- package/lib/cjs/presentation-common/ElementProperties.d.ts.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.js +9 -9
- package/lib/cjs/presentation-common/Error.d.ts +47 -45
- package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Error.js +64 -62
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +93 -93
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js +9 -9
- package/lib/cjs/presentation-common/KeySet.d.ts +146 -146
- package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js +428 -428
- package/lib/cjs/presentation-common/LabelDefinition.d.ts +93 -87
- package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js +78 -73
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.d.ts +29 -29
- package/lib/cjs/presentation-common/LocalizationHelper.js +110 -110
- package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +40 -40
- package/lib/cjs/presentation-common/PresentationIpcInterface.js +12 -12
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +273 -261
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js +23 -23
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +186 -186
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +108 -104
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PropertyFormatter.d.ts +31 -0
- package/lib/cjs/presentation-common/PropertyFormatter.d.ts.map +1 -0
- package/lib/cjs/presentation-common/PropertyFormatter.js +199 -0
- package/lib/cjs/presentation-common/PropertyFormatter.js.map +1 -0
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +26 -26
- package/lib/cjs/presentation-common/RegisteredRuleset.js +33 -33
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +82 -83
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +166 -171
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts +171 -171
- package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js +55 -55
- package/lib/cjs/presentation-common/RulesetsFactory.d.ts +44 -44
- package/lib/cjs/presentation-common/RulesetsFactory.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.js +223 -223
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts +213 -213
- package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Update.js +226 -226
- package/lib/cjs/presentation-common/Utils.d.ts +62 -62
- package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Utils.js +43 -43
- package/lib/cjs/presentation-common/content/Category.d.ts +49 -49
- package/lib/cjs/presentation-common/content/Category.js +48 -48
- package/lib/cjs/presentation-common/content/Content.d.ts +38 -38
- package/lib/cjs/presentation-common/content/Content.js +56 -56
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +271 -271
- package/lib/cjs/presentation-common/content/ContentTraverser.js +437 -439
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +328 -328
- package/lib/cjs/presentation-common/content/Descriptor.js +191 -193
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +21 -21
- package/lib/cjs/presentation-common/content/DisplayTypes.js +29 -29
- package/lib/cjs/presentation-common/content/Editor.d.ts +15 -15
- package/lib/cjs/presentation-common/content/Editor.js +9 -9
- package/lib/cjs/presentation-common/content/Fields.d.ts +298 -301
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +393 -397
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +85 -85
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +84 -84
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +57 -57
- package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js +40 -40
- package/lib/cjs/presentation-common/content/Renderer.d.ts +11 -11
- package/lib/cjs/presentation-common/content/Renderer.js +9 -9
- package/lib/cjs/presentation-common/content/TypeDescription.d.ts +72 -72
- package/lib/cjs/presentation-common/content/TypeDescription.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.js +23 -23
- package/lib/cjs/presentation-common/content/Value.d.ts +189 -189
- package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Value.js +273 -273
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +37 -37
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +31 -31
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +246 -246
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js +121 -121
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +154 -154
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +106 -106
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +96 -96
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +122 -122
- package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts +45 -45
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js +9 -9
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/RelationshipDirection.d.ts +13 -13
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js +21 -21
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +56 -56
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/Rule.d.ts +76 -76
- package/lib/cjs/presentation-common/rules/Rule.js +35 -35
- package/lib/cjs/presentation-common/rules/Ruleset.d.ts +65 -65
- package/lib/cjs/presentation-common/rules/Ruleset.js +9 -9
- package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +41 -41
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/Variables.d.ts +58 -58
- package/lib/cjs/presentation-common/rules/Variables.js +25 -25
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +30 -30
- package/lib/cjs/presentation-common/rules/content/ContentRule.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +58 -58
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +20 -20
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +108 -108
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +21 -21
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +96 -96
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +43 -43
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +207 -207
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +51 -51
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +158 -158
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +25 -25
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +58 -58
- package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +14 -14
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +98 -98
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +21 -21
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +79 -79
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +19 -19
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +16 -16
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +35 -35
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +9 -9
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +38 -38
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.js +9 -9
- package/lib/cjs/presentation-common.d.ts +113 -112
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +133 -128
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts +22 -22
- package/lib/esm/presentation-common/AsyncTasks.js +34 -34
- package/lib/esm/presentation-common/CommonLoggerCategory.d.ts +12 -12
- package/lib/esm/presentation-common/CommonLoggerCategory.js +17 -17
- package/lib/esm/presentation-common/Diagnostics.d.ts +125 -125
- package/lib/esm/presentation-common/Diagnostics.d.ts.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.js +67 -67
- package/lib/esm/presentation-common/EC.d.ts +347 -350
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +287 -287
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.d.ts +123 -123
- package/lib/esm/presentation-common/ElementProperties.d.ts.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.js +8 -8
- package/lib/esm/presentation-common/Error.d.ts +47 -45
- package/lib/esm/presentation-common/Error.d.ts.map +1 -1
- package/lib/esm/presentation-common/Error.js +60 -58
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +93 -93
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.js +8 -8
- package/lib/esm/presentation-common/KeySet.d.ts +146 -146
- package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/esm/presentation-common/KeySet.js +424 -424
- package/lib/esm/presentation-common/LabelDefinition.d.ts +93 -87
- package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js +75 -70
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.d.ts +29 -29
- package/lib/esm/presentation-common/LocalizationHelper.js +106 -106
- package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +40 -40
- package/lib/esm/presentation-common/PresentationIpcInterface.js +9 -9
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +273 -261
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js +18 -18
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +186 -186
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +105 -100
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PropertyFormatter.d.ts +31 -0
- package/lib/esm/presentation-common/PropertyFormatter.d.ts.map +1 -0
- package/lib/esm/presentation-common/PropertyFormatter.js +194 -0
- package/lib/esm/presentation-common/PropertyFormatter.js.map +1 -0
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +26 -26
- package/lib/esm/presentation-common/RegisteredRuleset.js +29 -29
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +82 -83
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +162 -167
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts +171 -171
- package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js +52 -52
- package/lib/esm/presentation-common/RulesetsFactory.d.ts +44 -44
- package/lib/esm/presentation-common/RulesetsFactory.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.js +219 -219
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts +213 -213
- package/lib/esm/presentation-common/Update.d.ts.map +1 -1
- package/lib/esm/presentation-common/Update.js +223 -223
- package/lib/esm/presentation-common/Utils.d.ts +62 -62
- package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
- package/lib/esm/presentation-common/Utils.js +39 -39
- package/lib/esm/presentation-common/content/Category.d.ts +49 -49
- package/lib/esm/presentation-common/content/Category.js +45 -45
- package/lib/esm/presentation-common/content/Content.d.ts +38 -38
- package/lib/esm/presentation-common/content/Content.js +52 -52
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts +271 -271
- package/lib/esm/presentation-common/content/ContentTraverser.js +427 -429
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +328 -328
- package/lib/esm/presentation-common/content/Descriptor.js +187 -189
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.d.ts +21 -21
- package/lib/esm/presentation-common/content/DisplayTypes.js +26 -26
- package/lib/esm/presentation-common/content/Editor.d.ts +15 -15
- package/lib/esm/presentation-common/content/Editor.js +8 -8
- package/lib/esm/presentation-common/content/Fields.d.ts +298 -301
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +386 -390
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +85 -85
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +80 -80
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +57 -57
- package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Property.js +37 -37
- package/lib/esm/presentation-common/content/Renderer.d.ts +11 -11
- package/lib/esm/presentation-common/content/Renderer.js +8 -8
- package/lib/esm/presentation-common/content/TypeDescription.d.ts +72 -72
- package/lib/esm/presentation-common/content/TypeDescription.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.js +20 -20
- package/lib/esm/presentation-common/content/Value.d.ts +189 -189
- package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Value.js +270 -270
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +37 -37
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +28 -28
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +246 -246
- package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js +118 -118
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +154 -154
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +103 -103
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +96 -96
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +119 -119
- package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts +45 -45
- package/lib/esm/presentation-common/rules/ClassSpecifications.js +8 -8
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/RelationshipDirection.d.ts +13 -13
- package/lib/esm/presentation-common/rules/RelationshipDirection.js +18 -18
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +56 -56
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/Rule.d.ts +76 -76
- package/lib/esm/presentation-common/rules/Rule.js +32 -32
- package/lib/esm/presentation-common/rules/Ruleset.d.ts +65 -65
- package/lib/esm/presentation-common/rules/Ruleset.js +8 -8
- package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +41 -41
- package/lib/esm/presentation-common/rules/SchemasSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/Variables.d.ts +58 -58
- package/lib/esm/presentation-common/rules/Variables.js +22 -22
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +30 -30
- package/lib/esm/presentation-common/rules/content/ContentRule.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +58 -58
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js +17 -17
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +8 -8
- package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +108 -108
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +18 -18
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +96 -96
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +40 -40
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +207 -207
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +48 -48
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +158 -158
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +22 -22
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +58 -58
- package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +14 -14
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +98 -98
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +18 -18
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +79 -79
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +16 -16
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +16 -16
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +35 -35
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +8 -8
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +38 -38
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.js +8 -8
- package/lib/esm/presentation-common.d.ts +113 -112
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +117 -116
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/Presentation.json +15 -0
- package/package.json +17 -15
- package/lib/cjs/assets/locales/en/BisCore.json +0 -18
- package/lib/cjs/assets/locales/en/ECPresentation.json +0 -9
- package/lib/cjs/assets/locales/en/RulesEngine.json +0 -6
- package/lib/cjs/assets/locales/en-PSEUDO/BisCore.json +0 -18
- package/lib/cjs/assets/locales/en-PSEUDO/ECPresentation.json +0 -9
- package/lib/cjs/assets/locales/en-PSEUDO/RulesEngine.json +0 -6
- package/lib/public/locales/en/BisCore.json +0 -18
- package/lib/public/locales/en/ECPresentation.json +0 -9
- package/lib/public/locales/en/RulesEngine.json +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesetsFactory.js","sourceRoot":"","sources":["../../../src/presentation-common/RulesetsFactory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6D;AAG7D,+DAA0F;AAC1F,2CAAsD;AACtD,6BAAgE;AAEhE,+EAAiF;AAEjF,yEAAsE;AACtE,uCAAyC;AAGzC;;;;;GAKG;AACH,MAAa,eAAe;IAClB,iCAAiC,CAAC,KAAY,EA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,EAAwE,EAAE;IACrI,MAAM,IAAI,GAAG,mCAAmC,CAAC,KAAK,CAAC,CAAC;IACxD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtE,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,EAAc,EAAE,EAAE;IAClC,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;QAClC,IAAI,KAAK,GAAG,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACtC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;YACnC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC3B,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACjB;QACD,OAAO,KAAK,GAAG,CAAC,EAAE;YAChB,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;YACxB,KAAK,GAAG,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC;SACxB;KACF;IACD,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { Guid, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { Field, PropertiesField } from \"./content/Fields\";\r\nimport { Item } from \"./content/Item\";\r\nimport { PrimitiveTypeDescription, PropertyValueFormat } from \"./content/TypeDescription\";\r\nimport { DisplayValue, Value } from \"./content/Value\";\r\nimport { ClassInfo, InstanceKey, RelationshipPath } from \"./EC\";\r\nimport { MultiSchemaClassesSpecification, SingleSchemaClassSpecification } from \"./rules/ClassSpecifications\";\r\nimport { ContentSpecificationTypes } from \"./rules/content/ContentSpecification\";\r\nimport { RelatedInstanceSpecification } from \"./rules/RelatedInstanceSpecification\";\r\nimport { RelationshipDirection } from \"./rules/RelationshipDirection\";\r\nimport { RuleTypes } from \"./rules/Rule\";\r\nimport { Ruleset } from \"./rules/Ruleset\";\r\n\r\n/**\r\n * A factory class that can be used to create presentation rulesets targeted towards\r\n * specific use cases.\r\n *\r\n * @public\r\n */\r\nexport class RulesetsFactory {\r\n private createSimilarInstancesRulesetInfo(field: Field, record: Item) {\r\n if (!field.isPropertiesField())\r\n throw new Error(\"Can only create 'similar instances' ruleset for properties-based records\");\r\n if (field.type.valueFormat !== PropertyValueFormat.Primitive)\r\n throw new Error(\"Can only create 'similar instances' ruleset for primitive properties\");\r\n if (field.properties.length === 0)\r\n throw new Error(\"Invalid properties' field with no properties\");\r\n if (record.isFieldMerged(field.name))\r\n throw new Error(\"Can't create 'similar instances' ruleset for merged values\");\r\n if (!record.classInfo)\r\n throw new Error(\"Can't create 'similar instances' for records based on multiple different ECClass instances\");\r\n const propertyName = getPropertyName(field);\r\n const propertyValue = getPropertyValue(record, field);\r\n const relatedInstanceInfo = createRelatedInstanceSpecInfo(field);\r\n const relatedClass = relatedInstanceInfo?.class;\r\n const ruleset: Ruleset = {\r\n id: `SimilarInstances/${propertyName}/${Guid.createValue()}`,\r\n rules: [],\r\n };\r\n ruleset.rules.push({\r\n ruleType: RuleTypes.Content,\r\n specifications: [{\r\n specType: ContentSpecificationTypes.ContentInstancesOfSpecificClasses,\r\n classes: createMultiClassSpecification(record.classInfo),\r\n handleInstancesPolymorphically: true,\r\n relatedInstances: relatedInstanceInfo ? [relatedInstanceInfo.spec] : [],\r\n instanceFilter: createInstanceFilter(relatedInstanceInfo?.spec, field.type, propertyName, propertyValue.raw),\r\n }],\r\n });\r\n return { ruleset, relatedClass, propertyName, propertyValue };\r\n }\r\n\r\n /**\r\n * Create a ruleset with content rules for getting instances are of the\r\n * same ECClass and have the same property value as the provided `record`.\r\n * @param field A field identifying which property of the record we should use\r\n * @param record A record whose similar instances should be found\r\n * @param computeDisplayValue Optional callback function to calculate display value that's\r\n * used in ruleset's description. If not provided, display value from record is used instead.\r\n */\r\n public async createSimilarInstancesRuleset(field: Field, record: Item, computeDisplayValue?: ComputeDisplayValueCallback): Promise<{ ruleset: Ruleset, description: string }> {\r\n const info = this.createSimilarInstancesRulesetInfo(field, record);\r\n const description = await createDescriptionAsync(record, info.relatedClass, field, info.propertyValue, computeDisplayValue);\r\n return { ruleset: info.ruleset, description };\r\n }\r\n}\r\n\r\n/**\r\n * Definition of a function for calculating a display value.\r\n * @public\r\n */\r\nexport type ComputeDisplayValueCallback = (type: string, value: PrimitivePropertyValue, displayValue: string) => Promise<string>;\r\n\r\ninterface PrimitiveValueDef {\r\n raw: PrimitivePropertyValue;\r\n display: string;\r\n}\r\n\r\n/**\r\n * Value of a primitive property.\r\n * @public\r\n */\r\nexport type PrimitivePropertyValue = string | number | boolean | Point | InstanceKey | undefined;\r\n\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\r\ntype Point = { x: number, y: number, z?: number };\r\n\r\nconst toString = (displayValue: Value | DisplayValue): string => {\r\n if (!displayValue)\r\n return \"NULL\";\r\n return displayValue.toString();\r\n};\r\n\r\nconst createDescription = (record: Item, relatedClass: ClassInfo | undefined, field: Field, value: string): string => {\r\n const classInfo = relatedClass ?? record.classInfo!;\r\n return `[${classInfo.label}].[${field.label}] = ${value}`;\r\n};\r\n\r\nconst createDescriptionAsync = async (record: Item, relatedClass: ClassInfo | undefined, field: Field, value: PrimitiveValueDef, computeDisplayValue?: ComputeDisplayValueCallback): Promise<string> => {\r\n const displayValue = computeDisplayValue ? await computeDisplayValue(field.type.typeName, value.raw, value.display) : toString(value.display);\r\n return createDescription(record, relatedClass, field, displayValue);\r\n};\r\n\r\nconst getPropertyName = (field: PropertiesField) => {\r\n let name = field.properties[0].property.name;\r\n if (field.type.typeName === \"navigation\")\r\n name += \".Id\";\r\n return name;\r\n};\r\n\r\nconst isPrimitivePropertyValue = (value: Value): value is PrimitivePropertyValue => {\r\n if (Value.isPrimitive(value)) {\r\n return true;\r\n }\r\n\r\n if (Value.isMap(value)) {\r\n if (typeof value.x === \"number\"\r\n && typeof value.y === \"number\"\r\n && (value.z === undefined || typeof value.z === \"number\")) {\r\n return true;\r\n }\r\n\r\n if (typeof value.className === \"string\" && typeof value.id === \"string\") {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst getPropertyValue = (record: Item, field: Field): PrimitiveValueDef => {\r\n const fieldNamesStack = [];\r\n let currField: Field | undefined = field;\r\n while (currField) {\r\n fieldNamesStack.push(currField.name);\r\n currField = currField.parent;\r\n }\r\n let currFieldName = fieldNamesStack.pop();\r\n let displayValue: DisplayValue = record.displayValues[currFieldName!];\r\n let value: Value = record.values[currFieldName!];\r\n currFieldName = fieldNamesStack.pop();\r\n while (currFieldName) {\r\n if (!Value.isNestedContent(value) || value.length === 0)\r\n throw new Error(\"Invalid record value\");\r\n if (value.length > 1)\r\n throw new Error(\"Can't create 'similar instances' for records related through many part of *-to-many relationship\");\r\n if (value[0].mergedFieldNames.indexOf(currFieldName) !== -1)\r\n throw new Error(\"Can't create 'similar instances' ruleset for merged values\");\r\n displayValue = value[0].displayValues[currFieldName];\r\n value = value[0].values[currFieldName];\r\n currFieldName = fieldNamesStack.pop();\r\n }\r\n if (!isPrimitivePropertyValue(value))\r\n throw new Error(\"Can only create 'similar instances' ruleset for primitive values\");\r\n return { raw: value, display: toString(displayValue) };\r\n};\r\n\r\nconst createInstanceFilter = (\r\n relatedInstanceSpec: Readonly<RelatedInstanceSpecification> | undefined,\r\n propertyType: PrimitiveTypeDescription,\r\n propertyName: string,\r\n propertyValue: PrimitivePropertyValue,\r\n): string => {\r\n const alias = relatedInstanceSpec ? relatedInstanceSpec.alias : \"this\";\r\n return createComparison(propertyType, `${alias}.${propertyName}`, \"=\", propertyValue);\r\n};\r\n\r\ntype Operator = \"=\" | \"!=\" | \">\" | \">=\" | \"<\" | \"<=\";\r\nconst createComparison = (type: PrimitiveTypeDescription, name: string, operator: Operator, value: PrimitivePropertyValue): string => {\r\n let compareValue = \"\";\r\n switch (typeof value) {\r\n case \"undefined\":\r\n compareValue = \"NULL\";\r\n break;\r\n case \"string\":\r\n compareValue = `\"${value.replace(/\"/g, `\"\"`)}\"`;\r\n break;\r\n case \"boolean\":\r\n compareValue = value ? \"TRUE\" : \"FALSE\";\r\n break;\r\n case \"number\":\r\n compareValue = value.toString();\r\n break;\r\n }\r\n\r\n if (type.typeName === \"navigation\" && typeof value === \"object\" && Id64.isId64((value as InstanceKey).id))\r\n // note: this is temporary until we support hex ids in instance filters\r\n compareValue = hexToDec((value as InstanceKey).id);\r\n\r\n if (type.typeName === \"point2d\" || type.typeName === \"point3d\") {\r\n if (typeof value !== \"object\")\r\n throw new Error(\"Expecting point values to be supplied as objects\");\r\n\r\n const dimensionType: PrimitiveTypeDescription = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n typeName: \"double\",\r\n };\r\n\r\n const pointValue = value as Point;\r\n let comparison = `${createComparison(dimensionType, `${name}.x`, operator, pointValue.x)}`;\r\n comparison += ` AND ${createComparison(dimensionType, `${name}.y`, operator, pointValue.y)}`;\r\n if (type.typeName === \"point3d\" && pointValue.z !== undefined)\r\n comparison += ` AND ${createComparison(dimensionType, `${name}.z`, operator, pointValue.z)}`;\r\n\r\n return comparison;\r\n }\r\n\r\n if (type.typeName === \"double\")\r\n return `CompareDoubles(${name}, ${compareValue}) ${operator} 0`;\r\n\r\n if (type.typeName === \"dateTime\")\r\n return `CompareDateTimes(${name}, ${compareValue}) ${operator} 0`;\r\n\r\n return `${name} ${operator} ${compareValue}`;\r\n};\r\n\r\nconst createMultiClassSpecification = (classInfo: Readonly<ClassInfo>): MultiSchemaClassesSpecification => {\r\n const [schemaName, className] = classInfo.name.split(\":\");\r\n return { schemaName, classNames: [className] };\r\n};\r\n\r\nconst createSingleClassSpecification = (classInfo: Readonly<ClassInfo>): SingleSchemaClassSpecification => {\r\n const [schemaName, className] = classInfo.name.split(\":\");\r\n return { schemaName, className };\r\n};\r\n\r\nconst createRelatedInstanceSpec = (pathFromSelectToPropertyClass: RelationshipPath, index: number): { spec: RelatedInstanceSpecification, class: ClassInfo } => ({\r\n spec: {\r\n relationshipPath: pathFromSelectToPropertyClass.map((step) => ({\r\n relationship: createSingleClassSpecification(step.relationshipInfo),\r\n direction: step.isForwardRelationship ? RelationshipDirection.Forward : RelationshipDirection.Backward,\r\n targetClass: createSingleClassSpecification(step.targetClassInfo),\r\n })),\r\n isRequired: true,\r\n alias: `related_${index}`,\r\n },\r\n class: pathFromSelectToPropertyClass[pathFromSelectToPropertyClass.length - 1].targetClassInfo,\r\n});\r\n\r\nconst createPathFromSelectToPropertyClass = (field: PropertiesField): RelationshipPath => {\r\n let currField: Field = field;\r\n const pathFromPropertyToSelectClass: RelationshipPath = [];\r\n while (currField.parent) {\r\n pathFromPropertyToSelectClass.push(...currField.parent.pathToPrimaryClass);\r\n currField = currField.parent;\r\n }\r\n return RelationshipPath.reverse(pathFromPropertyToSelectClass);\r\n};\r\n\r\nconst createRelatedInstanceSpecInfo = (field: PropertiesField): { spec: RelatedInstanceSpecification, class: ClassInfo } | undefined => {\r\n const path = createPathFromSelectToPropertyClass(field);\r\n return path.length ? createRelatedInstanceSpec(path, 0) : undefined;\r\n};\r\n\r\nconst hexToDec = (id: Id64String) => {\r\n const digits = [0];\r\n for (let i = 2; i < id.length; ++i) {\r\n let carry = parseInt(id.charAt(i), 16);\r\n for (let j = 0; j < digits.length; ++j) {\r\n digits[j] = digits[j] * 16 + carry;\r\n carry = digits[j] / 10 | 0;\r\n digits[j] %= 10;\r\n }\r\n while (carry > 0) {\r\n digits.push(carry % 10);\r\n carry = carry / 10 | 0;\r\n }\r\n }\r\n return digits.reverse().join(\"\");\r\n};\r\n"]}
|
|
1
|
+
{"version":3,"file":"RulesetsFactory.js","sourceRoot":"","sources":["../../../src/presentation-common/RulesetsFactory.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6D;AAG7D,+DAA0F;AAC1F,2CAAsD;AACtD,6BAAgE;AAEhE,+EAAiF;AAEjF,yEAAsE;AACtE,uCAAyC;AAGzC;;;;;GAKG;AACH,MAAa,eAAe;IAClB,iCAAiC,CAAC,KAAY,EAAE,MAAY;QAClE,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;QAC9F,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,qCAAmB,CAAC,SAAS;YAC1D,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;QAC1F,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;QAChF,IAAI,CAAC,MAAM,CAAC,SAAS;YACnB,MAAM,IAAI,KAAK,CAAC,4FAA4F,CAAC,CAAC;QAChH,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACtD,MAAM,mBAAmB,GAAG,6BAA6B,CAAC,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AAI,EAAE,CAAC;SACjB;QACD,OAAO,KAAK,GAAG,CAAC,EAAE;YAChB,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;YACxB,KAAK,GAAG,KAAK,GAAG,EAAE,GAAG,CAAC,CAAC;SACxB;KACF;IACD,OAAO,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnC,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { Guid, Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport { Field, PropertiesField } from \"./content/Fields\";\r\nimport { Item } from \"./content/Item\";\r\nimport { PrimitiveTypeDescription, PropertyValueFormat } from \"./content/TypeDescription\";\r\nimport { DisplayValue, Value } from \"./content/Value\";\r\nimport { ClassInfo, InstanceKey, RelationshipPath } from \"./EC\";\r\nimport { MultiSchemaClassesSpecification, SingleSchemaClassSpecification } from \"./rules/ClassSpecifications\";\r\nimport { ContentSpecificationTypes } from \"./rules/content/ContentSpecification\";\r\nimport { RelatedInstanceSpecification } from \"./rules/RelatedInstanceSpecification\";\r\nimport { RelationshipDirection } from \"./rules/RelationshipDirection\";\r\nimport { RuleTypes } from \"./rules/Rule\";\r\nimport { Ruleset } from \"./rules/Ruleset\";\r\n\r\n/**\r\n * A factory class that can be used to create presentation rulesets targeted towards\r\n * specific use cases.\r\n *\r\n * @public\r\n */\r\nexport class RulesetsFactory {\r\n private createSimilarInstancesRulesetInfo(field: Field, record: Item) {\r\n if (!field.isPropertiesField())\r\n throw new Error(\"Can only create 'similar instances' ruleset for properties-based records\");\r\n if (field.type.valueFormat !== PropertyValueFormat.Primitive)\r\n throw new Error(\"Can only create 'similar instances' ruleset for primitive properties\");\r\n if (field.properties.length === 0)\r\n throw new Error(\"Invalid properties' field with no properties\");\r\n if (record.isFieldMerged(field.name))\r\n throw new Error(\"Can't create 'similar instances' ruleset for merged values\");\r\n if (!record.classInfo)\r\n throw new Error(\"Can't create 'similar instances' for records based on multiple different ECClass instances\");\r\n const propertyName = getPropertyName(field);\r\n const propertyValue = getPropertyValue(record, field);\r\n const relatedInstanceInfo = createRelatedInstanceSpecInfo(field);\r\n const relatedClass = relatedInstanceInfo?.class;\r\n const ruleset: Ruleset = {\r\n id: `SimilarInstances/${propertyName}/${Guid.createValue()}`,\r\n rules: [],\r\n };\r\n ruleset.rules.push({\r\n ruleType: RuleTypes.Content,\r\n specifications: [{\r\n specType: ContentSpecificationTypes.ContentInstancesOfSpecificClasses,\r\n classes: createMultiClassSpecification(record.classInfo),\r\n handleInstancesPolymorphically: true,\r\n relatedInstances: relatedInstanceInfo ? [relatedInstanceInfo.spec] : [],\r\n instanceFilter: createInstanceFilter(relatedInstanceInfo?.spec, field.type, propertyName, propertyValue.raw),\r\n }],\r\n });\r\n return { ruleset, relatedClass, propertyName, propertyValue };\r\n }\r\n\r\n /**\r\n * Create a ruleset with content rules for getting instances are of the\r\n * same ECClass and have the same property value as the provided `record`.\r\n * @param field A field identifying which property of the record we should use\r\n * @param record A record whose similar instances should be found\r\n * @param computeDisplayValue Optional callback function to calculate display value that's\r\n * used in ruleset's description. If not provided, display value from record is used instead.\r\n */\r\n public async createSimilarInstancesRuleset(field: Field, record: Item, computeDisplayValue?: ComputeDisplayValueCallback): Promise<{ ruleset: Ruleset, description: string }> {\r\n const info = this.createSimilarInstancesRulesetInfo(field, record);\r\n const description = await createDescriptionAsync(record, info.relatedClass, field, info.propertyValue, computeDisplayValue);\r\n return { ruleset: info.ruleset, description };\r\n }\r\n}\r\n\r\n/**\r\n * Definition of a function for calculating a display value.\r\n * @public\r\n */\r\nexport type ComputeDisplayValueCallback = (type: string, value: PrimitivePropertyValue, displayValue: string) => Promise<string>;\r\n\r\ninterface PrimitiveValueDef {\r\n raw: PrimitivePropertyValue;\r\n display: string;\r\n}\r\n\r\n/**\r\n * Value of a primitive property.\r\n * @public\r\n */\r\nexport type PrimitivePropertyValue = string | number | boolean | Point | InstanceKey | undefined;\r\n\r\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\r\ntype Point = { x: number, y: number, z?: number };\r\n\r\nconst toString = (displayValue: Value | DisplayValue): string => {\r\n if (!displayValue)\r\n return \"NULL\";\r\n return displayValue.toString();\r\n};\r\n\r\nconst createDescription = (record: Item, relatedClass: ClassInfo | undefined, field: Field, value: string): string => {\r\n const classInfo = relatedClass ?? record.classInfo!;\r\n return `[${classInfo.label}].[${field.label}] = ${value}`;\r\n};\r\n\r\nconst createDescriptionAsync = async (record: Item, relatedClass: ClassInfo | undefined, field: Field, value: PrimitiveValueDef, computeDisplayValue?: ComputeDisplayValueCallback): Promise<string> => {\r\n const displayValue = computeDisplayValue ? await computeDisplayValue(field.type.typeName, value.raw, value.display) : toString(value.display);\r\n return createDescription(record, relatedClass, field, displayValue);\r\n};\r\n\r\nconst getPropertyName = (field: PropertiesField) => {\r\n let name = field.properties[0].property.name;\r\n if (field.type.typeName === \"navigation\")\r\n name += \".Id\";\r\n return name;\r\n};\r\n\r\nconst isPrimitivePropertyValue = (value: Value): value is PrimitivePropertyValue => {\r\n if (Value.isPrimitive(value)) {\r\n return true;\r\n }\r\n\r\n if (Value.isMap(value)) {\r\n if (typeof value.x === \"number\"\r\n && typeof value.y === \"number\"\r\n && (value.z === undefined || typeof value.z === \"number\")) {\r\n return true;\r\n }\r\n\r\n if (typeof value.className === \"string\" && typeof value.id === \"string\") {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst getPropertyValue = (record: Item, field: Field): PrimitiveValueDef => {\r\n const fieldNamesStack = [];\r\n let currField: Field | undefined = field;\r\n while (currField) {\r\n fieldNamesStack.push(currField.name);\r\n currField = currField.parent;\r\n }\r\n let currFieldName = fieldNamesStack.pop();\r\n let displayValue: DisplayValue = record.displayValues[currFieldName!];\r\n let value: Value = record.values[currFieldName!];\r\n currFieldName = fieldNamesStack.pop();\r\n while (currFieldName) {\r\n if (!Value.isNestedContent(value) || value.length === 0)\r\n throw new Error(\"Invalid record value\");\r\n if (value.length > 1)\r\n throw new Error(\"Can't create 'similar instances' for records related through many part of *-to-many relationship\");\r\n if (value[0].mergedFieldNames.indexOf(currFieldName) !== -1)\r\n throw new Error(\"Can't create 'similar instances' ruleset for merged values\");\r\n displayValue = value[0].displayValues[currFieldName];\r\n value = value[0].values[currFieldName];\r\n currFieldName = fieldNamesStack.pop();\r\n }\r\n if (!isPrimitivePropertyValue(value))\r\n throw new Error(\"Can only create 'similar instances' ruleset for primitive values\");\r\n return { raw: value, display: toString(displayValue) };\r\n};\r\n\r\nconst createInstanceFilter = (\r\n relatedInstanceSpec: Readonly<RelatedInstanceSpecification> | undefined,\r\n propertyType: PrimitiveTypeDescription,\r\n propertyName: string,\r\n propertyValue: PrimitivePropertyValue,\r\n): string => {\r\n const alias = relatedInstanceSpec ? relatedInstanceSpec.alias : \"this\";\r\n return createComparison(propertyType, `${alias}.${propertyName}`, \"=\", propertyValue);\r\n};\r\n\r\ntype Operator = \"=\" | \"!=\" | \">\" | \">=\" | \"<\" | \"<=\";\r\nconst createComparison = (type: PrimitiveTypeDescription, name: string, operator: Operator, value: PrimitivePropertyValue): string => {\r\n let compareValue = \"\";\r\n switch (typeof value) {\r\n case \"undefined\":\r\n compareValue = \"NULL\";\r\n break;\r\n case \"string\":\r\n compareValue = `\"${value.replace(/\"/g, `\"\"`)}\"`;\r\n break;\r\n case \"boolean\":\r\n compareValue = value ? \"TRUE\" : \"FALSE\";\r\n break;\r\n case \"number\":\r\n compareValue = value.toString();\r\n break;\r\n }\r\n\r\n if (type.typeName === \"navigation\" && typeof value === \"object\" && Id64.isId64((value as InstanceKey).id))\r\n // note: this is temporary until we support hex ids in instance filters\r\n compareValue = hexToDec((value as InstanceKey).id);\r\n\r\n if (type.typeName === \"point2d\" || type.typeName === \"point3d\") {\r\n if (typeof value !== \"object\")\r\n throw new Error(\"Expecting point values to be supplied as objects\");\r\n\r\n const dimensionType: PrimitiveTypeDescription = {\r\n valueFormat: PropertyValueFormat.Primitive,\r\n typeName: \"double\",\r\n };\r\n\r\n const pointValue = value as Point;\r\n let comparison = `${createComparison(dimensionType, `${name}.x`, operator, pointValue.x)}`;\r\n comparison += ` AND ${createComparison(dimensionType, `${name}.y`, operator, pointValue.y)}`;\r\n if (type.typeName === \"point3d\" && pointValue.z !== undefined)\r\n comparison += ` AND ${createComparison(dimensionType, `${name}.z`, operator, pointValue.z)}`;\r\n\r\n return comparison;\r\n }\r\n\r\n if (type.typeName === \"double\")\r\n return `CompareDoubles(${name}, ${compareValue}) ${operator} 0`;\r\n\r\n if (type.typeName === \"dateTime\")\r\n return `CompareDateTimes(${name}, ${compareValue}) ${operator} 0`;\r\n\r\n return `${name} ${operator} ${compareValue}`;\r\n};\r\n\r\nconst createMultiClassSpecification = (classInfo: Readonly<ClassInfo>): MultiSchemaClassesSpecification => {\r\n const [schemaName, className] = classInfo.name.split(\":\");\r\n return { schemaName, classNames: [className] };\r\n};\r\n\r\nconst createSingleClassSpecification = (classInfo: Readonly<ClassInfo>): SingleSchemaClassSpecification => {\r\n const [schemaName, className] = classInfo.name.split(\":\");\r\n return { schemaName, className };\r\n};\r\n\r\nconst createRelatedInstanceSpec = (pathFromSelectToPropertyClass: RelationshipPath, index: number): { spec: RelatedInstanceSpecification, class: ClassInfo } => ({\r\n spec: {\r\n relationshipPath: pathFromSelectToPropertyClass.map((step) => ({\r\n relationship: createSingleClassSpecification(step.relationshipInfo),\r\n direction: step.isForwardRelationship ? RelationshipDirection.Forward : RelationshipDirection.Backward,\r\n targetClass: createSingleClassSpecification(step.targetClassInfo),\r\n })),\r\n isRequired: true,\r\n alias: `related_${index}`,\r\n },\r\n class: pathFromSelectToPropertyClass[pathFromSelectToPropertyClass.length - 1].targetClassInfo,\r\n});\r\n\r\nconst createPathFromSelectToPropertyClass = (field: PropertiesField): RelationshipPath => {\r\n let currField: Field = field;\r\n const pathFromPropertyToSelectClass: RelationshipPath = [];\r\n while (currField.parent) {\r\n pathFromPropertyToSelectClass.push(...currField.parent.pathToPrimaryClass);\r\n currField = currField.parent;\r\n }\r\n return RelationshipPath.reverse(pathFromPropertyToSelectClass);\r\n};\r\n\r\nconst createRelatedInstanceSpecInfo = (field: PropertiesField): { spec: RelatedInstanceSpecification, class: ClassInfo } | undefined => {\r\n const path = createPathFromSelectToPropertyClass(field);\r\n return path.length ? createRelatedInstanceSpec(path, 0) : undefined;\r\n};\r\n\r\nconst hexToDec = (id: Id64String) => {\r\n const digits = [0];\r\n for (let i = 2; i < id.length; ++i) {\r\n let carry = parseInt(id.charAt(i), 16);\r\n for (let j = 0; j < digits.length; ++j) {\r\n digits[j] = digits[j] * 16 + carry;\r\n carry = digits[j] / 10 | 0;\r\n digits[j] %= 10;\r\n }\r\n while (carry > 0) {\r\n digits.push(carry % 10);\r\n carry = carry / 10 | 0;\r\n }\r\n }\r\n return digits.reverse().join(\"\");\r\n};\r\n"]}
|
|
@@ -1,214 +1,214 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Core
|
|
3
|
-
*/
|
|
4
|
-
import { NodeKey, NodeKeyJSON } from "./hierarchy/Key";
|
|
5
|
-
import { Node, NodeJSON, PartialNode, PartialNodeJSON } from "./hierarchy/Node";
|
|
6
|
-
/** @alpha */
|
|
7
|
-
export declare const UPDATE_FULL = "FULL";
|
|
8
|
-
/** @alpha */
|
|
9
|
-
export interface UpdateInfoJSON {
|
|
10
|
-
[imodel: string]: {
|
|
11
|
-
[rulesetId: string]: {
|
|
12
|
-
hierarchy?: HierarchyUpdateInfoJSON;
|
|
13
|
-
content?: ContentUpdateInfo;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
/** @alpha */
|
|
18
|
-
export interface UpdateInfo {
|
|
19
|
-
[imodel: string]: {
|
|
20
|
-
[rulesetId: string]: {
|
|
21
|
-
hierarchy?: HierarchyUpdateInfo;
|
|
22
|
-
content?: ContentUpdateInfo;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
/** @alpha */
|
|
27
|
-
export declare namespace UpdateInfo {
|
|
28
|
-
/** Serialize given object to JSON. */
|
|
29
|
-
function toJSON(obj: UpdateInfo): UpdateInfoJSON;
|
|
30
|
-
/** Deserialize given object from JSON */
|
|
31
|
-
function fromJSON(json: UpdateInfoJSON): UpdateInfo;
|
|
32
|
-
}
|
|
33
|
-
/** @alpha */
|
|
34
|
-
export interface ExpandedNodeUpdateRecordJSON {
|
|
35
|
-
node: NodeJSON;
|
|
36
|
-
position: number;
|
|
37
|
-
}
|
|
38
|
-
/** @alpha */
|
|
39
|
-
export interface HierarchyUpdateRecordJSON {
|
|
40
|
-
parent?: NodeKeyJSON;
|
|
41
|
-
nodesCount: number;
|
|
42
|
-
expandedNodes?: ExpandedNodeUpdateRecordJSON[];
|
|
43
|
-
instanceFilter?: string;
|
|
44
|
-
}
|
|
45
|
-
/** @alpha */
|
|
46
|
-
export interface ExpandedNodeUpdateRecord {
|
|
47
|
-
node: Node;
|
|
48
|
-
position: number;
|
|
49
|
-
}
|
|
50
|
-
/** @alpha */
|
|
51
|
-
export interface HierarchyUpdateRecord {
|
|
52
|
-
parent?: NodeKey;
|
|
53
|
-
nodesCount: number;
|
|
54
|
-
expandedNodes?: ExpandedNodeUpdateRecord[];
|
|
55
|
-
instanceFilter?: string;
|
|
56
|
-
}
|
|
57
|
-
/** @alpha */
|
|
58
|
-
export declare namespace ExpandedNodeUpdateRecord {
|
|
59
|
-
/** Serialize given object to JSON. */
|
|
60
|
-
function toJSON(obj: ExpandedNodeUpdateRecord): ExpandedNodeUpdateRecordJSON;
|
|
61
|
-
/** Deserialize given object from JSON */
|
|
62
|
-
function fromJSON(json: ExpandedNodeUpdateRecordJSON): ExpandedNodeUpdateRecord;
|
|
63
|
-
}
|
|
64
|
-
/** @alpha */
|
|
65
|
-
export declare namespace HierarchyUpdateRecord {
|
|
66
|
-
/** Serialize given object to JSON. */
|
|
67
|
-
function toJSON(obj: HierarchyUpdateRecord): HierarchyUpdateRecordJSON;
|
|
68
|
-
/** Deserialize given object from JSON */
|
|
69
|
-
function fromJSON(json: HierarchyUpdateRecordJSON): HierarchyUpdateRecord;
|
|
70
|
-
}
|
|
71
|
-
/** @alpha */
|
|
72
|
-
export
|
|
73
|
-
/** @alpha */
|
|
74
|
-
export
|
|
75
|
-
/** @alpha */
|
|
76
|
-
export declare namespace HierarchyUpdateInfo {
|
|
77
|
-
/** Serialize given object to JSON. */
|
|
78
|
-
function toJSON(obj: HierarchyUpdateInfo): HierarchyUpdateInfoJSON;
|
|
79
|
-
/** Deserialize given object from JSON */
|
|
80
|
-
function fromJSON(json: HierarchyUpdateInfoJSON): HierarchyUpdateInfo;
|
|
81
|
-
}
|
|
82
|
-
/** @alpha */
|
|
83
|
-
export
|
|
84
|
-
/**
|
|
85
|
-
* JSON representation of [[PartialHierarchyModification]].
|
|
86
|
-
* @public
|
|
87
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
88
|
-
*/
|
|
89
|
-
export
|
|
90
|
-
/**
|
|
91
|
-
* Information about a hierarchy change: insertion, deletion or node update.
|
|
92
|
-
* @public
|
|
93
|
-
*/
|
|
94
|
-
export
|
|
95
|
-
/** @public */
|
|
96
|
-
export declare namespace PartialHierarchyModification {
|
|
97
|
-
/**
|
|
98
|
-
* Serialize given object to JSON.
|
|
99
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
100
|
-
*/
|
|
101
|
-
function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON;
|
|
102
|
-
/**
|
|
103
|
-
* Deserialize given object from JSON
|
|
104
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
105
|
-
*/
|
|
106
|
-
function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Information about node insertion.
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
export interface NodeInsertionInfo {
|
|
113
|
-
type: "Insert";
|
|
114
|
-
/** Parent node key */
|
|
115
|
-
parent?: NodeKey;
|
|
116
|
-
/** Index of the new node under its parent */
|
|
117
|
-
position: number;
|
|
118
|
-
/** Inserted node */
|
|
119
|
-
node: Node;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* JSON representation of [[NodeInsertionInfo]].
|
|
123
|
-
* @public
|
|
124
|
-
* @deprecated in 3.x. Use [[NodeInsertionInfo]]
|
|
125
|
-
*/
|
|
126
|
-
export interface NodeInsertionInfoJSON {
|
|
127
|
-
type: "Insert";
|
|
128
|
-
parent?: NodeKeyJSON;
|
|
129
|
-
position: number;
|
|
130
|
-
node: NodeJSON;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Information about node deletion.
|
|
134
|
-
* @public
|
|
135
|
-
*/
|
|
136
|
-
export interface NodeDeletionInfo {
|
|
137
|
-
type: "Delete";
|
|
138
|
-
/** Parent of the deleted node */
|
|
139
|
-
parent?: NodeKey;
|
|
140
|
-
/** Position of the deleted node among its siblings in the initial, not updated tree */
|
|
141
|
-
position: number;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* JSON representation of [[NodeDeletionInfo]].
|
|
145
|
-
* @public
|
|
146
|
-
* @deprecated in 3.x. Use [[NodeDeletionInfo]]
|
|
147
|
-
*/
|
|
148
|
-
export interface NodeDeletionInfoJSON {
|
|
149
|
-
type: "Delete";
|
|
150
|
-
/** Parent of the deleted node */
|
|
151
|
-
parent?: NodeKeyJSON;
|
|
152
|
-
/** Position of the deleted node among its siblings in the initial, not updated tree */
|
|
153
|
-
position: number;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Information about node update.
|
|
157
|
-
* @public
|
|
158
|
-
*/
|
|
159
|
-
export interface NodeUpdateInfo {
|
|
160
|
-
type: "Update";
|
|
161
|
-
/** Key of the updated node */
|
|
162
|
-
target: NodeKey;
|
|
163
|
-
/** Updated node attributes */
|
|
164
|
-
changes: PartialNode;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* JSON representation of [[NodeUpdateInfo]].
|
|
168
|
-
* @public
|
|
169
|
-
* @deprecated in 3.x. Use [[NodeUpdateInfo]]
|
|
170
|
-
*/
|
|
171
|
-
export interface NodeUpdateInfoJSON {
|
|
172
|
-
type: "Update";
|
|
173
|
-
target: NodeKeyJSON;
|
|
174
|
-
changes: PartialNodeJSON;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* JSON representation of [[HierarchyCompareInfo]].
|
|
178
|
-
* @public
|
|
179
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]].
|
|
180
|
-
*/
|
|
181
|
-
export interface HierarchyCompareInfoJSON {
|
|
182
|
-
changes: PartialHierarchyModificationJSON[];
|
|
183
|
-
continuationToken?: {
|
|
184
|
-
prevHierarchyNode: string;
|
|
185
|
-
currHierarchyNode: string;
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Information about hierarchy modification / differences.
|
|
190
|
-
* @public
|
|
191
|
-
*/
|
|
192
|
-
export interface HierarchyCompareInfo {
|
|
193
|
-
/** A list of hierarchy changes */
|
|
194
|
-
changes: PartialHierarchyModification[];
|
|
195
|
-
/** Continuation token for requesting more changes. */
|
|
196
|
-
continuationToken?: {
|
|
197
|
-
prevHierarchyNode: string;
|
|
198
|
-
currHierarchyNode: string;
|
|
199
|
-
};
|
|
200
|
-
}
|
|
201
|
-
/** @public */
|
|
202
|
-
export declare namespace HierarchyCompareInfo {
|
|
203
|
-
/**
|
|
204
|
-
* Serialize given object to JSON.
|
|
205
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
206
|
-
*/
|
|
207
|
-
function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON;
|
|
208
|
-
/**
|
|
209
|
-
* Deserialize given object from JSON
|
|
210
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
211
|
-
*/
|
|
212
|
-
function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo;
|
|
213
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Core
|
|
3
|
+
*/
|
|
4
|
+
import { NodeKey, NodeKeyJSON } from "./hierarchy/Key";
|
|
5
|
+
import { Node, NodeJSON, PartialNode, PartialNodeJSON } from "./hierarchy/Node";
|
|
6
|
+
/** @alpha */
|
|
7
|
+
export declare const UPDATE_FULL = "FULL";
|
|
8
|
+
/** @alpha */
|
|
9
|
+
export interface UpdateInfoJSON {
|
|
10
|
+
[imodel: string]: {
|
|
11
|
+
[rulesetId: string]: {
|
|
12
|
+
hierarchy?: HierarchyUpdateInfoJSON;
|
|
13
|
+
content?: ContentUpdateInfo;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/** @alpha */
|
|
18
|
+
export interface UpdateInfo {
|
|
19
|
+
[imodel: string]: {
|
|
20
|
+
[rulesetId: string]: {
|
|
21
|
+
hierarchy?: HierarchyUpdateInfo;
|
|
22
|
+
content?: ContentUpdateInfo;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** @alpha */
|
|
27
|
+
export declare namespace UpdateInfo {
|
|
28
|
+
/** Serialize given object to JSON. */
|
|
29
|
+
function toJSON(obj: UpdateInfo): UpdateInfoJSON;
|
|
30
|
+
/** Deserialize given object from JSON */
|
|
31
|
+
function fromJSON(json: UpdateInfoJSON): UpdateInfo;
|
|
32
|
+
}
|
|
33
|
+
/** @alpha */
|
|
34
|
+
export interface ExpandedNodeUpdateRecordJSON {
|
|
35
|
+
node: NodeJSON;
|
|
36
|
+
position: number;
|
|
37
|
+
}
|
|
38
|
+
/** @alpha */
|
|
39
|
+
export interface HierarchyUpdateRecordJSON {
|
|
40
|
+
parent?: NodeKeyJSON;
|
|
41
|
+
nodesCount: number;
|
|
42
|
+
expandedNodes?: ExpandedNodeUpdateRecordJSON[];
|
|
43
|
+
instanceFilter?: string;
|
|
44
|
+
}
|
|
45
|
+
/** @alpha */
|
|
46
|
+
export interface ExpandedNodeUpdateRecord {
|
|
47
|
+
node: Node;
|
|
48
|
+
position: number;
|
|
49
|
+
}
|
|
50
|
+
/** @alpha */
|
|
51
|
+
export interface HierarchyUpdateRecord {
|
|
52
|
+
parent?: NodeKey;
|
|
53
|
+
nodesCount: number;
|
|
54
|
+
expandedNodes?: ExpandedNodeUpdateRecord[];
|
|
55
|
+
instanceFilter?: string;
|
|
56
|
+
}
|
|
57
|
+
/** @alpha */
|
|
58
|
+
export declare namespace ExpandedNodeUpdateRecord {
|
|
59
|
+
/** Serialize given object to JSON. */
|
|
60
|
+
function toJSON(obj: ExpandedNodeUpdateRecord): ExpandedNodeUpdateRecordJSON;
|
|
61
|
+
/** Deserialize given object from JSON */
|
|
62
|
+
function fromJSON(json: ExpandedNodeUpdateRecordJSON): ExpandedNodeUpdateRecord;
|
|
63
|
+
}
|
|
64
|
+
/** @alpha */
|
|
65
|
+
export declare namespace HierarchyUpdateRecord {
|
|
66
|
+
/** Serialize given object to JSON. */
|
|
67
|
+
function toJSON(obj: HierarchyUpdateRecord): HierarchyUpdateRecordJSON;
|
|
68
|
+
/** Deserialize given object from JSON */
|
|
69
|
+
function fromJSON(json: HierarchyUpdateRecordJSON): HierarchyUpdateRecord;
|
|
70
|
+
}
|
|
71
|
+
/** @alpha */
|
|
72
|
+
export type HierarchyUpdateInfoJSON = typeof UPDATE_FULL | HierarchyUpdateRecordJSON[];
|
|
73
|
+
/** @alpha */
|
|
74
|
+
export type HierarchyUpdateInfo = typeof UPDATE_FULL | HierarchyUpdateRecord[];
|
|
75
|
+
/** @alpha */
|
|
76
|
+
export declare namespace HierarchyUpdateInfo {
|
|
77
|
+
/** Serialize given object to JSON. */
|
|
78
|
+
function toJSON(obj: HierarchyUpdateInfo): HierarchyUpdateInfoJSON;
|
|
79
|
+
/** Deserialize given object from JSON */
|
|
80
|
+
function fromJSON(json: HierarchyUpdateInfoJSON): HierarchyUpdateInfo;
|
|
81
|
+
}
|
|
82
|
+
/** @alpha */
|
|
83
|
+
export type ContentUpdateInfo = typeof UPDATE_FULL;
|
|
84
|
+
/**
|
|
85
|
+
* JSON representation of [[PartialHierarchyModification]].
|
|
86
|
+
* @public
|
|
87
|
+
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
88
|
+
*/
|
|
89
|
+
export type PartialHierarchyModificationJSON = NodeInsertionInfoJSON | NodeDeletionInfoJSON | NodeUpdateInfoJSON;
|
|
90
|
+
/**
|
|
91
|
+
* Information about a hierarchy change: insertion, deletion or node update.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export type PartialHierarchyModification = NodeInsertionInfo | NodeDeletionInfo | NodeUpdateInfo;
|
|
95
|
+
/** @public */
|
|
96
|
+
export declare namespace PartialHierarchyModification {
|
|
97
|
+
/**
|
|
98
|
+
* Serialize given object to JSON.
|
|
99
|
+
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
100
|
+
*/
|
|
101
|
+
function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON;
|
|
102
|
+
/**
|
|
103
|
+
* Deserialize given object from JSON
|
|
104
|
+
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
105
|
+
*/
|
|
106
|
+
function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Information about node insertion.
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export interface NodeInsertionInfo {
|
|
113
|
+
type: "Insert";
|
|
114
|
+
/** Parent node key */
|
|
115
|
+
parent?: NodeKey;
|
|
116
|
+
/** Index of the new node under its parent */
|
|
117
|
+
position: number;
|
|
118
|
+
/** Inserted node */
|
|
119
|
+
node: Node;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* JSON representation of [[NodeInsertionInfo]].
|
|
123
|
+
* @public
|
|
124
|
+
* @deprecated in 3.x. Use [[NodeInsertionInfo]]
|
|
125
|
+
*/
|
|
126
|
+
export interface NodeInsertionInfoJSON {
|
|
127
|
+
type: "Insert";
|
|
128
|
+
parent?: NodeKeyJSON;
|
|
129
|
+
position: number;
|
|
130
|
+
node: NodeJSON;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Information about node deletion.
|
|
134
|
+
* @public
|
|
135
|
+
*/
|
|
136
|
+
export interface NodeDeletionInfo {
|
|
137
|
+
type: "Delete";
|
|
138
|
+
/** Parent of the deleted node */
|
|
139
|
+
parent?: NodeKey;
|
|
140
|
+
/** Position of the deleted node among its siblings in the initial, not updated tree */
|
|
141
|
+
position: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* JSON representation of [[NodeDeletionInfo]].
|
|
145
|
+
* @public
|
|
146
|
+
* @deprecated in 3.x. Use [[NodeDeletionInfo]]
|
|
147
|
+
*/
|
|
148
|
+
export interface NodeDeletionInfoJSON {
|
|
149
|
+
type: "Delete";
|
|
150
|
+
/** Parent of the deleted node */
|
|
151
|
+
parent?: NodeKeyJSON;
|
|
152
|
+
/** Position of the deleted node among its siblings in the initial, not updated tree */
|
|
153
|
+
position: number;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Information about node update.
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
export interface NodeUpdateInfo {
|
|
160
|
+
type: "Update";
|
|
161
|
+
/** Key of the updated node */
|
|
162
|
+
target: NodeKey;
|
|
163
|
+
/** Updated node attributes */
|
|
164
|
+
changes: PartialNode;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* JSON representation of [[NodeUpdateInfo]].
|
|
168
|
+
* @public
|
|
169
|
+
* @deprecated in 3.x. Use [[NodeUpdateInfo]]
|
|
170
|
+
*/
|
|
171
|
+
export interface NodeUpdateInfoJSON {
|
|
172
|
+
type: "Update";
|
|
173
|
+
target: NodeKeyJSON;
|
|
174
|
+
changes: PartialNodeJSON;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* JSON representation of [[HierarchyCompareInfo]].
|
|
178
|
+
* @public
|
|
179
|
+
* @deprecated in 3.x. Use [[HierarchyCompareInfo]].
|
|
180
|
+
*/
|
|
181
|
+
export interface HierarchyCompareInfoJSON {
|
|
182
|
+
changes: PartialHierarchyModificationJSON[];
|
|
183
|
+
continuationToken?: {
|
|
184
|
+
prevHierarchyNode: string;
|
|
185
|
+
currHierarchyNode: string;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Information about hierarchy modification / differences.
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
export interface HierarchyCompareInfo {
|
|
193
|
+
/** A list of hierarchy changes */
|
|
194
|
+
changes: PartialHierarchyModification[];
|
|
195
|
+
/** Continuation token for requesting more changes. */
|
|
196
|
+
continuationToken?: {
|
|
197
|
+
prevHierarchyNode: string;
|
|
198
|
+
currHierarchyNode: string;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/** @public */
|
|
202
|
+
export declare namespace HierarchyCompareInfo {
|
|
203
|
+
/**
|
|
204
|
+
* Serialize given object to JSON.
|
|
205
|
+
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
206
|
+
*/
|
|
207
|
+
function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON;
|
|
208
|
+
/**
|
|
209
|
+
* Deserialize given object from JSON
|
|
210
|
+
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
211
|
+
*/
|
|
212
|
+
function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo;
|
|
213
|
+
}
|
|
214
214
|
//# sourceMappingURL=Update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{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