@itwin/presentation-common 5.1.0-dev.7 → 5.1.0-dev.71
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 +76 -1
- package/Ruleset.schema.json +3 -3
- package/lib/cjs/presentation-common/AsyncTasks.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/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/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/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/Value.d.ts +1 -1
- package/lib/cjs/presentation-common/content/Value.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/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/hierarchy/CustomNodeSpecification.d.ts +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.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/esm/presentation-common/AsyncTasks.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/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/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/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/Value.d.ts +1 -1
- package/lib/esm/presentation-common/content/Value.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/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/hierarchy/CustomNodeSpecification.d.ts +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.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/package.json +19 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fields.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AACzD,oCAUkB;AAClB,0CAAoE;AACpE,oHAAmG;AACnG,0CAA4C;AAG5C,+CAAuD;AAwEvD,SAAS,iBAAiB,CAAC,KAAwB;IACjD,OAAO,CAAC,CAAE,KAAa,CAAC,UAAU,CAAC;AACrC,CAAC;AAKD,SAAS,sBAAsB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AE,EAAE,sBAAsB,CAAC,SAAS,EAAE,GAAG,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE;QACpG,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,8BAAsB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACpJ,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,SAA+B,EAAE,UAAiC;IAClG,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC;IACvE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,4BAAiB,CAAC,6BAAkB,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,uDAAmB,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,sDAAyD;AACzD,oCAUkB;AAClB,0CAAo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AAC,SAAS,CAAC,CAAC,CAAC;IAEpE,MAAM,EAAE,sBAAsB,EAAE,GAAG,oBAAoB,EAAE,GAAG,sBAAsB,CAAC;IAEnF,OAAO;QACL,GAAG,oBAAoB;QACvB,SAAS,EAAE,EAAE,EAAE,EAAE,sBAAsB,CAAC,SAAS,EAAE,GAAG,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE;QACpG,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,8BAAsB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACpJ,CAAC;AACJ,CAAC;AAED,SAAS,wBAAwB,CAAC,SAA+B,EAAE,UAAiC;IAClG,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC;IACvE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,4BAAiB,CAAC,6BAAkB,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,uDAAmB,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 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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 - will not be removed until after 2026-06-13. 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.0 - will not be removed until after 2026-06-13. 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"]}
|
|
@@ -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,C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IhD,oCAAoC;IAC7B,MAAM,IAAI,QAAQ;IASzB,qCAAqC;WACvB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS;CAgB9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,8DAAwD;AACxD,0CAA8D;AAmC9D;;;GAGG;AACH,MAAa,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,oCAAe,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,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C,CAAC;IACL,CAAC;CACF;AAlHD,oBAkHC","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,8DAAwD;AACxD,0CAA8D;AAmC9D;;;GAGG;AACH,MAAa,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,oCAAe,CAAC,eAAe,CAAC,KAAK,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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;AAlHD,oBAkHC","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.0 - will not be removed until after 2026-06-13. Use [[label]] instead. */\n labelDefinition: LabelDefinition;\n label?: LabelDefinition;\n classInfo?: ClassInfo;\n values: ValuesDictionary<Value>;\n displayValues: ValuesDictionary<DisplayValue>;\n mergedFieldNames: string[];\n extendedData?: { [key: string]: any };\n}\n\n/**\n * Props for creating [[Item]].\n * @public\n */\ninterface ItemProps {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n label: LabelDefinition;\n classInfo?: ClassInfo;\n values: ValuesDictionary<Value>;\n displayValues: ValuesDictionary<DisplayValue>;\n mergedFieldNames: string[];\n extendedData?: { [key: string]: any };\n}\n\n/**\n * A data structure that represents a single content record.\n * @public\n */\nexport class Item {\n /**\n * Keys of input instances that caused this item to be included in content. Only set if the content is\n * created with [[ContentFlags.IncludeInputKeys]] flag.\n */\n public inputKeys?: InstanceKey[];\n /** Keys of instances whose data is contained in this item */\n public primaryKeys: InstanceKey[];\n /** Display label of the item */\n public label: LabelDefinition;\n /** For cases when item consists only of same class instances, information about the ECClass */\n public classInfo?: ClassInfo;\n /** Raw values dictionary */\n public values: ValuesDictionary<Value>;\n /** Display values dictionary */\n public displayValues: ValuesDictionary<DisplayValue>;\n /** List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging)) */\n public mergedFieldNames: string[];\n /** Extended data injected into this content item */\n public extendedData?: { [key: string]: any };\n\n /**\n * Creates an instance of Item.\n * @param primaryKeys Keys of instances whose data is contained in this item\n * @param label Display label of the item\n * @param imageId ID of the image associated with this item\n * @param classInfo For cases when item consists only of same class instances, information about the ECClass\n * @param values Raw values dictionary\n * @param displayValues Display values dictionary\n * @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))\n * @param extendedData Extended data injected into this content item\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `ItemProps` instead.\n */\n public constructor(\n primaryKeys: InstanceKey[],\n label: string | LabelDefinition,\n imageId: string,\n classInfo: ClassInfo | undefined,\n values: ValuesDictionary<Value>,\n displayValues: ValuesDictionary<DisplayValue>,\n mergedFieldNames: string[],\n extendedData?: { [key: string]: any },\n );\n public constructor(props: ItemProps);\n public constructor(\n primaryKeysOrProps: ItemProps | InstanceKey[],\n label?: string | LabelDefinition,\n imageId?: string,\n classInfo?: ClassInfo | undefined,\n values?: ValuesDictionary<Value>,\n displayValues?: ValuesDictionary<DisplayValue>,\n mergedFieldNames?: string[],\n extendedData?: { [key: string]: any },\n ) {\n /* c8 ignore next 12 */\n const props = Array.isArray(primaryKeysOrProps)\n ? {\n primaryKeys: primaryKeysOrProps,\n label: typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : label!,\n imageId: imageId!,\n classInfo,\n values: values!,\n displayValues: displayValues!,\n mergedFieldNames: mergedFieldNames!,\n extendedData,\n }\n : primaryKeysOrProps;\n\n if (\"inputKeys\" in props) {\n this.inputKeys = props.inputKeys;\n }\n this.primaryKeys = props.primaryKeys;\n this.classInfo = props.classInfo;\n this.values = props.values;\n this.displayValues = props.displayValues;\n this.mergedFieldNames = props.mergedFieldNames;\n this.extendedData = props.extendedData;\n this.label = props.label;\n }\n\n /**\n * Is value of field with the specified name merged in this record.\n */\n public isFieldMerged(fieldName: string): boolean {\n return -1 !== this.mergedFieldNames.indexOf(fieldName);\n }\n\n /** Serialize this object to JSON */\n public toJSON(): ItemJSON {\n const { label, ...baseItem } = this;\n return omitUndefined({\n ...baseItem,\n labelDefinition: label,\n label,\n });\n }\n\n /** Deserialize [[Item]] from JSON */\n public static fromJSON(json: ItemJSON | string | undefined): Item | undefined {\n if (!json) {\n return undefined;\n }\n\n if (typeof json === \"string\") {\n return Item.fromJSON(JSON.parse(json));\n }\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const { labelDefinition, label, ...baseJson } = json;\n return new Item({\n ...baseJson,\n label: label ?? labelDefinition,\n });\n }\n}\n"]}
|
|
@@ -75,7 +75,7 @@ export interface NestedContentValue {
|
|
|
75
75
|
mergedFieldNames: string[];
|
|
76
76
|
/**
|
|
77
77
|
* Label of the ECInstance that this `NestedContentValue` is based on.
|
|
78
|
-
* @deprecated in 5.
|
|
78
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[label]] instead.
|
|
79
79
|
*/
|
|
80
80
|
labelDefinition?: LabelDefinition;
|
|
81
81
|
label?: LabelDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAYH,cAAc;AACd,2DAA2D;AAC3D,IAAiB,KAAK,CA8BrB;AA9BD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC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AA2DD,SAAS,oBAAoB,CAAC,CAAQ;IACpC,OAAO,CACL,CAAC,KAAK,SAAS;QACf,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC;YACb,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBACJ,CAAC,CAAC,CAAC,CAAwB,CAAC,WAAW,KAAK,SAAS;gBACrD,CAAC,CAAC,CAAC,CAAwB,CAAC,MAAM,KAAK,SAAS;gBAChD,CAAC,CAAC,CAAC,CAAwB,CAAC,aAAa,KAAK,SAAS;gBACvD,CAAC,CAAC,CAAC,CAAwB,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,CAAuB;IAC3C,+GAA+G;IAC/G,sDAAsD;IACtD,OAAO,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AACD,SAAS,UAAU,CAAC,CAAuB;IACzC,OAAO,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC;AACD,SAAS,gBAAgB,CAAC,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5C,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 { InstanceId, InstanceKey } from \"../EC.js\";\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { ValuesDictionary } from \"../Utils.js\";\n\n/**\n * Raw value type\n * @public\n */\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace Value {\n /** Is the value a primitive */\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: Value): value is ValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: Value): value is ValuesMap {\n return isMapValue(value);\n }\n\n /** Is the value a nested content value */\n export function isNestedContent(value: Value): value is NestedContentValue[] {\n return isNestedContentValue(value);\n }\n\n /** Is the value a navigation value */\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\n return (\n value !== undefined &&\n (value as NavigationPropertyValue).id !== undefined &&\n (value as NavigationPropertyValue).className !== undefined &&\n (value as NavigationPropertyValue).label !== undefined\n );\n }\n}\n\n/**\n * A map of raw values\n * @public\n */\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of raw values\n * @public\n */\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Display value type.\n * @public\n */\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace DisplayValue {\n /** Is the value a primitive */\n export function isPrimitive(value: DisplayValue): value is string | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\n return isMapValue(value);\n }\n}\n\n/**\n * A map of display values\n * @public\n */\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of display values\n * @public\n */\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Data structure that describes nested content value.\n * @public\n */\nexport interface NestedContentValue {\n /** Keys of instances whose content is contained in this value */\n primaryKeys: InstanceKey[];\n /** Content values map */\n values: ValuesDictionary<Value>;\n /** Content display values map */\n displayValues: ValuesDictionary<DisplayValue>;\n /** Names of fields whose values are merged */\n mergedFieldNames: string[];\n /**\n * Label of the ECInstance that this `NestedContentValue` is based on.\n * @deprecated in 5.
|
|
1
|
+
{"version":3,"file":"Value.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Value.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAYH,cAAc;AACd,2DAA2D;AAC3D,IAAiB,KAAK,CA8BrB;AA9BD,WAAiB,KAAK;IACpB,+BAA+B;IAC/B,SAAgB,WAAW,CAAC,KAAY;QACtC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAFe,iBAAW,cAE1B,CAAA;IAED,4BAA4B;IAC5B,SAAgB,OAAO,CAAC,KAAY;QAClC,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAFe,aAAO,UAEtB,CAAA;IAED,kCAAkC;IAClC,SAAgB,KAAK,CAAC,KAAY;QAChC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAFe,WAAK,QAEpB,CAAA;IAED,0CAA0C;IAC1C,SAAgB,eAAe,CAAC,KAAY;QAC1C,OAAO,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;IAFe,qBAAe,kBAE9B,CAAA;IAED,sCAAsC;IACtC,SAAgB,iBAAiB,CAAC,KAAY;QAC5C,OAAO,CACL,KAAK,KAAK,SAAS;YAClB,KAAiC,CAAC,EAAE,KAAK,SAAS;YAClD,KAAiC,CAAC,SAAS,KAAK,SAAS;YACzD,KAAiC,CAAC,KAAK,KAAK,SAAS,CACvD,CAAC;IACJ,CAAC;IAPe,uBAAiB,oBAOhC,CAAA;AACH,CAAC,EA9BgB,KAAK,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QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC;AACD,SAAS,gBAAgB,CAAC,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5C,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 { InstanceId, InstanceKey } from \"../EC.js\";\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { ValuesDictionary } from \"../Utils.js\";\n\n/**\n * Raw value type\n * @public\n */\nexport type Value = string | number | boolean | undefined | ValuesMap | ValuesArray | NavigationPropertyValue | NestedContentValue[];\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace Value {\n /** Is the value a primitive */\n export function isPrimitive(value: Value): value is string | number | boolean | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: Value): value is ValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: Value): value is ValuesMap {\n return isMapValue(value);\n }\n\n /** Is the value a nested content value */\n export function isNestedContent(value: Value): value is NestedContentValue[] {\n return isNestedContentValue(value);\n }\n\n /** Is the value a navigation value */\n export function isNavigationValue(value: Value): value is NavigationPropertyValue {\n return (\n value !== undefined &&\n (value as NavigationPropertyValue).id !== undefined &&\n (value as NavigationPropertyValue).className !== undefined &&\n (value as NavigationPropertyValue).label !== undefined\n );\n }\n}\n\n/**\n * A map of raw values\n * @public\n */\nexport interface ValuesMap extends ValuesDictionary<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of raw values\n * @public\n */\nexport interface ValuesArray extends Array<Value> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Display value type.\n * @public\n */\nexport type DisplayValue = string | undefined | DisplayValuesMap | DisplayValuesArray;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace DisplayValue {\n /** Is the value a primitive */\n export function isPrimitive(value: DisplayValue): value is string | undefined {\n return isPrimitiveValue(value);\n }\n\n /** Is the value an array */\n export function isArray(value: DisplayValue): value is DisplayValuesArray {\n return isArrayValue(value);\n }\n\n /** Is the value a map / struct */\n export function isMap(value: DisplayValue): value is DisplayValuesMap {\n return isMapValue(value);\n }\n}\n\n/**\n * A map of display values\n * @public\n */\nexport interface DisplayValuesMap extends ValuesDictionary<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * An array of display values\n * @public\n */\nexport interface DisplayValuesArray extends Array<DisplayValue> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Data structure that describes nested content value.\n * @public\n */\nexport interface NestedContentValue {\n /** Keys of instances whose content is contained in this value */\n primaryKeys: InstanceKey[];\n /** Content values map */\n values: ValuesDictionary<Value>;\n /** Content display values map */\n displayValues: ValuesDictionary<DisplayValue>;\n /** Names of fields whose values are merged */\n mergedFieldNames: string[];\n /**\n * Label of the ECInstance that this `NestedContentValue` is based on.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[label]] instead.\n */\n labelDefinition?: LabelDefinition;\n label?: LabelDefinition;\n}\n\n/**\n * Data structure that describes value of the navigation property.\n * @public\n */\nexport interface NavigationPropertyValue {\n /** Label of target instance. */\n label: LabelDefinition;\n /** Full class name of target instance in format `SchemaName:ClassName` */\n className: string;\n /** Id of target instance. */\n id: InstanceId;\n}\n\n/**\n * A group of raw values and their common display value.\n * @public\n */\nexport interface DisplayValueGroup {\n /** Common display value for all grouped raw values */\n displayValue: DisplayValue;\n /** A list of grouped raw values */\n groupedRawValues: Value[];\n}\n\nfunction isNestedContentValue(v: Value): v is NestedContentValue[] {\n return (\n v !== undefined &&\n Array.isArray(v) &&\n (v.length === 0 ||\n (!!v[0] &&\n (v[0] as NestedContentValue).primaryKeys !== undefined &&\n (v[0] as NestedContentValue).values !== undefined &&\n (v[0] as NestedContentValue).displayValues !== undefined &&\n (v[0] as NestedContentValue).mergedFieldNames !== undefined))\n );\n}\n\nfunction isArrayValue(v: Value | DisplayValue): v is ValuesArray | DisplayValuesArray {\n // note: we don't guarantee by 100% that v is ValuesArray | DisplayValuesArray, but merely make compiler happy.\n // we have other means to determine the type of value.\n return v !== undefined && Array.isArray(v);\n}\nfunction isMapValue(v: Value | DisplayValue): v is ValuesMap | DisplayValuesMap {\n return v !== undefined && typeof v === \"object\" && !Array.isArray(v);\n}\nfunction isPrimitiveValue(v: Value | DisplayValue): v is string | number | boolean | undefined {\n return !isArrayValue(v) && !isMapValue(v);\n}\n"]}
|
|
@@ -16,7 +16,7 @@ export interface Node {
|
|
|
16
16
|
description?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Image ID
|
|
19
|
-
* @deprecated in 3.
|
|
19
|
+
* @deprecated in 3.3.0 - might be removed in next major version. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. Will
|
|
20
20
|
* be removed with [[PropertyGroup.imageId]] and [[PropertyRangeGroupSpecification.imageId]].
|
|
21
21
|
*/
|
|
22
22
|
imageId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.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 Hierarchies\n */\n\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { NodeKey } from \"./Key.js\";\n\n/**\n * Data structure that describes a tree node.\n * @public\n */\nexport interface Node {\n /** A key that uniquely identifies a node. */\n key: NodeKey;\n /** Definition of node display label */\n label: LabelDefinition;\n /** Extensive description */\n description?: string;\n /**\n * Image ID\n * @deprecated in 3.
|
|
1
|
+
{"version":3,"file":"Node.js","sourceRoot":"","sources":["../../../../src/presentation-common/hierarchy/Node.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 Hierarchies\n */\n\nimport { LabelDefinition } from \"../LabelDefinition.js\";\nimport { NodeKey } from \"./Key.js\";\n\n/**\n * Data structure that describes a tree node.\n * @public\n */\nexport interface Node {\n /** A key that uniquely identifies a node. */\n key: NodeKey;\n /** Definition of node display label */\n label: LabelDefinition;\n /** Extensive description */\n description?: string;\n /**\n * Image ID\n * @deprecated in 3.3.0 - might be removed in next major version. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. Will\n * be removed with [[PropertyGroup.imageId]] and [[PropertyRangeGroupSpecification.imageId]].\n */\n imageId?: string;\n /** Does this node have child nodes */\n hasChildren?: boolean;\n /** Is this node selectable */\n isSelectionDisabled?: boolean;\n /** Is this node editable */\n isEditable?: boolean;\n /** Is this node expanded */\n isExpanded?: boolean;\n /**\n * Identifies whether the hierarchy level below this node supports filtering. If not, requesting either a hierarchy level descriptor or\n * a hierarchy level with [[HierarchyRequestOptions.instanceFilter]] will throw an error with [[PresentationStatus.InvalidArgument]] status.\n */\n supportsFiltering?: boolean;\n /** Extended data injected into this node */\n extendedData?: {\n [key: string]: any;\n };\n}\n\n/**\n * Partial node definition.\n * @public\n */\nexport type PartialNode = AllOrNone<Partial<Node>, \"key\" | \"label\">;\n\ntype AllOrNone<T, P extends keyof T> = Omit<T, P> & ({ [K in P]?: never } | Required<Pick<T, P>>);\n"]}
|
|
@@ -133,7 +133,7 @@ export interface PropertyGroup extends GroupingSpecificationBase {
|
|
|
133
133
|
* it's up to the UI component to decide what to do with it.
|
|
134
134
|
*
|
|
135
135
|
* @minLength 1
|
|
136
|
-
* @deprecated in 5.
|
|
136
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
137
137
|
*/
|
|
138
138
|
imageId?: string;
|
|
139
139
|
/** Specifies whether a grouping node should be created if there is only one item in that group. */
|
|
@@ -156,7 +156,7 @@ export interface PropertyRangeGroupSpecification {
|
|
|
156
156
|
* ID of an image to use for the grouping node. Defaults to [[PropertyGroup.imageId]] specified in [[PropertyGroup]].
|
|
157
157
|
*
|
|
158
158
|
* @minLength 1
|
|
159
|
-
* @deprecated in 5.
|
|
159
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
160
160
|
*/
|
|
161
161
|
imageId?: string;
|
|
162
162
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GroupingRule.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/GroupingRule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAsCH;;;GAGG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,mDAAqB,CAAA;IACrB,qEAAuC,CAAA;AACzC,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAgED;;;GAGG;AACH,IAAY,sCAYX;AAZD,WAAY,sCAAsC;IAChD,qCAAqC;IACrC,yDAAe,CAAA;IAEf;;;;;;OAMG;IACH,qEAA2B,CAAA;AAC7B,CAAC,EAZW,sCAAsC,sDAAtC,sCAAsC,QAYjD","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 PresentationRules\n */\n\nimport { SingleSchemaClassSpecification } from \"../ClassSpecifications.js\";\nimport { RuleBase } from \"../Rule.js\";\n\n/**\n * Grouping rules provide advanced ways to group instances when creating hierarchies.\n *\n * @see [Grouping rule reference documentation page]($docs/presentation/hierarchies/GroupingRule.md)\n * @public\n */\nexport interface GroupingRule extends RuleBase {\n /** Used for serializing to JSON. */\n ruleType: \"Grouping\";\n\n /**\n * An [ECExpression]($docs/presentation/hierarchies/ECExpressions.md#rule-condition) that results in\n * a boolean value. If specified, the grouping rule applies only to instance nodes that cause the condition\n * to evaluate to `true`.\n */\n condition?: string;\n\n /** Specification of ECClass which should be grouped using this rule. */\n class: SingleSchemaClassSpecification;\n\n /**\n * Specifies a list of [grouping specifications]($docs/presentation/hierarchies/GroupingRule.md#grouping-specifications)\n * which describe the kind of grouping that should be applied.\n */\n groups: GroupingSpecification[];\n}\n\n/**\n * Grouping rule specifications.\n * @public\n */\nexport declare type GroupingSpecification = ClassGroup | PropertyGroup | SameLabelInstanceGroup;\n\n/**\n * Available types of [[GroupingSpecification]].\n * @public\n */\nexport enum GroupingSpecificationTypes {\n Class = \"Class\",\n Property = \"Property\",\n SameLabelInstance = \"SameLabelInstance\",\n}\n\n/**\n * Base interface for all [[GroupingSpecification]] implementations. Not\n * meant to be used directly, see `GroupingSpecification`.\n *\n * @public\n */\nexport interface GroupingSpecificationBase {\n /**\n * Type of the subclass\n * @see GroupingSpecificationTypes\n */\n specType: `${GroupingSpecificationTypes}`;\n}\n\n/**\n * Base class grouping allows grouping ECInstance nodes by their base class (as opposed to the hierarchy\n * specifications' `groupByClass` attribute, which always groups by direct class).\n *\n * @see [Base class grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#base-class-grouping)\n * @public\n */\nexport interface ClassGroup extends GroupingSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"Class\";\n\n /** Specifies whether a grouping node should be created if there is only one item in that group. */\n createGroupForSingleItem?: boolean;\n\n /**\n * Specification of the base ECClass to group by. If specified, allows grouping by a subclass of the class\n * specified by rule's `class` attribute.\n */\n baseClass?: SingleSchemaClassSpecification;\n}\n\n/**\n * Allows grouping multiple instances with the same label into one ECInstances type of node. Similar to display label grouping,\n * but instead of showing a grouping node with multiple grouped ECInstance nodes, it shows a single ECInstances node which represents\n * multiple ECInstances.\n *\n * @see [Same label instance grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#same-label-instance-grouping)\n * @public\n */\nexport interface SameLabelInstanceGroup extends GroupingSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"SameLabelInstance\";\n\n /**\n * Grouping nodes by label is an expensive operation because it requires the whole hierarchy level to be created before even the first\n * grouped node can be produced. To alleviate the performance impact when this specification is used, two `applicationStage` settings have been introduced:\n *\n * - `\"Query\"` groups instances during ECSql query, which can often make use of database indices and is generally fairly quick. It is chosen\n * as the default option, however, it fails to produce grouping nodes when certain ruleset specifications are involved.\n *\n * - `\"PostProcess\"` groups instances after the whole hierarchy level is built. It incurs a large performance penalty, but it will\n * produce the expected result in all cases.\n *\n * @see SameLabelInstanceGroupApplicationStage\n */\n applicationStage?: `${SameLabelInstanceGroupApplicationStage}`;\n}\n\n/**\n * Specifies hierarchy creation stages used to apply [[SameLabelInstanceGroup]] grouping.\n * @public\n */\nexport enum SameLabelInstanceGroupApplicationStage {\n /** Apply grouping at query stage. */\n Query = \"Query\",\n\n /**\n * Apply grouping at post-processing stage.\n *\n * This allows grouping nodes created by different hierarchy specifications at\n * a higher performance cost as it requires loading the whole hierarchy level before\n * returning even the first node - avoid using with large numbers of nodes.\n */\n PostProcess = \"PostProcess\",\n}\n\n/**\n * Property grouping allows grouping by a property of the instance by value or by given ranges of values.\n *\n * @see [Property grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#property-grouping)\n * @public\n */\nexport interface PropertyGroup extends GroupingSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"Property\";\n\n /**\n * Name of the ECProperty which is used for grouping. The property must exist on the ECClass specified by the\n * rule's `class` attribute and it must be of either a primitive or a navigation type.\n *\n * @minLength 1\n */\n propertyName: string;\n\n /**\n * Specifies grouping node's image ID. If set, the ID is assigned to [[Node.imageId]] and\n * it's up to the UI component to decide what to do with it.\n *\n * @minLength 1\n * @deprecated in 5.
|
|
1
|
+
{"version":3,"file":"GroupingRule.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/customization/GroupingRule.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAsCH;;;GAGG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,mDAAqB,CAAA;IACrB,qEAAuC,CAAA;AACzC,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAgED;;;GAGG;AACH,IAAY,sCAYX;AAZD,WAAY,sCAAsC;IAChD,qCAAqC;IACrC,yDAAe,CAAA;IAEf;;;;;;OAMG;IACH,qEAA2B,CAAA;AAC7B,CAAC,EAZW,sCAAsC,sDAAtC,sCAAsC,QAYjD","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 PresentationRules\n */\n\nimport { SingleSchemaClassSpecification } from \"../ClassSpecifications.js\";\nimport { RuleBase } from \"../Rule.js\";\n\n/**\n * Grouping rules provide advanced ways to group instances when creating hierarchies.\n *\n * @see [Grouping rule reference documentation page]($docs/presentation/hierarchies/GroupingRule.md)\n * @public\n */\nexport interface GroupingRule extends RuleBase {\n /** Used for serializing to JSON. */\n ruleType: \"Grouping\";\n\n /**\n * An [ECExpression]($docs/presentation/hierarchies/ECExpressions.md#rule-condition) that results in\n * a boolean value. If specified, the grouping rule applies only to instance nodes that cause the condition\n * to evaluate to `true`.\n */\n condition?: string;\n\n /** Specification of ECClass which should be grouped using this rule. */\n class: SingleSchemaClassSpecification;\n\n /**\n * Specifies a list of [grouping specifications]($docs/presentation/hierarchies/GroupingRule.md#grouping-specifications)\n * which describe the kind of grouping that should be applied.\n */\n groups: GroupingSpecification[];\n}\n\n/**\n * Grouping rule specifications.\n * @public\n */\nexport declare type GroupingSpecification = ClassGroup | PropertyGroup | SameLabelInstanceGroup;\n\n/**\n * Available types of [[GroupingSpecification]].\n * @public\n */\nexport enum GroupingSpecificationTypes {\n Class = \"Class\",\n Property = \"Property\",\n SameLabelInstance = \"SameLabelInstance\",\n}\n\n/**\n * Base interface for all [[GroupingSpecification]] implementations. Not\n * meant to be used directly, see `GroupingSpecification`.\n *\n * @public\n */\nexport interface GroupingSpecificationBase {\n /**\n * Type of the subclass\n * @see GroupingSpecificationTypes\n */\n specType: `${GroupingSpecificationTypes}`;\n}\n\n/**\n * Base class grouping allows grouping ECInstance nodes by their base class (as opposed to the hierarchy\n * specifications' `groupByClass` attribute, which always groups by direct class).\n *\n * @see [Base class grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#base-class-grouping)\n * @public\n */\nexport interface ClassGroup extends GroupingSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"Class\";\n\n /** Specifies whether a grouping node should be created if there is only one item in that group. */\n createGroupForSingleItem?: boolean;\n\n /**\n * Specification of the base ECClass to group by. If specified, allows grouping by a subclass of the class\n * specified by rule's `class` attribute.\n */\n baseClass?: SingleSchemaClassSpecification;\n}\n\n/**\n * Allows grouping multiple instances with the same label into one ECInstances type of node. Similar to display label grouping,\n * but instead of showing a grouping node with multiple grouped ECInstance nodes, it shows a single ECInstances node which represents\n * multiple ECInstances.\n *\n * @see [Same label instance grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#same-label-instance-grouping)\n * @public\n */\nexport interface SameLabelInstanceGroup extends GroupingSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"SameLabelInstance\";\n\n /**\n * Grouping nodes by label is an expensive operation because it requires the whole hierarchy level to be created before even the first\n * grouped node can be produced. To alleviate the performance impact when this specification is used, two `applicationStage` settings have been introduced:\n *\n * - `\"Query\"` groups instances during ECSql query, which can often make use of database indices and is generally fairly quick. It is chosen\n * as the default option, however, it fails to produce grouping nodes when certain ruleset specifications are involved.\n *\n * - `\"PostProcess\"` groups instances after the whole hierarchy level is built. It incurs a large performance penalty, but it will\n * produce the expected result in all cases.\n *\n * @see SameLabelInstanceGroupApplicationStage\n */\n applicationStage?: `${SameLabelInstanceGroupApplicationStage}`;\n}\n\n/**\n * Specifies hierarchy creation stages used to apply [[SameLabelInstanceGroup]] grouping.\n * @public\n */\nexport enum SameLabelInstanceGroupApplicationStage {\n /** Apply grouping at query stage. */\n Query = \"Query\",\n\n /**\n * Apply grouping at post-processing stage.\n *\n * This allows grouping nodes created by different hierarchy specifications at\n * a higher performance cost as it requires loading the whole hierarchy level before\n * returning even the first node - avoid using with large numbers of nodes.\n */\n PostProcess = \"PostProcess\",\n}\n\n/**\n * Property grouping allows grouping by a property of the instance by value or by given ranges of values.\n *\n * @see [Property grouping documentation section]($docs/presentation/hierarchies/GroupingRule.md#property-grouping)\n * @public\n */\nexport interface PropertyGroup extends GroupingSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"Property\";\n\n /**\n * Name of the ECProperty which is used for grouping. The property must exist on the ECClass specified by the\n * rule's `class` attribute and it must be of either a primitive or a navigation type.\n *\n * @minLength 1\n */\n propertyName: string;\n\n /**\n * Specifies grouping node's image ID. If set, the ID is assigned to [[Node.imageId]] and\n * it's up to the UI component to decide what to do with it.\n *\n * @minLength 1\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n imageId?: string;\n\n /** Specifies whether a grouping node should be created if there is only one item in that group. */\n createGroupForSingleItem?: boolean;\n\n /**\n * Should a separate grouping node be created for nodes whose grouping value is not set or is set to an empty string.\n */\n createGroupForUnspecifiedValues?: boolean;\n\n /** Ranges into which the grouping values are divided. Instances are grouped by value if no ranges are specified. */\n ranges?: PropertyRangeGroupSpecification[];\n}\n\n/**\n * Describes a grouping range.\n *\n * @see [Property range group specification documentation section]($docs/presentation/hierarchies/GroupingRule.md#attribute-ranges)\n * @public\n */\nexport interface PropertyRangeGroupSpecification {\n /**\n * ID of an image to use for the grouping node. Defaults to [[PropertyGroup.imageId]] specified in [[PropertyGroup]].\n *\n * @minLength 1\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n imageId?: string;\n\n /**\n * Grouping node label. May be [localized]($docs/presentation/advanced/Localization.md).\n * Defaults to `{from value} - {to value}`.\n *\n * @minLength 1\n */\n label?: string;\n\n /**\n * Value that defines the range start (inclusive).\n *\n * @minLength 1\n */\n fromValue: string;\n\n /**\n * Value that defines the range end (inclusive).\n *\n * @minLength 1\n */\n toValue: string;\n}\n"]}
|
|
@@ -27,7 +27,7 @@ export interface CustomNodeSpecification extends ChildNodeSpecificationBase {
|
|
|
27
27
|
* Specifies node's image ID. If set, the ID is assigned to [[Node.imageId]] and it's
|
|
28
28
|
* up to the UI component to decide what to do with it.
|
|
29
29
|
*
|
|
30
|
-
* @deprecated in 5.
|
|
30
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.
|
|
31
31
|
*/
|
|
32
32
|
imageId?: string;
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomNodeSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/hierarchy/CustomNodeSpecification.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 PresentationRules\n */\n\nimport { ChildNodeSpecificationBase } from \"./ChildNodeSpecification.js\";\n\n/**\n * Returns a static custom-defined node that's not based on an ECInstance.\n *\n * @see [Custom node specification reference documentation page]($docs/presentation/hierarchies/CustomNode.md)\n * @public\n */\nexport interface CustomNodeSpecification extends ChildNodeSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"CustomNode\";\n\n /** Specifies node type, which is assigned to node's key. */\n type: string;\n\n /**\n * Specifies node label. This is a string value that may be [localized]($docs/presentation/advanced/Localization.md).\n */\n label: string;\n\n /**\n * Specifies the value of [[Node.description]] property, which is a string that may\n * be [localized]($docs/presentation/advanced/Localization.md). UI component displaying the node may choose\n * whether and how to surface this information to users.\n */\n description?: string;\n\n /**\n * Specifies node's image ID. If set, the ID is assigned to [[Node.imageId]] and it's\n * up to the UI component to decide what to do with it.\n *\n * @deprecated in 5.
|
|
1
|
+
{"version":3,"file":"CustomNodeSpecification.js","sourceRoot":"","sources":["../../../../../src/presentation-common/rules/hierarchy/CustomNodeSpecification.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 PresentationRules\n */\n\nimport { ChildNodeSpecificationBase } from \"./ChildNodeSpecification.js\";\n\n/**\n * Returns a static custom-defined node that's not based on an ECInstance.\n *\n * @see [Custom node specification reference documentation page]($docs/presentation/hierarchies/CustomNode.md)\n * @public\n */\nexport interface CustomNodeSpecification extends ChildNodeSpecificationBase {\n /** Used for serializing to JSON. */\n specType: \"CustomNode\";\n\n /** Specifies node type, which is assigned to node's key. */\n type: string;\n\n /**\n * Specifies node label. This is a string value that may be [localized]($docs/presentation/advanced/Localization.md).\n */\n label: string;\n\n /**\n * Specifies the value of [[Node.description]] property, which is a string that may\n * be [localized]($docs/presentation/advanced/Localization.md). UI component displaying the node may choose\n * whether and how to surface this information to users.\n */\n description?: string;\n\n /**\n * Specifies node's image ID. If set, the ID is assigned to [[Node.imageId]] and it's\n * up to the UI component to decide what to do with it.\n *\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[ExtendedDataRule]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n imageId?: string;\n}\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Data structure that describes a [selection scope]($docs/presentation/unified-selection/index#selection-scopes).
|
|
6
6
|
* @public
|
|
7
|
-
* @deprecated in 5.0. Use `Props<typeof computeSelection>["scope"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
7
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `Props<typeof computeSelection>["scope"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
8
8
|
*/
|
|
9
9
|
export interface SelectionScope {
|
|
10
10
|
/** Unique ID of the selection scope */
|
|
@@ -17,7 +17,7 @@ export interface SelectionScope {
|
|
|
17
17
|
/**
|
|
18
18
|
* A data structure that defines properties for applying element selection scope.
|
|
19
19
|
* @public
|
|
20
|
-
* @deprecated in 5.0. Use `Props<typeof computeSelection>["scope"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
20
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `Props<typeof computeSelection>["scope"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
21
21
|
*/
|
|
22
22
|
export interface ElementSelectionScopeProps {
|
|
23
23
|
/** Identifies this as the "element" selection scope */
|
|
@@ -34,7 +34,7 @@ export interface ElementSelectionScopeProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* A data structure that defines properties for applying a selection scope.
|
|
36
36
|
* @public
|
|
37
|
-
* @deprecated in 5.0. Use `Props<typeof computeSelection>["scope"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
37
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `Props<typeof computeSelection>["scope"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
38
38
|
*/
|
|
39
39
|
export type SelectionScopeProps = ElementSelectionScopeProps | {
|
|
40
40
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionScope.js","sourceRoot":"","sources":["../../../../src/presentation-common/selection/SelectionScope.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\n/**\n * Data structure that describes a [selection scope]($docs/presentation/unified-selection/index#selection-scopes).\n * @public\n * @deprecated in 5.0. Use `Props<typeof computeSelection>[\"scope\"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport interface SelectionScope {\n /** Unique ID of the selection scope */\n id: string;\n /** Label */\n label: string;\n /** Description */\n description?: string;\n}\n\n/**\n * A data structure that defines properties for applying element selection scope.\n * @public\n * @deprecated in 5.0. Use `Props<typeof computeSelection>[\"scope\"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport interface ElementSelectionScopeProps {\n /** Identifies this as the \"element\" selection scope */\n id: \"element\";\n /**\n * Specifies how far \"up\" we should walk to find the target element. When not specified or `0`,\n * the target element matches the request element. When `1`, the target element matches the direct parent element.\n * When `2`, the target element is parent of the parent element and so on. In all situations when this is `> 0`,\n * we're not walking further than the last existing element, for example when `ancestorLevel = 1` (direct parent\n * element is requested), but the request element doesn't have a parent, the request element is returned as the result.\n */\n ancestorLevel?: number;\n}\n\n/**\n * A data structure that defines properties for applying a selection scope.\n * @public\n * @deprecated in 5.0. Use `Props<typeof computeSelection>[\"scope\"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport type SelectionScopeProps = ElementSelectionScopeProps | { id: string };\n"]}
|
|
1
|
+
{"version":3,"file":"SelectionScope.js","sourceRoot":"","sources":["../../../../src/presentation-common/selection/SelectionScope.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,qDAAqD;AACrD;;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/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module UnifiedSelection\n */\n\n/**\n * Data structure that describes a [selection scope]($docs/presentation/unified-selection/index#selection-scopes).\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `Props<typeof computeSelection>[\"scope\"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport interface SelectionScope {\n /** Unique ID of the selection scope */\n id: string;\n /** Label */\n label: string;\n /** Description */\n description?: string;\n}\n\n/**\n * A data structure that defines properties for applying element selection scope.\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `Props<typeof computeSelection>[\"scope\"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport interface ElementSelectionScopeProps {\n /** Identifies this as the \"element\" selection scope */\n id: \"element\";\n /**\n * Specifies how far \"up\" we should walk to find the target element. When not specified or `0`,\n * the target element matches the request element. When `1`, the target element matches the direct parent element.\n * When `2`, the target element is parent of the parent element and so on. In all situations when this is `> 0`,\n * we're not walking further than the last existing element, for example when `ancestorLevel = 1` (direct parent\n * element is requested), but the request element doesn't have a parent, the request element is returned as the result.\n */\n ancestorLevel?: number;\n}\n\n/**\n * A data structure that defines properties for applying a selection scope.\n * @public\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `Props<typeof computeSelection>[\"scope\"]` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport type SelectionScopeProps = ElementSelectionScopeProps | { id: string };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncTasks.js","sourceRoot":"","sources":["../../../src/presentation-common/AsyncTasks.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,iBAAiB;IACpB,iBAAiB,GAAG,IAAI,GAAG,EAAc,CAAC;IAClD,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IACM,cAAc;QACnB,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC/B,OAAO;YACL,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;SAC1D,CAAC;IACJ,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 Core\n */\n\nimport { Guid, GuidString } from \"@itwin/core-bentley\";\n\n/**\n * A helper to track ongoing async tasks. Usage:\n * ```\n * {
|
|
1
|
+
{"version":3,"file":"AsyncTasks.js","sourceRoot":"","sources":["../../../src/presentation-common/AsyncTasks.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAc,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,iBAAiB;IACpB,iBAAiB,GAAG,IAAI,GAAG,EAAc,CAAC;IAClD,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IACM,cAAc;QACnB,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAC9B,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC/B,OAAO;YACL,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;SAC1D,CAAC;IACJ,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 Core\n */\n\nimport { Guid, GuidString } from \"@itwin/core-bentley\";\n\n/**\n * A helper to track ongoing async tasks. Usage:\n * ```\n * {\n * using _r = tracker.trackAsyncTask();\n * await doSomethingAsync();\n * }\n * ```\n *\n * Can be used with `waitForPendingAsyncs` in test helpers to wait for all\n * async tasks to complete.\n *\n * @internal\n */\nexport class AsyncTasksTracker {\n private _asyncsInProgress = new Set<GuidString>();\n public get pendingAsyncs() {\n return this._asyncsInProgress;\n }\n public trackAsyncTask(): Disposable {\n const id = Guid.createValue();\n this._asyncsInProgress.add(id);\n return {\n [Symbol.dispose]: () => this._asyncsInProgress.delete(id),\n };\n }\n}\n"]}
|