@itwin/presentation-common 5.1.0-dev.9 → 5.1.1
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 +96 -1
- package/Ruleset.schema.json +3 -3
- package/lib/assets/locales/en/Presentation.json +19 -19
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +9 -2
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.js +1 -0
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.d.ts +1 -1
- package/lib/cjs/presentation-common/Error.js +1 -1
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.d.ts +24 -2
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js +97 -104
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +3 -3
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +19 -19
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +17 -17
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +14 -14
- package/lib/cjs/presentation-common/content/Fields.js +9 -9
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +2 -2
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +1 -1
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +3 -3
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common-internal.js.map +1 -1
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +9 -2
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.js +1 -0
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.d.ts +1 -1
- package/lib/esm/presentation-common/Error.js +1 -1
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts +24 -2
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js +97 -104
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +3 -3
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +19 -19
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +17 -17
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/esm/presentation-common/content/Editor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +14 -14
- package/lib/esm/presentation-common/content/Fields.js +9 -9
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +2 -2
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +1 -1
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +2 -2
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +3 -3
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common-internal.js.map +1 -1
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/Presentation.json +19 -19
- package/package.json +19 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Editor.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","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\n/**\n * A data structure which describes property editor used\n * for a content [[Field]].\n *\n * @public\n */\nexport interface EditorDescription {\n /** Unique name */\n name: string;\n /** Editor-specific parameters */\n params?: any;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Editor.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\n/**\r\n * A data structure which describes property editor used\r\n * for a content [[Field]].\r\n *\r\n * @public\r\n */\r\nexport interface EditorDescription {\r\n /** Unique name */\r\n name: string;\r\n /** Editor-specific parameters */\r\n params?: any;\r\n}\r\n"]}
|
|
@@ -130,7 +130,7 @@ export declare class Field {
|
|
|
130
130
|
* @param editor Property editor used to edit values of this field
|
|
131
131
|
* @param renderer Property renderer used to render values of this field
|
|
132
132
|
* @param extendedData Extended data associated with this field
|
|
133
|
-
* @deprecated in 5.0. Use an overload with `FieldProps` instead.
|
|
133
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `FieldProps` instead.
|
|
134
134
|
*/
|
|
135
135
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, editor?: EditorDescription, renderer?: RendererDescription, extendedData?: {
|
|
136
136
|
[key: string]: unknown;
|
|
@@ -152,7 +152,7 @@ export declare class Field {
|
|
|
152
152
|
clone(): Field;
|
|
153
153
|
/**
|
|
154
154
|
* Serialize this object to JSON.
|
|
155
|
-
* @deprecated in 5.
|
|
155
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
156
156
|
*/
|
|
157
157
|
toJSON(): FieldJSON;
|
|
158
158
|
/** Serialize this object to compressed JSON */
|
|
@@ -161,7 +161,7 @@ export declare class Field {
|
|
|
161
161
|
}): FieldJSON<string>;
|
|
162
162
|
/**
|
|
163
163
|
* Deserialize [[Field]] from JSON.
|
|
164
|
-
* @deprecated in 5.
|
|
164
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
165
165
|
*/
|
|
166
166
|
static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined;
|
|
167
167
|
/** Deserialize a [[Field]] from compressed JSON. */
|
|
@@ -212,7 +212,7 @@ export declare class PropertiesField extends Field {
|
|
|
212
212
|
* @param properties A list of properties this field is created from
|
|
213
213
|
* @param editor Property editor used to edit values of this field
|
|
214
214
|
* @param renderer Property renderer used to render values of this field
|
|
215
|
-
* @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.
|
|
215
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `PropertiesFieldProps` instead.
|
|
216
216
|
*/
|
|
217
217
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
218
218
|
/** Creates an instance of [[PropertiesField]]. */
|
|
@@ -224,7 +224,7 @@ export declare class PropertiesField extends Field {
|
|
|
224
224
|
clone(): PropertiesField;
|
|
225
225
|
/**
|
|
226
226
|
* Serialize this object to JSON
|
|
227
|
-
* @deprecated in 5.
|
|
227
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
228
228
|
*/
|
|
229
229
|
toJSON(): PropertiesFieldJSON;
|
|
230
230
|
/** Serialize this object to compressed JSON */
|
|
@@ -233,7 +233,7 @@ export declare class PropertiesField extends Field {
|
|
|
233
233
|
}): PropertiesFieldJSON<string>;
|
|
234
234
|
/**
|
|
235
235
|
* Deserialize [[PropertiesField]] from JSON.
|
|
236
|
-
* @deprecated in 5.
|
|
236
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
237
237
|
*/
|
|
238
238
|
static fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined;
|
|
239
239
|
/**
|
|
@@ -269,7 +269,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
269
269
|
itemsField: PropertiesField;
|
|
270
270
|
/**
|
|
271
271
|
* Creates an instance of [[ArrayPropertiesField]].
|
|
272
|
-
* @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.
|
|
272
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `ArrayPropertiesFieldProps` instead.
|
|
273
273
|
*/
|
|
274
274
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, itemsField: PropertiesField, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
275
275
|
/** Creates an instance of [[ArrayPropertiesField]]. */
|
|
@@ -278,7 +278,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
278
278
|
clone(): ArrayPropertiesField;
|
|
279
279
|
/**
|
|
280
280
|
* Serialize this object to JSON.
|
|
281
|
-
* @deprecated in 5.
|
|
281
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
282
282
|
*/
|
|
283
283
|
toJSON(): ArrayPropertiesFieldJSON;
|
|
284
284
|
/** Serialize this object to compressed JSON */
|
|
@@ -287,7 +287,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
287
287
|
}): ArrayPropertiesFieldJSON<string>;
|
|
288
288
|
/**
|
|
289
289
|
* Deserialize [[ArrayPropertiesField]] from JSON.
|
|
290
|
-
* @deprecated in 5.
|
|
290
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
291
291
|
*/
|
|
292
292
|
static fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField;
|
|
293
293
|
/**
|
|
@@ -313,7 +313,7 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
313
313
|
memberFields: PropertiesField[];
|
|
314
314
|
/**
|
|
315
315
|
* Creates an instance of [[StructPropertiesField]].
|
|
316
|
-
* @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.
|
|
316
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `StructPropertiesFieldProps` instead.
|
|
317
317
|
*/
|
|
318
318
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, memberFields: PropertiesField[], isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
319
319
|
/** Creates an instance of [[StructPropertiesField]]. */
|
|
@@ -322,7 +322,7 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
322
322
|
clone(): StructPropertiesField;
|
|
323
323
|
/**
|
|
324
324
|
* Serialize this object to JSON.
|
|
325
|
-
* @deprecated in 5.
|
|
325
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
326
326
|
*/
|
|
327
327
|
toJSON(): StructPropertiesFieldJSON;
|
|
328
328
|
/** Serialize this object to compressed JSON */
|
|
@@ -331,7 +331,7 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
331
331
|
}): StructPropertiesFieldJSON<string>;
|
|
332
332
|
/**
|
|
333
333
|
* Deserialize [[StructPropertiesField]] from JSON.
|
|
334
|
-
* @deprecated in 5.
|
|
334
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
335
335
|
*/
|
|
336
336
|
static fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField;
|
|
337
337
|
/**
|
|
@@ -423,7 +423,7 @@ export declare class NestedContentField extends Field {
|
|
|
423
423
|
* @param autoExpand Flag specifying whether field should be expanded
|
|
424
424
|
* @param relationshipMeaning RelationshipMeaning of the field
|
|
425
425
|
* @param renderer Property renderer used to render values of this field
|
|
426
|
-
* @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.
|
|
426
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `NestedContentFieldProps` instead.
|
|
427
427
|
*/
|
|
428
428
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, contentClassInfo: ClassInfo, pathToPrimaryClass: RelationshipPath, nestedFields: Field[], editor?: EditorDescription, autoExpand?: boolean, renderer?: RendererDescription);
|
|
429
429
|
/** Creates an instance of [[NestedContentField]]. */
|
|
@@ -437,7 +437,7 @@ export declare class NestedContentField extends Field {
|
|
|
437
437
|
getFieldByName(name: string, recurse?: boolean): Field | undefined;
|
|
438
438
|
/**
|
|
439
439
|
* Serialize this object to JSON.
|
|
440
|
-
* @deprecated in 5.
|
|
440
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
441
441
|
*/
|
|
442
442
|
toJSON(): NestedContentFieldJSON;
|
|
443
443
|
/** Serialize this object to compressed JSON */
|
|
@@ -100,7 +100,7 @@ export class Field {
|
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* Serialize this object to JSON.
|
|
103
|
-
* @deprecated in 5.
|
|
103
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
104
104
|
*/
|
|
105
105
|
toJSON() {
|
|
106
106
|
return this.toCompressedJSON({});
|
|
@@ -121,7 +121,7 @@ export class Field {
|
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* Deserialize [[Field]] from JSON.
|
|
124
|
-
* @deprecated in 5.
|
|
124
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
125
125
|
*/
|
|
126
126
|
static fromJSON(json, categories) {
|
|
127
127
|
if (!json) {
|
|
@@ -233,7 +233,7 @@ export class PropertiesField extends Field {
|
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
235
|
* Serialize this object to JSON
|
|
236
|
-
* @deprecated in 5.
|
|
236
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
237
237
|
*/
|
|
238
238
|
toJSON() {
|
|
239
239
|
return {
|
|
@@ -251,7 +251,7 @@ export class PropertiesField extends Field {
|
|
|
251
251
|
}
|
|
252
252
|
/**
|
|
253
253
|
* Deserialize [[PropertiesField]] from JSON.
|
|
254
|
-
* @deprecated in 5.
|
|
254
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
255
255
|
*/
|
|
256
256
|
static fromJSON(json, categories) {
|
|
257
257
|
if (!json) {
|
|
@@ -373,7 +373,7 @@ export class ArrayPropertiesField extends PropertiesField {
|
|
|
373
373
|
}
|
|
374
374
|
/**
|
|
375
375
|
* Serialize this object to JSON.
|
|
376
|
-
* @deprecated in 5.
|
|
376
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
377
377
|
*/
|
|
378
378
|
toJSON() {
|
|
379
379
|
return {
|
|
@@ -392,7 +392,7 @@ export class ArrayPropertiesField extends PropertiesField {
|
|
|
392
392
|
}
|
|
393
393
|
/**
|
|
394
394
|
* Deserialize [[ArrayPropertiesField]] from JSON.
|
|
395
|
-
* @deprecated in 5.
|
|
395
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
396
396
|
*/
|
|
397
397
|
static fromJSON(json, categories) {
|
|
398
398
|
return new ArrayPropertiesField({
|
|
@@ -450,7 +450,7 @@ export class StructPropertiesField extends PropertiesField {
|
|
|
450
450
|
}
|
|
451
451
|
/**
|
|
452
452
|
* Serialize this object to JSON.
|
|
453
|
-
* @deprecated in 5.
|
|
453
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
454
454
|
*/
|
|
455
455
|
toJSON() {
|
|
456
456
|
return {
|
|
@@ -469,7 +469,7 @@ export class StructPropertiesField extends PropertiesField {
|
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
471
|
* Deserialize [[StructPropertiesField]] from JSON.
|
|
472
|
-
* @deprecated in 5.
|
|
472
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
473
473
|
*/
|
|
474
474
|
static fromJSON(json, categories) {
|
|
475
475
|
return new StructPropertiesField({
|
|
@@ -569,7 +569,7 @@ export class NestedContentField extends Field {
|
|
|
569
569
|
}
|
|
570
570
|
/**
|
|
571
571
|
* Serialize this object to JSON.
|
|
572
|
-
* @deprecated in 5.
|
|
572
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
573
573
|
*/
|
|
574
574
|
toJSON() {
|
|
575
575
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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mBAAmB,CAAC,eAAe;QACpF,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,IAAI,EAAE;QACvD,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,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 Content\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n ClassInfo,\n CompressedClassInfoJSON,\n NavigationPropertyInfo,\n PropertyInfo,\n PropertyInfoJSON,\n RelatedClassInfo,\n RelationshipPath,\n RelationshipPathJSON,\n StrippedRelationshipPath,\n} from \"../EC.js\";\nimport { PresentationError, PresentationStatus } from \"../Error.js\";\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification.js\";\nimport { omitUndefined } from \"../Utils.js\";\nimport { CategoryDescription } from \"./Category.js\";\nimport { EditorDescription } from \"./Editor.js\";\nimport { Property, PropertyJSON } from \"./Property.js\";\nimport { RendererDescription } from \"./Renderer.js\";\nimport { TypeDescription } from \"./TypeDescription.js\";\n\n/**\n * Data structure for a [[Field]] serialized to JSON.\n * @public\n */\nexport interface BaseFieldJSON {\n category: string;\n name: string;\n label: string;\n type: TypeDescription;\n isReadonly: boolean;\n priority: number;\n renderer?: RendererDescription;\n editor?: EditorDescription;\n extendedData?: { [key: string]: unknown };\n}\n\n/**\n * Data structure for a [[PropertiesField]] serialized to JSON.\n * @public\n */\n\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\n properties: PropertyJSON<TClassInfoJSON>[];\n}\n\n/**\n * Data structure for a [[ArrayPropertiesField]] serialized to JSON.\n * @public\n */\nexport interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\n itemsField: PropertiesFieldJSON<TClassInfoJSON>;\n}\n\n/**\n * Data structure for a [[StructPropertiesField]] serialized to JSON.\n * @public\n */\nexport interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\n memberFields: PropertiesFieldJSON<TClassInfoJSON>[];\n}\n\n/**\n * Data structure for a [[NestedContentField]] serialized to JSON.\n * @public\n */\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\n contentClassInfo: TClassInfoJSON;\n pathToPrimaryClass: RelationshipPathJSON<TClassInfoJSON>;\n relationshipMeaning?: RelationshipMeaning;\n actualPrimaryClassIds?: Id64String[];\n autoExpand?: boolean;\n nestedFields: FieldJSON<TClassInfoJSON>[];\n}\n\n/**\n * JSON representation of a [[Field]]\n * @public\n */\nexport type FieldJSON<TClassInfoJSON = ClassInfo> =\n | BaseFieldJSON\n | PropertiesFieldJSON<TClassInfoJSON>\n | ArrayPropertiesFieldJSON<TClassInfoJSON>\n | StructPropertiesFieldJSON<TClassInfoJSON>\n | NestedContentFieldJSON<TClassInfoJSON>;\n\n/** Is supplied field a properties field. */\nfunction isPropertiesField(field: FieldJSON): field is PropertiesFieldJSON<any>;\nfunction isPropertiesField(field: Field): field is PropertiesField;\nfunction isPropertiesField(field: FieldJSON | Field) {\n return !!(field as any).properties;\n}\n\n/** Is supplied field an array properties field. */\nfunction isArrayPropertiesField(field: FieldJSON): field is ArrayPropertiesFieldJSON<any>;\nfunction isArrayPropertiesField(field: Field): field is ArrayPropertiesField;\nfunction isArrayPropertiesField(field: FieldJSON | Field) {\n return !!(field as ArrayPropertiesFieldJSON).itemsField;\n}\n\n/** Is supplied field an array properties field. */\nfunction isStructPropertiesField(field: FieldJSON): field is StructPropertiesFieldJSON<any>;\nfunction isStructPropertiesField(field: Field): field is StructPropertiesField;\nfunction isStructPropertiesField(field: FieldJSON | Field) {\n return !!(field as StructPropertiesFieldJSON).memberFields;\n}\n\n/** Is supplied field a nested content field. */\nfunction isNestedContentField(field: FieldJSON): field is NestedContentFieldJSON<any>;\nfunction isNestedContentField(field: Field): field is NestedContentField;\nfunction isNestedContentField(field: FieldJSON | Field) {\n return !!(field as any).nestedFields;\n}\n\n/**\n * Props for creating [[Field]].\n * @public\n */\ninterface FieldProps {\n /** Category information */\n category: CategoryDescription;\n /** Unique name */\n name: string;\n /** Display label */\n label: string;\n /** Description of this field's values data type */\n type: TypeDescription;\n /** Are values in this field read-only */\n isReadonly: boolean;\n /** Priority of the field */\n priority: number;\n /** Property editor used to edit values of this field */\n editor?: EditorDescription;\n /** Property renderer used to render values of this field */\n renderer?: RendererDescription;\n /** Extended data associated with this field */\n extendedData?: { [key: string]: unknown };\n}\n\n/**\n * Describes a single content field. A field is usually represented as a grid column\n * or a property pane row.\n *\n * @public\n */\nexport class Field {\n /** Category information */\n public category: CategoryDescription;\n /** Unique name */\n public name: string;\n /** Display label */\n public label: string;\n /** Description of this field's values data type */\n public type: TypeDescription;\n /** Are values in this field read-only */\n public isReadonly: boolean;\n /** Priority of the field. Higher priority fields should appear first in the UI */\n public priority: number;\n /** Property renderer used to render values of this field */\n public renderer?: RendererDescription;\n /** Property editor used to edit values of this field */\n public editor?: EditorDescription;\n /** Extended data associated with this field */\n public extendedData?: { [key: string]: unknown };\n /** Parent field */\n private _parent?: NestedContentField;\n\n /**\n * Creates an instance of [[Field]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param editor Property editor used to edit values of this field\n * @param renderer Property renderer used to render values of this field\n * @param extendedData Extended data associated with this field\n * @deprecated in 5.0. Use an overload with `FieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n editor?: EditorDescription,\n renderer?: RendererDescription,\n extendedData?: { [key: string]: unknown },\n );\n /** Creates an instance of [[Field]]. */\n public constructor(props: FieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | FieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n editor?: EditorDescription,\n renderer?: RendererDescription,\n extendedData?: { [key: string]: unknown },\n ) {\n /* c8 ignore next 14 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n extendedData,\n };\n this.category = props.category;\n this.name = props.name;\n this.label = props.label;\n this.type = props.type;\n this.isReadonly = props.isReadonly;\n this.priority = props.priority;\n this.editor = props.editor;\n this.renderer = props.renderer;\n this.extendedData = props.extendedData;\n }\n\n /**\n * Is this a [[PropertiesField]]\n */\n public isPropertiesField(): this is PropertiesField {\n return isPropertiesField(this);\n }\n\n /**\n * Is this a [[NestedContentField]]\n */\n public isNestedContentField(): this is NestedContentField {\n return isNestedContentField(this);\n }\n\n /**\n * Get parent\n */\n public get parent(): NestedContentField | undefined {\n return this._parent;\n }\n\n public clone() {\n const clone = new Field(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public toJSON(): FieldJSON {\n return this.toCompressedJSON({});\n }\n\n /** Serialize this object to compressed JSON */\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\n return omitUndefined({\n category: this.category.name,\n name: this.name,\n label: this.label,\n type: this.type,\n isReadonly: this.isReadonly,\n priority: this.priority,\n renderer: this.renderer,\n editor: this.editor,\n extendedData: this.extendedData,\n });\n }\n\n /**\n * Deserialize [[Field]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return PropertiesField.fromJSON(json, categories);\n }\n if (isNestedContentField(json)) {\n return new NestedContentField({\n ...json,\n ...fromNestedContentFieldJSON(json, categories),\n nestedFields: json.nestedFields\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\n });\n }\n return new Field({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n /** Deserialize a [[Field]] from compressed JSON. */\n public static fromCompressedJSON(\n json: FieldJSON<string> | undefined,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n if (isNestedContentField(json)) {\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\n }\n return new Field({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, categories: CategoryDescription[]): CategoryDescription {\n return getCategoryFromFieldJson(fieldJson, categories);\n }\n\n /** Resets field's parent. */\n public resetParentship(): void {\n this._parent = undefined;\n }\n\n /** Sets provided [[NestedContentField]] as parent of this field. */\n public rebuildParentship(parentField?: NestedContentField): void {\n this._parent = parentField;\n }\n\n /**\n * Get descriptor for this field.\n * @public\n */\n public getFieldDescriptor(): FieldDescriptor {\n return {\n type: FieldDescriptorType.Name,\n fieldName: this.name,\n } as NamedFieldDescriptor;\n }\n\n /**\n * Checks if this field matches given field descriptor\n * @see [[getFieldDescriptor]]\n */\n public matchesDescriptor(descriptor: FieldDescriptor) {\n return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;\n }\n}\n\n/**\n * Props for creating [[PropertiesField]].\n * @public\n */\ninterface PropertiesFieldProps extends FieldProps {\n /** A list of properties this field is created from */\n properties: Property[];\n}\n\n/**\n * Describes a content field that's based on one or more similar\n * EC properties.\n *\n * @public\n */\nexport class PropertiesField extends Field {\n /** A list of properties this field is created from */\n public properties: Property[];\n\n /**\n * Creates an instance of [[PropertiesField]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param properties A list of properties this field is created from\n * @param editor Property editor used to edit values of this field\n * @param renderer Property renderer used to render values of this field\n * @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[PropertiesField]]. */\n public constructor(props: PropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | PropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 14 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n };\n super(props);\n this.properties = props.properties;\n }\n\n /** Is this a an array property field */\n public isArrayPropertiesField(): this is ArrayPropertiesField {\n return false;\n }\n /** Is this a an struct property field */\n public isStructPropertiesField(): this is StructPropertiesField {\n return false;\n }\n\n public override clone() {\n const clone = new PropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): PropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n properties: this.properties,\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): PropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),\n };\n }\n\n /**\n * Deserialize [[PropertiesField]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\n if (!json) {\n return undefined;\n }\n if (isArrayPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return ArrayPropertiesField.fromJSON(json, categories);\n }\n if (isStructPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return StructPropertiesField.fromJSON(json, categories);\n }\n return new PropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n /**\n * Deserialize a [[PropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: PropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): PropertiesField | undefined {\n if (isArrayPropertiesField(json)) {\n return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n if (isStructPropertiesField(json)) {\n return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n return new PropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n });\n }\n\n /**\n * Get descriptor for this field.\n * @public\n */\n public override getFieldDescriptor(): FieldDescriptor {\n const pathFromPropertyToSelectClass = new Array<RelatedClassInfo>();\n let currAncestor = this.parent;\n while (currAncestor) {\n pathFromPropertyToSelectClass.push(...currAncestor.pathToPrimaryClass);\n currAncestor = currAncestor.parent;\n }\n return {\n type: FieldDescriptorType.Properties,\n pathFromSelectToPropertyClass: RelationshipPath.strip(RelationshipPath.reverse(pathFromPropertyToSelectClass)),\n properties: this.properties.map((p) => ({\n class: p.property.classInfo.name,\n name: p.property.name,\n })),\n } as PropertiesFieldDescriptor;\n }\n\n /**\n * Checks if this field matches given field descriptor\n * @see [[getFieldDescriptor]]\n */\n public override matchesDescriptor(descriptor: FieldDescriptor) {\n if (!FieldDescriptor.isProperties(descriptor)) {\n return false;\n }\n\n // ensure at least one descriptor property matches at least one property of this field\n if (\n !this.properties.some(({ property: fieldProperty }) =>\n descriptor.properties.some(\n (descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class,\n ),\n )\n ) {\n return false;\n }\n\n // ensure path from select to property in field and in descriptor matches\n let stepsCount = 0;\n let currAncestor = this.parent;\n while (currAncestor) {\n const pathFromCurrentToItsParent = RelationshipPath.reverse(currAncestor.pathToPrimaryClass);\n for (const step of pathFromCurrentToItsParent) {\n if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {\n return false;\n }\n if (!RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {\n return false;\n }\n ++stepsCount;\n }\n currAncestor = currAncestor.parent;\n }\n return true;\n }\n}\n\n/**\n * Props for creating [[ArrayPropertiesField]].\n * @public\n */\ninterface ArrayPropertiesFieldProps extends PropertiesFieldProps {\n itemsField: PropertiesField;\n}\n\n/**\n * Describes a content field that's based on one or more similar EC array properties.\n * @public\n */\nexport class ArrayPropertiesField extends PropertiesField {\n public itemsField: PropertiesField;\n\n /**\n * Creates an instance of [[ArrayPropertiesField]].\n * @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n itemsField: PropertiesField,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[ArrayPropertiesField]]. */\n public constructor(props: ArrayPropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | ArrayPropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n itemsField?: PropertiesField,\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 15 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n itemsField: itemsField!,\n };\n super(props);\n this.itemsField = props.itemsField;\n }\n\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new ArrayPropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): ArrayPropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n itemsField: this.itemsField.toJSON(),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): ArrayPropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n itemsField: this.itemsField.toCompressedJSON(classesMap),\n };\n }\n\n /**\n * Deserialize [[ArrayPropertiesField]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\n return new ArrayPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n itemsField: PropertiesField.fromJSON(json.itemsField, categories)!,\n });\n }\n\n /**\n * Deserialize an [[ArrayPropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: ArrayPropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): ArrayPropertiesField {\n return new ArrayPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories)!,\n });\n }\n}\n\n/**\n * Props for creating [[StructPropertiesField]].\n * @public\n */\ninterface StructPropertiesFieldProps extends PropertiesFieldProps {\n memberFields: PropertiesField[];\n}\n\n/**\n * Describes a content field that's based on one or more similar EC struct properties.\n * @public\n */\nexport class StructPropertiesField extends PropertiesField {\n public memberFields: PropertiesField[];\n\n /**\n * Creates an instance of [[StructPropertiesField]].\n * @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n memberFields: PropertiesField[],\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[StructPropertiesField]]. */\n public constructor(props: StructPropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | StructPropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n memberFields?: PropertiesField[],\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 15 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n memberFields: memberFields!,\n };\n super(props);\n this.memberFields = props.memberFields;\n }\n\n public override isStructPropertiesField(): this is StructPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new StructPropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): StructPropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n memberFields: this.memberFields.map((m) => m.toJSON()),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): StructPropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),\n };\n }\n\n /**\n * Deserialize [[StructPropertiesField]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\n return new StructPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)!),\n });\n }\n\n /**\n * Deserialize a [[StructPropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: StructPropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): StructPropertiesField {\n return new StructPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)!),\n });\n }\n}\n\n/**\n * Props for creating [[NestedContentField]].\n * @public\n */\ninterface NestedContentFieldProps extends FieldProps {\n /** Information about an ECClass whose properties are nested inside this field */\n contentClassInfo: ClassInfo;\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\n pathToPrimaryClass: RelationshipPath;\n /**\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\n * and content class of this field.\n *\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\n * presentation rules for creating the content.\n */\n relationshipMeaning?: RelationshipMeaning;\n /**\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\n * here to help.\n *\n * **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`.\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\n */\n actualPrimaryClassIds?: Id64String[];\n /** Contained nested fields */\n nestedFields: Field[];\n /** Flag specifying whether field should be expanded */\n autoExpand?: boolean;\n}\n\n/**\n * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).\n *\n * @public\n */\nexport class NestedContentField extends Field {\n /** Information about an ECClass whose properties are nested inside this field */\n public contentClassInfo: ClassInfo;\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\n public pathToPrimaryClass: RelationshipPath;\n /**\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\n * and content class of this field.\n *\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\n * presentation rules for creating the content.\n */\n public relationshipMeaning: RelationshipMeaning;\n /**\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\n * here to help.\n *\n * **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`.\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\n */\n public actualPrimaryClassIds: Id64String[];\n /** Contained nested fields */\n public nestedFields: Field[];\n /** Flag specifying whether field should be expanded */\n public autoExpand?: boolean;\n\n /**\n * Creates an instance of [[NestedContentField]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param contentClassInfo Information about an ECClass whose properties are nested inside this field\n * @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)\n * @param nestedFields Contained nested fields\n * @param editor Property editor used to edit values of this field\n * @param autoExpand Flag specifying whether field should be expanded\n * @param relationshipMeaning RelationshipMeaning of the field\n * @param renderer Property renderer used to render values of this field\n * @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n contentClassInfo: ClassInfo,\n pathToPrimaryClass: RelationshipPath,\n nestedFields: Field[],\n editor?: EditorDescription,\n autoExpand?: boolean,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[NestedContentField]]. */\n public constructor(props: NestedContentFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | NestedContentFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n contentClassInfo?: ClassInfo,\n pathToPrimaryClass?: RelationshipPath,\n nestedFields?: Field[],\n editor?: EditorDescription,\n autoExpand?: boolean,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 17 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n contentClassInfo: contentClassInfo!,\n pathToPrimaryClass: pathToPrimaryClass!,\n nestedFields: nestedFields!,\n autoExpand,\n };\n super(props);\n this.contentClassInfo = props.contentClassInfo;\n this.pathToPrimaryClass = props.pathToPrimaryClass;\n this.relationshipMeaning = props.relationshipMeaning ?? RelationshipMeaning.RelatedInstance;\n this.nestedFields = props.nestedFields;\n this.autoExpand = props.autoExpand;\n this.actualPrimaryClassIds = props.actualPrimaryClassIds ?? [];\n }\n\n public override clone() {\n const clone = new NestedContentField({\n ...this,\n nestedFields: this.nestedFields.map((n) => n.clone()),\n });\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Get field by its name\n * @param name Name of the field to find\n * @param recurse Recurse into nested fields\n */\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\n return getFieldByName(this.nestedFields, name, recurse);\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): NestedContentFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n contentClassInfo: this.contentClassInfo,\n pathToPrimaryClass: this.pathToPrimaryClass,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\n ...(this.autoExpand ? { autoExpand: true } : undefined),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): NestedContentFieldJSON<string> {\n const { id, ...leftOverInfo } = this.contentClassInfo;\n classesMap[id] = leftOverInfo;\n return {\n ...super.toCompressedJSON(classesMap),\n contentClassInfo: id,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\n ...(this.autoExpand ? { autoExpand: true } : undefined),\n };\n }\n\n /** Deserialize a [[NestedContentField]] from compressed JSON. */\n public static override fromCompressedJSON(\n json: NestedContentFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ) {\n assert(classesMap.hasOwnProperty(json.contentClassInfo));\n return new NestedContentField({\n ...json,\n ...fromNestedContentFieldJSON(json, categories),\n category: this.getCategoryFromFieldJson(json, categories),\n nestedFields: json.nestedFields\n .map((nestedFieldJson: FieldJSON) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\n contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },\n pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),\n });\n }\n\n /** Resets parent of this field and all nested fields. */\n public override resetParentship(): void {\n super.resetParentship();\n for (const nestedField of this.nestedFields) {\n nestedField.resetParentship();\n }\n }\n\n /**\n * Sets provided [[NestedContentField]] as parent of this fields and recursively updates\n * all nested fields parents.\n */\n public override rebuildParentship(parentField?: NestedContentField): void {\n super.rebuildParentship(parentField);\n for (const nestedField of this.nestedFields) {\n nestedField.rebuildParentship(this);\n }\n }\n}\n\n/** @internal */\nexport const getFieldByName = (fields: Field[], name: string | undefined, recurse?: boolean): Field | undefined => {\n if (name) {\n for (const field of fields) {\n if (field.name === name) {\n return field;\n }\n\n if (recurse && field.isNestedContentField()) {\n const nested = getFieldByName(field.nestedFields, name, recurse);\n if (nested) {\n return nested;\n }\n }\n }\n }\n return undefined;\n};\n\n/** @internal */\nexport const getFieldByDescriptor = (fields: Field[], fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined => {\n for (const field of fields) {\n if (field.matchesDescriptor(fieldDescriptor)) {\n return field;\n }\n\n if (recurse && field.isNestedContentField()) {\n const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);\n if (nested) {\n return nested;\n }\n }\n }\n return undefined;\n};\n\n/**\n * Types of different field descriptors.\n * @public\n */\nexport enum FieldDescriptorType {\n Name = \"name\",\n Properties = \"properties\",\n}\n\n/**\n * Base for a field descriptor\n * @public\n */\nexport interface FieldDescriptorBase {\n type: FieldDescriptorType;\n}\n\n/**\n * A union of all possible field descriptor types\n * @public\n */\nexport type FieldDescriptor = NamedFieldDescriptor | PropertiesFieldDescriptor;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace FieldDescriptor {\n /** Is this a named field descriptor */\n export function isNamed(d: FieldDescriptor): d is NamedFieldDescriptor {\n return d.type === FieldDescriptorType.Name;\n }\n /** Is this a properties field descriptor */\n export function isProperties(d: FieldDescriptor): d is PropertiesFieldDescriptor {\n return d.type === FieldDescriptorType.Properties;\n }\n}\n\n/**\n * Field descriptor that identifies a content field by its unique name.\n * @public\n */\nexport interface NamedFieldDescriptor extends FieldDescriptorBase {\n type: FieldDescriptorType.Name;\n fieldName: string;\n}\n\n/**\n * Field descriptor that identifies a properties field using a list of\n * properties that the field contains.\n * @public\n */\nexport interface PropertiesFieldDescriptor extends FieldDescriptorBase {\n type: FieldDescriptorType.Properties;\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\n /**\n * A list of properties that describe the field. At least one property in the list must\n * match at least one property in the field for the descriptor to be considered matching.\n */\n properties: Array<{\n /** Full class name */\n class: string;\n /** Property name */\n name: string;\n }>;\n}\n\nfunction fromCompressedPropertyJSON(compressedPropertyJSON: PropertyJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): Property {\n return {\n property: fromCompressedPropertyInfoJSON(compressedPropertyJSON.property, classesMap),\n };\n}\n\nfunction fromCompressedPropertyInfoJSON(compressedPropertyJSON: PropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfo {\n assert(classesMap.hasOwnProperty(compressedPropertyJSON.classInfo));\n\n const { navigationPropertyInfo, ...leftOverPropertyJSON } = compressedPropertyJSON;\n\n return {\n ...leftOverPropertyJSON,\n classInfo: { id: compressedPropertyJSON.classInfo, ...classesMap[compressedPropertyJSON.classInfo] },\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n}\n\nfunction getCategoryFromFieldJson(fieldJson: { category: string }, categories: CategoryDescription[]): CategoryDescription {\n const category = categories.find((c) => c.name === fieldJson.category);\n if (!category) {\n throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);\n }\n return category;\n}\n\nfunction fromNestedContentFieldJSON(json: NestedContentFieldJSON<ClassInfo | string>, categories: CategoryDescription[]) {\n return {\n category: getCategoryFromFieldJson(json, categories),\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\n autoExpand: json.autoExpand,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Fields.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAGL,sBAAsB,EAGtB,gBAAgB,EAChB,gBAAgB,GAGjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,QAAQ,EAAgB,MAAM,eAAe,CAAC;AAwEvD,SAAS,iBAAiB,CAAC,KAAwB;IACjD,OAAO,CAAC,CAAE,KAAa,CAAC,UAAU,CAAC;AACrC,CAAC;AAKD,SAAS,sBAAsB,CAAC,KAAwB;IACtD,OAAO,CAAC,CAAE,KAAkC,CAAC,UAAU,CAAC;AAC1D,CAAC;AAKD,SAAS,uBAAuB,CAAC,KAAwB;IACvD,OAAO,CAAC,CAAE,KAAmC,CAAC,YAAY,CAAC;AAC7D,CAAC;AAKD,SAAS,oBAAoB,CAAC,KAAwB;IACpD,OAAO,CAAC,CAAE,KAAa,CAAC,YAAY,CAAC;AACvC,CAAC;AA2BD;;;;;GAKG;AACH,MAAM,OAAO,KAAK;IAChB,2BAA2B;IACpB,QAAQ,CAAsB;IACrC,kB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I,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,iBAAiB,CAAC,kBAAkB,CAAC,eAAe,EAAE,gCAAgC,CAAC,CAAC;IACpG,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAgD,EAAE,UAAiC;IACrH,OAAO;QACL,QAAQ,EAAE,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC;QACpD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,IAAI,mBAAmB,CAAC,eAAe;QACpF,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,IAAI,EAAE;QACvD,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n ClassInfo,\r\n CompressedClassInfoJSON,\r\n NavigationPropertyInfo,\r\n PropertyInfo,\r\n PropertyInfoJSON,\r\n RelatedClassInfo,\r\n RelationshipPath,\r\n RelationshipPathJSON,\r\n StrippedRelationshipPath,\r\n} from \"../EC.js\";\r\nimport { PresentationError, PresentationStatus } from \"../Error.js\";\r\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification.js\";\r\nimport { omitUndefined } from \"../Utils.js\";\r\nimport { CategoryDescription } from \"./Category.js\";\r\nimport { EditorDescription } from \"./Editor.js\";\r\nimport { Property, PropertyJSON } from \"./Property.js\";\r\nimport { RendererDescription } from \"./Renderer.js\";\r\nimport { TypeDescription } from \"./TypeDescription.js\";\r\n\r\n/**\r\n * Data structure for a [[Field]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface BaseFieldJSON {\r\n category: string;\r\n name: string;\r\n label: string;\r\n type: TypeDescription;\r\n isReadonly: boolean;\r\n priority: number;\r\n renderer?: RendererDescription;\r\n editor?: EditorDescription;\r\n extendedData?: { [key: string]: unknown };\r\n}\r\n\r\n/**\r\n * Data structure for a [[PropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\n\r\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\r\n properties: PropertyJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * Data structure for a [[ArrayPropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\r\n itemsField: PropertiesFieldJSON<TClassInfoJSON>;\r\n}\r\n\r\n/**\r\n * Data structure for a [[StructPropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\r\n memberFields: PropertiesFieldJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * Data structure for a [[NestedContentField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\r\n contentClassInfo: TClassInfoJSON;\r\n pathToPrimaryClass: RelationshipPathJSON<TClassInfoJSON>;\r\n relationshipMeaning?: RelationshipMeaning;\r\n actualPrimaryClassIds?: Id64String[];\r\n autoExpand?: boolean;\r\n nestedFields: FieldJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * JSON representation of a [[Field]]\r\n * @public\r\n */\r\nexport type FieldJSON<TClassInfoJSON = ClassInfo> =\r\n | BaseFieldJSON\r\n | PropertiesFieldJSON<TClassInfoJSON>\r\n | ArrayPropertiesFieldJSON<TClassInfoJSON>\r\n | StructPropertiesFieldJSON<TClassInfoJSON>\r\n | NestedContentFieldJSON<TClassInfoJSON>;\r\n\r\n/** Is supplied field a properties field. */\r\nfunction isPropertiesField(field: FieldJSON): field is PropertiesFieldJSON<any>;\r\nfunction isPropertiesField(field: Field): field is PropertiesField;\r\nfunction isPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as any).properties;\r\n}\r\n\r\n/** Is supplied field an array properties field. */\r\nfunction isArrayPropertiesField(field: FieldJSON): field is ArrayPropertiesFieldJSON<any>;\r\nfunction isArrayPropertiesField(field: Field): field is ArrayPropertiesField;\r\nfunction isArrayPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as ArrayPropertiesFieldJSON).itemsField;\r\n}\r\n\r\n/** Is supplied field an array properties field. */\r\nfunction isStructPropertiesField(field: FieldJSON): field is StructPropertiesFieldJSON<any>;\r\nfunction isStructPropertiesField(field: Field): field is StructPropertiesField;\r\nfunction isStructPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as StructPropertiesFieldJSON).memberFields;\r\n}\r\n\r\n/** Is supplied field a nested content field. */\r\nfunction isNestedContentField(field: FieldJSON): field is NestedContentFieldJSON<any>;\r\nfunction isNestedContentField(field: Field): field is NestedContentField;\r\nfunction isNestedContentField(field: FieldJSON | Field) {\r\n return !!(field as any).nestedFields;\r\n}\r\n\r\n/**\r\n * Props for creating [[Field]].\r\n * @public\r\n */\r\ninterface FieldProps {\r\n /** Category information */\r\n category: CategoryDescription;\r\n /** Unique name */\r\n name: string;\r\n /** Display label */\r\n label: string;\r\n /** Description of this field's values data type */\r\n type: TypeDescription;\r\n /** Are values in this field read-only */\r\n isReadonly: boolean;\r\n /** Priority of the field */\r\n priority: number;\r\n /** Property editor used to edit values of this field */\r\n editor?: EditorDescription;\r\n /** Property renderer used to render values of this field */\r\n renderer?: RendererDescription;\r\n /** Extended data associated with this field */\r\n extendedData?: { [key: string]: unknown };\r\n}\r\n\r\n/**\r\n * Describes a single content field. A field is usually represented as a grid column\r\n * or a property pane row.\r\n *\r\n * @public\r\n */\r\nexport class Field {\r\n /** Category information */\r\n public category: CategoryDescription;\r\n /** Unique name */\r\n public name: string;\r\n /** Display label */\r\n public label: string;\r\n /** Description of this field's values data type */\r\n public type: TypeDescription;\r\n /** Are values in this field read-only */\r\n public isReadonly: boolean;\r\n /** Priority of the field. Higher priority fields should appear first in the UI */\r\n public priority: number;\r\n /** Property renderer used to render values of this field */\r\n public renderer?: RendererDescription;\r\n /** Property editor used to edit values of this field */\r\n public editor?: EditorDescription;\r\n /** Extended data associated with this field */\r\n public extendedData?: { [key: string]: unknown };\r\n /** Parent field */\r\n private _parent?: NestedContentField;\r\n\r\n /**\r\n * Creates an instance of [[Field]].\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param editor Property editor used to edit values of this field\r\n * @param renderer Property renderer used to render values of this field\r\n * @param extendedData Extended data associated with this field\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `FieldProps` instead.\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n extendedData?: { [key: string]: unknown },\r\n );\r\n /** Creates an instance of [[Field]]. */\r\n public constructor(props: FieldProps);\r\n public constructor(\r\n categoryOrProps: CategoryDescription | FieldProps,\r\n name?: string,\r\n label?: string,\r\n type?: TypeDescription,\r\n isReadonly?: boolean,\r\n priority?: number,\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n extendedData?: { [key: string]: unknown },\r\n ) {\r\n /* c8 ignore next 14 */\r\n const props =\r\n \"category\" in categoryOrProps\r\n ? categoryOrProps\r\n : {\r\n category: categoryOrProps,\r\n name: name!,\r\n label: label!,\r\n type: type!,\r\n isReadonly: isReadonly!,\r\n priority: priority!,\r\n editor,\r\n renderer,\r\n extendedData,\r\n };\r\n this.category = props.category;\r\n this.name = props.name;\r\n this.label = props.label;\r\n this.type = props.type;\r\n this.isReadonly = props.isReadonly;\r\n this.priority = props.priority;\r\n this.editor = props.editor;\r\n this.renderer = props.renderer;\r\n this.extendedData = props.extendedData;\r\n }\r\n\r\n /**\r\n * Is this a [[PropertiesField]]\r\n */\r\n public isPropertiesField(): this is PropertiesField {\r\n return isPropertiesField(this);\r\n }\r\n\r\n /**\r\n * Is this a [[NestedContentField]]\r\n */\r\n public isNestedContentField(): this is NestedContentField {\r\n return isNestedContentField(this);\r\n }\r\n\r\n /**\r\n * Get parent\r\n */\r\n public get parent(): NestedContentField | undefined {\r\n return this._parent;\r\n }\r\n\r\n public clone() {\r\n const clone = new Field(this);\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serialize this object to JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.\r\n */\r\n public toJSON(): FieldJSON {\r\n return this.toCompressedJSON({});\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\r\n return omitUndefined({\r\n category: this.category.name,\r\n name: this.name,\r\n label: this.label,\r\n type: this.type,\r\n isReadonly: this.isReadonly,\r\n priority: this.priority,\r\n renderer: this.renderer,\r\n editor: this.editor,\r\n extendedData: this.extendedData,\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize [[Field]] from JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.\r\n */\r\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (isPropertiesField(json)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return PropertiesField.fromJSON(json, categories);\r\n }\r\n if (isNestedContentField(json)) {\r\n return new NestedContentField({\r\n ...json,\r\n ...fromNestedContentFieldJSON(json, categories),\r\n nestedFields: json.nestedFields\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\r\n .filter((nestedField): nestedField is Field => !!nestedField),\r\n });\r\n }\r\n return new Field({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n /** Deserialize a [[Field]] from compressed JSON. */\r\n public static fromCompressedJSON(\r\n json: FieldJSON<string> | undefined,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): Field | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (isPropertiesField(json)) {\r\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n if (isNestedContentField(json)) {\r\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n return new Field({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, categories: CategoryDescription[]): CategoryDescription {\r\n return getCategoryFromFieldJson(fieldJson, categories);\r\n }\r\n\r\n /** Resets field's parent. */\r\n public resetParentship(): void {\r\n this._parent = undefined;\r\n }\r\n\r\n /** Sets provided [[NestedContentField]] as parent of this field. */\r\n public rebuildParentship(parentField?: NestedContentField): void {\r\n this._parent = parentField;\r\n }\r\n\r\n /**\r\n * Get descriptor for this field.\r\n * @public\r\n */\r\n public getFieldDescriptor(): FieldDescriptor {\r\n return {\r\n type: FieldDescriptorType.Name,\r\n fieldName: this.name,\r\n } as NamedFieldDescriptor;\r\n }\r\n\r\n /**\r\n * Checks if this field matches given field descriptor\r\n * @see [[getFieldDescriptor]]\r\n */\r\n public matchesDescriptor(descriptor: FieldDescriptor) {\r\n return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;\r\n }\r\n}\r\n\r\n/**\r\n * Props for creating [[PropertiesField]].\r\n * @public\r\n */\r\ninterface PropertiesFieldProps extends FieldProps {\r\n /** A list of properties this field is created from */\r\n properties: Property[];\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar\r\n * EC properties.\r\n *\r\n * @public\r\n */\r\nexport class PropertiesField extends Field {\r\n /** A list of properties this field is created from */\r\n public properties: Property[];\r\n\r\n /**\r\n * Creates an instance of [[PropertiesField]].\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param properties A list of properties this field is created from\r\n * @param editor Property editor used to edit values of this field\r\n * @param renderer Property renderer used to render values of this field\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `PropertiesFieldProps` instead.\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n );\r\n /** Creates an instance of [[PropertiesField]]. */\r\n public constructor(props: PropertiesFieldProps);\r\n public constructor(\r\n categoryOrProps: CategoryDescription | PropertiesFieldProps,\r\n name?: string,\r\n label?: string,\r\n type?: TypeDescription,\r\n isReadonly?: boolean,\r\n priority?: number,\r\n properties?: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n /* c8 ignore next 14 */\r\n const props =\r\n \"category\" in categoryOrProps\r\n ? categoryOrProps\r\n : {\r\n category: categoryOrProps,\r\n name: name!,\r\n label: label!,\r\n type: type!,\r\n isReadonly: isReadonly!,\r\n priority: priority!,\r\n editor,\r\n renderer,\r\n properties: properties!,\r\n };\r\n super(props);\r\n this.properties = props.properties;\r\n }\r\n\r\n /** Is this a an array property field */\r\n public isArrayPropertiesField(): this is ArrayPropertiesField {\r\n return false;\r\n }\r\n /** Is this a an struct property field */\r\n public isStructPropertiesField(): this is StructPropertiesField {\r\n return false;\r\n }\r\n\r\n public override clone() {\r\n const clone = new PropertiesField(this);\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serialize this object to JSON\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.\r\n */\r\n public override toJSON(): PropertiesFieldJSON {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n ...super.toJSON(),\r\n properties: this.properties,\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): PropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[PropertiesField]] from JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.\r\n */\r\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (isArrayPropertiesField(json)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return ArrayPropertiesField.fromJSON(json, categories);\r\n }\r\n if (isStructPropertiesField(json)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return StructPropertiesField.fromJSON(json, categories);\r\n }\r\n return new PropertiesField({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize a [[PropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: PropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): PropertiesField | undefined {\r\n if (isArrayPropertiesField(json)) {\r\n return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n if (isStructPropertiesField(json)) {\r\n return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n return new PropertiesField({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n });\r\n }\r\n\r\n /**\r\n * Get descriptor for this field.\r\n * @public\r\n */\r\n public override getFieldDescriptor(): FieldDescriptor {\r\n const pathFromPropertyToSelectClass = new Array<RelatedClassInfo>();\r\n let currAncestor = this.parent;\r\n while (currAncestor) {\r\n pathFromPropertyToSelectClass.push(...currAncestor.pathToPrimaryClass);\r\n currAncestor = currAncestor.parent;\r\n }\r\n return {\r\n type: FieldDescriptorType.Properties,\r\n pathFromSelectToPropertyClass: RelationshipPath.strip(RelationshipPath.reverse(pathFromPropertyToSelectClass)),\r\n properties: this.properties.map((p) => ({\r\n class: p.property.classInfo.name,\r\n name: p.property.name,\r\n })),\r\n } as PropertiesFieldDescriptor;\r\n }\r\n\r\n /**\r\n * Checks if this field matches given field descriptor\r\n * @see [[getFieldDescriptor]]\r\n */\r\n public override matchesDescriptor(descriptor: FieldDescriptor) {\r\n if (!FieldDescriptor.isProperties(descriptor)) {\r\n return false;\r\n }\r\n\r\n // ensure at least one descriptor property matches at least one property of this field\r\n if (\r\n !this.properties.some(({ property: fieldProperty }) =>\r\n descriptor.properties.some(\r\n (descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class,\r\n ),\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n // ensure path from select to property in field and in descriptor matches\r\n let stepsCount = 0;\r\n let currAncestor = this.parent;\r\n while (currAncestor) {\r\n const pathFromCurrentToItsParent = RelationshipPath.reverse(currAncestor.pathToPrimaryClass);\r\n for (const step of pathFromCurrentToItsParent) {\r\n if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {\r\n return false;\r\n }\r\n if (!RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {\r\n return false;\r\n }\r\n ++stepsCount;\r\n }\r\n currAncestor = currAncestor.parent;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Props for creating [[ArrayPropertiesField]].\r\n * @public\r\n */\r\ninterface ArrayPropertiesFieldProps extends PropertiesFieldProps {\r\n itemsField: PropertiesField;\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar EC array properties.\r\n * @public\r\n */\r\nexport class ArrayPropertiesField extends PropertiesField {\r\n public itemsField: PropertiesField;\r\n\r\n /**\r\n * Creates an instance of [[ArrayPropertiesField]].\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `ArrayPropertiesFieldProps` instead.\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n itemsField: PropertiesField,\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n );\r\n /** Creates an instance of [[ArrayPropertiesField]]. */\r\n public constructor(props: ArrayPropertiesFieldProps);\r\n public constructor(\r\n categoryOrProps: CategoryDescription | ArrayPropertiesFieldProps,\r\n name?: string,\r\n label?: string,\r\n type?: TypeDescription,\r\n itemsField?: PropertiesField,\r\n isReadonly?: boolean,\r\n priority?: number,\r\n properties?: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n /* c8 ignore next 15 */\r\n const props =\r\n \"category\" in categoryOrProps\r\n ? categoryOrProps\r\n : {\r\n category: categoryOrProps,\r\n name: name!,\r\n label: label!,\r\n type: type!,\r\n isReadonly: isReadonly!,\r\n priority: priority!,\r\n editor,\r\n renderer,\r\n properties: properties!,\r\n itemsField: itemsField!,\r\n };\r\n super(props);\r\n this.itemsField = props.itemsField;\r\n }\r\n\r\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\r\n return true;\r\n }\r\n\r\n public override clone() {\r\n const clone = new ArrayPropertiesField(this);\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serialize this object to JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.\r\n */\r\n public override toJSON(): ArrayPropertiesFieldJSON {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n ...super.toJSON(),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n itemsField: this.itemsField.toJSON(),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): ArrayPropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n itemsField: this.itemsField.toCompressedJSON(classesMap),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[ArrayPropertiesField]] from JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.\r\n */\r\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\r\n return new ArrayPropertiesField({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n itemsField: PropertiesField.fromJSON(json.itemsField, categories)!,\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize an [[ArrayPropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: ArrayPropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): ArrayPropertiesField {\r\n return new ArrayPropertiesField({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories)!,\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Props for creating [[StructPropertiesField]].\r\n * @public\r\n */\r\ninterface StructPropertiesFieldProps extends PropertiesFieldProps {\r\n memberFields: PropertiesField[];\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar EC struct properties.\r\n * @public\r\n */\r\nexport class StructPropertiesField extends PropertiesField {\r\n public memberFields: PropertiesField[];\r\n\r\n /**\r\n * Creates an instance of [[StructPropertiesField]].\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `StructPropertiesFieldProps` instead.\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n memberFields: PropertiesField[],\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n );\r\n /** Creates an instance of [[StructPropertiesField]]. */\r\n public constructor(props: StructPropertiesFieldProps);\r\n public constructor(\r\n categoryOrProps: CategoryDescription | StructPropertiesFieldProps,\r\n name?: string,\r\n label?: string,\r\n type?: TypeDescription,\r\n memberFields?: PropertiesField[],\r\n isReadonly?: boolean,\r\n priority?: number,\r\n properties?: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n /* c8 ignore next 15 */\r\n const props =\r\n \"category\" in categoryOrProps\r\n ? categoryOrProps\r\n : {\r\n category: categoryOrProps,\r\n name: name!,\r\n label: label!,\r\n type: type!,\r\n isReadonly: isReadonly!,\r\n priority: priority!,\r\n editor,\r\n renderer,\r\n properties: properties!,\r\n memberFields: memberFields!,\r\n };\r\n super(props);\r\n this.memberFields = props.memberFields;\r\n }\r\n\r\n public override isStructPropertiesField(): this is StructPropertiesField {\r\n return true;\r\n }\r\n\r\n public override clone() {\r\n const clone = new StructPropertiesField(this);\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serialize this object to JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.\r\n */\r\n public override toJSON(): StructPropertiesFieldJSON {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n ...super.toJSON(),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n memberFields: this.memberFields.map((m) => m.toJSON()),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): StructPropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[StructPropertiesField]] from JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.\r\n */\r\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\r\n return new StructPropertiesField({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)!),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize a [[StructPropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: StructPropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): StructPropertiesField {\r\n return new StructPropertiesField({\r\n ...json,\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)!),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Props for creating [[NestedContentField]].\r\n * @public\r\n */\r\ninterface NestedContentFieldProps extends FieldProps {\r\n /** Information about an ECClass whose properties are nested inside this field */\r\n contentClassInfo: ClassInfo;\r\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\r\n pathToPrimaryClass: RelationshipPath;\r\n /**\r\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\r\n * and content class of this field.\r\n *\r\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\r\n * presentation rules for creating the content.\r\n */\r\n relationshipMeaning?: RelationshipMeaning;\r\n /**\r\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\r\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\r\n * here to help.\r\n *\r\n * **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`.\r\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\r\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\r\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\r\n */\r\n actualPrimaryClassIds?: Id64String[];\r\n /** Contained nested fields */\r\n nestedFields: Field[];\r\n /** Flag specifying whether field should be expanded */\r\n autoExpand?: boolean;\r\n}\r\n\r\n/**\r\n * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).\r\n *\r\n * @public\r\n */\r\nexport class NestedContentField extends Field {\r\n /** Information about an ECClass whose properties are nested inside this field */\r\n public contentClassInfo: ClassInfo;\r\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\r\n public pathToPrimaryClass: RelationshipPath;\r\n /**\r\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\r\n * and content class of this field.\r\n *\r\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\r\n * presentation rules for creating the content.\r\n */\r\n public relationshipMeaning: RelationshipMeaning;\r\n /**\r\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\r\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\r\n * here to help.\r\n *\r\n * **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`.\r\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\r\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\r\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\r\n */\r\n public actualPrimaryClassIds: Id64String[];\r\n /** Contained nested fields */\r\n public nestedFields: Field[];\r\n /** Flag specifying whether field should be expanded */\r\n public autoExpand?: boolean;\r\n\r\n /**\r\n * Creates an instance of [[NestedContentField]].\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param contentClassInfo Information about an ECClass whose properties are nested inside this field\r\n * @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)\r\n * @param nestedFields Contained nested fields\r\n * @param editor Property editor used to edit values of this field\r\n * @param autoExpand Flag specifying whether field should be expanded\r\n * @param relationshipMeaning RelationshipMeaning of the field\r\n * @param renderer Property renderer used to render values of this field\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `NestedContentFieldProps` instead.\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n contentClassInfo: ClassInfo,\r\n pathToPrimaryClass: RelationshipPath,\r\n nestedFields: Field[],\r\n editor?: EditorDescription,\r\n autoExpand?: boolean,\r\n renderer?: RendererDescription,\r\n );\r\n /** Creates an instance of [[NestedContentField]]. */\r\n public constructor(props: NestedContentFieldProps);\r\n public constructor(\r\n categoryOrProps: CategoryDescription | NestedContentFieldProps,\r\n name?: string,\r\n label?: string,\r\n type?: TypeDescription,\r\n isReadonly?: boolean,\r\n priority?: number,\r\n contentClassInfo?: ClassInfo,\r\n pathToPrimaryClass?: RelationshipPath,\r\n nestedFields?: Field[],\r\n editor?: EditorDescription,\r\n autoExpand?: boolean,\r\n renderer?: RendererDescription,\r\n ) {\r\n /* c8 ignore next 17 */\r\n const props =\r\n \"category\" in categoryOrProps\r\n ? categoryOrProps\r\n : {\r\n category: categoryOrProps,\r\n name: name!,\r\n label: label!,\r\n type: type!,\r\n isReadonly: isReadonly!,\r\n priority: priority!,\r\n editor,\r\n renderer,\r\n contentClassInfo: contentClassInfo!,\r\n pathToPrimaryClass: pathToPrimaryClass!,\r\n nestedFields: nestedFields!,\r\n autoExpand,\r\n };\r\n super(props);\r\n this.contentClassInfo = props.contentClassInfo;\r\n this.pathToPrimaryClass = props.pathToPrimaryClass;\r\n this.relationshipMeaning = props.relationshipMeaning ?? RelationshipMeaning.RelatedInstance;\r\n this.nestedFields = props.nestedFields;\r\n this.autoExpand = props.autoExpand;\r\n this.actualPrimaryClassIds = props.actualPrimaryClassIds ?? [];\r\n }\r\n\r\n public override clone() {\r\n const clone = new NestedContentField({\r\n ...this,\r\n nestedFields: this.nestedFields.map((n) => n.clone()),\r\n });\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Get field by its name\r\n * @param name Name of the field to find\r\n * @param recurse Recurse into nested fields\r\n */\r\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\r\n return getFieldByName(this.nestedFields, name, recurse);\r\n }\r\n\r\n /**\r\n * Serialize this object to JSON.\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.\r\n */\r\n public override toJSON(): NestedContentFieldJSON {\r\n return {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n ...super.toJSON(),\r\n contentClassInfo: this.contentClassInfo,\r\n pathToPrimaryClass: this.pathToPrimaryClass,\r\n relationshipMeaning: this.relationshipMeaning,\r\n actualPrimaryClassIds: this.actualPrimaryClassIds,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\r\n ...(this.autoExpand ? { autoExpand: true } : undefined),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): NestedContentFieldJSON<string> {\r\n const { id, ...leftOverInfo } = this.contentClassInfo;\r\n classesMap[id] = leftOverInfo;\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n contentClassInfo: id,\r\n relationshipMeaning: this.relationshipMeaning,\r\n actualPrimaryClassIds: this.actualPrimaryClassIds,\r\n pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\r\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\r\n ...(this.autoExpand ? { autoExpand: true } : undefined),\r\n };\r\n }\r\n\r\n /** Deserialize a [[NestedContentField]] from compressed JSON. */\r\n public static override fromCompressedJSON(\r\n json: NestedContentFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ) {\r\n assert(classesMap.hasOwnProperty(json.contentClassInfo));\r\n return new NestedContentField({\r\n ...json,\r\n ...fromNestedContentFieldJSON(json, categories),\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n nestedFields: json.nestedFields\r\n .map((nestedFieldJson: FieldJSON) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))\r\n .filter((nestedField): nestedField is Field => !!nestedField),\r\n contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },\r\n pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),\r\n });\r\n }\r\n\r\n /** Resets parent of this field and all nested fields. */\r\n public override resetParentship(): void {\r\n super.resetParentship();\r\n for (const nestedField of this.nestedFields) {\r\n nestedField.resetParentship();\r\n }\r\n }\r\n\r\n /**\r\n * Sets provided [[NestedContentField]] as parent of this fields and recursively updates\r\n * all nested fields parents.\r\n */\r\n public override rebuildParentship(parentField?: NestedContentField): void {\r\n super.rebuildParentship(parentField);\r\n for (const nestedField of this.nestedFields) {\r\n nestedField.rebuildParentship(this);\r\n }\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const getFieldByName = (fields: Field[], name: string | undefined, recurse?: boolean): Field | undefined => {\r\n if (name) {\r\n for (const field of fields) {\r\n if (field.name === name) {\r\n return field;\r\n }\r\n\r\n if (recurse && field.isNestedContentField()) {\r\n const nested = getFieldByName(field.nestedFields, name, recurse);\r\n if (nested) {\r\n return nested;\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/** @internal */\r\nexport const getFieldByDescriptor = (fields: Field[], fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined => {\r\n for (const field of fields) {\r\n if (field.matchesDescriptor(fieldDescriptor)) {\r\n return field;\r\n }\r\n\r\n if (recurse && field.isNestedContentField()) {\r\n const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);\r\n if (nested) {\r\n return nested;\r\n }\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Types of different field descriptors.\r\n * @public\r\n */\r\nexport enum FieldDescriptorType {\r\n Name = \"name\",\r\n Properties = \"properties\",\r\n}\r\n\r\n/**\r\n * Base for a field descriptor\r\n * @public\r\n */\r\nexport interface FieldDescriptorBase {\r\n type: FieldDescriptorType;\r\n}\r\n\r\n/**\r\n * A union of all possible field descriptor types\r\n * @public\r\n */\r\nexport type FieldDescriptor = NamedFieldDescriptor | PropertiesFieldDescriptor;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace FieldDescriptor {\r\n /** Is this a named field descriptor */\r\n export function isNamed(d: FieldDescriptor): d is NamedFieldDescriptor {\r\n return d.type === FieldDescriptorType.Name;\r\n }\r\n /** Is this a properties field descriptor */\r\n export function isProperties(d: FieldDescriptor): d is PropertiesFieldDescriptor {\r\n return d.type === FieldDescriptorType.Properties;\r\n }\r\n}\r\n\r\n/**\r\n * Field descriptor that identifies a content field by its unique name.\r\n * @public\r\n */\r\nexport interface NamedFieldDescriptor extends FieldDescriptorBase {\r\n type: FieldDescriptorType.Name;\r\n fieldName: string;\r\n}\r\n\r\n/**\r\n * Field descriptor that identifies a properties field using a list of\r\n * properties that the field contains.\r\n * @public\r\n */\r\nexport interface PropertiesFieldDescriptor extends FieldDescriptorBase {\r\n type: FieldDescriptorType.Properties;\r\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\r\n /**\r\n * A list of properties that describe the field. At least one property in the list must\r\n * match at least one property in the field for the descriptor to be considered matching.\r\n */\r\n properties: Array<{\r\n /** Full class name */\r\n class: string;\r\n /** Property name */\r\n name: string;\r\n }>;\r\n}\r\n\r\nfunction fromCompressedPropertyJSON(compressedPropertyJSON: PropertyJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): Property {\r\n return {\r\n property: fromCompressedPropertyInfoJSON(compressedPropertyJSON.property, classesMap),\r\n };\r\n}\r\n\r\nfunction fromCompressedPropertyInfoJSON(compressedPropertyJSON: PropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfo {\r\n assert(classesMap.hasOwnProperty(compressedPropertyJSON.classInfo));\r\n\r\n const { navigationPropertyInfo, ...leftOverPropertyJSON } = compressedPropertyJSON;\r\n\r\n return {\r\n ...leftOverPropertyJSON,\r\n classInfo: { id: compressedPropertyJSON.classInfo, ...classesMap[compressedPropertyJSON.classInfo] },\r\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\r\n };\r\n}\r\n\r\nfunction getCategoryFromFieldJson(fieldJson: { category: string }, categories: CategoryDescription[]): CategoryDescription {\r\n const category = categories.find((c) => c.name === fieldJson.category);\r\n if (!category) {\r\n throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);\r\n }\r\n return category;\r\n}\r\n\r\nfunction fromNestedContentFieldJSON(json: NestedContentFieldJSON<ClassInfo | string>, categories: CategoryDescription[]) {\r\n return {\r\n category: getCategoryFromFieldJson(json, categories),\r\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\r\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\r\n autoExpand: json.autoExpand,\r\n };\r\n}\r\n"]}
|
|
@@ -12,7 +12,7 @@ import { DisplayValue, Value } from "./Value.js";
|
|
|
12
12
|
export interface ItemJSON {
|
|
13
13
|
inputKeys?: InstanceKey[];
|
|
14
14
|
primaryKeys: InstanceKey[];
|
|
15
|
-
/** @deprecated in 5.
|
|
15
|
+
/** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[label]] instead. */
|
|
16
16
|
labelDefinition: LabelDefinition;
|
|
17
17
|
label?: LabelDefinition;
|
|
18
18
|
classInfo?: ClassInfo;
|
|
@@ -75,7 +75,7 @@ export declare class Item {
|
|
|
75
75
|
* @param displayValues Display values dictionary
|
|
76
76
|
* @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))
|
|
77
77
|
* @param extendedData Extended data injected into this content item
|
|
78
|
-
* @deprecated in 5.0. Use an overload with `ItemProps` instead.
|
|
78
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `ItemProps` instead.
|
|
79
79
|
*/
|
|
80
80
|
constructor(primaryKeys: InstanceKey[], label: string | LabelDefinition, imageId: string, classInfo: ClassInfo | undefined, values: ValuesDictionary<Value>, displayValues: ValuesDictionary<DisplayValue>, mergedFieldNames: string[], extendedData?: {
|
|
81
81
|
[key: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.d.ts","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAiB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjD;;;GA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|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAoB,MAAM,aAAa,CAAC;AAmC9D;;;GAGG;AACH,MAAM,OAAO,IAAI;IACf;;;OAGG;IACI,SAAS,CAAiB;IACjC,6DAA6D;IACtD,WAAW,CAAgB;IAClC,gCAAgC;IACzB,KAAK,CAAkB;IAC9B,+FAA+F;IACxF,SAAS,CAAa;IAC7B,4BAA4B;IACrB,MAAM,CAA0B;IACvC,gCAAgC;IACzB,aAAa,CAAiC;IACrD,+HAA+H;IACxH,gBAAgB,CAAW;IAClC,oDAAoD;IAC7C,YAAY,CAA0B;IAyB7C,YACE,kBAA6C,EAC7C,KAAgC,EAChC,OAAgB,EAChB,SAAiC,EACjC,MAAgC,EAChC,aAA8C,EAC9C,gBAA2B,EAC3B,YAAqC;QAErC,uBAAuB;QACvB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;YAC7C,CAAC,CAAC;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAM;gBAClF,OAAO,EAAE,OAAQ;gBACjB,SAAS;gBACT,MAAM,EAAE,MAAO;gBACf,aAAa,EAAE,aAAc;gBAC7B,gBAAgB,EAAE,gBAAiB;gBACnC,YAAY;aACb;YACH,CAAC,CAAC,kBAAkB,CAAC;QAEvB,IAAI,WAAW,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QACzC,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,SAAiB;QACpC,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACzD,CAAC;IAED,oCAAoC;IAC7B,MAAM;QACX,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACpC,OAAO,aAAa,CAAC;YACnB,GAAG,QAAQ;YACX,eAAe,EAAE,KAAK;YACtB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;IAED,qCAAqC;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAmC;QACxD,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,CAAC;QAED,4DAA4D;QAC5D,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACrD,OAAO,IAAI,IAAI,CAAC;YACd,GAAG,QAAQ;YACX,KAAK,EAAE,KAAK,IAAI,eAAe;SAChC,CAAC,CAAC;IACL,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 { ClassInfo, InstanceKey } from \"../EC.js\";\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { omitUndefined, ValuesDictionary } from \"../Utils.js\";\nimport { DisplayValue, Value } from \"./Value.js\";\n\n/**\n * Serialized [[Item]] JSON representation.\n * @public\n */\nexport interface ItemJSON {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n /** @deprecated in 5.
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAoB,MAAM,aAAa,CAAC;AAmC9D;;;GAGG;AACH,MAAM,OAAO,IAAI;IACf;;;OAGG;IACI,SAAS,CAAiB;IACjC,6DAA6D;IACtD,WAAW,CAAgB;IAClC,gCAAgC;IACzB,KAAK,CAAkB;IAC9B,+FAA+F;IACxF,SAAS,CAAa;IAC7B,4BAA4B;IACrB,MAAM,CAA0B;IACvC,gCAAgC;IACzB,aAAa,CAAiC;IACrD,+HAA+H;IACxH,gBAAgB,CAAW;IAClC,oDAAoD;IAC7C,YAAY,CAA0B;IAyB7C,YACE,kBAA6C,EAC7C,KAAgC,EAChC,OAAgB,EAChB,SAAiC,EACjC,MAAgC,EAChC,aAA8C,EAC9C,gBAA2B,EAC3B,YAAqC;QAErC,uBAAuB;QACvB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;YAC7C,CAAC,CAAC;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAM;gBAClF,OAAO,EAAE,OAAQ;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AC,CAAC;QACzC,CAAC;QAED,4DAA4D;QAC5D,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;QACrD,OAAO,IAAI,IAAI,CAAC;YACd,GAAG,QAAQ;YACX,KAAK,EAAE,KAAK,IAAI,eAAe;SAChC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfo, InstanceKey } from \"../EC.js\";\r\nimport { LabelDefinition } from \"../LabelDefinition.js\";\r\nimport { omitUndefined, ValuesDictionary } from \"../Utils.js\";\r\nimport { DisplayValue, Value } from \"./Value.js\";\r\n\r\n/**\r\n * Serialized [[Item]] JSON representation.\r\n * @public\r\n */\r\nexport interface ItemJSON {\r\n inputKeys?: InstanceKey[];\r\n primaryKeys: InstanceKey[];\r\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[label]] instead. */\r\n labelDefinition: LabelDefinition;\r\n label?: LabelDefinition;\r\n classInfo?: ClassInfo;\r\n values: ValuesDictionary<Value>;\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n mergedFieldNames: string[];\r\n extendedData?: { [key: string]: any };\r\n}\r\n\r\n/**\r\n * Props for creating [[Item]].\r\n * @public\r\n */\r\ninterface ItemProps {\r\n inputKeys?: InstanceKey[];\r\n primaryKeys: InstanceKey[];\r\n label: LabelDefinition;\r\n classInfo?: ClassInfo;\r\n values: ValuesDictionary<Value>;\r\n displayValues: ValuesDictionary<DisplayValue>;\r\n mergedFieldNames: string[];\r\n extendedData?: { [key: string]: any };\r\n}\r\n\r\n/**\r\n * A data structure that represents a single content record.\r\n * @public\r\n */\r\nexport class Item {\r\n /**\r\n * Keys of input instances that caused this item to be included in content. Only set if the content is\r\n * created with [[ContentFlags.IncludeInputKeys]] flag.\r\n */\r\n public inputKeys?: InstanceKey[];\r\n /** Keys of instances whose data is contained in this item */\r\n public primaryKeys: InstanceKey[];\r\n /** Display label of the item */\r\n public label: LabelDefinition;\r\n /** For cases when item consists only of same class instances, information about the ECClass */\r\n public classInfo?: ClassInfo;\r\n /** Raw values dictionary */\r\n public values: ValuesDictionary<Value>;\r\n /** Display values dictionary */\r\n public displayValues: ValuesDictionary<DisplayValue>;\r\n /** List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging)) */\r\n public mergedFieldNames: string[];\r\n /** Extended data injected into this content item */\r\n public extendedData?: { [key: string]: any };\r\n\r\n /**\r\n * Creates an instance of Item.\r\n * @param primaryKeys Keys of instances whose data is contained in this item\r\n * @param label Display label of the item\r\n * @param imageId ID of the image associated with this item\r\n * @param classInfo For cases when item consists only of same class instances, information about the ECClass\r\n * @param values Raw values dictionary\r\n * @param displayValues Display values dictionary\r\n * @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))\r\n * @param extendedData Extended data injected into this content item\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `ItemProps` instead.\r\n */\r\n public constructor(\r\n primaryKeys: InstanceKey[],\r\n label: string | LabelDefinition,\r\n imageId: string,\r\n classInfo: ClassInfo | undefined,\r\n values: ValuesDictionary<Value>,\r\n displayValues: ValuesDictionary<DisplayValue>,\r\n mergedFieldNames: string[],\r\n extendedData?: { [key: string]: any },\r\n );\r\n public constructor(props: ItemProps);\r\n public constructor(\r\n primaryKeysOrProps: ItemProps | InstanceKey[],\r\n label?: string | LabelDefinition,\r\n imageId?: string,\r\n classInfo?: ClassInfo | undefined,\r\n values?: ValuesDictionary<Value>,\r\n displayValues?: ValuesDictionary<DisplayValue>,\r\n mergedFieldNames?: string[],\r\n extendedData?: { [key: string]: any },\r\n ) {\r\n /* c8 ignore next 12 */\r\n const props = Array.isArray(primaryKeysOrProps)\r\n ? {\r\n primaryKeys: primaryKeysOrProps,\r\n label: typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : label!,\r\n imageId: imageId!,\r\n classInfo,\r\n values: values!,\r\n displayValues: displayValues!,\r\n mergedFieldNames: mergedFieldNames!,\r\n extendedData,\r\n }\r\n : primaryKeysOrProps;\r\n\r\n if (\"inputKeys\" in props) {\r\n this.inputKeys = props.inputKeys;\r\n }\r\n this.primaryKeys = props.primaryKeys;\r\n this.classInfo = props.classInfo;\r\n this.values = props.values;\r\n this.displayValues = props.displayValues;\r\n this.mergedFieldNames = props.mergedFieldNames;\r\n this.extendedData = props.extendedData;\r\n this.label = props.label;\r\n }\r\n\r\n /**\r\n * Is value of field with the specified name merged in this record.\r\n */\r\n public isFieldMerged(fieldName: string): boolean {\r\n return -1 !== this.mergedFieldNames.indexOf(fieldName);\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public toJSON(): ItemJSON {\r\n const { label, ...baseItem } = this;\r\n return omitUndefined({\r\n ...baseItem,\r\n labelDefinition: label,\r\n label,\r\n });\r\n }\r\n\r\n /** Deserialize [[Item]] from JSON */\r\n public static fromJSON(json: ItemJSON | string | undefined): Item | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n if (typeof json === \"string\") {\r\n return Item.fromJSON(JSON.parse(json));\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n const { labelDefinition, label, ...baseJson } = json;\r\n return new Item({\r\n ...baseJson,\r\n label: label ?? labelDefinition,\r\n });\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAsC,YAAY,EAAoB,MAAM,UAAU,CAAC;AAgC9F,cAAc;AACd,MAAM,KAAW,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACvB,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;AACH,CAAC,EAPgB,QAAQ,KAAR,QAAQ,QAOxB","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 { ClassInfo, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC.js\";\n\n/**\n * Data structure that describes one step of property\n * accessor path.\n *\n * @public\n */\nexport interface PropertyAccessor {\n /** Name of ECProperty */\n propertyName: string;\n /** If the property is an array, array index. Otherwise undefined. */\n arrayIndex?: number;\n}\n\n/**\n * Describes path to a property.\n * @public\n */\nexport type PropertyAccessorPath = PropertyAccessor[];\n\n/**\n * Data structure that describes a single ECProperty that's\n * included in a [[PropertiesField]].\n *\n * @public\n */\nexport interface Property {\n /** ECProperty information */\n property: PropertyInfo;\n}\n\n/** @public */\nexport namespace Property {\n /** Serialize [[Property]] to compressed JSON */\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\n return {\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\n };\n }\n}\n\n/**\n * JSON representation of [[Property]]\n * @public\n */\nexport interface PropertyJSON<TClassInfoJSON = ClassInfo> {\n property: PropertyInfoJSON<TClassInfoJSON>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAsC,YAAY,EAAoB,MAAM,UAAU,CAAC;AAgC9F,cAAc;AACd,MAAM,KAAW,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACvB,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;AACH,CAAC,EAPgB,QAAQ,KAAR,QAAQ,QAOxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfo, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC.js\";\r\n\r\n/**\r\n * Data structure that describes one step of property\r\n * accessor path.\r\n *\r\n * @public\r\n */\r\nexport interface PropertyAccessor {\r\n /** Name of ECProperty */\r\n propertyName: string;\r\n /** If the property is an array, array index. Otherwise undefined. */\r\n arrayIndex?: number;\r\n}\r\n\r\n/**\r\n * Describes path to a property.\r\n * @public\r\n */\r\nexport type PropertyAccessorPath = PropertyAccessor[];\r\n\r\n/**\r\n * Data structure that describes a single ECProperty that's\r\n * included in a [[PropertiesField]].\r\n *\r\n * @public\r\n */\r\nexport interface Property {\r\n /** ECProperty information */\r\n property: PropertyInfo;\r\n}\r\n\r\n/** @public */\r\nexport namespace Property {\r\n /** Serialize [[Property]] to compressed JSON */\r\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\r\n return {\r\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Property]]\r\n * @public\r\n */\r\nexport interface PropertyJSON<TClassInfoJSON = ClassInfo> {\r\n property: PropertyInfoJSON<TClassInfoJSON>;\r\n}\r\n"]}
|