@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
|
@@ -101,51 +101,6 @@ export interface RulesetVariableBaseJSON {
|
|
|
101
101
|
type: VariableValueTypes;
|
|
102
102
|
value: VariableValueJSON;
|
|
103
103
|
}
|
|
104
|
-
/**
|
|
105
|
-
* JSON representation of [[BooleanRulesetVariable]].
|
|
106
|
-
* @public
|
|
107
|
-
* @deprecated in 3.x. Use [[BooleanRulesetVariable]]
|
|
108
|
-
*/
|
|
109
|
-
export interface BooleanRulesetVariableJSON extends RulesetVariableBaseJSON {
|
|
110
|
-
type: VariableValueTypes.Bool;
|
|
111
|
-
value: boolean;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* JSON representation of [[StringRulesetVariable]].
|
|
115
|
-
* @public
|
|
116
|
-
* @deprecated in 3.x. Use [[StringRulesetVariable]]
|
|
117
|
-
*/
|
|
118
|
-
export interface StringRulesetVariableJSON extends RulesetVariableBaseJSON {
|
|
119
|
-
type: VariableValueTypes.String;
|
|
120
|
-
value: string;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* JSON representation of [[IntRulesetVariable]].
|
|
124
|
-
* @public
|
|
125
|
-
* @deprecated in 3.x. Use [[IntRulesetVariable]]
|
|
126
|
-
*/
|
|
127
|
-
export interface IntRulesetVariableJSON extends RulesetVariableBaseJSON {
|
|
128
|
-
type: VariableValueTypes.Int;
|
|
129
|
-
value: number;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* JSON representation of [[IntsRulesetVariable]].
|
|
133
|
-
* @public
|
|
134
|
-
* @deprecated in 3.x. Use [[IntsRulesetVariable]]
|
|
135
|
-
*/
|
|
136
|
-
export interface IntsRulesetVariableJSON extends RulesetVariableBaseJSON {
|
|
137
|
-
type: VariableValueTypes.IntArray;
|
|
138
|
-
value: number[];
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* JSON representation of [[Id64RulesetVariable]].
|
|
142
|
-
* @public
|
|
143
|
-
* @deprecated in 3.x. Use [[Id64RulesetVariable]]
|
|
144
|
-
*/
|
|
145
|
-
export interface Id64RulesetVariableJSON extends RulesetVariableBaseJSON {
|
|
146
|
-
type: VariableValueTypes.Id64;
|
|
147
|
-
value: Id64String;
|
|
148
|
-
}
|
|
149
104
|
/**
|
|
150
105
|
* JSON representation of [[Id64sRulesetVariable]].
|
|
151
106
|
* @public
|
|
@@ -158,7 +113,7 @@ export interface Id64sRulesetVariableJSON extends RulesetVariableBaseJSON {
|
|
|
158
113
|
* JSON representation of [[RulesetVariable]].
|
|
159
114
|
* @public
|
|
160
115
|
*/
|
|
161
|
-
export type RulesetVariableJSON =
|
|
116
|
+
export type RulesetVariableJSON = BooleanRulesetVariable | StringRulesetVariable | IntRulesetVariable | IntsRulesetVariable | Id64RulesetVariable | Id64sRulesetVariableJSON;
|
|
162
117
|
/** @public */
|
|
163
118
|
export declare namespace RulesetVariable {
|
|
164
119
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesetVariables.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/RulesetVariables.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEpE;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,oBAAoB;IACpB,GAAG,QAAQ;IAEX,8BAA8B;IAC9B,QAAQ,UAAU;IAElB,oBAAoB;IACpB,IAAI,SAAS;IAEb,mBAAmB;IACnB,MAAM,WAAW;IAEjB,uBAAuB;IACvB,IAAI,SAAS;IAEb,iCAAiC;IACjC,SAAS,WAAW;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU,EAAE,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,GAAG,UAAU,EAAE,GAAG,iBAAiB,CAAC;AAErH;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,aAAa,CAAC;CACtB;AACD;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;IAC9B,KAAK,EAAE,OAAO,CAAC;CAChB;AACD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,IAAI,EAAE,kBAAkB,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AACD;;;GAGG;AACH,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,IAAI,EAAE,kBAAkB,CAAC,GAAG,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf;AACD;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,kBAAkB,CAAC,QAAQ,CAAC;IAClC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AACD;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;IAC9B,KAAK,EAAE,UAAU,CAAC;CACnB;AACD;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC;IACnC,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AACD;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AACD
|
|
1
|
+
{"version":3,"file":"RulesetVariables.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/RulesetVariables.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEpE;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,oBAAoB;IACpB,GAAG,QAAQ;IAEX,8BAA8B;IAC9B,QAAQ,UAAU;IAElB,oBAAoB;IACpB,IAAI,SAAS;IAEb,m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AAQ,mBAAmB;IAC/D,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC;IACnC,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AACD;;;GAGG;AACH,MAAM,MAAM,eAAe,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,CAAC;AAEzB;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AACD;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,uBAAuB;IACvE,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC;IACnC,KAAK,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC;CACzC;AACD;;;GAGG;AAEH,MAAM,MAAM,mBAAmB,GAC3B,sBAAsB,GACtB,qBAAqB,GACrB,kBAAkB,GAClB,mBAAmB,GACnB,mBAAmB,GACnB,wBAAwB,CAAC;AAE7B,cAAc;AAEd,yBAAiB,eAAe,CAAC;IAC/B;;;OAGG;IACH,SAAgB,MAAM,CAAC,QAAQ,EAAE,eAAe,GAAG,mBAAmB,CAKrE;IAED,iDAAiD;IACjD,SAAgB,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,eAAe,CAQnE;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesetVariables.js","sourceRoot":"","sources":["../../../src/presentation-common/RulesetVariables.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAc,MAAM,qBAAqB,CAAC;AAEpE;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAkBX;AAlBD,WAAY,kBAAkB;IAC5B,oBAAoB;IACpB,iCAAW,CAAA;IAEX,8BAA8B;IAC9B,wCAAkB,CAAA;IAElB,oBAAoB;IACpB,mCAAa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;gBACnC,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,iBAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3E,CAAC;YACD,OAAO,IAAW,CAAC,CAAC,kFAAkF;QACxG,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IARe,wBAAQ,WAQvB,CAAA;AACH,CAAC,EAtBgB,eAAe,KAAf,eAAe,QAsB/B","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 { CompressedId64Set, Id64String } from \"@itwin/core-bentley\";\n\n/**\n * Possible variable value types\n * @public\n */\nexport enum VariableValueTypes {\n /** Integer value */\n Int = \"int\",\n\n /** Array of integer values */\n IntArray = \"int[]\",\n\n /** Boolean value */\n Bool = \"bool\",\n\n /** String value */\n String = \"string\",\n\n /** Id64String value */\n Id64 = \"id64\",\n\n /** Array of Id64String values */\n Id64Array = \"id64[]\",\n}\n\n/**\n * Union of all supported variable value types\n * @public\n */\nexport type VariableValue = boolean | string | number | number[] | Id64String | Id64String[];\n\n/**\n * JSON representation of [[VariableValue]]\n * @public\n */\nexport type VariableValueJSON = boolean | string | number | number[] | Id64String | Id64String[] | CompressedId64Set;\n\n/**\n * Base data structure for representing ruleset variables.\n * @public\n */\nexport interface RulesetVariableBase {\n id: string;\n type: VariableValueTypes;\n value: VariableValue;\n}\n/**\n * Data structure for representing boolean ruleset variables.\n * @public\n */\nexport interface BooleanRulesetVariable extends RulesetVariableBase {\n type: VariableValueTypes.Bool;\n value: boolean;\n}\n/**\n * Data structure for representing string ruleset variables.\n * @public\n */\nexport interface StringRulesetVariable extends RulesetVariableBase {\n type: VariableValueTypes.String;\n value: string;\n}\n/**\n * Data structure for representing int ruleset variables.\n * @public\n */\nexport interface IntRulesetVariable extends RulesetVariableBase {\n type: VariableValueTypes.Int;\n value: number;\n}\n/**\n * Data structure for representing int array ruleset variables.\n * @public\n */\nexport interface IntsRulesetVariable extends RulesetVariableBase {\n type: VariableValueTypes.IntArray;\n value: number[];\n}\n/**\n * Data structure for representing ID ruleset variables.\n * @public\n */\nexport interface Id64RulesetVariable extends RulesetVariableBase {\n type: VariableValueTypes.Id64;\n value: Id64String;\n}\n/**\n * Data structure for representing ID array ruleset variables.\n * @public\n */\nexport interface Id64sRulesetVariable extends RulesetVariableBase {\n type: VariableValueTypes.Id64Array;\n value: Id64String[];\n}\n/**\n * Data structure for representing ruleset variables.\n * @public\n */\nexport type RulesetVariable =\n | BooleanRulesetVariable\n | StringRulesetVariable\n | IntRulesetVariable\n | IntsRulesetVariable\n | Id64RulesetVariable\n | Id64sRulesetVariable;\n\n/**\n * JSON representation of [[RulesetVariableBase]].\n * @public\n */\nexport interface RulesetVariableBaseJSON {\n id: string;\n type: VariableValueTypes;\n value: VariableValueJSON;\n}\n/**\n * JSON representation of [[Id64sRulesetVariable]].\n * @public\n */\nexport interface Id64sRulesetVariableJSON extends RulesetVariableBaseJSON {\n type: VariableValueTypes.Id64Array;\n value: Id64String[] | CompressedId64Set;\n}\n/**\n * JSON representation of [[RulesetVariable]].\n * @public\n */\n\nexport type RulesetVariableJSON =\n | BooleanRulesetVariable\n | StringRulesetVariable\n | IntRulesetVariable\n | IntsRulesetVariable\n | Id64RulesetVariable\n | Id64sRulesetVariableJSON;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace RulesetVariable {\n /**\n * Serialize given RulesetVariable to JSON.\n * Note: In case of [[Id64sRulesetVariable]], this method expects IDs are sorted. See [[OrderedId64Iterable.sortArray]].\n */\n export function toJSON(variable: RulesetVariable): RulesetVariableJSON {\n if (variable.type === VariableValueTypes.Id64Array) {\n return { ...variable, value: CompressedId64Set.compressArray(variable.value) };\n }\n return variable;\n }\n\n /** Deserialize [[RulesetVariable]] from JSON. */\n export function fromJSON(json: RulesetVariableJSON): RulesetVariable {\n if (json.type === VariableValueTypes.Id64Array) {\n if (typeof json.value === \"string\") {\n return { ...json, value: CompressedId64Set.decompressArray(json.value) };\n }\n return json as any; // for some reason TS doesn't understand that `json.value` is always an array here\n }\n return json;\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Core
|
|
3
3
|
*/
|
|
4
|
-
import { NodeKey
|
|
5
|
-
import { Node,
|
|
4
|
+
import { NodeKey } from "./hierarchy/Key";
|
|
5
|
+
import { Node, PartialNode } from "./hierarchy/Node";
|
|
6
6
|
/**
|
|
7
7
|
* A constant for indicating that a full update is required.
|
|
8
8
|
* @public
|
|
@@ -32,30 +32,11 @@ export type HierarchyUpdateInfo = typeof UPDATE_FULL;
|
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
34
|
export type ContentUpdateInfo = typeof UPDATE_FULL;
|
|
35
|
-
/**
|
|
36
|
-
* JSON representation of [[PartialHierarchyModification]].
|
|
37
|
-
* @public
|
|
38
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
39
|
-
*/
|
|
40
|
-
export type PartialHierarchyModificationJSON = NodeInsertionInfoJSON | NodeDeletionInfoJSON | NodeUpdateInfoJSON;
|
|
41
35
|
/**
|
|
42
36
|
* Information about a hierarchy change: insertion, deletion or node update.
|
|
43
37
|
* @public
|
|
44
38
|
*/
|
|
45
39
|
export type PartialHierarchyModification = NodeInsertionInfo | NodeDeletionInfo | NodeUpdateInfo;
|
|
46
|
-
/** @public */
|
|
47
|
-
export declare namespace PartialHierarchyModification {
|
|
48
|
-
/**
|
|
49
|
-
* Serialize given object to JSON.
|
|
50
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
51
|
-
*/
|
|
52
|
-
function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON;
|
|
53
|
-
/**
|
|
54
|
-
* Deserialize given object from JSON
|
|
55
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
56
|
-
*/
|
|
57
|
-
function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification;
|
|
58
|
-
}
|
|
59
40
|
/**
|
|
60
41
|
* Information about node insertion.
|
|
61
42
|
* @public
|
|
@@ -69,17 +50,6 @@ export interface NodeInsertionInfo {
|
|
|
69
50
|
/** Inserted node */
|
|
70
51
|
node: Node;
|
|
71
52
|
}
|
|
72
|
-
/**
|
|
73
|
-
* JSON representation of [[NodeInsertionInfo]].
|
|
74
|
-
* @public
|
|
75
|
-
* @deprecated in 3.x. Use [[NodeInsertionInfo]]
|
|
76
|
-
*/
|
|
77
|
-
export interface NodeInsertionInfoJSON {
|
|
78
|
-
type: "Insert";
|
|
79
|
-
parent?: NodeKeyJSON;
|
|
80
|
-
position: number;
|
|
81
|
-
node: NodeJSON;
|
|
82
|
-
}
|
|
83
53
|
/**
|
|
84
54
|
* Information about node deletion.
|
|
85
55
|
* @public
|
|
@@ -91,18 +61,6 @@ export interface NodeDeletionInfo {
|
|
|
91
61
|
/** Position of the deleted node among its siblings in the initial, not updated tree */
|
|
92
62
|
position: number;
|
|
93
63
|
}
|
|
94
|
-
/**
|
|
95
|
-
* JSON representation of [[NodeDeletionInfo]].
|
|
96
|
-
* @public
|
|
97
|
-
* @deprecated in 3.x. Use [[NodeDeletionInfo]]
|
|
98
|
-
*/
|
|
99
|
-
export interface NodeDeletionInfoJSON {
|
|
100
|
-
type: "Delete";
|
|
101
|
-
/** Parent of the deleted node */
|
|
102
|
-
parent?: NodeKeyJSON;
|
|
103
|
-
/** Position of the deleted node among its siblings in the initial, not updated tree */
|
|
104
|
-
position: number;
|
|
105
|
-
}
|
|
106
64
|
/**
|
|
107
65
|
* Information about node update.
|
|
108
66
|
* @public
|
|
@@ -114,28 +72,6 @@ export interface NodeUpdateInfo {
|
|
|
114
72
|
/** Updated node attributes */
|
|
115
73
|
changes: PartialNode;
|
|
116
74
|
}
|
|
117
|
-
/**
|
|
118
|
-
* JSON representation of [[NodeUpdateInfo]].
|
|
119
|
-
* @public
|
|
120
|
-
* @deprecated in 3.x. Use [[NodeUpdateInfo]]
|
|
121
|
-
*/
|
|
122
|
-
export interface NodeUpdateInfoJSON {
|
|
123
|
-
type: "Update";
|
|
124
|
-
target: NodeKeyJSON;
|
|
125
|
-
changes: PartialNodeJSON;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* JSON representation of [[HierarchyCompareInfo]].
|
|
129
|
-
* @public
|
|
130
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]].
|
|
131
|
-
*/
|
|
132
|
-
export interface HierarchyCompareInfoJSON {
|
|
133
|
-
changes: PartialHierarchyModificationJSON[];
|
|
134
|
-
continuationToken?: {
|
|
135
|
-
prevHierarchyNode: string;
|
|
136
|
-
currHierarchyNode: string;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
75
|
/**
|
|
140
76
|
* Information about hierarchy modification / differences.
|
|
141
77
|
* @public
|
|
@@ -149,17 +85,4 @@ export interface HierarchyCompareInfo {
|
|
|
149
85
|
currHierarchyNode: string;
|
|
150
86
|
};
|
|
151
87
|
}
|
|
152
|
-
/** @public */
|
|
153
|
-
export declare namespace HierarchyCompareInfo {
|
|
154
|
-
/**
|
|
155
|
-
* Serialize given object to JSON.
|
|
156
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
157
|
-
*/
|
|
158
|
-
function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON;
|
|
159
|
-
/**
|
|
160
|
-
* Deserialize given object from JSON
|
|
161
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
162
|
-
*/
|
|
163
|
-
function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo;
|
|
164
|
-
}
|
|
165
88
|
//# sourceMappingURL=Update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAS,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,MAAM,EAAE,MAAM,GAAG;QAChB,CAAC,SAAS,EAAE,MAAM,GAAG;YACnB,SAAS,CAAC,EAAE,mBAAmB,CAAC;YAChC,OAAO,CAAC,EAAE,iBAAiB,CAAC;SAC7B,CAAC;KACH,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,WAAW,CAAC;AAErD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,WAAW,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEjG;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,sBAAsB;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB;IACpB,IAAI,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,8BAA8B;IAC9B,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACxC,sDAAsD;IACtD,iBAAiB,CAAC,EAAE;QAClB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH"}
|
|
@@ -5,112 +5,9 @@
|
|
|
5
5
|
/** @packageDocumentation
|
|
6
6
|
* @module Core
|
|
7
7
|
*/
|
|
8
|
-
import { NodeKey } from "./hierarchy/Key";
|
|
9
|
-
import { Node } from "./hierarchy/Node";
|
|
10
8
|
/**
|
|
11
9
|
* A constant for indicating that a full update is required.
|
|
12
10
|
* @public
|
|
13
11
|
*/
|
|
14
12
|
export const UPDATE_FULL = "FULL";
|
|
15
|
-
/** @public */
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
17
|
-
export var PartialHierarchyModification;
|
|
18
|
-
(function (PartialHierarchyModification) {
|
|
19
|
-
/**
|
|
20
|
-
* Serialize given object to JSON.
|
|
21
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
22
|
-
*/
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
24
|
-
function toJSON(obj) {
|
|
25
|
-
switch (obj.type) {
|
|
26
|
-
case "Insert":
|
|
27
|
-
return {
|
|
28
|
-
type: "Insert",
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
30
|
-
parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),
|
|
31
|
-
position: obj.position,
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
33
|
-
node: Node.toJSON(obj.node),
|
|
34
|
-
};
|
|
35
|
-
case "Update":
|
|
36
|
-
return {
|
|
37
|
-
type: "Update",
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
39
|
-
target: NodeKey.toJSON(obj.target),
|
|
40
|
-
changes: Node.toPartialJSON(obj.changes),
|
|
41
|
-
};
|
|
42
|
-
case "Delete":
|
|
43
|
-
return {
|
|
44
|
-
type: "Delete",
|
|
45
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
46
|
-
parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),
|
|
47
|
-
position: obj.position,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
PartialHierarchyModification.toJSON = toJSON;
|
|
52
|
-
/**
|
|
53
|
-
* Deserialize given object from JSON
|
|
54
|
-
* @deprecated in 3.x. Use [[PartialHierarchyModification]]
|
|
55
|
-
*/
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
57
|
-
function fromJSON(json) {
|
|
58
|
-
switch (json.type) {
|
|
59
|
-
case "Insert":
|
|
60
|
-
return {
|
|
61
|
-
type: "Insert",
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
63
|
-
parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),
|
|
64
|
-
position: json.position,
|
|
65
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
66
|
-
node: Node.fromJSON(json.node),
|
|
67
|
-
};
|
|
68
|
-
case "Update":
|
|
69
|
-
return {
|
|
70
|
-
type: "Update",
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
72
|
-
target: NodeKey.fromJSON(json.target),
|
|
73
|
-
changes: Node.fromPartialJSON(json.changes),
|
|
74
|
-
};
|
|
75
|
-
case "Delete":
|
|
76
|
-
return {
|
|
77
|
-
type: "Delete",
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
79
|
-
parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),
|
|
80
|
-
position: json.position,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
PartialHierarchyModification.fromJSON = fromJSON;
|
|
85
|
-
})(PartialHierarchyModification || (PartialHierarchyModification = {}));
|
|
86
|
-
/** @public */
|
|
87
|
-
export var HierarchyCompareInfo;
|
|
88
|
-
(function (HierarchyCompareInfo) {
|
|
89
|
-
/**
|
|
90
|
-
* Serialize given object to JSON.
|
|
91
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
92
|
-
*/
|
|
93
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
94
|
-
function toJSON(obj) {
|
|
95
|
-
return {
|
|
96
|
-
...obj,
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
98
|
-
changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
HierarchyCompareInfo.toJSON = toJSON;
|
|
102
|
-
/**
|
|
103
|
-
* Deserialize given object from JSON
|
|
104
|
-
* @deprecated in 3.x. Use [[HierarchyCompareInfo]]
|
|
105
|
-
*/
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
107
|
-
function fromJSON(json) {
|
|
108
|
-
return {
|
|
109
|
-
...json,
|
|
110
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
111
|
-
changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
HierarchyCompareInfo.fromJSON = fromJSON;
|
|
115
|
-
})(HierarchyCompareInfo || (HierarchyCompareInfo = {}));
|
|
116
13
|
//# sourceMappingURL=Update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAe,MAAM,iBAAiB,CAAC;AACvD,OAAO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AC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SAClF,CAAC;IACJ,CAAC;IANe,2BAAM,SAMrB,CAAA;IAED;;;OAGG;IACH,4DAA4D;IAC5D,SAAgB,QAAQ,CAAC,IAA8B;QACrD,OAAO;YACL,GAAG,IAAI;YACP,4DAA4D;YAC5D,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,4BAA4B,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;SACrF,CAAC;IACJ,CAAC;IANe,6BAAQ,WAMvB,CAAA;AACH,CAAC,EA1BgB,oBAAoB,KAApB,oBAAoB,QA0BpC","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 { NodeKey, NodeKeyJSON } from \"./hierarchy/Key\";\nimport { Node, NodeJSON, PartialNode, PartialNodeJSON } from \"./hierarchy/Node\";\n\n/**\n * A constant for indicating that a full update is required.\n * @public\n */\nexport const UPDATE_FULL = \"FULL\";\n\n/**\n * A data structure that describes changes that need to be applied to the hierarchy and\n * content components due to some changes on the backend.\n *\n * @public\n */\nexport interface UpdateInfo {\n [imodel: string]: {\n [rulesetId: string]: {\n hierarchy?: HierarchyUpdateInfo;\n content?: ContentUpdateInfo;\n };\n };\n}\n\n/**\n * Information about a required hierarchy update.\n * @public\n */\nexport type HierarchyUpdateInfo = typeof UPDATE_FULL;\n\n/**\n * Information about a required content update.\n * @public\n */\nexport type ContentUpdateInfo = typeof UPDATE_FULL;\n\n/**\n * JSON representation of [[PartialHierarchyModification]].\n * @public\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\n */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport type PartialHierarchyModificationJSON = NodeInsertionInfoJSON | NodeDeletionInfoJSON | NodeUpdateInfoJSON;\n\n/**\n * Information about a hierarchy change: insertion, deletion or node update.\n * @public\n */\nexport type PartialHierarchyModification = NodeInsertionInfo | NodeDeletionInfo | NodeUpdateInfo;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace PartialHierarchyModification {\n /**\n * Serialize given object to JSON.\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(obj: PartialHierarchyModification): PartialHierarchyModificationJSON {\n switch (obj.type) {\n case \"Insert\":\n return {\n type: \"Insert\",\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\n position: obj.position,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n node: Node.toJSON(obj.node),\n };\n\n case \"Update\":\n return {\n type: \"Update\",\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n target: NodeKey.toJSON(obj.target),\n changes: Node.toPartialJSON(obj.changes),\n };\n\n case \"Delete\":\n return {\n type: \"Delete\",\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n parent: obj.parent === undefined ? undefined : NodeKey.toJSON(obj.parent),\n position: obj.position,\n };\n }\n }\n\n /**\n * Deserialize given object from JSON\n * @deprecated in 3.x. Use [[PartialHierarchyModification]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: PartialHierarchyModificationJSON): PartialHierarchyModification {\n switch (json.type) {\n case \"Insert\":\n return {\n type: \"Insert\",\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\n position: json.position,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n node: Node.fromJSON(json.node),\n };\n\n case \"Update\":\n return {\n type: \"Update\",\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n target: NodeKey.fromJSON(json.target),\n changes: Node.fromPartialJSON(json.changes),\n };\n\n case \"Delete\":\n return {\n type: \"Delete\",\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n parent: json.parent === undefined ? undefined : NodeKey.fromJSON(json.parent),\n position: json.position,\n };\n }\n }\n}\n\n/**\n * Information about node insertion.\n * @public\n */\nexport interface NodeInsertionInfo {\n type: \"Insert\";\n /** Parent node key */\n parent?: NodeKey;\n /** Index of the new node under its parent */\n position: number;\n /** Inserted node */\n node: Node;\n}\n\n/**\n * JSON representation of [[NodeInsertionInfo]].\n * @public\n * @deprecated in 3.x. Use [[NodeInsertionInfo]]\n */\nexport interface NodeInsertionInfoJSON {\n type: \"Insert\";\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n parent?: NodeKeyJSON;\n position: number;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n node: NodeJSON;\n}\n\n/**\n * Information about node deletion.\n * @public\n */\nexport interface NodeDeletionInfo {\n type: \"Delete\";\n /** Parent of the deleted node */\n parent?: NodeKey;\n /** Position of the deleted node among its siblings in the initial, not updated tree */\n position: number;\n}\n\n/**\n * JSON representation of [[NodeDeletionInfo]].\n * @public\n * @deprecated in 3.x. Use [[NodeDeletionInfo]]\n */\nexport interface NodeDeletionInfoJSON {\n type: \"Delete\";\n /** Parent of the deleted node */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n parent?: NodeKeyJSON;\n /** Position of the deleted node among its siblings in the initial, not updated tree */\n position: number;\n}\n\n/**\n * Information about node update.\n * @public\n */\nexport interface NodeUpdateInfo {\n type: \"Update\";\n /** Key of the updated node */\n target: NodeKey;\n /** Updated node attributes */\n changes: PartialNode;\n}\n\n/**\n * JSON representation of [[NodeUpdateInfo]].\n * @public\n * @deprecated in 3.x. Use [[NodeUpdateInfo]]\n */\nexport interface NodeUpdateInfoJSON {\n type: \"Update\";\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n target: NodeKeyJSON;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n changes: PartialNodeJSON;\n}\n\n/**\n * JSON representation of [[HierarchyCompareInfo]].\n * @public\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]].\n */\nexport interface HierarchyCompareInfoJSON {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n changes: PartialHierarchyModificationJSON[];\n continuationToken?: {\n prevHierarchyNode: string;\n currHierarchyNode: string;\n };\n}\n\n/**\n * Information about hierarchy modification / differences.\n * @public\n */\nexport interface HierarchyCompareInfo {\n /** A list of hierarchy changes */\n changes: PartialHierarchyModification[];\n /** Continuation token for requesting more changes. */\n continuationToken?: {\n prevHierarchyNode: string;\n currHierarchyNode: string;\n };\n}\n\n/** @public */\nexport namespace HierarchyCompareInfo {\n /**\n * Serialize given object to JSON.\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function toJSON(obj: HierarchyCompareInfo): HierarchyCompareInfoJSON {\n return {\n ...obj,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n changes: obj.changes.map((change) => PartialHierarchyModification.toJSON(change)),\n };\n }\n\n /**\n * Deserialize given object from JSON\n * @deprecated in 3.x. Use [[HierarchyCompareInfo]]\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n export function fromJSON(json: HierarchyCompareInfoJSON): HierarchyCompareInfo {\n return {\n ...json,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n changes: json.changes.map((change) => PartialHierarchyModification.fromJSON(change)),\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../src/presentation-common/Update.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAKH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,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 Core\n */\n\nimport { NodeKey } from \"./hierarchy/Key\";\nimport { Node, PartialNode } from \"./hierarchy/Node\";\n\n/**\n * A constant for indicating that a full update is required.\n * @public\n */\nexport const UPDATE_FULL = \"FULL\";\n\n/**\n * A data structure that describes changes that need to be applied to the hierarchy and\n * content components due to some changes on the backend.\n *\n * @public\n */\nexport interface UpdateInfo {\n [imodel: string]: {\n [rulesetId: string]: {\n hierarchy?: HierarchyUpdateInfo;\n content?: ContentUpdateInfo;\n };\n };\n}\n\n/**\n * Information about a required hierarchy update.\n * @public\n */\nexport type HierarchyUpdateInfo = typeof UPDATE_FULL;\n\n/**\n * Information about a required content update.\n * @public\n */\nexport type ContentUpdateInfo = typeof UPDATE_FULL;\n\n/**\n * Information about a hierarchy change: insertion, deletion or node update.\n * @public\n */\nexport type PartialHierarchyModification = NodeInsertionInfo | NodeDeletionInfo | NodeUpdateInfo;\n\n/**\n * Information about node insertion.\n * @public\n */\nexport interface NodeInsertionInfo {\n type: \"Insert\";\n /** Parent node key */\n parent?: NodeKey;\n /** Index of the new node under its parent */\n position: number;\n /** Inserted node */\n node: Node;\n}\n\n/**\n * Information about node deletion.\n * @public\n */\nexport interface NodeDeletionInfo {\n type: \"Delete\";\n /** Parent of the deleted node */\n parent?: NodeKey;\n /** Position of the deleted node among its siblings in the initial, not updated tree */\n position: number;\n}\n\n/**\n * Information about node update.\n * @public\n */\nexport interface NodeUpdateInfo {\n type: \"Update\";\n /** Key of the updated node */\n target: NodeKey;\n /** Updated node attributes */\n changes: PartialNode;\n}\n\n/**\n * Information about hierarchy modification / differences.\n * @public\n */\nexport interface HierarchyCompareInfo {\n /** A list of hierarchy changes */\n changes: PartialHierarchyModification[];\n /** Continuation token for requesting more changes. */\n continuationToken?: {\n prevHierarchyNode: string;\n currHierarchyNode: string;\n };\n}\n"]}
|
|
@@ -60,4 +60,25 @@ export declare const getInstancesCount: (keys: Readonly<KeySet>) => number;
|
|
|
60
60
|
* @public
|
|
61
61
|
*/
|
|
62
62
|
export declare const DEFAULT_KEYS_BATCH_SIZE = 5000;
|
|
63
|
+
/**
|
|
64
|
+
* Removes all `undefined` properties from given `obj` object and returns
|
|
65
|
+
* the same (mutated) object.
|
|
66
|
+
*
|
|
67
|
+
* Example: `omitUndefined({ a: 1, b: undefined })` will return `{ a: 1 }`
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare function omitUndefined<T extends object>(obj: T): T;
|
|
72
|
+
/** @internal */
|
|
73
|
+
type NullToUndefined<T> = T extends null ? undefined : T extends Array<infer U> ? Array<NullToUndefined<U>> : T extends object ? {
|
|
74
|
+
[K in keyof T]: NullToUndefined<T[K]>;
|
|
75
|
+
} : T;
|
|
76
|
+
/** @internal */
|
|
77
|
+
export declare function deepReplaceNullsToUndefined<T>(obj: T): NullToUndefined<T>;
|
|
78
|
+
/** @internal */
|
|
79
|
+
export declare function createCancellableTimeoutPromise(timeoutMs: number): {
|
|
80
|
+
promise: Promise<void>;
|
|
81
|
+
cancel: () => void;
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
63
84
|
//# sourceMappingURL=Utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAE9C;;;GAGG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,I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;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,EAAE,CAAC,EAAE,CAAC;CACZ;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,SAAU,QAAQ,CAAC,MAAM,CAAC,KAAG,MAU1D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOzD;AAED,gBAAgB;AAChB,KAAK,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,GACpC,SAAS,GACT,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GACtB,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,GACzB,CAAC,SAAS,MAAM,GACd;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACzC,CAAC,CAAC;AAEV,gBAAgB;AAChB,wBAAgB,2BAA2B,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAoBzE;AAED,gBAAgB;AAChB,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM;;;EAchE"}
|
|
@@ -37,4 +37,58 @@ export const getInstancesCount = (keys) => {
|
|
|
37
37
|
* @public
|
|
38
38
|
*/
|
|
39
39
|
export const DEFAULT_KEYS_BATCH_SIZE = 5000;
|
|
40
|
+
/**
|
|
41
|
+
* Removes all `undefined` properties from given `obj` object and returns
|
|
42
|
+
* the same (mutated) object.
|
|
43
|
+
*
|
|
44
|
+
* Example: `omitUndefined({ a: 1, b: undefined })` will return `{ a: 1 }`
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
export function omitUndefined(obj) {
|
|
49
|
+
Object.entries(obj).forEach(([key, value]) => {
|
|
50
|
+
if (value === undefined) {
|
|
51
|
+
delete obj[key];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return obj;
|
|
55
|
+
}
|
|
56
|
+
/** @internal */
|
|
57
|
+
export function deepReplaceNullsToUndefined(obj) {
|
|
58
|
+
/* istanbul ignore next */
|
|
59
|
+
if (obj === null) {
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
62
|
+
/* istanbul ignore next */
|
|
63
|
+
if (Array.isArray(obj)) {
|
|
64
|
+
return obj.map(deepReplaceNullsToUndefined);
|
|
65
|
+
}
|
|
66
|
+
if (typeof obj === "object") {
|
|
67
|
+
return Object.keys(obj).reduce((acc, key) => {
|
|
68
|
+
const value = obj[key];
|
|
69
|
+
/* istanbul ignore else */
|
|
70
|
+
if (value !== null && value !== undefined) {
|
|
71
|
+
acc[key] = deepReplaceNullsToUndefined(value);
|
|
72
|
+
}
|
|
73
|
+
return acc;
|
|
74
|
+
}, {});
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
/** @internal */
|
|
79
|
+
export function createCancellableTimeoutPromise(timeoutMs) {
|
|
80
|
+
let timeout;
|
|
81
|
+
let rejectPromise;
|
|
82
|
+
const promise = new Promise((resolve, reject) => {
|
|
83
|
+
rejectPromise = reject;
|
|
84
|
+
timeout = setTimeout(resolve, timeoutMs);
|
|
85
|
+
});
|
|
86
|
+
return {
|
|
87
|
+
promise,
|
|
88
|
+
cancel: () => {
|
|
89
|
+
clearTimeout(timeout);
|
|
90
|
+
rejectPromise();
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
40
94
|
//# sourceMappingURL=Utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA8C1C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAsB,EAAU,EAAE;IAClE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACnC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAY,EAAE,EAAE;QACrC,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;QACnC,CAAC;aAAM,IAAI,OAAO,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1C,KAAK,IAAI,GAAG,CAAC,qBAAqB,CAAC;QACrC,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,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 Core\n */\n\nimport { NodeKey } from \"./hierarchy/Key\";\nimport { KeySet } from \"./KeySet\";\n\n/**\n * Create a type with `T` properties excluding properties listed in `K`.\n *\n * Usage example: `Omit<SomeType, \"exclude_prop1\" | \"exclude_prop2\">`\n *\n * @public\n */\nexport type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;\n\n/**\n * Create a type with `T` properties excluding all properties in type `K`.\n *\n * Usage example: `Subtract<SomeType, ExcludePropertiesInThisType>`\n *\n * @public\n */\nexport type Subtract<T, K> = Omit<T, keyof K>;\n\n/**\n * Create a type from given type `T` and make specified properties optional.\n * @public\n */\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\n/**\n * A dictionary data structure.\n * @public\n */\nexport interface ValuesDictionary<T> {\n [key: string]: T;\n}\n\n/**\n * A structure for paged responses\n * @public\n */\nexport interface PagedResponse<T> {\n /** Total number of items */\n total: number;\n /** Items for the requested page */\n items: T[];\n}\n\n/**\n * Get total number of instances included in the supplied key set. The\n * count is calculated by adding all of the following:\n * - `keys.instanceKeysCount`\n * - number of `keys.nodeKeys` which are *ECInstance* keys\n * - for every grouping node key in `keys.nodeKeys`, number of grouped instances\n *\n * E.g. if `keys` contains one instance key, one *ECInstance* node key\n * and one grouping node key which groups 3 instances, the result is 5.\n *\n * @public\n */\nexport const getInstancesCount = (keys: Readonly<KeySet>): number => {\n let count = keys.instanceKeysCount;\n keys.nodeKeys.forEach((key: NodeKey) => {\n if (NodeKey.isInstancesNodeKey(key)) {\n count += key.instanceKeys.length;\n } else if (NodeKey.isGroupingNodeKey(key)) {\n count += key.groupedInstancesCount;\n }\n });\n return count;\n};\n\n/**\n * Default (recommended) keyset batch size for cases when it needs to be sent\n * over HTTP. Sending keys in batches helps avoid HTTP413 error.\n *\n * @public\n */\nexport const DEFAULT_KEYS_BATCH_SIZE = 5000;\n"]}
|
|
1
|
+
{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../src/presentation-common/Utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA8C1C;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAsB,EAAU,EAAE;IAClE,IAAI,KAAK,GAAG,IAAI,CAAC,iBAAiB,CAAC;IACnC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,GAAY,EAAE,EAAE;QACrC,IAAI,OAAO,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;YACpC,KAAK,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC;QACnC,CAAC;aAAM,IAAI,OAAO,CA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,CAAC;QACb,CAAC,EAAE,EAAwB,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,GAAU,CAAC;AACpB,CAAC;AAED,gBAAgB;AAChB,MAAM,UAAU,+BAA+B,CAAC,SAAiB;IAC/D,IAAI,OAAsC,CAAC;IAC3C,IAAI,aAAyB,CAAC;IAC9B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACpD,aAAa,GAAG,MAAM,CAAC;QACvB,OAAO,GAAG,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,OAAO;QACL,OAAO;QACP,MAAM,EAAE,GAAG,EAAE;YACX,YAAY,CAAC,OAAO,CAAC,CAAC;YACtB,aAAa,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,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 Core\n */\n\nimport { NodeKey } from \"./hierarchy/Key\";\nimport { KeySet } from \"./KeySet\";\n\n/**\n * Create a type with `T` properties excluding properties listed in `K`.\n *\n * Usage example: `Omit<SomeType, \"exclude_prop1\" | \"exclude_prop2\">`\n *\n * @public\n */\nexport type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;\n\n/**\n * Create a type with `T` properties excluding all properties in type `K`.\n *\n * Usage example: `Subtract<SomeType, ExcludePropertiesInThisType>`\n *\n * @public\n */\nexport type Subtract<T, K> = Omit<T, keyof K>;\n\n/**\n * Create a type from given type `T` and make specified properties optional.\n * @public\n */\nexport type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;\n\n/**\n * A dictionary data structure.\n * @public\n */\nexport interface ValuesDictionary<T> {\n [key: string]: T;\n}\n\n/**\n * A structure for paged responses\n * @public\n */\nexport interface PagedResponse<T> {\n /** Total number of items */\n total: number;\n /** Items for the requested page */\n items: T[];\n}\n\n/**\n * Get total number of instances included in the supplied key set. The\n * count is calculated by adding all of the following:\n * - `keys.instanceKeysCount`\n * - number of `keys.nodeKeys` which are *ECInstance* keys\n * - for every grouping node key in `keys.nodeKeys`, number of grouped instances\n *\n * E.g. if `keys` contains one instance key, one *ECInstance* node key\n * and one grouping node key which groups 3 instances, the result is 5.\n *\n * @public\n */\nexport const getInstancesCount = (keys: Readonly<KeySet>): number => {\n let count = keys.instanceKeysCount;\n keys.nodeKeys.forEach((key: NodeKey) => {\n if (NodeKey.isInstancesNodeKey(key)) {\n count += key.instanceKeys.length;\n } else if (NodeKey.isGroupingNodeKey(key)) {\n count += key.groupedInstancesCount;\n }\n });\n return count;\n};\n\n/**\n * Default (recommended) keyset batch size for cases when it needs to be sent\n * over HTTP. Sending keys in batches helps avoid HTTP413 error.\n *\n * @public\n */\nexport const DEFAULT_KEYS_BATCH_SIZE = 5000;\n\n/**\n * Removes all `undefined` properties from given `obj` object and returns\n * the same (mutated) object.\n *\n * Example: `omitUndefined({ a: 1, b: undefined })` will return `{ a: 1 }`\n *\n * @internal\n */\nexport function omitUndefined<T extends object>(obj: T): T {\n Object.entries(obj).forEach(([key, value]) => {\n if (value === undefined) {\n delete obj[key as keyof T];\n }\n });\n return obj;\n}\n\n/** @internal */\ntype NullToUndefined<T> = T extends null\n ? undefined\n : T extends Array<infer U>\n ? Array<NullToUndefined<U>>\n : T extends object\n ? { [K in keyof T]: NullToUndefined<T[K]> }\n : T;\n\n/** @internal */\nexport function deepReplaceNullsToUndefined<T>(obj: T): NullToUndefined<T> {\n /* istanbul ignore next */\n if (obj === null) {\n return undefined as any;\n }\n /* istanbul ignore next */\n if (Array.isArray(obj)) {\n return obj.map(deepReplaceNullsToUndefined) as NullToUndefined<T>;\n }\n if (typeof obj === \"object\") {\n return Object.keys(obj).reduce((acc, key) => {\n const value = obj[key as keyof T];\n /* istanbul ignore else */\n if (value !== null && value !== undefined) {\n acc[key as keyof NullToUndefined<T>] = deepReplaceNullsToUndefined(value) as any;\n }\n return acc;\n }, {} as NullToUndefined<T>);\n }\n return obj as any;\n}\n\n/** @internal */\nexport function createCancellableTimeoutPromise(timeoutMs: number) {\n let timeout: ReturnType<typeof setTimeout>;\n let rejectPromise: () => void;\n const promise = new Promise<void>((resolve, reject) => {\n rejectPromise = reject;\n timeout = setTimeout(resolve, timeoutMs);\n });\n return {\n promise,\n cancel: () => {\n clearTimeout(timeout);\n rejectPromise();\n },\n };\n}\n"]}
|
|
@@ -28,12 +28,5 @@ export declare class Content {
|
|
|
28
28
|
toJSON(): ContentJSON;
|
|
29
29
|
/** Deserialize [[Content]] from JSON */
|
|
30
30
|
static fromJSON(json: ContentJSON | string | undefined): Content | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Reviver function that can be used as a second argument for
|
|
33
|
-
* `JSON.parse` method when parsing Content objects.
|
|
34
|
-
*
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
static reviver(key: string, value: any): any;
|
|
38
31
|
}
|
|
39
32
|
//# sourceMappingURL=Content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,OAAO;IAClB,4CAA4C;IAC5C,SAAgB,UAAU,EAAE,UAAU,CAAC;IACvC,oBAAoB;IACpB,SAAgB,UAAU,EAAE,IAAI,EAAE,CAAC;IAEnC,wCAAwC;gBACrB,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;IAKxD,oCAAoC;IAC7B,MAAM,IAAI,WAAW;IAO5B,wCAAwC;WAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;
|
|
1
|
+
{"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED;;;;;GAKG;AACH,qBAAa,OAAO;IAClB,4CAA4C;IAC5C,SAAgB,UAAU,EAAE,UAAU,CAAC;IACvC,oBAAoB;IACpB,SAAgB,UAAU,EAAE,IAAI,EAAE,CAAC;IAEnC,wCAAwC;gBACrB,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;IAKxD,oCAAoC;IAC7B,MAAM,IAAI,WAAW;IAO5B,wCAAwC;WAC1B,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS;CAiBpF"}
|
|
@@ -14,6 +14,10 @@ import { Item } from "./Item";
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
export class Content {
|
|
17
|
+
/** Descriptor used to create the content */
|
|
18
|
+
descriptor;
|
|
19
|
+
/** Content items */
|
|
20
|
+
contentSet;
|
|
17
21
|
/** Create a new [[Content]] instance */
|
|
18
22
|
constructor(descriptor, items) {
|
|
19
23
|
this.descriptor = descriptor;
|
|
@@ -32,7 +36,7 @@ export class Content {
|
|
|
32
36
|
return undefined;
|
|
33
37
|
}
|
|
34
38
|
if (typeof json === "string") {
|
|
35
|
-
return JSON.parse(json
|
|
39
|
+
return Content.fromJSON(JSON.parse(json));
|
|
36
40
|
}
|
|
37
41
|
const descriptor = Descriptor.fromJSON(json.descriptor);
|
|
38
42
|
if (!descriptor) {
|
|
@@ -41,14 +45,5 @@ export class Content {
|
|
|
41
45
|
const contentSet = json.contentSet.map((itemJson) => Item.fromJSON(itemJson)).filter((item) => item !== undefined);
|
|
42
46
|
return new Content(descriptor, contentSet);
|
|
43
47
|
}
|
|
44
|
-
/**
|
|
45
|
-
* Reviver function that can be used as a second argument for
|
|
46
|
-
* `JSON.parse` method when parsing Content objects.
|
|
47
|
-
*
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
static reviver(key, value) {
|
|
51
|
-
return key === "" ? Content.fromJSON(value) : value;
|
|
52
|
-
}
|
|
53
48
|
}
|
|
54
49
|
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AAWxC;;;;;GAKG;AACH,MAAM,OAAO,OAAO;
|
|
1
|
+
{"version":3,"file":"Content.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Content.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAY,MAAM,QAAQ,CAAC;AAWxC;;;;;GAKG;AACH,MAAM,OAAO,OAAO;IAClB,4CAA4C;IAC5B,UAAU,CAAa;IACvC,oBAAoB;IACJ,UAAU,CAAS;IAEnC,wCAAwC;IACxC,YAAmB,UAAsB,EAAE,KAAa;QACtD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,oCAAoC;IAC7B,MAAM;QACX,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACpC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;SAC/D,CAAC;IACJ,CAAC;IAED,wCAAwC;IACjC,MAAM,CAAC,QAAQ,CAAC,IAAsC;QAC3D,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5C,CAAC;QAED,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAO,CAAC,IAAI,EAAgB,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;QACvI,OAAO,IAAI,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;CACF","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 { Descriptor, DescriptorJSON } from \"./Descriptor\";\nimport { Item, ItemJSON } from \"./Item\";\n\n/**\n * Serialized [[Content]] JSON representation.\n * @public\n */\nexport interface ContentJSON {\n descriptor: DescriptorJSON;\n contentSet: ItemJSON[];\n}\n\n/**\n * A data structure that contains the [[Descriptor]] and a list of [[Item]]\n * objects which are based on that descriptor.\n *\n * @public\n */\nexport class Content {\n /** Descriptor used to create the content */\n public readonly descriptor: Descriptor;\n /** Content items */\n public readonly contentSet: Item[];\n\n /** Create a new [[Content]] instance */\n public constructor(descriptor: Descriptor, items: Item[]) {\n this.descriptor = descriptor;\n this.contentSet = items;\n }\n\n /** Serialize this object to JSON */\n public toJSON(): ContentJSON {\n return {\n descriptor: this.descriptor.toJSON(),\n contentSet: this.contentSet.map((item: Item) => item.toJSON()),\n };\n }\n\n /** Deserialize [[Content]] from JSON */\n public static fromJSON(json: ContentJSON | string | undefined): Content | undefined {\n if (!json) {\n return undefined;\n }\n\n if (typeof json === \"string\") {\n return Content.fromJSON(JSON.parse(json));\n }\n\n const descriptor = Descriptor.fromJSON(json.descriptor);\n if (!descriptor) {\n return undefined;\n }\n\n const contentSet = json.contentSet.map((itemJson) => Item.fromJSON(itemJson)).filter<Item>((item): item is Item => item !== undefined);\n return new Content(descriptor, contentSet);\n }\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Content
|
|
3
3
|
*/
|
|
4
|
+
import { LabelDefinition } from "../LabelDefinition";
|
|
4
5
|
import { CategoryDescription } from "./Category";
|
|
5
6
|
import { Content } from "./Content";
|
|
6
7
|
import { Descriptor } from "./Descriptor";
|
|
@@ -8,7 +9,6 @@ import { Field } from "./Fields";
|
|
|
8
9
|
import { Item } from "./Item";
|
|
9
10
|
import { TypeDescription } from "./TypeDescription";
|
|
10
11
|
import { DisplayValue, DisplayValuesArray, DisplayValuesMap, Value as PresentationValue, ValuesArray as PresentationValuesArray, ValuesMap as PresentationValuesMap } from "./Value";
|
|
11
|
-
import { LabelDefinition } from "../LabelDefinition";
|
|
12
12
|
/**
|
|
13
13
|
* A data structure to define a hierarchy of [[Field]] objects.
|
|
14
14
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAEhB,KAAK,IAAI,iBAAiB,EAC1B,WAAW,IAAI,uBAAuB,EACtC,SAAS,IAAI,qBAAqB,EACnC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentTraverser.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/ContentTraverser.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAsB,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAuB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAEhB,KAAK,IAAI,iBAAiB,EAC1B,WAAW,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