@itwin/presentation-common 3.6.0-dev.52 → 3.6.0-dev.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/assets/locales/en/BisCore.json +18 -18
- package/lib/cjs/assets/locales/en/ECPresentation.json +9 -9
- package/lib/cjs/assets/locales/en/RulesEngine.json +5 -5
- package/lib/cjs/presentation-common/AsyncTasks.d.ts +22 -22
- package/lib/cjs/presentation-common/AsyncTasks.js +38 -38
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/CommonLoggerCategory.d.ts +12 -12
- package/lib/cjs/presentation-common/CommonLoggerCategory.js +20 -20
- package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.d.ts +125 -125
- package/lib/cjs/presentation-common/Diagnostics.js +72 -72
- package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts +315 -315
- package/lib/cjs/presentation-common/EC.js +270 -270
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.d.ts +123 -123
- package/lib/cjs/presentation-common/ElementProperties.js +9 -9
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.d.ts +45 -45
- package/lib/cjs/presentation-common/Error.js +62 -62
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.d.ts +59 -59
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js +9 -9
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.d.ts +146 -146
- package/lib/cjs/presentation-common/KeySet.js +423 -423
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.d.ts +79 -79
- package/lib/cjs/presentation-common/LabelDefinition.js +76 -76
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.d.ts +29 -29
- package/lib/cjs/presentation-common/LocalizationHelper.js +110 -110
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.d.ts +40 -40
- package/lib/cjs/presentation-common/PresentationIpcInterface.js +12 -12
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +256 -250
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js +23 -23
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +188 -181
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +107 -102
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +26 -26
- package/lib/cjs/presentation-common/RegisteredRuleset.js +33 -33
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +83 -82
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +161 -155
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts +166 -166
- package/lib/cjs/presentation-common/RulesetVariables.js +55 -55
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.d.ts +44 -44
- package/lib/cjs/presentation-common/RulesetsFactory.js +223 -223
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts +196 -196
- package/lib/cjs/presentation-common/Update.js +196 -196
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.d.ts +62 -62
- package/lib/cjs/presentation-common/Utils.js +43 -43
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.d.ts +49 -49
- package/lib/cjs/presentation-common/content/Category.js +49 -49
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.d.ts +38 -38
- package/lib/cjs/presentation-common/content/Content.js +56 -56
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +101 -101
- package/lib/cjs/presentation-common/content/ContentTraverser.js +420 -420
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +279 -275
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +195 -195
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +21 -21
- package/lib/cjs/presentation-common/content/DisplayTypes.js +29 -29
- package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/cjs/presentation-common/content/Editor.d.ts +15 -15
- package/lib/cjs/presentation-common/content/Editor.js +9 -9
- package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +282 -282
- package/lib/cjs/presentation-common/content/Fields.js +394 -394
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +87 -87
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +86 -86
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +51 -51
- package/lib/cjs/presentation-common/content/Property.js +36 -36
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/Renderer.d.ts +11 -11
- package/lib/cjs/presentation-common/content/Renderer.js +9 -9
- package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.d.ts +72 -72
- package/lib/cjs/presentation-common/content/TypeDescription.js +23 -23
- package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +157 -157
- package/lib/cjs/presentation-common/content/Value.js +217 -217
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +31 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +24 -0
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +185 -185
- package/lib/cjs/presentation-common/hierarchy/Key.js +112 -112
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +149 -141
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +97 -97
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +85 -85
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +98 -98
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/ClassSpecifications.d.ts +45 -45
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js +9 -9
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipDirection.d.ts +13 -13
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js +21 -21
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.d.ts +53 -53
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.d.ts +74 -74
- package/lib/cjs/presentation-common/rules/Rule.js +35 -35
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.d.ts +66 -66
- package/lib/cjs/presentation-common/rules/Ruleset.js +9 -9
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.d.ts +41 -41
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.d.ts +55 -55
- package/lib/cjs/presentation-common/rules/Variables.js +25 -25
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.d.ts +30 -30
- package/lib/cjs/presentation-common/rules/content/ContentRule.js +9 -9
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +55 -55
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js +20 -20
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +105 -105
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +21 -21
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +93 -93
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +43 -43
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +200 -200
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +51 -51
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.d.ts +156 -156
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js +25 -25
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.d.ts +58 -58
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +9 -9
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +15 -15
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +97 -97
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js +22 -22
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +76 -76
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +19 -19
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.d.ts +17 -17
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.d.ts +36 -36
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js +9 -9
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +25 -25
- package/lib/cjs/presentation-common/selection/SelectionScope.js +9 -9
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +112 -111
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +128 -127
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts +22 -22
- package/lib/esm/presentation-common/AsyncTasks.js +34 -34
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/CommonLoggerCategory.d.ts +12 -12
- package/lib/esm/presentation-common/CommonLoggerCategory.js +17 -17
- package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.d.ts +125 -125
- package/lib/esm/presentation-common/Diagnostics.js +67 -67
- package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +315 -315
- package/lib/esm/presentation-common/EC.js +267 -267
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.d.ts +123 -123
- package/lib/esm/presentation-common/ElementProperties.js +8 -8
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.d.ts +45 -45
- package/lib/esm/presentation-common/Error.js +58 -58
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.d.ts +59 -59
- package/lib/esm/presentation-common/InstanceFilterDefinition.js +8 -8
- package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.d.ts +146 -146
- package/lib/esm/presentation-common/KeySet.js +419 -419
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.d.ts +79 -79
- package/lib/esm/presentation-common/LabelDefinition.js +73 -73
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.d.ts +29 -29
- package/lib/esm/presentation-common/LocalizationHelper.js +106 -106
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.d.ts +40 -40
- package/lib/esm/presentation-common/PresentationIpcInterface.js +9 -9
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +256 -250
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js +18 -18
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +188 -181
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +103 -98
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +26 -26
- package/lib/esm/presentation-common/RegisteredRuleset.js +29 -29
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +83 -82
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +157 -151
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts +166 -166
- package/lib/esm/presentation-common/RulesetVariables.js +52 -52
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.d.ts +44 -44
- package/lib/esm/presentation-common/RulesetsFactory.js +219 -219
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts +196 -196
- package/lib/esm/presentation-common/Update.js +193 -193
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.d.ts +62 -62
- package/lib/esm/presentation-common/Utils.js +39 -39
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.d.ts +49 -49
- package/lib/esm/presentation-common/content/Category.js +46 -46
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.d.ts +38 -38
- package/lib/esm/presentation-common/content/Content.js +52 -52
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts +101 -101
- package/lib/esm/presentation-common/content/ContentTraverser.js +411 -411
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +279 -275
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +191 -191
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.d.ts +21 -21
- package/lib/esm/presentation-common/content/DisplayTypes.js +26 -26
- package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/esm/presentation-common/content/Editor.d.ts +15 -15
- package/lib/esm/presentation-common/content/Editor.js +8 -8
- package/lib/esm/presentation-common/content/Editor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +282 -282
- package/lib/esm/presentation-common/content/Fields.js +387 -387
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +87 -87
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +82 -82
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +51 -51
- package/lib/esm/presentation-common/content/Property.js +33 -33
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/Renderer.d.ts +11 -11
- package/lib/esm/presentation-common/content/Renderer.js +8 -8
- package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.d.ts +72 -72
- package/lib/esm/presentation-common/content/TypeDescription.js +20 -20
- package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +157 -157
- package/lib/esm/presentation-common/content/Value.js +214 -214
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +31 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +21 -0
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -0
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +185 -185
- package/lib/esm/presentation-common/hierarchy/Key.js +109 -109
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +149 -141
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +94 -94
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +85 -85
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +95 -95
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/ClassSpecifications.d.ts +45 -45
- package/lib/esm/presentation-common/rules/ClassSpecifications.js +8 -8
- package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.d.ts +31 -31
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipDirection.d.ts +13 -13
- package/lib/esm/presentation-common/rules/RelationshipDirection.js +18 -18
- package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.d.ts +53 -53
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.d.ts +74 -74
- package/lib/esm/presentation-common/rules/Rule.js +32 -32
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.d.ts +66 -66
- package/lib/esm/presentation-common/rules/Ruleset.js +8 -8
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.d.ts +41 -41
- package/lib/esm/presentation-common/rules/SchemasSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.d.ts +55 -55
- package/lib/esm/presentation-common/rules/Variables.js +22 -22
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.d.ts +41 -41
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.d.ts +25 -25
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.d.ts +30 -30
- package/lib/esm/presentation-common/rules/content/ContentRule.js +8 -8
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +55 -55
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js +17 -17
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.d.ts +19 -19
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js +8 -8
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/PropertySpecification.d.ts +86 -86
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.d.ts +28 -28
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +25 -25
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.d.ts +57 -57
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.d.ts +17 -17
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +107 -107
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js +8 -8
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.d.ts +105 -105
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js +18 -18
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.d.ts +93 -93
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js +40 -40
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +44 -44
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +36 -36
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.d.ts +27 -27
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +200 -200
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +48 -48
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +29 -29
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.d.ts +156 -156
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js +22 -22
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +40 -40
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.d.ts +58 -58
- package/lib/esm/presentation-common/rules/customization/SortingRule.js +8 -8
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +48 -48
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js +8 -8
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.d.ts +15 -15
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.d.ts +97 -97
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js +19 -19
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +31 -31
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.d.ts +76 -76
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js +16 -16
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +39 -39
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.d.ts +50 -50
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.d.ts +27 -27
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.d.ts +27 -27
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.d.ts +17 -17
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.d.ts +36 -36
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js +8 -8
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +25 -25
- package/lib/esm/presentation-common/selection/SelectionScope.js +8 -8
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +112 -111
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +116 -115
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/BisCore.json +18 -18
- package/lib/public/locales/en/ECPresentation.json +9 -9
- package/lib/public/locales/en/RulesEngine.json +5 -5
- package/package.json +9 -9
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module Content
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.DisplayValueGroup = exports.NestedContentValue = exports.DisplayValue = exports.Value = void 0;
|
|
11
|
-
const EC_1 = require("../EC");
|
|
12
|
-
/** @public */
|
|
13
|
-
var Value;
|
|
14
|
-
(function (Value) {
|
|
15
|
-
/** Is the value a primitive */
|
|
16
|
-
function isPrimitive(value) {
|
|
17
|
-
return isPrimitiveValue(value);
|
|
18
|
-
}
|
|
19
|
-
Value.isPrimitive = isPrimitive;
|
|
20
|
-
/** Is the value an array */
|
|
21
|
-
function isArray(value) {
|
|
22
|
-
return isArrayValue(value);
|
|
23
|
-
}
|
|
24
|
-
Value.isArray = isArray;
|
|
25
|
-
/** Is the value a map / struct */
|
|
26
|
-
function isMap(value) {
|
|
27
|
-
return isMapValue(value);
|
|
28
|
-
}
|
|
29
|
-
Value.isMap = isMap;
|
|
30
|
-
/** Is the value a nested content value */
|
|
31
|
-
function isNestedContent(value) {
|
|
32
|
-
return isNestedContentValue(value);
|
|
33
|
-
}
|
|
34
|
-
Value.isNestedContent = isNestedContent;
|
|
35
|
-
/** Serialize [[Value]] to JSON */
|
|
36
|
-
function fromJSON(json) {
|
|
37
|
-
if (json === null)
|
|
38
|
-
return undefined;
|
|
39
|
-
if (isNestedContentValue(json))
|
|
40
|
-
return json.map(NestedContentValue.fromJSON);
|
|
41
|
-
if (isArrayValue(json))
|
|
42
|
-
return valuesArrayFromJSON(json);
|
|
43
|
-
if (isMapValue(json))
|
|
44
|
-
return valuesMapFromJSON(json);
|
|
45
|
-
return json;
|
|
46
|
-
}
|
|
47
|
-
Value.fromJSON = fromJSON;
|
|
48
|
-
/** Deserialize [[Value]] from JSON */
|
|
49
|
-
function toJSON(value) {
|
|
50
|
-
if (undefined === value)
|
|
51
|
-
return null;
|
|
52
|
-
if (isNestedContentValue(value))
|
|
53
|
-
return value.map(NestedContentValue.toJSON);
|
|
54
|
-
if (isArrayValue(value))
|
|
55
|
-
return valuesArrayToJSON(value);
|
|
56
|
-
if (isMapValue(value))
|
|
57
|
-
return valuesMapToJSON(value);
|
|
58
|
-
return value;
|
|
59
|
-
}
|
|
60
|
-
Value.toJSON = toJSON;
|
|
61
|
-
})(Value = exports.Value || (exports.Value = {}));
|
|
62
|
-
/** @public */
|
|
63
|
-
var DisplayValue;
|
|
64
|
-
(function (DisplayValue) {
|
|
65
|
-
/** Is the value a primitive */
|
|
66
|
-
function isPrimitive(value) {
|
|
67
|
-
return isPrimitiveValue(value);
|
|
68
|
-
}
|
|
69
|
-
DisplayValue.isPrimitive = isPrimitive;
|
|
70
|
-
/** Is the value an array */
|
|
71
|
-
function isArray(value) {
|
|
72
|
-
return isArrayValue(value);
|
|
73
|
-
}
|
|
74
|
-
DisplayValue.isArray = isArray;
|
|
75
|
-
/** Is the value a map / struct */
|
|
76
|
-
function isMap(value) {
|
|
77
|
-
return isMapValue(value);
|
|
78
|
-
}
|
|
79
|
-
DisplayValue.isMap = isMap;
|
|
80
|
-
/** Serialize [[DisplayValue]] to JSON */
|
|
81
|
-
function fromJSON(json) {
|
|
82
|
-
if (json === null)
|
|
83
|
-
return undefined;
|
|
84
|
-
if (isArrayValue(json))
|
|
85
|
-
return displayValuesArrayFromJSON(json);
|
|
86
|
-
if (isMapValue(json))
|
|
87
|
-
return displayValuesMapFromJSON(json);
|
|
88
|
-
return json;
|
|
89
|
-
}
|
|
90
|
-
DisplayValue.fromJSON = fromJSON;
|
|
91
|
-
/** Deserialize [[DisplayValue]] from JSON */
|
|
92
|
-
function toJSON(value) {
|
|
93
|
-
if (undefined === value)
|
|
94
|
-
return null;
|
|
95
|
-
if (isArrayValue(value))
|
|
96
|
-
return displayValuesArrayToJSON(value);
|
|
97
|
-
if (isMapValue(value))
|
|
98
|
-
return displayValuesMapToJSON(value);
|
|
99
|
-
return value;
|
|
100
|
-
}
|
|
101
|
-
DisplayValue.toJSON = toJSON;
|
|
102
|
-
})(DisplayValue = exports.DisplayValue || (exports.DisplayValue = {}));
|
|
103
|
-
/** @public */
|
|
104
|
-
var NestedContentValue;
|
|
105
|
-
(function (NestedContentValue) {
|
|
106
|
-
/** Serialize [[NestedContentValue]] to JSON */
|
|
107
|
-
function toJSON(json) {
|
|
108
|
-
return {
|
|
109
|
-
primaryKeys: json.primaryKeys.map(EC_1.InstanceKey.toJSON),
|
|
110
|
-
values: valuesMapToJSON(json.values),
|
|
111
|
-
displayValues: displayValuesMapToJSON(json.displayValues),
|
|
112
|
-
mergedFieldNames: json.mergedFieldNames,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
NestedContentValue.toJSON = toJSON;
|
|
116
|
-
/** Deserialize [[NestedContentValue]] from JSON */
|
|
117
|
-
function fromJSON(json) {
|
|
118
|
-
return {
|
|
119
|
-
primaryKeys: json.primaryKeys.map(EC_1.InstanceKey.fromJSON),
|
|
120
|
-
values: valuesMapFromJSON(json.values),
|
|
121
|
-
displayValues: displayValuesMapFromJSON(json.displayValues),
|
|
122
|
-
mergedFieldNames: json.mergedFieldNames,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
NestedContentValue.fromJSON = fromJSON;
|
|
126
|
-
})(NestedContentValue = exports.NestedContentValue || (exports.NestedContentValue = {}));
|
|
127
|
-
/** @public */
|
|
128
|
-
var DisplayValueGroup;
|
|
129
|
-
(function (DisplayValueGroup) {
|
|
130
|
-
/** Serialize [[DisplayValueGroup]] to JSON */
|
|
131
|
-
function toJSON(group) {
|
|
132
|
-
return {
|
|
133
|
-
displayValue: DisplayValue.toJSON(group.displayValue),
|
|
134
|
-
groupedRawValues: group.groupedRawValues.map(Value.toJSON),
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
DisplayValueGroup.toJSON = toJSON;
|
|
138
|
-
/** Deserialize [[DisplayValueGroup]] from JSON */
|
|
139
|
-
function fromJSON(json) {
|
|
140
|
-
return {
|
|
141
|
-
displayValue: DisplayValue.fromJSON(json.displayValue),
|
|
142
|
-
groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
DisplayValueGroup.fromJSON = fromJSON;
|
|
146
|
-
})(DisplayValueGroup = exports.DisplayValueGroup || (exports.DisplayValueGroup = {}));
|
|
147
|
-
function isNestedContentValue(v) {
|
|
148
|
-
return (v !== undefined) && Array.isArray(v)
|
|
149
|
-
&& ((v.length === 0)
|
|
150
|
-
|| v[0].primaryKeys !== undefined
|
|
151
|
-
&& v[0].values !== undefined
|
|
152
|
-
&& v[0].displayValues !== undefined
|
|
153
|
-
&& v[0].mergedFieldNames !== undefined);
|
|
154
|
-
}
|
|
155
|
-
function isArrayValue(v) {
|
|
156
|
-
// note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.
|
|
157
|
-
// we have other means to determine the type of value.
|
|
158
|
-
return (v !== undefined) && Array.isArray(v);
|
|
159
|
-
}
|
|
160
|
-
function isMapValue(v) {
|
|
161
|
-
return (v !== undefined) && (typeof v === "object") && !Array.isArray(v);
|
|
162
|
-
}
|
|
163
|
-
function isPrimitiveValue(v) {
|
|
164
|
-
return !isArrayValue(v) && !isMapValue(v);
|
|
165
|
-
}
|
|
166
|
-
function valuesArrayFromJSON(json) {
|
|
167
|
-
return json.map(Value.fromJSON);
|
|
168
|
-
}
|
|
169
|
-
function valuesArrayToJSON(values) {
|
|
170
|
-
return values.map(Value.toJSON);
|
|
171
|
-
}
|
|
172
|
-
function valuesMapFromJSON(json) {
|
|
173
|
-
const map = {};
|
|
174
|
-
for (const key in json) {
|
|
175
|
-
/* istanbul ignore else */
|
|
176
|
-
if (json.hasOwnProperty(key)) {
|
|
177
|
-
map[key] = Value.fromJSON(json[key]);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
return map;
|
|
181
|
-
}
|
|
182
|
-
function valuesMapToJSON(values) {
|
|
183
|
-
const map = {};
|
|
184
|
-
for (const key in values) {
|
|
185
|
-
/* istanbul ignore else */
|
|
186
|
-
if (values.hasOwnProperty(key)) {
|
|
187
|
-
map[key] = Value.toJSON(values[key]);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return map;
|
|
191
|
-
}
|
|
192
|
-
function displayValuesArrayFromJSON(json) {
|
|
193
|
-
return json.map(DisplayValue.fromJSON);
|
|
194
|
-
}
|
|
195
|
-
function displayValuesArrayToJSON(values) {
|
|
196
|
-
return values.map(DisplayValue.toJSON);
|
|
197
|
-
}
|
|
198
|
-
function displayValuesMapFromJSON(json) {
|
|
199
|
-
const map = {};
|
|
200
|
-
for (const key in json) {
|
|
201
|
-
/* istanbul ignore else */
|
|
202
|
-
if (json.hasOwnProperty(key)) {
|
|
203
|
-
map[key] = DisplayValue.fromJSON(json[key]);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return map;
|
|
207
|
-
}
|
|
208
|
-
function displayValuesMapToJSON(values) {
|
|
209
|
-
const map = {};
|
|
210
|
-
for (const key in values) {
|
|
211
|
-
/* istanbul ignore else */
|
|
212
|
-
if (values.hasOwnProperty(key)) {
|
|
213
|
-
map[key] = DisplayValue.toJSON(values[key]);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
return map;
|
|
217
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Content
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DisplayValueGroup = exports.NestedContentValue = exports.DisplayValue = exports.Value = void 0;
|
|
11
|
+
const EC_1 = require("../EC");
|
|
12
|
+
/** @public */
|
|
13
|
+
var Value;
|
|
14
|
+
(function (Value) {
|
|
15
|
+
/** Is the value a primitive */
|
|
16
|
+
function isPrimitive(value) {
|
|
17
|
+
return isPrimitiveValue(value);
|
|
18
|
+
}
|
|
19
|
+
Value.isPrimitive = isPrimitive;
|
|
20
|
+
/** Is the value an array */
|
|
21
|
+
function isArray(value) {
|
|
22
|
+
return isArrayValue(value);
|
|
23
|
+
}
|
|
24
|
+
Value.isArray = isArray;
|
|
25
|
+
/** Is the value a map / struct */
|
|
26
|
+
function isMap(value) {
|
|
27
|
+
return isMapValue(value);
|
|
28
|
+
}
|
|
29
|
+
Value.isMap = isMap;
|
|
30
|
+
/** Is the value a nested content value */
|
|
31
|
+
function isNestedContent(value) {
|
|
32
|
+
return isNestedContentValue(value);
|
|
33
|
+
}
|
|
34
|
+
Value.isNestedContent = isNestedContent;
|
|
35
|
+
/** Serialize [[Value]] to JSON */
|
|
36
|
+
function fromJSON(json) {
|
|
37
|
+
if (json === null)
|
|
38
|
+
return undefined;
|
|
39
|
+
if (isNestedContentValue(json))
|
|
40
|
+
return json.map(NestedContentValue.fromJSON);
|
|
41
|
+
if (isArrayValue(json))
|
|
42
|
+
return valuesArrayFromJSON(json);
|
|
43
|
+
if (isMapValue(json))
|
|
44
|
+
return valuesMapFromJSON(json);
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
Value.fromJSON = fromJSON;
|
|
48
|
+
/** Deserialize [[Value]] from JSON */
|
|
49
|
+
function toJSON(value) {
|
|
50
|
+
if (undefined === value)
|
|
51
|
+
return null;
|
|
52
|
+
if (isNestedContentValue(value))
|
|
53
|
+
return value.map(NestedContentValue.toJSON);
|
|
54
|
+
if (isArrayValue(value))
|
|
55
|
+
return valuesArrayToJSON(value);
|
|
56
|
+
if (isMapValue(value))
|
|
57
|
+
return valuesMapToJSON(value);
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
Value.toJSON = toJSON;
|
|
61
|
+
})(Value = exports.Value || (exports.Value = {}));
|
|
62
|
+
/** @public */
|
|
63
|
+
var DisplayValue;
|
|
64
|
+
(function (DisplayValue) {
|
|
65
|
+
/** Is the value a primitive */
|
|
66
|
+
function isPrimitive(value) {
|
|
67
|
+
return isPrimitiveValue(value);
|
|
68
|
+
}
|
|
69
|
+
DisplayValue.isPrimitive = isPrimitive;
|
|
70
|
+
/** Is the value an array */
|
|
71
|
+
function isArray(value) {
|
|
72
|
+
return isArrayValue(value);
|
|
73
|
+
}
|
|
74
|
+
DisplayValue.isArray = isArray;
|
|
75
|
+
/** Is the value a map / struct */
|
|
76
|
+
function isMap(value) {
|
|
77
|
+
return isMapValue(value);
|
|
78
|
+
}
|
|
79
|
+
DisplayValue.isMap = isMap;
|
|
80
|
+
/** Serialize [[DisplayValue]] to JSON */
|
|
81
|
+
function fromJSON(json) {
|
|
82
|
+
if (json === null)
|
|
83
|
+
return undefined;
|
|
84
|
+
if (isArrayValue(json))
|
|
85
|
+
return displayValuesArrayFromJSON(json);
|
|
86
|
+
if (isMapValue(json))
|
|
87
|
+
return displayValuesMapFromJSON(json);
|
|
88
|
+
return json;
|
|
89
|
+
}
|
|
90
|
+
DisplayValue.fromJSON = fromJSON;
|
|
91
|
+
/** Deserialize [[DisplayValue]] from JSON */
|
|
92
|
+
function toJSON(value) {
|
|
93
|
+
if (undefined === value)
|
|
94
|
+
return null;
|
|
95
|
+
if (isArrayValue(value))
|
|
96
|
+
return displayValuesArrayToJSON(value);
|
|
97
|
+
if (isMapValue(value))
|
|
98
|
+
return displayValuesMapToJSON(value);
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
DisplayValue.toJSON = toJSON;
|
|
102
|
+
})(DisplayValue = exports.DisplayValue || (exports.DisplayValue = {}));
|
|
103
|
+
/** @public */
|
|
104
|
+
var NestedContentValue;
|
|
105
|
+
(function (NestedContentValue) {
|
|
106
|
+
/** Serialize [[NestedContentValue]] to JSON */
|
|
107
|
+
function toJSON(json) {
|
|
108
|
+
return {
|
|
109
|
+
primaryKeys: json.primaryKeys.map(EC_1.InstanceKey.toJSON),
|
|
110
|
+
values: valuesMapToJSON(json.values),
|
|
111
|
+
displayValues: displayValuesMapToJSON(json.displayValues),
|
|
112
|
+
mergedFieldNames: json.mergedFieldNames,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
NestedContentValue.toJSON = toJSON;
|
|
116
|
+
/** Deserialize [[NestedContentValue]] from JSON */
|
|
117
|
+
function fromJSON(json) {
|
|
118
|
+
return {
|
|
119
|
+
primaryKeys: json.primaryKeys.map(EC_1.InstanceKey.fromJSON),
|
|
120
|
+
values: valuesMapFromJSON(json.values),
|
|
121
|
+
displayValues: displayValuesMapFromJSON(json.displayValues),
|
|
122
|
+
mergedFieldNames: json.mergedFieldNames,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
NestedContentValue.fromJSON = fromJSON;
|
|
126
|
+
})(NestedContentValue = exports.NestedContentValue || (exports.NestedContentValue = {}));
|
|
127
|
+
/** @public */
|
|
128
|
+
var DisplayValueGroup;
|
|
129
|
+
(function (DisplayValueGroup) {
|
|
130
|
+
/** Serialize [[DisplayValueGroup]] to JSON */
|
|
131
|
+
function toJSON(group) {
|
|
132
|
+
return {
|
|
133
|
+
displayValue: DisplayValue.toJSON(group.displayValue),
|
|
134
|
+
groupedRawValues: group.groupedRawValues.map(Value.toJSON),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
DisplayValueGroup.toJSON = toJSON;
|
|
138
|
+
/** Deserialize [[DisplayValueGroup]] from JSON */
|
|
139
|
+
function fromJSON(json) {
|
|
140
|
+
return {
|
|
141
|
+
displayValue: DisplayValue.fromJSON(json.displayValue),
|
|
142
|
+
groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
DisplayValueGroup.fromJSON = fromJSON;
|
|
146
|
+
})(DisplayValueGroup = exports.DisplayValueGroup || (exports.DisplayValueGroup = {}));
|
|
147
|
+
function isNestedContentValue(v) {
|
|
148
|
+
return (v !== undefined) && Array.isArray(v)
|
|
149
|
+
&& ((v.length === 0)
|
|
150
|
+
|| v[0].primaryKeys !== undefined
|
|
151
|
+
&& v[0].values !== undefined
|
|
152
|
+
&& v[0].displayValues !== undefined
|
|
153
|
+
&& v[0].mergedFieldNames !== undefined);
|
|
154
|
+
}
|
|
155
|
+
function isArrayValue(v) {
|
|
156
|
+
// note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.
|
|
157
|
+
// we have other means to determine the type of value.
|
|
158
|
+
return (v !== undefined) && Array.isArray(v);
|
|
159
|
+
}
|
|
160
|
+
function isMapValue(v) {
|
|
161
|
+
return (v !== undefined) && (typeof v === "object") && !Array.isArray(v);
|
|
162
|
+
}
|
|
163
|
+
function isPrimitiveValue(v) {
|
|
164
|
+
return !isArrayValue(v) && !isMapValue(v);
|
|
165
|
+
}
|
|
166
|
+
function valuesArrayFromJSON(json) {
|
|
167
|
+
return json.map(Value.fromJSON);
|
|
168
|
+
}
|
|
169
|
+
function valuesArrayToJSON(values) {
|
|
170
|
+
return values.map(Value.toJSON);
|
|
171
|
+
}
|
|
172
|
+
function valuesMapFromJSON(json) {
|
|
173
|
+
const map = {};
|
|
174
|
+
for (const key in json) {
|
|
175
|
+
/* istanbul ignore else */
|
|
176
|
+
if (json.hasOwnProperty(key)) {
|
|
177
|
+
map[key] = Value.fromJSON(json[key]);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
return map;
|
|
181
|
+
}
|
|
182
|
+
function valuesMapToJSON(values) {
|
|
183
|
+
const map = {};
|
|
184
|
+
for (const key in values) {
|
|
185
|
+
/* istanbul ignore else */
|
|
186
|
+
if (values.hasOwnProperty(key)) {
|
|
187
|
+
map[key] = Value.toJSON(values[key]);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return map;
|
|
191
|
+
}
|
|
192
|
+
function displayValuesArrayFromJSON(json) {
|
|
193
|
+
return json.map(DisplayValue.fromJSON);
|
|
194
|
+
}
|
|
195
|
+
function displayValuesArrayToJSON(values) {
|
|
196
|
+
return values.map(DisplayValue.toJSON);
|
|
197
|
+
}
|
|
198
|
+
function displayValuesMapFromJSON(json) {
|
|
199
|
+
const map = {};
|
|
200
|
+
for (const key in json) {
|
|
201
|
+
/* istanbul ignore else */
|
|
202
|
+
if (json.hasOwnProperty(key)) {
|
|
203
|
+
map[key] = DisplayValue.fromJSON(json[key]);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return map;
|
|
207
|
+
}
|
|
208
|
+
function displayValuesMapToJSON(values) {
|
|
209
|
+
const map = {};
|
|
210
|
+
for (const key in values) {
|
|
211
|
+
/* istanbul ignore else */
|
|
212
|
+
if (values.hasOwnProperty(key)) {
|
|
213
|
+
map[key] = DisplayValue.toJSON(values[key]);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return map;
|
|
217
|
+
}
|
|
218
218
|
//# sourceMappingURL=Value.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8BAAqD;AASrD,cAAc;AACd,IAAiB,KAAK,CA8CrB;AA9CD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,kCAAkC;IAClC,SAAgB,QAAQ,CAAC,IAAe;QACtC,IAAI,IAAI,KAAK,IAAI;YACf,OAAO,SAAS,CAAC;QACnB,IAAI,oBAAoB,CAAC,IAAI,CAAC;YAC5B,OAAO,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,YAAY,CAAC,IAAI,CAAC;YACpB,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,UAAU,CAAC,IAAI,CAAC;YAClB,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAA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,CAAC,IAA4B;IAC9D,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,MAA0B;IAC1D,OAAO,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC5B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { InstanceKey, InstanceKeyJSON } from \"../EC\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\n\r\n/**\r\n * Raw value type\r\n * @public\r\n */\r\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NestedContentValue[];\r\n\r\n/** @public */\r\nexport namespace Value { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: Value): value is ValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: Value): value is ValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Is the value a nested content value */\r\n export function isNestedContent(value: Value): value is NestedContentValue[] {\r\n return isNestedContentValue(value);\r\n }\r\n\r\n /** Serialize [[Value]] to JSON */\r\n export function fromJSON(json: ValueJSON): Value {\r\n if (json === null)\r\n return undefined;\r\n if (isNestedContentValue(json))\r\n return json.map(NestedContentValue.fromJSON);\r\n if (isArrayValue(json))\r\n return valuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return valuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /** Deserialize [[Value]] from JSON */\r\n export function toJSON(value: Value): ValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isNestedContentValue(value))\r\n return value.map(NestedContentValue.toJSON);\r\n if (isArrayValue(value))\r\n return valuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return valuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of raw values\r\n * @public\r\n */\r\nexport interface ValuesMap extends ValuesDictionary<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of raw values\r\n * @public\r\n */\r\nexport interface ValuesArray extends Array<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Display value type.\r\n * @public\r\n */\r\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\r\n\r\n/** @public */\r\nexport namespace DisplayValue { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Is the value a primitive */\r\n export function isPrimitive(value: DisplayValue): value is string | undefined {\r\n return isPrimitiveValue(value);\r\n }\r\n\r\n /** Is the value an array */\r\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\r\n return isArrayValue(value);\r\n }\r\n\r\n /** Is the value a map / struct */\r\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\r\n return isMapValue(value);\r\n }\r\n\r\n /** Serialize [[DisplayValue]] to JSON */\r\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\r\n if (json === null)\r\n return undefined;\r\n if (isArrayValue(json))\r\n return displayValuesArrayFromJSON(json);\r\n if (isMapValue(json))\r\n return displayValuesMapFromJSON(json);\r\n return json;\r\n }\r\n\r\n /** Deserialize [[DisplayValue]] from JSON */\r\n export function toJSON(value: DisplayValue): DisplayValueJSON {\r\n if (undefined === value)\r\n return null;\r\n if (isArrayValue(value))\r\n return displayValuesArrayToJSON(value);\r\n if (isMapValue(value))\r\n return displayValuesMapToJSON(value);\r\n return value;\r\n }\r\n}\r\n\r\n/**\r\n * A map of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * An array of display values\r\n * @public\r\n */\r\nexport interface DisplayValuesArray extends Array<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * Data structure that describes nested content value.\r\n * @public\r\n */\r\nexport interface NestedContentValue {\r\n /** Keys of instances whose content is contained in this value */\r\n primaryKeys: InstanceKey[];\r\n /** Content values map */\r\n values: ValuesDictionary<Value>;\r\n /** Content display values map */\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n /** Names of fields whose values are merged */\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/** @public */\r\nexport namespace NestedContentValue {\r\n /** Serialize [[NestedContentValue]] to JSON */\r\n export function toJSON(json: NestedContentValue): NestedContentValueJSON {\r\n return {\r\n primaryKeys: json.primaryKeys.map(InstanceKey.toJSON),\r\n values: valuesMapToJSON(json.values),\r\n displayValues: displayValuesMapToJSON(json.displayValues),\r\n mergedFieldNames: json.mergedFieldNames,\r\n };\r\n }\r\n\r\n /** Deserialize [[NestedContentValue]] from JSON */\r\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\r\n return {\r\n primaryKeys: json.primaryKeys.map(InstanceKey.fromJSON),\r\n values: valuesMapFromJSON(json.values),\r\n displayValues: displayValuesMapFromJSON(json.displayValues),\r\n mergedFieldNames: json.mergedFieldNames,\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Value]]\r\n * @public\r\n */\r\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];\r\n\r\n/**\r\n * JSON representation of [[ValuesMap]]\r\n * @public\r\n */\r\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[ValuesArray]]\r\n * @public\r\n */\r\nexport interface ValuesArrayJSON extends Array<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValue]]\r\n * @public\r\n */\r\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesMap]]\r\n * @public\r\n */\r\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[DisplayValuesArray]]\r\n * @public\r\n */\r\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\r\n\r\n/**\r\n * JSON representation of [[NestedContentValue]]\r\n * @public\r\n */\r\nexport interface NestedContentValueJSON {\r\n primaryKeys: InstanceKeyJSON[];\r\n values: ValuesDictionary<ValueJSON>;\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n}\r\n\r\n/**\r\n * A group of raw values and their common display value.\r\n * @public\r\n */\r\nexport interface DisplayValueGroup {\r\n /** Common display value for all grouped raw values */\r\n displayValue: DisplayValue;\r\n /** A list of grouped raw values */\r\n groupedRawValues: Value[];\r\n}\r\n\r\n/**\r\n * JSON representation of [[DisplayValueGroup]].\r\n * @public\r\n */\r\nexport interface DisplayValueGroupJSON {\r\n displayValue: DisplayValueJSON;\r\n groupedRawValues: ValueJSON[];\r\n}\r\n\r\n/** @public */\r\nexport namespace DisplayValueGroup {\r\n /** Serialize [[DisplayValueGroup]] to JSON */\r\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\r\n return {\r\n displayValue: DisplayValue.toJSON(group.displayValue),\r\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\r\n };\r\n }\r\n\r\n /** Deserialize [[DisplayValueGroup]] from JSON */\r\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\r\n return {\r\n displayValue: DisplayValue.fromJSON(json.displayValue),\r\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\r\n };\r\n }\r\n}\r\n\r\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\r\n return (v !== undefined) && Array.isArray(v)\r\n && ((v.length === 0)\r\n || (v[0] as NestedContentValue).primaryKeys !== undefined\r\n && (v[0] as NestedContentValue).values !== undefined\r\n && (v[0] as NestedContentValue).displayValues !== undefined\r\n && (v[0] as NestedContentValue).mergedFieldNames !== undefined);\r\n}\r\nfunction isArrayValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\r\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\r\n // we have other means to determine the type of value.\r\n return (v !== undefined) && Array.isArray(v);\r\n}\r\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\r\n return (v !== undefined) && (typeof v === \"object\") && !Array.isArray(v);\r\n}\r\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\r\n return !isArrayValue(v) && !isMapValue(v);\r\n}\r\n\r\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\r\n return json.map(Value.fromJSON);\r\n}\r\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\r\n return values.map(Value.toJSON);\r\n}\r\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\r\n const map: ValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n map[key] = Value.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\r\n const map: ValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n map[key] = Value.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n\r\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\r\n return json.map(DisplayValue.fromJSON);\r\n}\r\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\r\n return values.map(DisplayValue.toJSON);\r\n}\r\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\r\n const map: DisplayValuesMap = {};\r\n for (const key in json) {\r\n /* istanbul ignore else */\r\n if (json.hasOwnProperty(key)) {\r\n map[key] = DisplayValue.fromJSON(json[key]);\r\n }\r\n }\r\n return map;\r\n}\r\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\r\n const map: DisplayValuesMapJSON = {};\r\n for (const key in values) {\r\n /* istanbul ignore else */\r\n if (values.hasOwnProperty(key)) {\r\n map[key] = DisplayValue.toJSON(values[key]);\r\n }\r\n }\r\n return map;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"Value.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GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC;AACD,SAAS,wBAAwB,CAAC,IAA0B;IAC1D,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,0BAA0B;QAC1B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC5B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AACD,SAAS,sBAAsB,CAAC,MAAwB;IACtD,MAAM,GAAG,GAAyB,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;QACxB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YAC9B,GAAG,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7C;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { InstanceKey, InstanceKeyJSON } from \"../EC\";\nimport { ValuesDictionary } from \"../Utils\";\n\n/**\n * Raw value type\n * @public\n */\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NestedContentValue[];\n\n/** @public */\nexport namespace Value { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Is the value a primitive */\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: Value): value is ValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: Value): value is ValuesMap {\n return isMapValue(value);\n }\n\n /** Is the value a nested content value */\n export function isNestedContent(value: Value): value is NestedContentValue[] {\n return isNestedContentValue(value);\n }\n\n /** Serialize [[Value]] to JSON */\n export function fromJSON(json: ValueJSON): Value {\n if (json === null)\n return undefined;\n if (isNestedContentValue(json))\n return json.map(NestedContentValue.fromJSON);\n if (isArrayValue(json))\n return valuesArrayFromJSON(json);\n if (isMapValue(json))\n return valuesMapFromJSON(json);\n return json;\n }\n\n /** Deserialize [[Value]] from JSON */\n export function toJSON(value: Value): ValueJSON {\n if (undefined === value)\n return null;\n if (isNestedContentValue(value))\n return value.map(NestedContentValue.toJSON);\n if (isArrayValue(value))\n return valuesArrayToJSON(value);\n if (isMapValue(value))\n return valuesMapToJSON(value);\n return value;\n }\n}\n\n/**\n * A map of raw values\n * @public\n */\nexport interface ValuesMap extends ValuesDictionary<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * An array of raw values\n * @public\n */\nexport interface ValuesArray extends Array<Value> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * Display value type.\n * @public\n */\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\n\n/** @public */\nexport namespace DisplayValue { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Is the value a primitive */\n export function isPrimitive(value: DisplayValue): value is string | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\n return isMapValue(value);\n }\n\n /** Serialize [[DisplayValue]] to JSON */\n export function fromJSON(json: DisplayValueJSON): DisplayValue {\n if (json === null)\n return undefined;\n if (isArrayValue(json))\n return displayValuesArrayFromJSON(json);\n if (isMapValue(json))\n return displayValuesMapFromJSON(json);\n return json;\n }\n\n /** Deserialize [[DisplayValue]] from JSON */\n export function toJSON(value: DisplayValue): DisplayValueJSON {\n if (undefined === value)\n return null;\n if (isArrayValue(value))\n return displayValuesArrayToJSON(value);\n if (isMapValue(value))\n return displayValuesMapToJSON(value);\n return value;\n }\n}\n\n/**\n * A map of display values\n * @public\n */\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * An array of display values\n * @public\n */\nexport interface DisplayValuesArray extends Array<DisplayValue> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * Data structure that describes nested content value.\n * @public\n */\nexport interface NestedContentValue {\n /** Keys of instances whose content is contained in this value */\n primaryKeys: InstanceKey[];\n /** Content values map */\n values: ValuesDictionary<Value>;\n /** Content display values map */\n displayValues: ValuesDictionary<DisplayValue>;\n /** Names of fields whose values are merged */\n mergedFieldNames: string[];\n}\n\n/** @public */\nexport namespace NestedContentValue {\n /** Serialize [[NestedContentValue]] to JSON */\n export function toJSON(json: NestedContentValue): NestedContentValueJSON {\n return {\n primaryKeys: json.primaryKeys.map(InstanceKey.toJSON),\n values: valuesMapToJSON(json.values),\n displayValues: displayValuesMapToJSON(json.displayValues),\n mergedFieldNames: json.mergedFieldNames,\n };\n }\n\n /** Deserialize [[NestedContentValue]] from JSON */\n export function fromJSON(json: NestedContentValueJSON): NestedContentValue {\n return {\n primaryKeys: json.primaryKeys.map(InstanceKey.fromJSON),\n values: valuesMapFromJSON(json.values),\n displayValues: displayValuesMapFromJSON(json.displayValues),\n mergedFieldNames: json.mergedFieldNames,\n };\n }\n}\n\n/**\n * JSON representation of [[Value]]\n * @public\n */\nexport type ValueJSON = string | number | boolean | null | ValuesMapJSON | ValuesArrayJSON | NestedContentValueJSON[];\n\n/**\n * JSON representation of [[ValuesMap]]\n * @public\n */\nexport interface ValuesMapJSON extends ValuesDictionary<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * JSON representation of [[ValuesArray]]\n * @public\n */\nexport interface ValuesArrayJSON extends Array<ValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * JSON representation of [[DisplayValue]]\n * @public\n */\nexport type DisplayValueJSON = string | null | DisplayValuesMapJSON | DisplayValuesArrayJSON;\n\n/**\n * JSON representation of [[DisplayValuesMap]]\n * @public\n */\nexport interface DisplayValuesMapJSON extends ValuesDictionary<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * JSON representation of [[DisplayValuesArray]]\n * @public\n */\nexport interface DisplayValuesArrayJSON extends Array<DisplayValueJSON> { } // eslint-disable-line @typescript-eslint/no-empty-interface\n\n/**\n * JSON representation of [[NestedContentValue]]\n * @public\n */\nexport interface NestedContentValueJSON {\n primaryKeys: InstanceKeyJSON[];\n values: ValuesDictionary<ValueJSON>;\n displayValues: ValuesDictionary<DisplayValueJSON>;\n mergedFieldNames: string[];\n}\n\n/**\n * A group of raw values and their common display value.\n * @public\n */\nexport interface DisplayValueGroup {\n /** Common display value for all grouped raw values */\n displayValue: DisplayValue;\n /** A list of grouped raw values */\n groupedRawValues: Value[];\n}\n\n/**\n * JSON representation of [[DisplayValueGroup]].\n * @public\n */\nexport interface DisplayValueGroupJSON {\n displayValue: DisplayValueJSON;\n groupedRawValues: ValueJSON[];\n}\n\n/** @public */\nexport namespace DisplayValueGroup {\n /** Serialize [[DisplayValueGroup]] to JSON */\n export function toJSON(group: DisplayValueGroup): DisplayValueGroupJSON {\n return {\n displayValue: DisplayValue.toJSON(group.displayValue),\n groupedRawValues: group.groupedRawValues.map(Value.toJSON),\n };\n }\n\n /** Deserialize [[DisplayValueGroup]] from JSON */\n export function fromJSON(json: DisplayValueGroupJSON): DisplayValueGroup {\n return {\n displayValue: DisplayValue.fromJSON(json.displayValue),\n groupedRawValues: json.groupedRawValues.map(Value.fromJSON),\n };\n }\n}\n\nfunction isNestedContentValue(v: Value | ValueJSON): v is NestedContentValue[] | NestedContentValueJSON[] {\n return (v !== undefined) && Array.isArray(v)\n && ((v.length === 0)\n || (v[0] as NestedContentValue).primaryKeys !== undefined\n && (v[0] as NestedContentValue).values !== undefined\n && (v[0] as NestedContentValue).displayValues !== undefined\n && (v[0] as NestedContentValue).mergedFieldNames !== undefined);\n}\nfunction isArrayValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesArray | ValuesArrayJSON | DisplayValuesArray | DisplayValuesArrayJSON {\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\n // we have other means to determine the type of value.\n return (v !== undefined) && Array.isArray(v);\n}\nfunction isMapValue(v: Value | ValueJSON | DisplayValue | DisplayValueJSON): v is ValuesMap | ValuesMapJSON | DisplayValuesMap | DisplayValuesMapJSON {\n return (v !== undefined) && (typeof v === \"object\") && !Array.isArray(v);\n}\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\n return !isArrayValue(v) && !isMapValue(v);\n}\n\nfunction valuesArrayFromJSON(json: ValuesArrayJSON): ValuesArray {\n return json.map(Value.fromJSON);\n}\nfunction valuesArrayToJSON(values: ValuesArray): ValuesArrayJSON {\n return values.map(Value.toJSON);\n}\nfunction valuesMapFromJSON(json: ValuesMapJSON): ValuesMap {\n const map: ValuesMap = {};\n for (const key in json) {\n /* istanbul ignore else */\n if (json.hasOwnProperty(key)) {\n map[key] = Value.fromJSON(json[key]);\n }\n }\n return map;\n}\nfunction valuesMapToJSON(values: ValuesMap): ValuesMapJSON {\n const map: ValuesMapJSON = {};\n for (const key in values) {\n /* istanbul ignore else */\n if (values.hasOwnProperty(key)) {\n map[key] = Value.toJSON(values[key]);\n }\n }\n return map;\n}\n\nfunction displayValuesArrayFromJSON(json: DisplayValuesArrayJSON): DisplayValuesArray {\n return json.map(DisplayValue.fromJSON);\n}\nfunction displayValuesArrayToJSON(values: DisplayValuesArray): DisplayValuesArrayJSON {\n return values.map(DisplayValue.toJSON);\n}\nfunction displayValuesMapFromJSON(json: DisplayValuesMapJSON): DisplayValuesMap {\n const map: DisplayValuesMap = {};\n for (const key in json) {\n /* istanbul ignore else */\n if (json.hasOwnProperty(key)) {\n map[key] = DisplayValue.fromJSON(json[key]);\n }\n }\n return map;\n}\nfunction displayValuesMapToJSON(values: DisplayValuesMap): DisplayValuesMapJSON {\n const map: DisplayValuesMapJSON = {};\n for (const key in values) {\n /* istanbul ignore else */\n if (values.hasOwnProperty(key)) {\n map[key] = DisplayValue.toJSON(values[key]);\n }\n }\n return map;\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Hierarchies
|
|
3
|
+
*/
|
|
4
|
+
import { Node, NodeJSON } from "./Node";
|
|
5
|
+
/**
|
|
6
|
+
* Defines a hierarchy level that consists of an array of nodes and possibly other information.
|
|
7
|
+
* @alpha
|
|
8
|
+
*/
|
|
9
|
+
export interface HierarchyLevel {
|
|
10
|
+
/** A list of nodes in a hierarchy level. */
|
|
11
|
+
nodes: Node[];
|
|
12
|
+
/**
|
|
13
|
+
* Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or
|
|
14
|
+
* a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.
|
|
15
|
+
*/
|
|
16
|
+
supportsFiltering?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* JSON representation of [[HierarchyLevel]].
|
|
20
|
+
* @alpha
|
|
21
|
+
*/
|
|
22
|
+
export interface HierarchyLevelJSON {
|
|
23
|
+
nodes: NodeJSON[];
|
|
24
|
+
supportsFiltering?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** @alpha */
|
|
27
|
+
export declare namespace HierarchyLevel {
|
|
28
|
+
/** Deserialize [[HierarchyLevel]] from JSON */
|
|
29
|
+
function fromJSON(json: HierarchyLevelJSON): HierarchyLevel;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=HierarchyLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyLevel.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,4CAA4C;IAC5C,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,aAAa;AACb,yBAAiB,cAAc,CAAC;IAC9B,+CAA+C;IAC/C,SAAgB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAKjE;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Hierarchies
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.HierarchyLevel = void 0;
|
|
11
|
+
const Node_1 = require("./Node");
|
|
12
|
+
/** @alpha */
|
|
13
|
+
var HierarchyLevel;
|
|
14
|
+
(function (HierarchyLevel) {
|
|
15
|
+
/** Deserialize [[HierarchyLevel]] from JSON */
|
|
16
|
+
function fromJSON(json) {
|
|
17
|
+
return {
|
|
18
|
+
...json,
|
|
19
|
+
nodes: json.nodes.map(Node_1.Node.fromJSON),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
HierarchyLevel.fromJSON = fromJSON;
|
|
23
|
+
})(HierarchyLevel = exports.HierarchyLevel || (exports.HierarchyLevel = {}));
|
|
24
|
+
//# sourceMappingURL=HierarchyLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HierarchyLevel.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/HierarchyLevel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iCAAwC;AAyBxC,aAAa;AACb,IAAiB,cAAc,CAQ9B;AARD,WAAiB,cAAc;IAC7B,+CAA+C;IAC/C,SAAgB,QAAQ,CAAC,IAAwB;QAC/C,OAAO;YACL,GAAG,IAAI;YACP,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAI,CAAC,QAAQ,CAAC;SACrC,CAAC;IACJ,CAAC;IALe,uBAAQ,WAKvB,CAAA;AACH,CAAC,EARgB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQ9B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Hierarchies\n */\n\nimport { Node, NodeJSON } from \"./Node\";\n\n/**\n * Defines a hierarchy level that consists of an array of nodes and possibly other information.\n * @alpha\n */\nexport interface HierarchyLevel {\n /** A list of nodes in a hierarchy level. */\n nodes: Node[];\n /**\n * Identifies whether the hierarchy level supports filtering. If not, requesting either a hierarchy level descriptor or\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\n */\n supportsFiltering?: boolean;\n}\n\n/**\n * JSON representation of [[HierarchyLevel]].\n * @alpha\n */\nexport interface HierarchyLevelJSON {\n nodes: NodeJSON[];\n supportsFiltering?: boolean;\n}\n\n/** @alpha */\nexport namespace HierarchyLevel {\n /** Deserialize [[HierarchyLevel]] from JSON */\n export function fromJSON(json: HierarchyLevelJSON): HierarchyLevel {\n return {\n ...json,\n nodes: json.nodes.map(Node.fromJSON),\n };\n }\n}\n"]}
|