@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EACL,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"Fields.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAq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Ae,GAAG,oBAAoB,GAAG,yBAAyB,CAAC;AAE/E,cAAc;AAEd,yBAAiB,eAAe,CAAC;IAC/B,uCAAuC;IACvC,SAAgB,OAAO,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,oBAAoB,CAErE;IACD,4CAA4C;IAC5C,SAAgB,YAAY,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,IAAI,yBAAyB,CAE/E;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,IAAI,EAAE,mBAAmB,CAAC,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC;IACrC,6BAA6B,EAAE,wBAAwB,CAAC;IACxD;;;OAGG;IACH,UAAU,EAAE,KAAK,CAAC;QAChB,sBAAsB;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,oBAAoB;QACpB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ"}
|
|
@@ -12,6 +12,7 @@ const core_bentley_1 = require("@itwin/core-bentley");
|
|
|
12
12
|
const EC_1 = require("../EC");
|
|
13
13
|
const Error_1 = require("../Error");
|
|
14
14
|
const RelatedPropertiesSpecification_1 = require("../rules/content/modifiers/RelatedPropertiesSpecification");
|
|
15
|
+
const Utils_1 = require("../Utils");
|
|
15
16
|
const Property_1 = require("./Property");
|
|
16
17
|
function isPropertiesField(field) {
|
|
17
18
|
return !!field.properties;
|
|
@@ -32,28 +33,50 @@ function isNestedContentField(field) {
|
|
|
32
33
|
* @public
|
|
33
34
|
*/
|
|
34
35
|
class Field {
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
/** Category information */
|
|
37
|
+
category;
|
|
38
|
+
/** Unique name */
|
|
39
|
+
name;
|
|
40
|
+
/** Display label */
|
|
41
|
+
label;
|
|
42
|
+
/** Description of this field's values data type */
|
|
43
|
+
type;
|
|
44
|
+
/** Are values in this field read-only */
|
|
45
|
+
isReadonly;
|
|
46
|
+
/** Priority of the field. Higher priority fields should appear first in the UI */
|
|
47
|
+
priority;
|
|
48
|
+
/** Property renderer used to render values of this field */
|
|
49
|
+
renderer;
|
|
50
|
+
/** Property editor used to edit values of this field */
|
|
51
|
+
editor;
|
|
52
|
+
/** Extended data associated with this field */
|
|
53
|
+
extendedData;
|
|
54
|
+
/** Parent field */
|
|
55
|
+
_parent;
|
|
56
|
+
constructor(categoryOrProps, name, label, type, isReadonly, priority, editor, renderer, extendedData) {
|
|
57
|
+
/* istanbul ignore next */
|
|
58
|
+
const props = "category" in categoryOrProps
|
|
59
|
+
? categoryOrProps
|
|
60
|
+
: {
|
|
61
|
+
category: categoryOrProps,
|
|
62
|
+
name: name,
|
|
63
|
+
label: label,
|
|
64
|
+
type: type,
|
|
65
|
+
isReadonly: isReadonly,
|
|
66
|
+
priority: priority,
|
|
67
|
+
editor,
|
|
68
|
+
renderer,
|
|
69
|
+
extendedData,
|
|
70
|
+
};
|
|
71
|
+
this.category = props.category;
|
|
72
|
+
this.name = props.name;
|
|
73
|
+
this.label = props.label;
|
|
74
|
+
this.type = props.type;
|
|
75
|
+
this.isReadonly = props.isReadonly;
|
|
76
|
+
this.priority = props.priority;
|
|
77
|
+
this.editor = props.editor;
|
|
78
|
+
this.renderer = props.renderer;
|
|
79
|
+
this.extendedData = props.extendedData;
|
|
57
80
|
}
|
|
58
81
|
/**
|
|
59
82
|
* Is this a [[PropertiesField]]
|
|
@@ -74,13 +97,20 @@ class Field {
|
|
|
74
97
|
return this._parent;
|
|
75
98
|
}
|
|
76
99
|
clone() {
|
|
77
|
-
const clone = new Field(this
|
|
100
|
+
const clone = new Field(this);
|
|
78
101
|
clone.rebuildParentship(this.parent);
|
|
79
102
|
return clone;
|
|
80
103
|
}
|
|
81
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Serialize this object to JSON.
|
|
106
|
+
* @deprecated in 5.x. Use [[toCompressedJSON]] instead.
|
|
107
|
+
*/
|
|
82
108
|
toJSON() {
|
|
83
|
-
return {
|
|
109
|
+
return this.toCompressedJSON({});
|
|
110
|
+
}
|
|
111
|
+
/** Serialize this object to compressed JSON */
|
|
112
|
+
toCompressedJSON(_classesMap) {
|
|
113
|
+
return (0, Utils_1.omitUndefined)({
|
|
84
114
|
category: this.category.name,
|
|
85
115
|
name: this.name,
|
|
86
116
|
label: this.label,
|
|
@@ -89,28 +119,34 @@ class Field {
|
|
|
89
119
|
priority: this.priority,
|
|
90
120
|
renderer: this.renderer,
|
|
91
121
|
editor: this.editor,
|
|
92
|
-
extendedData: this.extendedData
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
/** Serialize this object to compressed JSON */
|
|
96
|
-
toCompressedJSON(_classesMap) {
|
|
97
|
-
return this.toJSON();
|
|
122
|
+
extendedData: this.extendedData,
|
|
123
|
+
});
|
|
98
124
|
}
|
|
99
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Deserialize [[Field]] from JSON.
|
|
127
|
+
* @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
|
|
128
|
+
*/
|
|
100
129
|
static fromJSON(json, categories) {
|
|
101
130
|
if (!json) {
|
|
102
131
|
return undefined;
|
|
103
132
|
}
|
|
104
133
|
if (isPropertiesField(json)) {
|
|
134
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
105
135
|
return PropertiesField.fromJSON(json, categories);
|
|
106
136
|
}
|
|
107
137
|
if (isNestedContentField(json)) {
|
|
108
|
-
|
|
109
|
-
|
|
138
|
+
return new NestedContentField({
|
|
139
|
+
...json,
|
|
140
|
+
...fromNestedContentFieldJSON(json, categories),
|
|
141
|
+
nestedFields: json.nestedFields
|
|
142
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
143
|
+
.map((nestedFieldJson) => Field.fromJSON(nestedFieldJson, categories))
|
|
144
|
+
.filter((nestedField) => !!nestedField),
|
|
145
|
+
});
|
|
110
146
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
category:
|
|
147
|
+
return new Field({
|
|
148
|
+
...json,
|
|
149
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
114
150
|
});
|
|
115
151
|
}
|
|
116
152
|
/** Deserialize a [[Field]] from compressed JSON. */
|
|
@@ -124,17 +160,13 @@ class Field {
|
|
|
124
160
|
if (isNestedContentField(json)) {
|
|
125
161
|
return NestedContentField.fromCompressedJSON(json, classesMap, categories);
|
|
126
162
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
category:
|
|
163
|
+
return new Field({
|
|
164
|
+
...json,
|
|
165
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
130
166
|
});
|
|
131
167
|
}
|
|
132
168
|
static getCategoryFromFieldJson(fieldJson, categories) {
|
|
133
|
-
|
|
134
|
-
if (!category) {
|
|
135
|
-
throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid content field category`);
|
|
136
|
-
}
|
|
137
|
-
return category;
|
|
169
|
+
return getCategoryFromFieldJson(fieldJson, categories);
|
|
138
170
|
}
|
|
139
171
|
/** Resets field's parent. */
|
|
140
172
|
resetParentship() {
|
|
@@ -170,21 +202,25 @@ exports.Field = Field;
|
|
|
170
202
|
* @public
|
|
171
203
|
*/
|
|
172
204
|
class PropertiesField extends Field {
|
|
173
|
-
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
205
|
+
/** A list of properties this field is created from */
|
|
206
|
+
properties;
|
|
207
|
+
constructor(categoryOrProps, name, label, type, isReadonly, priority, properties, editor, renderer) {
|
|
208
|
+
/* istanbul ignore next */
|
|
209
|
+
const props = "category" in categoryOrProps
|
|
210
|
+
? categoryOrProps
|
|
211
|
+
: {
|
|
212
|
+
category: categoryOrProps,
|
|
213
|
+
name: name,
|
|
214
|
+
label: label,
|
|
215
|
+
type: type,
|
|
216
|
+
isReadonly: isReadonly,
|
|
217
|
+
priority: priority,
|
|
218
|
+
editor,
|
|
219
|
+
renderer,
|
|
220
|
+
properties: properties,
|
|
221
|
+
};
|
|
222
|
+
super(props);
|
|
223
|
+
this.properties = props.properties;
|
|
188
224
|
}
|
|
189
225
|
/** Is this a an array property field */
|
|
190
226
|
isArrayPropertiesField() {
|
|
@@ -195,13 +231,17 @@ class PropertiesField extends Field {
|
|
|
195
231
|
return false;
|
|
196
232
|
}
|
|
197
233
|
clone() {
|
|
198
|
-
const clone = new PropertiesField(this
|
|
234
|
+
const clone = new PropertiesField(this);
|
|
199
235
|
clone.rebuildParentship(this.parent);
|
|
200
236
|
return clone;
|
|
201
237
|
}
|
|
202
|
-
/**
|
|
238
|
+
/**
|
|
239
|
+
* Serialize this object to JSON
|
|
240
|
+
* @deprecated in 5.x. Use [[toCompressedJSON]] instead.
|
|
241
|
+
*/
|
|
203
242
|
toJSON() {
|
|
204
243
|
return {
|
|
244
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
205
245
|
...super.toJSON(),
|
|
206
246
|
properties: this.properties,
|
|
207
247
|
};
|
|
@@ -213,19 +253,24 @@ class PropertiesField extends Field {
|
|
|
213
253
|
properties: this.properties.map((property) => Property_1.Property.toCompressedJSON(property, classesMap)),
|
|
214
254
|
};
|
|
215
255
|
}
|
|
216
|
-
/**
|
|
256
|
+
/**
|
|
257
|
+
* Deserialize [[PropertiesField]] from JSON.
|
|
258
|
+
* @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
|
|
259
|
+
*/
|
|
217
260
|
static fromJSON(json, categories) {
|
|
218
261
|
if (!json) {
|
|
219
262
|
return undefined;
|
|
220
263
|
}
|
|
221
264
|
if (isArrayPropertiesField(json)) {
|
|
265
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
222
266
|
return ArrayPropertiesField.fromJSON(json, categories);
|
|
223
267
|
}
|
|
224
268
|
if (isStructPropertiesField(json)) {
|
|
269
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
225
270
|
return StructPropertiesField.fromJSON(json, categories);
|
|
226
271
|
}
|
|
227
|
-
|
|
228
|
-
|
|
272
|
+
return new PropertiesField({
|
|
273
|
+
...json,
|
|
229
274
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
230
275
|
});
|
|
231
276
|
}
|
|
@@ -240,8 +285,8 @@ class PropertiesField extends Field {
|
|
|
240
285
|
if (isStructPropertiesField(json)) {
|
|
241
286
|
return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
242
287
|
}
|
|
243
|
-
|
|
244
|
-
|
|
288
|
+
return new PropertiesField({
|
|
289
|
+
...json,
|
|
245
290
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
246
291
|
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
247
292
|
});
|
|
@@ -303,22 +348,43 @@ exports.PropertiesField = PropertiesField;
|
|
|
303
348
|
* @public
|
|
304
349
|
*/
|
|
305
350
|
class ArrayPropertiesField extends PropertiesField {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
351
|
+
itemsField;
|
|
352
|
+
constructor(categoryOrProps, name, label, type, itemsField, isReadonly, priority, properties, editor, renderer) {
|
|
353
|
+
/* istanbul ignore next */
|
|
354
|
+
const props = "category" in categoryOrProps
|
|
355
|
+
? categoryOrProps
|
|
356
|
+
: {
|
|
357
|
+
category: categoryOrProps,
|
|
358
|
+
name: name,
|
|
359
|
+
label: label,
|
|
360
|
+
type: type,
|
|
361
|
+
isReadonly: isReadonly,
|
|
362
|
+
priority: priority,
|
|
363
|
+
editor,
|
|
364
|
+
renderer,
|
|
365
|
+
properties: properties,
|
|
366
|
+
itemsField: itemsField,
|
|
367
|
+
};
|
|
368
|
+
super(props);
|
|
369
|
+
this.itemsField = props.itemsField;
|
|
309
370
|
}
|
|
310
371
|
isArrayPropertiesField() {
|
|
311
372
|
return true;
|
|
312
373
|
}
|
|
313
374
|
clone() {
|
|
314
|
-
const clone = new ArrayPropertiesField(this
|
|
375
|
+
const clone = new ArrayPropertiesField(this);
|
|
315
376
|
clone.rebuildParentship(this.parent);
|
|
316
377
|
return clone;
|
|
317
378
|
}
|
|
318
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Serialize this object to JSON.
|
|
381
|
+
* @deprecated in 5.x. Use [[toCompressedJSON]] instead.
|
|
382
|
+
*/
|
|
319
383
|
toJSON() {
|
|
320
384
|
return {
|
|
385
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
321
386
|
...super.toJSON(),
|
|
387
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
322
388
|
itemsField: this.itemsField.toJSON(),
|
|
323
389
|
};
|
|
324
390
|
}
|
|
@@ -329,11 +395,15 @@ class ArrayPropertiesField extends PropertiesField {
|
|
|
329
395
|
itemsField: this.itemsField.toCompressedJSON(classesMap),
|
|
330
396
|
};
|
|
331
397
|
}
|
|
332
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Deserialize [[ArrayPropertiesField]] from JSON.
|
|
400
|
+
* @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
|
|
401
|
+
*/
|
|
333
402
|
static fromJSON(json, categories) {
|
|
334
|
-
|
|
335
|
-
|
|
403
|
+
return new ArrayPropertiesField({
|
|
404
|
+
...json,
|
|
336
405
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
406
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
337
407
|
itemsField: PropertiesField.fromJSON(json.itemsField, categories),
|
|
338
408
|
});
|
|
339
409
|
}
|
|
@@ -342,8 +412,8 @@ class ArrayPropertiesField extends PropertiesField {
|
|
|
342
412
|
* @public
|
|
343
413
|
*/
|
|
344
414
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
345
|
-
|
|
346
|
-
|
|
415
|
+
return new ArrayPropertiesField({
|
|
416
|
+
...json,
|
|
347
417
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
348
418
|
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
349
419
|
itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories),
|
|
@@ -356,22 +426,43 @@ exports.ArrayPropertiesField = ArrayPropertiesField;
|
|
|
356
426
|
* @public
|
|
357
427
|
*/
|
|
358
428
|
class StructPropertiesField extends PropertiesField {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
429
|
+
memberFields;
|
|
430
|
+
constructor(categoryOrProps, name, label, type, memberFields, isReadonly, priority, properties, editor, renderer) {
|
|
431
|
+
/* istanbul ignore next */
|
|
432
|
+
const props = "category" in categoryOrProps
|
|
433
|
+
? categoryOrProps
|
|
434
|
+
: {
|
|
435
|
+
category: categoryOrProps,
|
|
436
|
+
name: name,
|
|
437
|
+
label: label,
|
|
438
|
+
type: type,
|
|
439
|
+
isReadonly: isReadonly,
|
|
440
|
+
priority: priority,
|
|
441
|
+
editor,
|
|
442
|
+
renderer,
|
|
443
|
+
properties: properties,
|
|
444
|
+
memberFields: memberFields,
|
|
445
|
+
};
|
|
446
|
+
super(props);
|
|
447
|
+
this.memberFields = props.memberFields;
|
|
362
448
|
}
|
|
363
449
|
isStructPropertiesField() {
|
|
364
450
|
return true;
|
|
365
451
|
}
|
|
366
452
|
clone() {
|
|
367
|
-
const clone = new StructPropertiesField(this
|
|
453
|
+
const clone = new StructPropertiesField(this);
|
|
368
454
|
clone.rebuildParentship(this.parent);
|
|
369
455
|
return clone;
|
|
370
456
|
}
|
|
371
|
-
/**
|
|
457
|
+
/**
|
|
458
|
+
* Serialize this object to JSON.
|
|
459
|
+
* @deprecated in 5.x. Use [[toCompressedJSON]] instead.
|
|
460
|
+
*/
|
|
372
461
|
toJSON() {
|
|
373
462
|
return {
|
|
463
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
374
464
|
...super.toJSON(),
|
|
465
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
375
466
|
memberFields: this.memberFields.map((m) => m.toJSON()),
|
|
376
467
|
};
|
|
377
468
|
}
|
|
@@ -382,11 +473,15 @@ class StructPropertiesField extends PropertiesField {
|
|
|
382
473
|
memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),
|
|
383
474
|
};
|
|
384
475
|
}
|
|
385
|
-
/**
|
|
476
|
+
/**
|
|
477
|
+
* Deserialize [[StructPropertiesField]] from JSON.
|
|
478
|
+
* @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
|
|
479
|
+
*/
|
|
386
480
|
static fromJSON(json, categories) {
|
|
387
|
-
|
|
388
|
-
|
|
481
|
+
return new StructPropertiesField({
|
|
482
|
+
...json,
|
|
389
483
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
484
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
390
485
|
memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)),
|
|
391
486
|
});
|
|
392
487
|
}
|
|
@@ -395,8 +490,8 @@ class StructPropertiesField extends PropertiesField {
|
|
|
395
490
|
* @public
|
|
396
491
|
*/
|
|
397
492
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
398
|
-
|
|
399
|
-
|
|
493
|
+
return new StructPropertiesField({
|
|
494
|
+
...json,
|
|
400
495
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
401
496
|
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
402
497
|
memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)),
|
|
@@ -410,35 +505,64 @@ exports.StructPropertiesField = StructPropertiesField;
|
|
|
410
505
|
* @public
|
|
411
506
|
*/
|
|
412
507
|
class NestedContentField extends Field {
|
|
508
|
+
/** Information about an ECClass whose properties are nested inside this field */
|
|
509
|
+
contentClassInfo;
|
|
510
|
+
/** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */
|
|
511
|
+
pathToPrimaryClass;
|
|
512
|
+
/**
|
|
513
|
+
* Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)
|
|
514
|
+
* and content class of this field.
|
|
515
|
+
*
|
|
516
|
+
* The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up
|
|
517
|
+
* presentation rules for creating the content.
|
|
518
|
+
*/
|
|
519
|
+
relationshipMeaning;
|
|
413
520
|
/**
|
|
414
|
-
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
* @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)
|
|
423
|
-
* @param nestedFields Contained nested fields
|
|
424
|
-
* @param editor Property editor used to edit values of this field
|
|
425
|
-
* @param autoExpand Flag specifying whether field should be expanded
|
|
426
|
-
* @param relationshipMeaning RelationshipMeaning of the field
|
|
427
|
-
* @param renderer Property renderer used to render values of this field
|
|
521
|
+
* When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes
|
|
522
|
+
* has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is
|
|
523
|
+
* here to help.
|
|
524
|
+
*
|
|
525
|
+
* **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.
|
|
526
|
+
* When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,
|
|
527
|
+
* class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute
|
|
528
|
+
* will contain ID of class `B`, identifying that only this specific class has the relationship.
|
|
428
529
|
*/
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
530
|
+
actualPrimaryClassIds;
|
|
531
|
+
/** Contained nested fields */
|
|
532
|
+
nestedFields;
|
|
533
|
+
/** Flag specifying whether field should be expanded */
|
|
534
|
+
autoExpand;
|
|
535
|
+
constructor(categoryOrProps, name, label, type, isReadonly, priority, contentClassInfo, pathToPrimaryClass, nestedFields, editor, autoExpand, renderer) {
|
|
536
|
+
/* istanbul ignore next */
|
|
537
|
+
const props = "category" in categoryOrProps
|
|
538
|
+
? categoryOrProps
|
|
539
|
+
: {
|
|
540
|
+
category: categoryOrProps,
|
|
541
|
+
name: name,
|
|
542
|
+
label: label,
|
|
543
|
+
type: type,
|
|
544
|
+
isReadonly: isReadonly,
|
|
545
|
+
priority: priority,
|
|
546
|
+
editor,
|
|
547
|
+
renderer,
|
|
548
|
+
contentClassInfo: contentClassInfo,
|
|
549
|
+
pathToPrimaryClass: pathToPrimaryClass,
|
|
550
|
+
nestedFields: nestedFields,
|
|
551
|
+
autoExpand,
|
|
552
|
+
};
|
|
553
|
+
super(props);
|
|
554
|
+
this.contentClassInfo = props.contentClassInfo;
|
|
555
|
+
this.pathToPrimaryClass = props.pathToPrimaryClass;
|
|
556
|
+
this.relationshipMeaning = props.relationshipMeaning ?? RelatedPropertiesSpecification_1.RelationshipMeaning.RelatedInstance;
|
|
557
|
+
this.nestedFields = props.nestedFields;
|
|
558
|
+
this.autoExpand = props.autoExpand;
|
|
559
|
+
this.actualPrimaryClassIds = props.actualPrimaryClassIds ?? [];
|
|
437
560
|
}
|
|
438
561
|
clone() {
|
|
439
|
-
const clone = new NestedContentField(
|
|
440
|
-
|
|
441
|
-
|
|
562
|
+
const clone = new NestedContentField({
|
|
563
|
+
...this,
|
|
564
|
+
nestedFields: this.nestedFields.map((n) => n.clone()),
|
|
565
|
+
});
|
|
442
566
|
clone.rebuildParentship(this.parent);
|
|
443
567
|
return clone;
|
|
444
568
|
}
|
|
@@ -450,16 +574,21 @@ class NestedContentField extends Field {
|
|
|
450
574
|
getFieldByName(name, recurse) {
|
|
451
575
|
return (0, exports.getFieldByName)(this.nestedFields, name, recurse);
|
|
452
576
|
}
|
|
453
|
-
/**
|
|
577
|
+
/**
|
|
578
|
+
* Serialize this object to JSON.
|
|
579
|
+
* @deprecated in 5.x. Use [[toCompressedJSON]] instead.
|
|
580
|
+
*/
|
|
454
581
|
toJSON() {
|
|
455
582
|
return {
|
|
583
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
456
584
|
...super.toJSON(),
|
|
457
585
|
contentClassInfo: this.contentClassInfo,
|
|
458
586
|
pathToPrimaryClass: this.pathToPrimaryClass,
|
|
459
587
|
relationshipMeaning: this.relationshipMeaning,
|
|
460
588
|
actualPrimaryClassIds: this.actualPrimaryClassIds,
|
|
589
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
461
590
|
nestedFields: this.nestedFields.map((field) => field.toJSON()),
|
|
462
|
-
autoExpand:
|
|
591
|
+
...(this.autoExpand ? { autoExpand: true } : undefined),
|
|
463
592
|
};
|
|
464
593
|
}
|
|
465
594
|
/** Serialize this object to compressed JSON */
|
|
@@ -469,30 +598,19 @@ class NestedContentField extends Field {
|
|
|
469
598
|
return {
|
|
470
599
|
...super.toCompressedJSON(classesMap),
|
|
471
600
|
contentClassInfo: id,
|
|
601
|
+
relationshipMeaning: this.relationshipMeaning,
|
|
602
|
+
actualPrimaryClassIds: this.actualPrimaryClassIds,
|
|
472
603
|
pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => EC_1.RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),
|
|
473
604
|
nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),
|
|
605
|
+
...(this.autoExpand ? { autoExpand: true } : undefined),
|
|
474
606
|
};
|
|
475
607
|
}
|
|
476
|
-
/**
|
|
477
|
-
* Deserialize [[NestedContentField]] from JSON
|
|
478
|
-
* @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]
|
|
479
|
-
*/
|
|
480
|
-
static fromJSON(json, categories) {
|
|
481
|
-
if (!json) {
|
|
482
|
-
return undefined;
|
|
483
|
-
}
|
|
484
|
-
const field = Object.create(NestedContentField.prototype);
|
|
485
|
-
return Object.assign(field, json, this.fromCommonJSON(json, categories), {
|
|
486
|
-
nestedFields: json.nestedFields
|
|
487
|
-
.map((nestedFieldJson) => Field.fromJSON(nestedFieldJson, categories))
|
|
488
|
-
.filter((nestedField) => !!nestedField),
|
|
489
|
-
});
|
|
490
|
-
}
|
|
491
608
|
/** Deserialize a [[NestedContentField]] from compressed JSON. */
|
|
492
609
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
493
610
|
(0, core_bentley_1.assert)(classesMap.hasOwnProperty(json.contentClassInfo));
|
|
494
|
-
|
|
495
|
-
|
|
611
|
+
return new NestedContentField({
|
|
612
|
+
...json,
|
|
613
|
+
...fromNestedContentFieldJSON(json, categories),
|
|
496
614
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
497
615
|
nestedFields: json.nestedFields
|
|
498
616
|
.map((nestedFieldJson) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))
|
|
@@ -501,15 +619,6 @@ class NestedContentField extends Field {
|
|
|
501
619
|
pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => EC_1.RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),
|
|
502
620
|
});
|
|
503
621
|
}
|
|
504
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
505
|
-
static fromCommonJSON(json, categories) {
|
|
506
|
-
return {
|
|
507
|
-
category: this.getCategoryFromFieldJson(json, categories),
|
|
508
|
-
relationshipMeaning: json.relationshipMeaning ?? RelatedPropertiesSpecification_1.RelationshipMeaning.RelatedInstance,
|
|
509
|
-
actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],
|
|
510
|
-
autoExpand: json.autoExpand,
|
|
511
|
-
};
|
|
512
|
-
}
|
|
513
622
|
/** Resets parent of this field and all nested fields. */
|
|
514
623
|
resetParentship() {
|
|
515
624
|
super.resetParentship();
|
|
@@ -601,4 +710,19 @@ function fromCompressedPropertyInfoJSON(compressedPropertyJSON, classesMap) {
|
|
|
601
710
|
...(navigationPropertyInfo ? { navigationPropertyInfo: EC_1.NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),
|
|
602
711
|
};
|
|
603
712
|
}
|
|
713
|
+
function getCategoryFromFieldJson(fieldJson, categories) {
|
|
714
|
+
const category = categories.find((c) => c.name === fieldJson.category);
|
|
715
|
+
if (!category) {
|
|
716
|
+
throw new Error_1.PresentationError(Error_1.PresentationStatus.InvalidArgument, `Invalid content field category`);
|
|
717
|
+
}
|
|
718
|
+
return category;
|
|
719
|
+
}
|
|
720
|
+
function fromNestedContentFieldJSON(json, categories) {
|
|
721
|
+
return {
|
|
722
|
+
category: getCategoryFromFieldJson(json, categories),
|
|
723
|
+
relationshipMeaning: json.relationshipMeaning ?? RelatedPropertiesSpecification_1.RelationshipMeaning.RelatedInstance,
|
|
724
|
+
actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],
|
|
725
|
+
autoExpand: json.autoExpand,
|
|
726
|
+
};
|
|
727
|
+
}
|
|
604
728
|
//# sourceMappingURL=Fields.js.map
|