@itwin/presentation-common 5.0.0-dev.8 → 5.0.0-dev.82
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 +46 -1
- package/Ruleset.schema.json +3 -258
- package/lib/cjs/presentation-common/AsyncTasks.d.ts +4 -4
- package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/cjs/presentation-common/AsyncTasks.js +5 -6
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts +36 -80
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +1 -97
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.js +16 -9
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.d.ts +2 -0
- package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Error.js +2 -0
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.d.ts +2 -2
- package/lib/cjs/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js +9 -11
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js +4 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.d.ts +0 -48
- package/lib/cjs/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js +1 -44
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.js +1 -0
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +31 -10
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.js +0 -5
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +9 -9
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +36 -21
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +3 -2
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js +9 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts +9 -12
- package/lib/cjs/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js +37 -30
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.d.ts +1 -46
- package/lib/cjs/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/Update.d.ts +2 -79
- package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Update.js +1 -104
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.d.ts +21 -0
- package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Utils.js +57 -0
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.d.ts +0 -7
- package/lib/cjs/presentation-common/content/Content.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Content.js +5 -10
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js +116 -28
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +2 -31
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +68 -22
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +151 -27
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +264 -140
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +26 -31
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +52 -67
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.d.ts +2 -12
- package/lib/cjs/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js +0 -18
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js +3 -0
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +5 -107
- package/lib/cjs/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Value.js +1 -215
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +0 -23
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +0 -83
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js +6 -24
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +4 -107
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js +0 -99
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +0 -117
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.d.ts +0 -14
- package/lib/cjs/presentation-common/rules/Rule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts +0 -7
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +2 -28
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js +1 -15
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -0
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +0 -9
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +3 -0
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.js +1 -0
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +1 -5
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +6 -5
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts +4 -4
- package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.js +5 -6
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +36 -80
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +0 -96
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.js +16 -9
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.d.ts +2 -0
- package/lib/esm/presentation-common/Error.d.ts.map +1 -1
- package/lib/esm/presentation-common/Error.js +2 -0
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.d.ts +2 -2
- package/lib/esm/presentation-common/KeySet.d.ts.map +1 -1
- package/lib/esm/presentation-common/KeySet.js +9 -11
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js +5 -2
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.d.ts +0 -48
- package/lib/esm/presentation-common/LabelDefinition.d.ts.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js +0 -43
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.js +1 -0
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +31 -10
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.js +0 -4
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +9 -9
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +38 -22
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +3 -2
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js +9 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts +9 -12
- package/lib/esm/presentation-common/RpcRequestsHandler.d.ts.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js +39 -32
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.d.ts +1 -46
- package/lib/esm/presentation-common/RulesetVariables.d.ts.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/Update.d.ts +2 -79
- package/lib/esm/presentation-common/Update.d.ts.map +1 -1
- package/lib/esm/presentation-common/Update.js +0 -103
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.d.ts +21 -0
- package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
- package/lib/esm/presentation-common/Utils.js +54 -0
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.d.ts +0 -7
- package/lib/esm/presentation-common/content/Content.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Content.js +5 -10
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js +117 -29
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +2 -31
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +68 -22
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +151 -27
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +264 -140
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +26 -31
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +52 -67
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.d.ts +2 -12
- package/lib/esm/presentation-common/content/Property.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Property.js +0 -18
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js +3 -0
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +5 -107
- package/lib/esm/presentation-common/content/Value.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Value.js +0 -214
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts +1 -22
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +1 -22
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +0 -83
- package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js +6 -24
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +4 -107
- package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js +1 -98
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts +1 -67
- package/lib/esm/presentation-common/hierarchy/NodePathElement.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js +1 -116
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.d.ts +0 -14
- package/lib/esm/presentation-common/rules/Rule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts +0 -7
- package/lib/esm/presentation-common/rules/content/ContentSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts +1 -5
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +2 -28
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js +0 -14
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +2 -0
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts +0 -9
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +3 -0
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.js +1 -0
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +1 -5
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +1 -5
- package/lib/esm/presentation-common.js.map +1 -1
- package/package.json +17 -18
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/LabelOverride.js.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js +0 -10
- package/lib/cjs/presentation-common/rules/customization/StyleOverride.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts +0 -45
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js +0 -9
- package/lib/esm/presentation-common/rules/customization/CheckBoxRule.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts +0 -30
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js +0 -9
- package/lib/esm/presentation-common/rules/customization/ImageIdOverride.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts +0 -41
- package/lib/esm/presentation-common/rules/customization/LabelOverride.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js +0 -9
- package/lib/esm/presentation-common/rules/customization/LabelOverride.js.map +0 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts +0 -49
- package/lib/esm/presentation-common/rules/customization/StyleOverride.d.ts.map +0 -1
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js +0 -9
- package/lib/esm/presentation-common/rules/customization/StyleOverride.js.map +0 -1
|
@@ -28,28 +28,6 @@ export interface InstanceKey {
|
|
|
28
28
|
export declare namespace InstanceKey {
|
|
29
29
|
/** Compare 2 instance keys */
|
|
30
30
|
function compare(lhs: InstanceKey, rhs: InstanceKey): number;
|
|
31
|
-
/**
|
|
32
|
-
* Serialize [[InstanceKey]] to JSON
|
|
33
|
-
* @deprecated in 3.x. Use [[InstanceKey]].
|
|
34
|
-
*/
|
|
35
|
-
function toJSON(key: InstanceKey): InstanceKeyJSON;
|
|
36
|
-
/**
|
|
37
|
-
* Deserialize [[InstanceKey]] from JSON
|
|
38
|
-
* @deprecated in 3.x. Use [[InstanceKey]].
|
|
39
|
-
*/
|
|
40
|
-
function fromJSON(json: InstanceKeyJSON): {
|
|
41
|
-
className: string;
|
|
42
|
-
id: string;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* A serialized version of [[InstanceKey]]
|
|
47
|
-
* @public
|
|
48
|
-
* @deprecated in 3.x. Use [[InstanceKey]].
|
|
49
|
-
*/
|
|
50
|
-
export interface InstanceKeyJSON {
|
|
51
|
-
className: string;
|
|
52
|
-
id: string;
|
|
53
31
|
}
|
|
54
32
|
/**
|
|
55
33
|
* Information about an ECClass
|
|
@@ -63,29 +41,6 @@ export interface ClassInfo {
|
|
|
63
41
|
/** ECClass label */
|
|
64
42
|
label: string;
|
|
65
43
|
}
|
|
66
|
-
/** @public */
|
|
67
|
-
export declare namespace ClassInfo {
|
|
68
|
-
/**
|
|
69
|
-
* Serialize [[ClassInfo]] to JSON
|
|
70
|
-
* @deprecated in 3.x. Use [[ClassInfo]].
|
|
71
|
-
*/
|
|
72
|
-
function toJSON(info: ClassInfo): ClassInfoJSON;
|
|
73
|
-
/**
|
|
74
|
-
* Deserialize [[ClassInfo]] from JSON
|
|
75
|
-
* @deprecated in 3.x. Use [[ClassInfo]].
|
|
76
|
-
*/
|
|
77
|
-
function fromJSON(json: ClassInfoJSON): ClassInfo;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* A serialized version of [[ClassInfo]]
|
|
81
|
-
* @public
|
|
82
|
-
* @deprecated in 3.x. Use [[ClassInfo]].
|
|
83
|
-
*/
|
|
84
|
-
export interface ClassInfoJSON {
|
|
85
|
-
id: string;
|
|
86
|
-
name: string;
|
|
87
|
-
label: string;
|
|
88
|
-
}
|
|
89
44
|
/**
|
|
90
45
|
* A serialized and compressed version of [[ClassInfo]]
|
|
91
46
|
* @public
|
|
@@ -147,20 +102,10 @@ export interface NavigationPropertyInfo {
|
|
|
147
102
|
* @public
|
|
148
103
|
*/
|
|
149
104
|
export declare namespace NavigationPropertyInfo {
|
|
150
|
-
/**
|
|
151
|
-
* Serialize [[NavigationPropertyInfo]] to JSON
|
|
152
|
-
* @deprecated in 3.x. Use [[toCompressedJSON]].
|
|
153
|
-
*/
|
|
154
|
-
function toJSON(info: NavigationPropertyInfo): NavigationPropertyInfoJSON;
|
|
155
105
|
/** Serialize [[NavigationPropertyInfo]] to compressed JSON */
|
|
156
106
|
function toCompressedJSON(navigationPropertyInfo: NavigationPropertyInfo, classesMap: {
|
|
157
107
|
[id: string]: CompressedClassInfoJSON;
|
|
158
108
|
}): NavigationPropertyInfoJSON<string>;
|
|
159
|
-
/**
|
|
160
|
-
* Deserialize [[NavigationPropertyInfo]] from JSON
|
|
161
|
-
* @deprecated in 3.x. Use [[fromCompressedJSON]].
|
|
162
|
-
*/
|
|
163
|
-
function fromJSON(json: NavigationPropertyInfoJSON): NavigationPropertyInfo;
|
|
164
109
|
/** Deserialize [[NavigationPropertyInfo]] from compressed JSON */
|
|
165
110
|
function fromCompressedJSON(compressedNavigationPropertyInfoJSON: NavigationPropertyInfoJSON<string>, classesMap: {
|
|
166
111
|
[id: string]: CompressedClassInfoJSON;
|
|
@@ -170,7 +115,7 @@ export declare namespace NavigationPropertyInfo {
|
|
|
170
115
|
* A serialized version of [[NavigationPropertyInfo]]
|
|
171
116
|
* @public
|
|
172
117
|
*/
|
|
173
|
-
export interface NavigationPropertyInfoJSON<TClassInfoJSON =
|
|
118
|
+
export interface NavigationPropertyInfoJSON<TClassInfoJSON = ClassInfo> {
|
|
174
119
|
classInfo: TClassInfoJSON;
|
|
175
120
|
isForwardRelationship: boolean;
|
|
176
121
|
targetClassInfo: TClassInfoJSON;
|
|
@@ -195,29 +140,50 @@ export interface PropertyInfo {
|
|
|
195
140
|
extendedType?: string;
|
|
196
141
|
/** Navigation property info if the field is navigation type */
|
|
197
142
|
navigationPropertyInfo?: NavigationPropertyInfo;
|
|
143
|
+
/** Constraints for values of ECProperty */
|
|
144
|
+
constraints?: PropertyValueConstraints;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Constraints for values of ECProperty
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
export type PropertyValueConstraints = StringPropertyValueConstraints | ArrayPropertyValueConstraints | NumericPropertyValueConstraints;
|
|
151
|
+
/**
|
|
152
|
+
* Describes constraints for `string` type ECProperty values
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
export interface StringPropertyValueConstraints {
|
|
156
|
+
minimumLength?: number;
|
|
157
|
+
maximumLength?: number;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Describes constraints for `int` | `double` | `float` type ECProperty values
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
export interface NumericPropertyValueConstraints {
|
|
164
|
+
minimumValue?: number;
|
|
165
|
+
maximumValue?: number;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Describes constraints for `array` type ECProperty values
|
|
169
|
+
* @public
|
|
170
|
+
*/
|
|
171
|
+
export interface ArrayPropertyValueConstraints {
|
|
172
|
+
minOccurs?: number;
|
|
173
|
+
maxOccurs?: number;
|
|
198
174
|
}
|
|
199
175
|
/** @public */
|
|
200
176
|
export declare namespace PropertyInfo {
|
|
201
|
-
/**
|
|
202
|
-
* Serialize [[PropertyInfo]] to JSON
|
|
203
|
-
* @deprecated in 3.x. Use [[PropertyInfo]].
|
|
204
|
-
*/
|
|
205
|
-
function toJSON(info: PropertyInfo): PropertyInfoJSON;
|
|
206
177
|
/** Serialize [[PropertyInfo]] to compressed JSON */
|
|
207
178
|
function toCompressedJSON(propertyInfo: PropertyInfo, classesMap: {
|
|
208
179
|
[id: string]: CompressedClassInfoJSON;
|
|
209
180
|
}): PropertyInfoJSON<string>;
|
|
210
|
-
/**
|
|
211
|
-
* Deserialize [[PropertyInfo]] from JSON
|
|
212
|
-
* @deprecated in 3.x. Use [[PropertyInfo]].
|
|
213
|
-
*/
|
|
214
|
-
function fromJSON(json: PropertyInfoJSON): PropertyInfo;
|
|
215
181
|
}
|
|
216
182
|
/**
|
|
217
183
|
* A serialized version of [[PropertyInfo]]
|
|
218
184
|
* @public
|
|
219
185
|
*/
|
|
220
|
-
export interface PropertyInfoJSON<TClassInfoJSON =
|
|
186
|
+
export interface PropertyInfoJSON<TClassInfoJSON = ClassInfo> {
|
|
221
187
|
classInfo: TClassInfoJSON;
|
|
222
188
|
name: string;
|
|
223
189
|
type: string;
|
|
@@ -247,20 +213,10 @@ export interface RelatedClassInfo {
|
|
|
247
213
|
}
|
|
248
214
|
/** @public */
|
|
249
215
|
export declare namespace RelatedClassInfo {
|
|
250
|
-
/**
|
|
251
|
-
* Serialize [[RelatedClassInfo]] to JSON
|
|
252
|
-
* @deprecated in 3.x. Use [[RelatedClassInfo]].
|
|
253
|
-
*/
|
|
254
|
-
function toJSON(info: RelatedClassInfo): RelatedClassInfoJSON;
|
|
255
216
|
/** Serialize [[RelatedClassInfo]] to compressed JSON */
|
|
256
217
|
function toCompressedJSON(classInfo: RelatedClassInfo, classesMap: {
|
|
257
218
|
[id: string]: CompressedClassInfoJSON;
|
|
258
219
|
}): RelatedClassInfoJSON<string>;
|
|
259
|
-
/**
|
|
260
|
-
* Deserialize [[RelatedClassInfo]] from JSON
|
|
261
|
-
* @deprecated in 3.x. Use [[RelatedClassInfo]].
|
|
262
|
-
*/
|
|
263
|
-
function fromJSON(json: RelatedClassInfoJSON): RelatedClassInfo;
|
|
264
220
|
/** Deserialize [[RelatedClassInfo]] from compressed JSON */
|
|
265
221
|
function fromCompressedJSON(json: RelatedClassInfoJSON<string>, classesMap: {
|
|
266
222
|
[id: string]: CompressedClassInfoJSON;
|
|
@@ -274,7 +230,7 @@ export declare namespace RelatedClassInfo {
|
|
|
274
230
|
* A serialized version of [[RelatedClassInfo]]
|
|
275
231
|
* @public
|
|
276
232
|
*/
|
|
277
|
-
export interface RelatedClassInfoJSON<TClassInfoJSON =
|
|
233
|
+
export interface RelatedClassInfoJSON<TClassInfoJSON = ClassInfo> {
|
|
278
234
|
sourceClassInfo: TClassInfoJSON;
|
|
279
235
|
targetClassInfo: TClassInfoJSON;
|
|
280
236
|
isPolymorphicTargetClass?: boolean;
|
|
@@ -290,7 +246,7 @@ export interface RelatedClassInfoJSON<TClassInfoJSON = ClassInfoJSON> {
|
|
|
290
246
|
*/
|
|
291
247
|
export type RelatedClassInfoWithOptionalRelationship = PartialBy<RelatedClassInfo, "relationshipInfo" | "isForwardRelationship" | "isPolymorphicRelationship">;
|
|
292
248
|
/** @public */
|
|
293
|
-
export type RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON =
|
|
249
|
+
export type RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON = ClassInfo> = PartialBy<RelatedClassInfoJSON<TClassInfoJSON>, "relationshipInfo" | "isForwardRelationship" | "isPolymorphicRelationship">;
|
|
294
250
|
/** @public */
|
|
295
251
|
export declare namespace RelatedClassInfoWithOptionalRelationship {
|
|
296
252
|
/** Serialize [[RelatedClassInfoWithOptionalRelationship]] to compressed JSON */
|
|
@@ -311,7 +267,7 @@ export type RelationshipPath = RelatedClassInfo[];
|
|
|
311
267
|
* Serialized [[RelationshipPath]]
|
|
312
268
|
* @public
|
|
313
269
|
*/
|
|
314
|
-
export type RelationshipPathJSON<TClassInfoJSON =
|
|
270
|
+
export type RelationshipPathJSON<TClassInfoJSON = ClassInfo> = RelatedClassInfoJSON<TClassInfoJSON>[];
|
|
315
271
|
/** @public */
|
|
316
272
|
export declare namespace RelationshipPath {
|
|
317
273
|
/** Reverse direction of the given [[RelationshipPath]] */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EC.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/EC.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACn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AAgB,GAAG,gBAAgB,EAAE,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,cAAc,GAAG,SAAS,IAAI,oBAAoB,CAAC,cAAc,CAAC,EAAE,CAAC;AAEtG,cAAc;AAEd,yBAAiB,gBAAgB,CAAC;IAChC,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAOhE;IAED,kFAAkF;IAClF,SAAgB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,GAAG,wBAAwB,CAAC,GAAG,OAAO,CAEhJ;IAED,uEAAuE;IACvE,SAAgB,KAAK,CAAC,IAAI,EAAE,gBAAgB,GAAG,wBAAwB,CAEtE;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,wBAAwB,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @module Core
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.RelationshipPath = exports.RelatedClassInfoWithOptionalRelationship = exports.RelatedClassInfo = exports.PropertyInfo = exports.NavigationPropertyInfo = exports.
|
|
10
|
+
exports.RelationshipPath = exports.RelatedClassInfoWithOptionalRelationship = exports.RelatedClassInfo = exports.PropertyInfo = exports.NavigationPropertyInfo = exports.InstanceKey = void 0;
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
/** @public */
|
|
13
13
|
var InstanceKey;
|
|
@@ -21,66 +21,13 @@ var InstanceKey;
|
|
|
21
21
|
return lhs.id.localeCompare(rhs.id);
|
|
22
22
|
}
|
|
23
23
|
InstanceKey.compare = compare;
|
|
24
|
-
/**
|
|
25
|
-
* Serialize [[InstanceKey]] to JSON
|
|
26
|
-
* @deprecated in 3.x. Use [[InstanceKey]].
|
|
27
|
-
*/
|
|
28
|
-
// istanbul ignore next
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
30
|
-
function toJSON(key) {
|
|
31
|
-
return { ...key };
|
|
32
|
-
}
|
|
33
|
-
InstanceKey.toJSON = toJSON;
|
|
34
|
-
/**
|
|
35
|
-
* Deserialize [[InstanceKey]] from JSON
|
|
36
|
-
* @deprecated in 3.x. Use [[InstanceKey]].
|
|
37
|
-
*/
|
|
38
|
-
// istanbul ignore next
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
40
|
-
function fromJSON(json) {
|
|
41
|
-
return { ...json };
|
|
42
|
-
}
|
|
43
|
-
InstanceKey.fromJSON = fromJSON;
|
|
44
24
|
})(InstanceKey || (exports.InstanceKey = InstanceKey = {}));
|
|
45
|
-
/** @public */
|
|
46
|
-
var ClassInfo;
|
|
47
|
-
(function (ClassInfo) {
|
|
48
|
-
/**
|
|
49
|
-
* Serialize [[ClassInfo]] to JSON
|
|
50
|
-
* @deprecated in 3.x. Use [[ClassInfo]].
|
|
51
|
-
*/
|
|
52
|
-
// istanbul ignore next
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
54
|
-
function toJSON(info) {
|
|
55
|
-
return { ...info };
|
|
56
|
-
}
|
|
57
|
-
ClassInfo.toJSON = toJSON;
|
|
58
|
-
/**
|
|
59
|
-
* Deserialize [[ClassInfo]] from JSON
|
|
60
|
-
* @deprecated in 3.x. Use [[ClassInfo]].
|
|
61
|
-
*/
|
|
62
|
-
// istanbul ignore next
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
64
|
-
function fromJSON(json) {
|
|
65
|
-
return { ...json };
|
|
66
|
-
}
|
|
67
|
-
ClassInfo.fromJSON = fromJSON;
|
|
68
|
-
})(ClassInfo || (exports.ClassInfo = ClassInfo = {}));
|
|
69
25
|
/**
|
|
70
26
|
* Contains utilities for working with objects of [[NavigationPropertyInfo]] type.
|
|
71
27
|
* @public
|
|
72
28
|
*/
|
|
73
29
|
var NavigationPropertyInfo;
|
|
74
30
|
(function (NavigationPropertyInfo) {
|
|
75
|
-
/**
|
|
76
|
-
* Serialize [[NavigationPropertyInfo]] to JSON
|
|
77
|
-
* @deprecated in 3.x. Use [[toCompressedJSON]].
|
|
78
|
-
*/
|
|
79
|
-
// istanbul ignore next
|
|
80
|
-
function toJSON(info) {
|
|
81
|
-
return { ...info };
|
|
82
|
-
}
|
|
83
|
-
NavigationPropertyInfo.toJSON = toJSON;
|
|
84
31
|
/** Serialize [[NavigationPropertyInfo]] to compressed JSON */
|
|
85
32
|
function toCompressedJSON(navigationPropertyInfo, classesMap) {
|
|
86
33
|
const { id: relationshipId, ...relationshipLeftOverInfo } = navigationPropertyInfo.classInfo;
|
|
@@ -94,15 +41,6 @@ var NavigationPropertyInfo;
|
|
|
94
41
|
};
|
|
95
42
|
}
|
|
96
43
|
NavigationPropertyInfo.toCompressedJSON = toCompressedJSON;
|
|
97
|
-
/**
|
|
98
|
-
* Deserialize [[NavigationPropertyInfo]] from JSON
|
|
99
|
-
* @deprecated in 3.x. Use [[fromCompressedJSON]].
|
|
100
|
-
*/
|
|
101
|
-
// istanbul ignore next
|
|
102
|
-
function fromJSON(json) {
|
|
103
|
-
return { ...json };
|
|
104
|
-
}
|
|
105
|
-
NavigationPropertyInfo.fromJSON = fromJSON;
|
|
106
44
|
/** Deserialize [[NavigationPropertyInfo]] from compressed JSON */
|
|
107
45
|
function fromCompressedJSON(compressedNavigationPropertyInfoJSON, classesMap) {
|
|
108
46
|
return {
|
|
@@ -116,15 +54,6 @@ var NavigationPropertyInfo;
|
|
|
116
54
|
/** @public */
|
|
117
55
|
var PropertyInfo;
|
|
118
56
|
(function (PropertyInfo) {
|
|
119
|
-
/**
|
|
120
|
-
* Serialize [[PropertyInfo]] to JSON
|
|
121
|
-
* @deprecated in 3.x. Use [[PropertyInfo]].
|
|
122
|
-
*/
|
|
123
|
-
// istanbul ignore next
|
|
124
|
-
function toJSON(info) {
|
|
125
|
-
return { ...info };
|
|
126
|
-
}
|
|
127
|
-
PropertyInfo.toJSON = toJSON;
|
|
128
57
|
/** Serialize [[PropertyInfo]] to compressed JSON */
|
|
129
58
|
function toCompressedJSON(propertyInfo, classesMap) {
|
|
130
59
|
const { navigationPropertyInfo, ...leftOverPropertyInfo } = propertyInfo;
|
|
@@ -137,27 +66,10 @@ var PropertyInfo;
|
|
|
137
66
|
};
|
|
138
67
|
}
|
|
139
68
|
PropertyInfo.toCompressedJSON = toCompressedJSON;
|
|
140
|
-
/**
|
|
141
|
-
* Deserialize [[PropertyInfo]] from JSON
|
|
142
|
-
* @deprecated in 3.x. Use [[PropertyInfo]].
|
|
143
|
-
*/
|
|
144
|
-
// istanbul ignore next
|
|
145
|
-
function fromJSON(json) {
|
|
146
|
-
return { ...json };
|
|
147
|
-
}
|
|
148
|
-
PropertyInfo.fromJSON = fromJSON;
|
|
149
69
|
})(PropertyInfo || (exports.PropertyInfo = PropertyInfo = {}));
|
|
150
70
|
/** @public */
|
|
151
71
|
var RelatedClassInfo;
|
|
152
72
|
(function (RelatedClassInfo) {
|
|
153
|
-
/**
|
|
154
|
-
* Serialize [[RelatedClassInfo]] to JSON
|
|
155
|
-
* @deprecated in 3.x. Use [[RelatedClassInfo]].
|
|
156
|
-
*/
|
|
157
|
-
function toJSON(info) {
|
|
158
|
-
return { ...info };
|
|
159
|
-
}
|
|
160
|
-
RelatedClassInfo.toJSON = toJSON;
|
|
161
73
|
/** Serialize [[RelatedClassInfo]] to compressed JSON */
|
|
162
74
|
function toCompressedJSON(classInfo, classesMap) {
|
|
163
75
|
const { id: sourceId, ...sourceLeftOverInfo } = classInfo.sourceClassInfo;
|
|
@@ -174,14 +86,6 @@ var RelatedClassInfo;
|
|
|
174
86
|
};
|
|
175
87
|
}
|
|
176
88
|
RelatedClassInfo.toCompressedJSON = toCompressedJSON;
|
|
177
|
-
/**
|
|
178
|
-
* Deserialize [[RelatedClassInfo]] from JSON
|
|
179
|
-
* @deprecated in 3.x. Use [[RelatedClassInfo]].
|
|
180
|
-
*/
|
|
181
|
-
function fromJSON(json) {
|
|
182
|
-
return { ...json };
|
|
183
|
-
}
|
|
184
|
-
RelatedClassInfo.fromJSON = fromJSON;
|
|
185
89
|
/** Deserialize [[RelatedClassInfo]] from compressed JSON */
|
|
186
90
|
function fromCompressedJSON(json, classesMap) {
|
|
187
91
|
(0, core_bentley_1.assert)(classesMap.hasOwnProperty(json.sourceClassInfo));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EC.js","sourceRoot":"","sources":["../../../src/presentation-common/EC.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AA2BzD,cAAc;AACd,IAAiB,WAAW,CA6B3B;AA7BD,WAAiB,WAAW;IAC1B,8BAA8B;IAC9B,SAAgB,OAAO,CAAC,GAAgB,EAAE,GAAgB;QACxD,MAAM,gBAAgB,GAAG,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,gBAAgB,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,OAAO,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IANe,mBAAO,UAMtB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,4DAA4D;IAC5D,SAAgB,MAAM,CAAC,GAAgB;QACrC,OAAO,EAAE,GAAG,GAAG,EAAE,CAAC;IACpB,CAAC;IAFe,kBAAM,SAErB,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,4DAA4D;IAC5D,SAAgB,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vE,SAAgB,KAAK,CAAC,IAAsB;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAFe,sBAAK,QAEpB,CAAA;AACH,CAAC,EApBgB,gBAAgB,gCAAhB,gBAAgB,QAoBhC","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 Core\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { FormatProps } from \"@itwin/core-quantity\";\nimport { PartialBy } from \"./Utils\";\n\n/**\n * Type of an ECClass ID.\n * @public\n */\nexport type ClassId = Id64String;\n\n/**\n * Type of an ECInstance ID.\n * @public\n */\nexport type InstanceId = Id64String;\n\n/**\n * A key that uniquely identifies an instance in an iModel\n * @public\n */\nexport interface InstanceKey {\n /** Full class name in format `SchemaName:ClassName` */\n className: string;\n /** ECInstance ID */\n id: InstanceId;\n}\n\n/** @public */\nexport namespace InstanceKey {\n /** Compare 2 instance keys */\n export function compare(lhs: InstanceKey, rhs: InstanceKey): number {\n const classNameCompare = lhs.className.localeCompare(rhs.className);\n if (classNameCompare !== 0) {\n return classNameCompare;\n }\n return lhs.id.localeCompare(rhs.id);\n }\n\n /**\n * Serialize [[InstanceKey]] to JSON\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\n // istanbul ignore next\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(key: InstanceKey): InstanceKeyJSON {\n return { ...key };\n }\n\n /**\n * Deserialize [[InstanceKey]] from JSON\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\n // istanbul ignore next\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: InstanceKeyJSON) {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[InstanceKey]]\n * @public\n * @deprecated in 3.x. Use [[InstanceKey]].\n */\nexport interface InstanceKeyJSON {\n className: string;\n id: string;\n}\n\n/**\n * Information about an ECClass\n * @public\n */\nexport interface ClassInfo {\n /** ECClass ID */\n id: ClassId;\n /** Full class name in format `SchemaName:ClassName` */\n name: string;\n /** ECClass label */\n label: string;\n}\n\n/** @public */\nexport namespace ClassInfo {\n /**\n * Serialize [[ClassInfo]] to JSON\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\n // istanbul ignore next\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(info: ClassInfo): ClassInfoJSON {\n return { ...info };\n }\n\n /**\n * Deserialize [[ClassInfo]] from JSON\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\n // istanbul ignore next\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: ClassInfoJSON): ClassInfo {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[ClassInfo]]\n * @public\n * @deprecated in 3.x. Use [[ClassInfo]].\n */\nexport interface ClassInfoJSON {\n id: string;\n name: string;\n label: string;\n}\n\n/**\n * A serialized and compressed version of [[ClassInfo]]\n * @public\n */\nexport interface CompressedClassInfoJSON {\n name: string;\n label: string;\n}\n\n/**\n * A single choice in enumeration\n * @public\n */\nexport interface EnumerationChoice {\n /** Label of the choice */\n label: string;\n /** Value of the choice */\n value: string | number;\n}\n\n/**\n * Enumeration information\n * @public\n */\nexport interface EnumerationInfo {\n /** Available enumeration choices */\n choices: EnumerationChoice[];\n /** Is the enumeration strict (values only allowed from `choices` list) */\n isStrict: boolean;\n}\n\n/**\n * Kind of quantity information\n * @public\n */\nexport interface KindOfQuantityInfo {\n /** Full name of KindOfQuantity in format `SchemaName:KindOfQuantityName` */\n name: string;\n /** Label of KindOfQuantity */\n label: string;\n /** Persistence unit full class name in format `SchemaName:UnitName`. */\n persistenceUnit: string;\n /** Active format that was used to format property value. */\n activeFormat?: FormatProps;\n}\n\n/**\n * A data structure for storing navigation property information.\n * @public\n */\nexport interface NavigationPropertyInfo {\n /** Information about ECProperty's relationship class */\n classInfo: ClassInfo;\n /** Is the direction of the relationship forward */\n isForwardRelationship: boolean;\n /** Information about ECProperty's target class */\n targetClassInfo: ClassInfo;\n /** Is ECProperty's target class polymorphic */\n isTargetPolymorphic: boolean;\n}\n\n/**\n * Contains utilities for working with objects of [[NavigationPropertyInfo]] type.\n * @public\n */\nexport namespace NavigationPropertyInfo {\n /**\n * Serialize [[NavigationPropertyInfo]] to JSON\n * @deprecated in 3.x. Use [[toCompressedJSON]].\n */\n // istanbul ignore next\n export function toJSON(info: NavigationPropertyInfo): NavigationPropertyInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[NavigationPropertyInfo]] to compressed JSON */\n export function toCompressedJSON(\n navigationPropertyInfo: NavigationPropertyInfo,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): NavigationPropertyInfoJSON<string> {\n const { id: relationshipId, ...relationshipLeftOverInfo } = navigationPropertyInfo.classInfo;\n const { id: targetId, ...targetLeftOverInfo } = navigationPropertyInfo.targetClassInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n return {\n ...navigationPropertyInfo,\n classInfo: relationshipId,\n targetClassInfo: targetId,\n };\n }\n\n /**\n * Deserialize [[NavigationPropertyInfo]] from JSON\n * @deprecated in 3.x. Use [[fromCompressedJSON]].\n */\n // istanbul ignore next\n export function fromJSON(json: NavigationPropertyInfoJSON): NavigationPropertyInfo {\n return { ...json };\n }\n\n /** Deserialize [[NavigationPropertyInfo]] from compressed JSON */\n export function fromCompressedJSON(\n compressedNavigationPropertyInfoJSON: NavigationPropertyInfoJSON<string>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): NavigationPropertyInfo {\n return {\n ...compressedNavigationPropertyInfoJSON,\n classInfo: { id: compressedNavigationPropertyInfoJSON.classInfo, ...classesMap[compressedNavigationPropertyInfoJSON.classInfo] },\n targetClassInfo: { id: compressedNavigationPropertyInfoJSON.targetClassInfo, ...classesMap[compressedNavigationPropertyInfoJSON.targetClassInfo] },\n };\n }\n}\n\n/**\n * A serialized version of [[NavigationPropertyInfo]]\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface NavigationPropertyInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n classInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n targetClassInfo: TClassInfoJSON;\n isTargetPolymorphic: boolean;\n}\n\n/**\n * A structure that describes an ECProperty\n * @public\n */\nexport interface PropertyInfo {\n /** Information about ECProperty class */\n classInfo: ClassInfo;\n /** Name of the ECProperty */\n name: string;\n /** Type name of the ECProperty */\n type: string;\n /** Enumeration info if the property is enumerable */\n enumerationInfo?: EnumerationInfo;\n /** Kind of quantity information, if any. */\n kindOfQuantity?: KindOfQuantityInfo;\n /** Extended type name of the ECProperty if it has one */\n extendedType?: string;\n /** Navigation property info if the field is navigation type */\n navigationPropertyInfo?: NavigationPropertyInfo;\n}\n\n/** @public */\nexport namespace PropertyInfo {\n /**\n * Serialize [[PropertyInfo]] to JSON\n * @deprecated in 3.x. Use [[PropertyInfo]].\n */\n // istanbul ignore next\n export function toJSON(info: PropertyInfo): PropertyInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[PropertyInfo]] to compressed JSON */\n export function toCompressedJSON(propertyInfo: PropertyInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfoJSON<string> {\n const { navigationPropertyInfo, ...leftOverPropertyInfo } = propertyInfo;\n const { id, ...leftOverInfo } = propertyInfo.classInfo;\n classesMap[id] = leftOverInfo;\n\n return {\n ...leftOverPropertyInfo,\n classInfo: propertyInfo.classInfo.id,\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.toCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n }\n\n /**\n * Deserialize [[PropertyInfo]] from JSON\n * @deprecated in 3.x. Use [[PropertyInfo]].\n */\n // istanbul ignore next\n export function fromJSON(json: PropertyInfoJSON): PropertyInfo {\n return { ...json };\n }\n}\n\n/**\n * A serialized version of [[PropertyInfo]]\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertyInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n classInfo: TClassInfoJSON;\n name: string;\n type: string;\n enumerationInfo?: EnumerationInfo;\n kindOfQuantity?: KindOfQuantityInfo;\n navigationPropertyInfo?: NavigationPropertyInfoJSON<TClassInfoJSON>;\n}\n\n/**\n * A structure that describes a related class and the properties of that relationship.\n * @public\n */\nexport interface RelatedClassInfo {\n /** Information about the source ECClass */\n sourceClassInfo: ClassInfo;\n\n /** Information about the target ECClass */\n targetClassInfo: ClassInfo;\n\n /** Is target class handled polymorphically */\n isPolymorphicTargetClass?: boolean;\n\n /** Optionally, IDs of specific target class instances. */\n targetInstanceIds?: Id64String[];\n\n /** Information about the ECRelationship */\n relationshipInfo: ClassInfo;\n\n /** Should relationship be followed in a forward direction to access the related class. */\n isForwardRelationship: boolean;\n\n /** Is relationship handled polymorphically */\n isPolymorphicRelationship?: boolean;\n}\n\n/** @public */\nexport namespace RelatedClassInfo {\n /**\n * Serialize [[RelatedClassInfo]] to JSON\n * @deprecated in 3.x. Use [[RelatedClassInfo]].\n */\n export function toJSON(info: RelatedClassInfo): RelatedClassInfoJSON {\n return { ...info };\n }\n\n /** Serialize [[RelatedClassInfo]] to compressed JSON */\n export function toCompressedJSON(classInfo: RelatedClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfoJSON<string> {\n const { id: sourceId, ...sourceLeftOverInfo } = classInfo.sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = classInfo.targetClassInfo;\n const { id: relationshipId, ...relationshipLeftOverInfo } = classInfo.relationshipInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n\n return {\n ...classInfo,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n relationshipInfo: relationshipId,\n };\n }\n\n /**\n * Deserialize [[RelatedClassInfo]] from JSON\n * @deprecated in 3.x. Use [[RelatedClassInfo]].\n */\n export function fromJSON(json: RelatedClassInfoJSON): RelatedClassInfo {\n return { ...json };\n }\n\n /** Deserialize [[RelatedClassInfo]] from compressed JSON */\n export function fromCompressedJSON(json: RelatedClassInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfo {\n assert(classesMap.hasOwnProperty(json.sourceClassInfo));\n assert(classesMap.hasOwnProperty(json.targetClassInfo));\n assert(classesMap.hasOwnProperty(json.relationshipInfo));\n return {\n ...json,\n sourceClassInfo: { id: json.sourceClassInfo, ...classesMap[json.sourceClassInfo] },\n targetClassInfo: { id: json.targetClassInfo, ...classesMap[json.targetClassInfo] },\n relationshipInfo: { id: json.relationshipInfo, ...classesMap[json.relationshipInfo] },\n };\n }\n\n /** Check two [[RelatedClassInfo]] or [[StrippedRelatedClassInfo]] for equality */\n export function equals(lhs: RelatedClassInfo | StrippedRelatedClassInfo, rhs: RelatedClassInfo | StrippedRelatedClassInfo): boolean {\n return (\n lhs.isForwardRelationship === rhs.isForwardRelationship &&\n getClassName(lhs, \"source\") === getClassName(rhs, \"source\") &&\n getClassName(lhs, \"target\") === getClassName(rhs, \"target\") &&\n getClassName(lhs, \"relationship\") === getClassName(rhs, \"relationship\")\n );\n }\n\n function isStripped(info: RelatedClassInfo | StrippedRelatedClassInfo): info is StrippedRelatedClassInfo {\n const maybeStripped = info as StrippedRelatedClassInfo;\n return !!maybeStripped.relationshipName && !!maybeStripped.sourceClassName && !!maybeStripped.targetClassName;\n }\n\n function getClassName(info: RelatedClassInfo | StrippedRelatedClassInfo, whichClass: \"relationship\" | \"source\" | \"target\"): string {\n switch (whichClass) {\n case \"source\":\n return isStripped(info) ? info.sourceClassName : info.sourceClassInfo.name;\n case \"target\":\n return isStripped(info) ? info.targetClassName : info.targetClassInfo.name;\n case \"relationship\":\n return isStripped(info) ? info.relationshipName : info.relationshipInfo.name;\n }\n }\n\n /** Strip given [[RelatedClassInfo]] to [[StrippedRelatedClassInfo]] */\n export function strip(full: RelatedClassInfo): StrippedRelatedClassInfo {\n return {\n sourceClassName: full.sourceClassInfo.name,\n targetClassName: full.targetClassInfo.name,\n relationshipName: full.relationshipInfo.name,\n isForwardRelationship: full.isForwardRelationship,\n };\n }\n}\n\n/**\n * A serialized version of [[RelatedClassInfo]]\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface RelatedClassInfoJSON<TClassInfoJSON = ClassInfoJSON> {\n sourceClassInfo: TClassInfoJSON;\n targetClassInfo: TClassInfoJSON;\n isPolymorphicTargetClass?: boolean;\n targetInstanceIds?: Id64String[];\n relationshipInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n isPolymorphicRelationship?: boolean;\n}\n\n/**\n * A structure that describes a relationship between source and target classes where\n * an actual ECRelationship between them is optional.\n * @public\n */\nexport type RelatedClassInfoWithOptionalRelationship = PartialBy<RelatedClassInfo, \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\">;\n\n/** @public */\nexport type RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON = ClassInfoJSON> = PartialBy<\n RelatedClassInfoJSON<TClassInfoJSON>,\n \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\"\n>;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelatedClassInfoWithOptionalRelationship {\n /** Serialize [[RelatedClassInfoWithOptionalRelationship]] to compressed JSON */\n export function toCompressedJSON(\n classInfo: RelatedClassInfoWithOptionalRelationship,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): RelatedClassInfoWithOptionalRelationshipJSON<string> {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = classInfo;\n const { id: sourceId, ...sourceLeftOverInfo } = sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = targetClassInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n if (relationshipInfo) {\n const { id: relationshipId, ...relationshipLeftOverInfo } = relationshipInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n }\n\n return {\n ...otherProps,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n ...(relationshipInfo ? { relationshipInfo: relationshipInfo.id } : undefined),\n };\n }\n\n /** Deserialize [[RelatedClassInfoWithOptionalRelationship]] from compressed JSON */\n export function fromCompressedJSON(\n json: RelatedClassInfoWithOptionalRelationshipJSON<string>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): RelatedClassInfoWithOptionalRelationship {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = json;\n assert(classesMap.hasOwnProperty(sourceClassInfo));\n assert(classesMap.hasOwnProperty(targetClassInfo));\n if (relationshipInfo) {\n assert(classesMap.hasOwnProperty(relationshipInfo));\n }\n return {\n ...otherProps,\n sourceClassInfo: { id: sourceClassInfo, ...classesMap[sourceClassInfo] },\n targetClassInfo: { id: targetClassInfo, ...classesMap[targetClassInfo] },\n ...(relationshipInfo ? { relationshipInfo: { id: relationshipInfo, ...classesMap[relationshipInfo] } } : undefined),\n };\n }\n}\n\n/**\n * A structure that describes a related class path.\n * @public\n */\nexport type RelationshipPath = RelatedClassInfo[];\n\n/**\n * Serialized [[RelationshipPath]]\n * @public\n */\nexport type RelationshipPathJSON<TClassInfoJSON = ClassInfoJSON> = RelatedClassInfoJSON<TClassInfoJSON>[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelationshipPath {\n /** Reverse direction of the given [[RelationshipPath]] */\n export function reverse(path: RelationshipPath): RelationshipPath {\n return [...path].reverse().map((step) => ({\n ...step,\n sourceClassInfo: step.targetClassInfo,\n targetClassInfo: step.sourceClassInfo,\n isForwardRelationship: !step.isForwardRelationship,\n }));\n }\n\n /** Check two [[RelationshipPath]] or [[StrippedRelationshipPath]] for equality */\n export function equals(lhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>, rhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>): boolean {\n return lhs.length === rhs.length && lhs.every((lhsPart, i) => RelatedClassInfo.equals(lhsPart, rhs[i]));\n }\n\n /** Strip given [[RelationshipPath]] to [[StrippedRelationshipPath]] */\n export function strip(full: RelationshipPath): StrippedRelationshipPath {\n return full.map(RelatedClassInfo.strip);\n }\n}\n\n/**\n * Data structure that contains a subset of [[RelatedClassInfo]] required to\n * identify the relationship.\n * @public\n */\nexport interface StrippedRelatedClassInfo {\n sourceClassName: string;\n targetClassName: string;\n relationshipName: string;\n isForwardRelationship: boolean;\n}\n\n/**\n * Data structure that contains a subset of [[RelationshipPath]] required to\n * identify the relationship path.\n * @public\n */\nexport type StrippedRelationshipPath = StrippedRelatedClassInfo[];\n"]}
|
|
1
|
+
{"version":3,"file":"EC.js","sourceRoot":"","sources":["../../../src/presentation-common/EC.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AA2BzD,cAAc;AACd,IAAiB,WAAW,CAS3B;AATD,WAAiB,WAAW;IAC1B,8BAA8B;IAC9B,SAAgB,OAAO,CAAC,GAAgB,EAAE,GAAgB;QACxD,MAAM,gBAAgB,GAAG,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,gBAAgB,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,OAAO,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;IANe,mBAAO,UAMtB,CAAA;AACH,CAAC,EATgB,WAAW,2BAAX,WAAW,QAS3B;AA4ED;;;GAGG;AACH,IAAiB,sBAAsB,CA6BtC;AA7BD,WAAiB,sBAAsB;IACrC,8DAA8D;IAC9D,SAAgB,gBAAgB,CAC9B,sBAA8C,EAC9C,UAAq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AAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SACpH,CAAC;IACJ,CAAC;IAhBe,2DAAkB,qBAgBjC,CAAA;AACH,CAAC,EA5CgB,wCAAwC,wDAAxC,wCAAwC,QA4CxD;AAcD,cAAc;AACd,2DAA2D;AAC3D,IAAiB,gBAAgB,CAoBhC;AApBD,WAAiB,gBAAgB;IAC/B,0DAA0D;IAC1D,SAAgB,OAAO,CAAC,IAAsB;QAC5C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACxC,GAAG,IAAI;YACP,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,qBAAqB,EAAE,CAAC,IAAI,CAAC,qBAAqB;SACnD,CAAC,CAAC,CAAC;IACN,CAAC;IAPe,wBAAO,UAOtB,CAAA;IAED,kFAAkF;IAClF,SAAgB,MAAM,CAAC,GAAuD,EAAE,GAAuD;QACrI,OAAO,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1G,CAAC;IAFe,uBAAM,SAErB,CAAA;IAED,uEAAuE;IACvE,SAAgB,KAAK,CAAC,IAAsB;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAFe,sBAAK,QAEpB,CAAA;AACH,CAAC,EApBgB,gBAAgB,gCAAhB,gBAAgB,QAoBhC","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 Core\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport { FormatProps } from \"@itwin/core-quantity\";\nimport { PartialBy } from \"./Utils\";\n\n/**\n * Type of an ECClass ID.\n * @public\n */\nexport type ClassId = Id64String;\n\n/**\n * Type of an ECInstance ID.\n * @public\n */\nexport type InstanceId = Id64String;\n\n/**\n * A key that uniquely identifies an instance in an iModel\n * @public\n */\nexport interface InstanceKey {\n /** Full class name in format `SchemaName:ClassName` */\n className: string;\n /** ECInstance ID */\n id: InstanceId;\n}\n\n/** @public */\nexport namespace InstanceKey {\n /** Compare 2 instance keys */\n export function compare(lhs: InstanceKey, rhs: InstanceKey): number {\n const classNameCompare = lhs.className.localeCompare(rhs.className);\n if (classNameCompare !== 0) {\n return classNameCompare;\n }\n return lhs.id.localeCompare(rhs.id);\n }\n}\n\n/**\n * Information about an ECClass\n * @public\n */\nexport interface ClassInfo {\n /** ECClass ID */\n id: ClassId;\n /** Full class name in format `SchemaName:ClassName` */\n name: string;\n /** ECClass label */\n label: string;\n}\n\n/**\n * A serialized and compressed version of [[ClassInfo]]\n * @public\n */\nexport interface CompressedClassInfoJSON {\n name: string;\n label: string;\n}\n\n/**\n * A single choice in enumeration\n * @public\n */\nexport interface EnumerationChoice {\n /** Label of the choice */\n label: string;\n /** Value of the choice */\n value: string | number;\n}\n\n/**\n * Enumeration information\n * @public\n */\nexport interface EnumerationInfo {\n /** Available enumeration choices */\n choices: EnumerationChoice[];\n /** Is the enumeration strict (values only allowed from `choices` list) */\n isStrict: boolean;\n}\n\n/**\n * Kind of quantity information\n * @public\n */\nexport interface KindOfQuantityInfo {\n /** Full name of KindOfQuantity in format `SchemaName:KindOfQuantityName` */\n name: string;\n /** Label of KindOfQuantity */\n label: string;\n /** Persistence unit full class name in format `SchemaName:UnitName`. */\n persistenceUnit: string;\n /** Active format that was used to format property value. */\n activeFormat?: FormatProps;\n}\n\n/**\n * A data structure for storing navigation property information.\n * @public\n */\nexport interface NavigationPropertyInfo {\n /** Information about ECProperty's relationship class */\n classInfo: ClassInfo;\n /** Is the direction of the relationship forward */\n isForwardRelationship: boolean;\n /** Information about ECProperty's target class */\n targetClassInfo: ClassInfo;\n /** Is ECProperty's target class polymorphic */\n isTargetPolymorphic: boolean;\n}\n\n/**\n * Contains utilities for working with objects of [[NavigationPropertyInfo]] type.\n * @public\n */\nexport namespace NavigationPropertyInfo {\n /** Serialize [[NavigationPropertyInfo]] to compressed JSON */\n export function toCompressedJSON(\n navigationPropertyInfo: NavigationPropertyInfo,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): NavigationPropertyInfoJSON<string> {\n const { id: relationshipId, ...relationshipLeftOverInfo } = navigationPropertyInfo.classInfo;\n const { id: targetId, ...targetLeftOverInfo } = navigationPropertyInfo.targetClassInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n return {\n ...navigationPropertyInfo,\n classInfo: relationshipId,\n targetClassInfo: targetId,\n };\n }\n\n /** Deserialize [[NavigationPropertyInfo]] from compressed JSON */\n export function fromCompressedJSON(\n compressedNavigationPropertyInfoJSON: NavigationPropertyInfoJSON<string>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): NavigationPropertyInfo {\n return {\n ...compressedNavigationPropertyInfoJSON,\n classInfo: { id: compressedNavigationPropertyInfoJSON.classInfo, ...classesMap[compressedNavigationPropertyInfoJSON.classInfo] },\n targetClassInfo: { id: compressedNavigationPropertyInfoJSON.targetClassInfo, ...classesMap[compressedNavigationPropertyInfoJSON.targetClassInfo] },\n };\n }\n}\n\n/**\n * A serialized version of [[NavigationPropertyInfo]]\n * @public\n */\nexport interface NavigationPropertyInfoJSON<TClassInfoJSON = ClassInfo> {\n classInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n targetClassInfo: TClassInfoJSON;\n isTargetPolymorphic: boolean;\n}\n\n/**\n * A structure that describes an ECProperty\n * @public\n */\nexport interface PropertyInfo {\n /** Information about ECProperty class */\n classInfo: ClassInfo;\n /** Name of the ECProperty */\n name: string;\n /** Type name of the ECProperty */\n type: string;\n /** Enumeration info if the property is enumerable */\n enumerationInfo?: EnumerationInfo;\n /** Kind of quantity information, if any. */\n kindOfQuantity?: KindOfQuantityInfo;\n /** Extended type name of the ECProperty if it has one */\n extendedType?: string;\n /** Navigation property info if the field is navigation type */\n navigationPropertyInfo?: NavigationPropertyInfo;\n /** Constraints for values of ECProperty */\n constraints?: PropertyValueConstraints;\n}\n\n/**\n * Constraints for values of ECProperty\n * @public\n */\nexport type PropertyValueConstraints = StringPropertyValueConstraints | ArrayPropertyValueConstraints | NumericPropertyValueConstraints;\n\n/**\n * Describes constraints for `string` type ECProperty values\n * @public\n */\nexport interface StringPropertyValueConstraints {\n minimumLength?: number;\n maximumLength?: number;\n}\n\n/**\n * Describes constraints for `int` | `double` | `float` type ECProperty values\n * @public\n */\nexport interface NumericPropertyValueConstraints {\n minimumValue?: number;\n maximumValue?: number;\n}\n\n/**\n * Describes constraints for `array` type ECProperty values\n * @public\n */\nexport interface ArrayPropertyValueConstraints {\n minOccurs?: number;\n maxOccurs?: number;\n}\n\n/** @public */\nexport namespace PropertyInfo {\n /** Serialize [[PropertyInfo]] to compressed JSON */\n export function toCompressedJSON(propertyInfo: PropertyInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfoJSON<string> {\n const { navigationPropertyInfo, ...leftOverPropertyInfo } = propertyInfo;\n const { id, ...leftOverInfo } = propertyInfo.classInfo;\n classesMap[id] = leftOverInfo;\n\n return {\n ...leftOverPropertyInfo,\n classInfo: propertyInfo.classInfo.id,\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.toCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n }\n}\n\n/**\n * A serialized version of [[PropertyInfo]]\n * @public\n */\nexport interface PropertyInfoJSON<TClassInfoJSON = ClassInfo> {\n classInfo: TClassInfoJSON;\n name: string;\n type: string;\n enumerationInfo?: EnumerationInfo;\n kindOfQuantity?: KindOfQuantityInfo;\n navigationPropertyInfo?: NavigationPropertyInfoJSON<TClassInfoJSON>;\n}\n\n/**\n * A structure that describes a related class and the properties of that relationship.\n * @public\n */\nexport interface RelatedClassInfo {\n /** Information about the source ECClass */\n sourceClassInfo: ClassInfo;\n\n /** Information about the target ECClass */\n targetClassInfo: ClassInfo;\n\n /** Is target class handled polymorphically */\n isPolymorphicTargetClass?: boolean;\n\n /** Optionally, IDs of specific target class instances. */\n targetInstanceIds?: Id64String[];\n\n /** Information about the ECRelationship */\n relationshipInfo: ClassInfo;\n\n /** Should relationship be followed in a forward direction to access the related class. */\n isForwardRelationship: boolean;\n\n /** Is relationship handled polymorphically */\n isPolymorphicRelationship?: boolean;\n}\n\n/** @public */\nexport namespace RelatedClassInfo {\n /** Serialize [[RelatedClassInfo]] to compressed JSON */\n export function toCompressedJSON(classInfo: RelatedClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfoJSON<string> {\n const { id: sourceId, ...sourceLeftOverInfo } = classInfo.sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = classInfo.targetClassInfo;\n const { id: relationshipId, ...relationshipLeftOverInfo } = classInfo.relationshipInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n\n return {\n ...classInfo,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n relationshipInfo: relationshipId,\n };\n }\n\n /** Deserialize [[RelatedClassInfo]] from compressed JSON */\n export function fromCompressedJSON(json: RelatedClassInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): RelatedClassInfo {\n assert(classesMap.hasOwnProperty(json.sourceClassInfo));\n assert(classesMap.hasOwnProperty(json.targetClassInfo));\n assert(classesMap.hasOwnProperty(json.relationshipInfo));\n return {\n ...json,\n sourceClassInfo: { id: json.sourceClassInfo, ...classesMap[json.sourceClassInfo] },\n targetClassInfo: { id: json.targetClassInfo, ...classesMap[json.targetClassInfo] },\n relationshipInfo: { id: json.relationshipInfo, ...classesMap[json.relationshipInfo] },\n };\n }\n\n /** Check two [[RelatedClassInfo]] or [[StrippedRelatedClassInfo]] for equality */\n export function equals(lhs: RelatedClassInfo | StrippedRelatedClassInfo, rhs: RelatedClassInfo | StrippedRelatedClassInfo): boolean {\n return (\n lhs.isForwardRelationship === rhs.isForwardRelationship &&\n getClassName(lhs, \"source\") === getClassName(rhs, \"source\") &&\n getClassName(lhs, \"target\") === getClassName(rhs, \"target\") &&\n getClassName(lhs, \"relationship\") === getClassName(rhs, \"relationship\")\n );\n }\n\n function isStripped(info: RelatedClassInfo | StrippedRelatedClassInfo): info is StrippedRelatedClassInfo {\n const maybeStripped = info as StrippedRelatedClassInfo;\n return !!maybeStripped.relationshipName && !!maybeStripped.sourceClassName && !!maybeStripped.targetClassName;\n }\n\n function getClassName(info: RelatedClassInfo | StrippedRelatedClassInfo, whichClass: \"relationship\" | \"source\" | \"target\"): string {\n switch (whichClass) {\n case \"source\":\n return isStripped(info) ? info.sourceClassName : info.sourceClassInfo.name;\n case \"target\":\n return isStripped(info) ? info.targetClassName : info.targetClassInfo.name;\n case \"relationship\":\n return isStripped(info) ? info.relationshipName : info.relationshipInfo.name;\n }\n }\n\n /** Strip given [[RelatedClassInfo]] to [[StrippedRelatedClassInfo]] */\n export function strip(full: RelatedClassInfo): StrippedRelatedClassInfo {\n return {\n sourceClassName: full.sourceClassInfo.name,\n targetClassName: full.targetClassInfo.name,\n relationshipName: full.relationshipInfo.name,\n isForwardRelationship: full.isForwardRelationship,\n };\n }\n}\n\n/**\n * A serialized version of [[RelatedClassInfo]]\n * @public\n */\nexport interface RelatedClassInfoJSON<TClassInfoJSON = ClassInfo> {\n sourceClassInfo: TClassInfoJSON;\n targetClassInfo: TClassInfoJSON;\n isPolymorphicTargetClass?: boolean;\n targetInstanceIds?: Id64String[];\n relationshipInfo: TClassInfoJSON;\n isForwardRelationship: boolean;\n isPolymorphicRelationship?: boolean;\n}\n\n/**\n * A structure that describes a relationship between source and target classes where\n * an actual ECRelationship between them is optional.\n * @public\n */\nexport type RelatedClassInfoWithOptionalRelationship = PartialBy<RelatedClassInfo, \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\">;\n\n/** @public */\nexport type RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON = ClassInfo> = PartialBy<\n RelatedClassInfoJSON<TClassInfoJSON>,\n \"relationshipInfo\" | \"isForwardRelationship\" | \"isPolymorphicRelationship\"\n>;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelatedClassInfoWithOptionalRelationship {\n /** Serialize [[RelatedClassInfoWithOptionalRelationship]] to compressed JSON */\n export function toCompressedJSON(\n classInfo: RelatedClassInfoWithOptionalRelationship,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): RelatedClassInfoWithOptionalRelationshipJSON<string> {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = classInfo;\n const { id: sourceId, ...sourceLeftOverInfo } = sourceClassInfo;\n const { id: targetId, ...targetLeftOverInfo } = targetClassInfo;\n\n classesMap[sourceId] = sourceLeftOverInfo;\n classesMap[targetId] = targetLeftOverInfo;\n\n if (relationshipInfo) {\n const { id: relationshipId, ...relationshipLeftOverInfo } = relationshipInfo;\n classesMap[relationshipId] = relationshipLeftOverInfo;\n }\n\n return {\n ...otherProps,\n sourceClassInfo: sourceId,\n targetClassInfo: targetId,\n ...(relationshipInfo ? { relationshipInfo: relationshipInfo.id } : undefined),\n };\n }\n\n /** Deserialize [[RelatedClassInfoWithOptionalRelationship]] from compressed JSON */\n export function fromCompressedJSON(\n json: RelatedClassInfoWithOptionalRelationshipJSON<string>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n ): RelatedClassInfoWithOptionalRelationship {\n const { sourceClassInfo, targetClassInfo, relationshipInfo, ...otherProps } = json;\n assert(classesMap.hasOwnProperty(sourceClassInfo));\n assert(classesMap.hasOwnProperty(targetClassInfo));\n if (relationshipInfo) {\n assert(classesMap.hasOwnProperty(relationshipInfo));\n }\n return {\n ...otherProps,\n sourceClassInfo: { id: sourceClassInfo, ...classesMap[sourceClassInfo] },\n targetClassInfo: { id: targetClassInfo, ...classesMap[targetClassInfo] },\n ...(relationshipInfo ? { relationshipInfo: { id: relationshipInfo, ...classesMap[relationshipInfo] } } : undefined),\n };\n }\n}\n\n/**\n * A structure that describes a related class path.\n * @public\n */\nexport type RelationshipPath = RelatedClassInfo[];\n\n/**\n * Serialized [[RelationshipPath]]\n * @public\n */\nexport type RelationshipPathJSON<TClassInfoJSON = ClassInfo> = RelatedClassInfoJSON<TClassInfoJSON>[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RelationshipPath {\n /** Reverse direction of the given [[RelationshipPath]] */\n export function reverse(path: RelationshipPath): RelationshipPath {\n return [...path].reverse().map((step) => ({\n ...step,\n sourceClassInfo: step.targetClassInfo,\n targetClassInfo: step.sourceClassInfo,\n isForwardRelationship: !step.isForwardRelationship,\n }));\n }\n\n /** Check two [[RelationshipPath]] or [[StrippedRelationshipPath]] for equality */\n export function equals(lhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>, rhs: Array<RelatedClassInfo | StrippedRelatedClassInfo>): boolean {\n return lhs.length === rhs.length && lhs.every((lhsPart, i) => RelatedClassInfo.equals(lhsPart, rhs[i]));\n }\n\n /** Strip given [[RelationshipPath]] to [[StrippedRelationshipPath]] */\n export function strip(full: RelationshipPath): StrippedRelationshipPath {\n return full.map(RelatedClassInfo.strip);\n }\n}\n\n/**\n * Data structure that contains a subset of [[RelatedClassInfo]] required to\n * identify the relationship.\n * @public\n */\nexport interface StrippedRelatedClassInfo {\n sourceClassName: string;\n targetClassName: string;\n relationshipName: string;\n isForwardRelationship: boolean;\n}\n\n/**\n * Data structure that contains a subset of [[RelationshipPath]] required to\n * identify the relationship path.\n * @public\n */\nexport type StrippedRelationshipPath = StrippedRelatedClassInfo[];\n"]}
|
|
@@ -19,11 +19,13 @@ const buildElementProperties = (descriptor, item) => {
|
|
|
19
19
|
};
|
|
20
20
|
exports.buildElementProperties = buildElementProperties;
|
|
21
21
|
class ElementPropertiesAppender {
|
|
22
|
+
_item;
|
|
23
|
+
_onItemFinished;
|
|
24
|
+
_propertyItems = {};
|
|
25
|
+
_categoryItemAppenders = {};
|
|
22
26
|
constructor(_item, _onItemFinished) {
|
|
23
27
|
this._item = _item;
|
|
24
28
|
this._onItemFinished = _onItemFinished;
|
|
25
|
-
this._propertyItems = {};
|
|
26
|
-
this._categoryItemAppenders = {};
|
|
27
29
|
}
|
|
28
30
|
append(label, item) {
|
|
29
31
|
this._propertyItems[label] = item;
|
|
@@ -51,10 +53,12 @@ class ElementPropertiesAppender {
|
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
class CategoryItemAppender {
|
|
56
|
+
_parentAppender;
|
|
57
|
+
_category;
|
|
58
|
+
_items = {};
|
|
54
59
|
constructor(_parentAppender, _category) {
|
|
55
60
|
this._parentAppender = _parentAppender;
|
|
56
61
|
this._category = _category;
|
|
57
|
-
this._items = {};
|
|
58
62
|
}
|
|
59
63
|
append(label, item) {
|
|
60
64
|
this._items[label] = item;
|
|
@@ -70,10 +74,12 @@ class CategoryItemAppender {
|
|
|
70
74
|
}
|
|
71
75
|
}
|
|
72
76
|
class ArrayItemAppender {
|
|
77
|
+
_parentAppender;
|
|
78
|
+
_props;
|
|
79
|
+
_items = [];
|
|
73
80
|
constructor(_parentAppender, _props) {
|
|
74
81
|
this._parentAppender = _parentAppender;
|
|
75
82
|
this._props = _props;
|
|
76
|
-
this._items = [];
|
|
77
83
|
}
|
|
78
84
|
append(_label, item) {
|
|
79
85
|
(0, core_bentley_1.assert)(item.type !== "category");
|
|
@@ -110,10 +116,12 @@ class ArrayItemAppender {
|
|
|
110
116
|
}
|
|
111
117
|
}
|
|
112
118
|
class StructItemAppender {
|
|
119
|
+
_parentAppender;
|
|
120
|
+
_props;
|
|
121
|
+
_members = {};
|
|
113
122
|
constructor(_parentAppender, _props) {
|
|
114
123
|
this._parentAppender = _parentAppender;
|
|
115
124
|
this._props = _props;
|
|
116
|
-
this._members = {};
|
|
117
125
|
}
|
|
118
126
|
append(label, item) {
|
|
119
127
|
(0, core_bentley_1.assert)(item.type !== "category");
|
|
@@ -128,10 +136,9 @@ class StructItemAppender {
|
|
|
128
136
|
}
|
|
129
137
|
}
|
|
130
138
|
class ElementPropertiesBuilder {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
139
|
+
_appendersStack = [];
|
|
140
|
+
_items = [];
|
|
141
|
+
_elementPropertiesAppender;
|
|
135
142
|
get items() {
|
|
136
143
|
return this._items;
|
|
137
144
|
}
|