@itwin/presentation-common 5.0.0-dev.40 → 5.0.0-dev.49
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 +11 -1
- package/lib/cjs/presentation-common/AsyncTasks.d.ts +4 -4
- package/lib/cjs/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/cjs/presentation-common/AsyncTasks.js +4 -3
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts +31 -0
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +3 -2
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js +6 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.d.ts +9 -0
- package/lib/cjs/presentation-common/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-common/Utils.js +17 -0
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js +64 -3
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +22 -11
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.js +5 -4
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +12 -7
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common.d.ts +1 -1
- package/lib/cjs/presentation-common.d.ts.map +1 -1
- package/lib/cjs/presentation-common.js +4 -1
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.d.ts +4 -4
- package/lib/esm/presentation-common/AsyncTasks.d.ts.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.js +4 -3
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts +31 -0
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +3 -2
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js +6 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/Utils.d.ts +9 -0
- package/lib/esm/presentation-common/Utils.d.ts.map +1 -1
- package/lib/esm/presentation-common/Utils.js +16 -0
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js +65 -4
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +22 -11
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Fields.js +5 -4
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +12 -7
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common.d.ts +1 -1
- package/lib/esm/presentation-common.d.ts.map +1 -1
- package/lib/esm/presentation-common.js +1 -1
- package/lib/esm/presentation-common.js.map +1 -1
- package/package.json +10 -10
|
@@ -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,8BAWe;AACf,oCAAiE;AACjE,8GAAgG;AAGhG,yCAAoD;AAyEpD,SAAS,iBAAiB,CAAC,KAAwB;IACjD,OAAO,CAAC,CAAE,KAAa,CAAC,UAAU,CAAC;AACrC,CAAC;AAKD,SAAS,sBAAsB,CAAC,KAAwB;IACtD,OAAO,CAAC,CAAE,KAAkC,CAAC,UAAU,CAAC;AAC1D,CAAC;AAKD,SAAS,uBAAuB,CAAC,KAAwB;IACvD,OAAO,CAAC,CAAE,KAAmC,CAAC,YAAY,CAAC;AAC7D,CAAC;AAKD,SAAS,oBAAoB,CAAC,KAAwB;IACpD,OAAO,CAAC,CAAE,KAAa,CAAC,YAAY,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAa,KAAK;IAsBhB;;;;;;;;;;;OAWG;IACH,YACE,QAA6B,EAC7B,IAAY,EACZ,KAAa,EACb,IAAqB,EACrB,UAAmB,EACnB,QAAgB,EAChB,MAA0B,EAC1B,QAA8B,EAC9B,YAA0C;QAE1C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,OAAO,iBAAiB,CAAC,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AAO,CAAC,CAAkB;QACxC,OAAO,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,IAAI,CAAC;IAC7C,CAAC;IAFe,uBAAO,UAEtB,CAAA;IACD,4CAA4C;IAC5C,SAAgB,YAAY,CAAC,CAAkB;QAC7C,OAAO,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,UAAU,CAAC;IACnD,CAAC;IAFe,4BAAY,eAE3B,CAAA;AACH,CAAC,EATgB,eAAe,+BAAf,eAAe,QAS/B;AA+BD,SAAS,0BAA0B,CAAC,sBAA4C,EAAE,UAAqD;IACrI,OAAO;QACL,QAAQ,EAAE,8BAA8B,CAAC,sBAAsB,CAAC,QAAQ,EAAE,UAAU,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,SAAS,8BAA8B,CAAC,sBAAgD,EAAE,UAAqD;IAC7I,IAAA,qBAAM,EAAC,UAAU,CAAC,cAAc,CAAC,sBAAsB,CAAC,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,2BAAsB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACpJ,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 ClassInfoJSON,\n CompressedClassInfoJSON,\n NavigationPropertyInfo,\n PropertyInfo,\n PropertyInfoJSON,\n RelatedClassInfo,\n RelationshipPath,\n RelationshipPathJSON,\n StrippedRelationshipPath,\n} from \"../EC\";\nimport { PresentationError, PresentationStatus } from \"../Error\";\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification\";\nimport { CategoryDescription } from \"./Category\";\nimport { EditorDescription } from \"./Editor\";\nimport { Property, PropertyJSON } from \"./Property\";\nimport { RendererDescription } from \"./Renderer\";\nimport { TypeDescription } from \"./TypeDescription\";\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// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfoJSON> 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 */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> 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 = ClassInfoJSON> =\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 * 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 */\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 this.category = category;\n this.name = name;\n this.label = label;\n this.type = type;\n this.isReadonly = isReadonly;\n this.priority = priority;\n this.editor = editor;\n this.renderer = renderer;\n this.extendedData = 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.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.editor, this.renderer, this.extendedData);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public toJSON(): FieldJSON {\n return {\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 /** Serialize this object to compressed JSON */\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\n return this.toJSON();\n }\n\n /** Deserialize [[Field]] from JSON */\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n return PropertiesField.fromJSON(json, categories);\n }\n if (isNestedContentField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return NestedContentField.fromJSON(json, categories);\n }\n const field = Object.create(Field.prototype);\n return Object.assign(field, json, {\n category: Field.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\n if (isPropertiesField(json)) {\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n\n if (isNestedContentField(json)) {\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\n }\n\n const field = Object.create(Field.prototype);\n return Object.assign(field, json, {\n category: Field.getCategoryFromFieldJson(json, categories),\n });\n }\n\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, 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\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 * 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 */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: TypeDescription,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n super(category, name, label, description, isReadonly, priority, editor, renderer);\n this.properties = 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(\n this.category,\n this.name,\n this.label,\n this.type,\n this.isReadonly,\n this.priority,\n this.properties,\n this.editor,\n this.renderer,\n );\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public override toJSON(): PropertiesFieldJSON {\n return {\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 /** Deserialize [[PropertiesField]] from JSON */\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\n if (!json) {\n return undefined;\n }\n\n if (isArrayPropertiesField(json)) {\n return ArrayPropertiesField.fromJSON(json, categories);\n }\n if (isStructPropertiesField(json)) {\n return StructPropertiesField.fromJSON(json, categories);\n }\n\n const field = Object.create(PropertiesField.prototype);\n return Object.assign(field, 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 const field = Object.create(PropertiesField.prototype);\n return Object.assign(field, 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 * 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 public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: TypeDescription,\n itemsField: PropertiesField,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\n this.itemsField = itemsField;\n }\n\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new ArrayPropertiesField(\n this.category,\n this.name,\n this.label,\n this.type,\n this.itemsField.clone(),\n this.isReadonly,\n this.priority,\n this.properties,\n this.editor,\n this.renderer,\n );\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public override toJSON(): ArrayPropertiesFieldJSON {\n return {\n ...super.toJSON(),\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 /** Deserialize [[ArrayPropertiesField]] from JSON */\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\n const field = Object.create(ArrayPropertiesField.prototype);\n return Object.assign(field, json, {\n category: this.getCategoryFromFieldJson(json, categories),\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 const field = Object.create(ArrayPropertiesField.prototype);\n return Object.assign(field, 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 * 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 public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: TypeDescription,\n memberFields: PropertiesField[],\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\n this.memberFields = memberFields;\n }\n\n public override isStructPropertiesField(): this is StructPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new StructPropertiesField(\n this.category,\n this.name,\n this.label,\n this.type,\n this.memberFields.map((m) => m.clone()),\n this.isReadonly,\n this.priority,\n this.properties,\n this.editor,\n this.renderer,\n );\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public override toJSON(): StructPropertiesFieldJSON {\n return {\n ...super.toJSON(),\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 /** Deserialize [[StructPropertiesField]] from JSON */\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\n const field = Object.create(StructPropertiesField.prototype);\n return Object.assign(field, json, {\n category: this.getCategoryFromFieldJson(json, categories),\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 const field = Object.create(StructPropertiesField.prototype);\n return Object.assign(field, 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 * 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 */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: 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 super(category, name, label, description, isReadonly, priority, editor, renderer);\n this.contentClassInfo = contentClassInfo;\n this.pathToPrimaryClass = pathToPrimaryClass;\n this.relationshipMeaning = RelationshipMeaning.RelatedInstance;\n this.nestedFields = nestedFields;\n this.autoExpand = autoExpand;\n this.actualPrimaryClassIds = [];\n }\n\n public override clone() {\n const clone = new NestedContentField(\n this.category,\n this.name,\n this.label,\n this.type,\n this.isReadonly,\n this.priority,\n this.contentClassInfo,\n this.pathToPrimaryClass,\n this.nestedFields.map((n) => n.clone()),\n this.editor,\n this.autoExpand,\n this.renderer,\n );\n clone.actualPrimaryClassIds = this.actualPrimaryClassIds;\n clone.relationshipMeaning = this.relationshipMeaning;\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 /** Serialize this object to JSON */\n public override toJSON(): NestedContentFieldJSON {\n return {\n ...super.toJSON(),\n contentClassInfo: this.contentClassInfo,\n pathToPrimaryClass: this.pathToPrimaryClass,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\n autoExpand: this.autoExpand,\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 pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\n };\n }\n\n /**\n * Deserialize [[NestedContentField]] from JSON\n * @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]\n */\n public static override fromJSON(json: NestedContentFieldJSON | undefined, categories: CategoryDescription[]): NestedContentField | undefined {\n if (!json) {\n return undefined;\n }\n\n const field = Object.create(NestedContentField.prototype);\n return Object.assign(field, json, this.fromCommonJSON(json, categories), {\n nestedFields: json.nestedFields\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\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 const field = Object.create(NestedContentField.prototype);\n return Object.assign(field, json, this.fromCommonJSON(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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n private static fromCommonJSON(json: NestedContentFieldJSON<ClassInfoJSON | string>, categories: CategoryDescription[]): Partial<NestedContentField> {\n return {\n category: this.getCategoryFromFieldJson(json, categories),\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\n autoExpand: json.autoExpand,\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"]}
|
|
1
|
+
{"version":3,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C3D,IAAiB,eAAe,CAS/B;AATD,WAAiB,eAAe;IAC9B,uCAAuC;IACvC,SAAgB,OAAO,CAAC,CAAkB;QACxC,OAAO,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,IAAI,CAAC;IAC7C,CAAC;IAFe,uBAAO,UAEtB,CAAA;IACD,4CAA4C;IAC5C,SAAgB,YAAY,CAAC,CAAkB;QAC7C,OAAO,CAAC,CAAC,IAAI,KAAK,mBAAmB,CAAC,UAAU,CAAC;IACnD,CAAC;IAFe,4BAAY,eAE3B,CAAA;AACH,CAAC,EATgB,eAAe,+BAAf,eAAe,QAS/B;AA+BD,SAAS,0BAA0B,CAAC,sBAA4C,EAAE,UAAqD;IACrI,OAAO;QACL,QAAQ,EAAE,8BAA8B,CAAC,sBAAsB,CAAC,QAAQ,EAAE,UAAU,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,SAAS,8BAA8B,CAAC,sBAAgD,EAAE,UAAqD;IAC7I,IAAA,qBAAM,EAAC,UAAU,CAAC,cAAc,CAAC,sBAAsB,CAAC,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,2BAAsB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACpJ,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 ClassInfoJSON,\n CompressedClassInfoJSON,\n NavigationPropertyInfo,\n PropertyInfo,\n PropertyInfoJSON,\n RelatedClassInfo,\n RelationshipPath,\n RelationshipPathJSON,\n StrippedRelationshipPath,\n} from \"../EC\";\nimport { PresentationError, PresentationStatus } from \"../Error\";\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification\";\nimport { CategoryDescription } from \"./Category\";\nimport { EditorDescription } from \"./Editor\";\nimport { Property, PropertyJSON } from \"./Property\";\nimport { RendererDescription } from \"./Renderer\";\nimport { TypeDescription } from \"./TypeDescription\";\nimport { omitUndefined } from \"../Utils\";\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// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfoJSON> 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 */\n// eslint-disable-next-line @typescript-eslint/no-deprecated\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> 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 = ClassInfoJSON> =\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 * 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 */\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 this.category = category;\n this.name = name;\n this.label = label;\n this.type = type;\n this.isReadonly = isReadonly;\n this.priority = priority;\n this.editor = editor;\n this.renderer = renderer;\n this.extendedData = 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.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.editor, this.renderer, this.extendedData);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public toJSON(): FieldJSON {\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 /** Serialize this object to compressed JSON */\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\n return this.toJSON();\n }\n\n /** Deserialize [[Field]] from JSON */\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n return PropertiesField.fromJSON(json, categories);\n }\n if (isNestedContentField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return NestedContentField.fromJSON(json, categories);\n }\n const field = Object.create(Field.prototype);\n return Object.assign(field, json, {\n category: Field.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\n if (isPropertiesField(json)) {\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n\n if (isNestedContentField(json)) {\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\n }\n\n const field = Object.create(Field.prototype);\n return Object.assign(field, json, {\n category: Field.getCategoryFromFieldJson(json, categories),\n });\n }\n\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, 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\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 * 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 */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: TypeDescription,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n super(category, name, label, description, isReadonly, priority, editor, renderer);\n this.properties = 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(\n this.category,\n this.name,\n this.label,\n this.type,\n this.isReadonly,\n this.priority,\n this.properties,\n this.editor,\n this.renderer,\n );\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public override toJSON(): PropertiesFieldJSON {\n return {\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 /** Deserialize [[PropertiesField]] from JSON */\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\n if (!json) {\n return undefined;\n }\n\n if (isArrayPropertiesField(json)) {\n return ArrayPropertiesField.fromJSON(json, categories);\n }\n if (isStructPropertiesField(json)) {\n return StructPropertiesField.fromJSON(json, categories);\n }\n\n const field = Object.create(PropertiesField.prototype);\n return Object.assign(field, 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 const field = Object.create(PropertiesField.prototype);\n return Object.assign(field, 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 * 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 public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: TypeDescription,\n itemsField: PropertiesField,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\n this.itemsField = itemsField;\n }\n\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new ArrayPropertiesField(\n this.category,\n this.name,\n this.label,\n this.type,\n this.itemsField.clone(),\n this.isReadonly,\n this.priority,\n this.properties,\n this.editor,\n this.renderer,\n );\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public override toJSON(): ArrayPropertiesFieldJSON {\n return {\n ...super.toJSON(),\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 /** Deserialize [[ArrayPropertiesField]] from JSON */\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\n const field = Object.create(ArrayPropertiesField.prototype);\n return Object.assign(field, json, {\n category: this.getCategoryFromFieldJson(json, categories),\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 const field = Object.create(ArrayPropertiesField.prototype);\n return Object.assign(field, 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 * 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 public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: TypeDescription,\n memberFields: PropertiesField[],\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\n this.memberFields = memberFields;\n }\n\n public override isStructPropertiesField(): this is StructPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new StructPropertiesField(\n this.category,\n this.name,\n this.label,\n this.type,\n this.memberFields.map((m) => m.clone()),\n this.isReadonly,\n this.priority,\n this.properties,\n this.editor,\n this.renderer,\n );\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /** Serialize this object to JSON */\n public override toJSON(): StructPropertiesFieldJSON {\n return {\n ...super.toJSON(),\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 /** Deserialize [[StructPropertiesField]] from JSON */\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\n const field = Object.create(StructPropertiesField.prototype);\n return Object.assign(field, json, {\n category: this.getCategoryFromFieldJson(json, categories),\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 const field = Object.create(StructPropertiesField.prototype);\n return Object.assign(field, 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 * 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 */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n description: 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 super(category, name, label, description, isReadonly, priority, editor, renderer);\n this.contentClassInfo = contentClassInfo;\n this.pathToPrimaryClass = pathToPrimaryClass;\n this.relationshipMeaning = RelationshipMeaning.RelatedInstance;\n this.nestedFields = nestedFields;\n this.autoExpand = autoExpand;\n this.actualPrimaryClassIds = [];\n }\n\n public override clone() {\n const clone = new NestedContentField(\n this.category,\n this.name,\n this.label,\n this.type,\n this.isReadonly,\n this.priority,\n this.contentClassInfo,\n this.pathToPrimaryClass,\n this.nestedFields.map((n) => n.clone()),\n this.editor,\n this.autoExpand,\n this.renderer,\n );\n clone.actualPrimaryClassIds = this.actualPrimaryClassIds;\n clone.relationshipMeaning = this.relationshipMeaning;\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 /** Serialize this object to JSON */\n public override toJSON(): NestedContentFieldJSON {\n return {\n ...super.toJSON(),\n contentClassInfo: this.contentClassInfo,\n pathToPrimaryClass: this.pathToPrimaryClass,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\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 pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\n };\n }\n\n /**\n * Deserialize [[NestedContentField]] from JSON\n * @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]\n */\n public static override fromJSON(json: NestedContentFieldJSON | undefined, categories: CategoryDescription[]): NestedContentField | undefined {\n if (!json) {\n return undefined;\n }\n\n const field = Object.create(NestedContentField.prototype);\n return Object.assign(field, json, this.fromCommonJSON(json, categories), {\n nestedFields: json.nestedFields\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\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 const field = Object.create(NestedContentField.prototype);\n return Object.assign(field, json, this.fromCommonJSON(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 // eslint-disable-next-line @typescript-eslint/no-deprecated\n private static fromCommonJSON(json: NestedContentFieldJSON<ClassInfoJSON | string>, categories: CategoryDescription[]): Partial<NestedContentField> {\n return {\n category: this.getCategoryFromFieldJson(json, categories),\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\n autoExpand: json.autoExpand,\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"]}
|
|
@@ -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,OAAO,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,
|
|
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,OAAO,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAiB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAwB,KAAK,EAAE,SAAS,EAAiB,MAAM,SAAS,CAAC;AAEhH;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,WAAW,EAAE,WAAW,EAAE,CAAC;IAG3B,eAAe,EAAE,mBAAmB,CAAC;IACrC,gKAAgK;IAChK,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,MAAM,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAEpC,aAAa,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAClD,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACvC;AAED;;;GAGG;AACH,qBAAa,I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Q,EAAE,GAAG,MAAM,GAAG,IAAI,EAAE;IAS7D;;;;OAIG;WACW,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAGxD"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Item = void 0;
|
|
11
11
|
const LabelDefinition_1 = require("../LabelDefinition");
|
|
12
|
+
const Utils_1 = require("../Utils");
|
|
12
13
|
const Value_1 = require("./Value");
|
|
13
14
|
/**
|
|
14
15
|
* A data structure that represents a single content record.
|
|
@@ -29,11 +30,15 @@ class Item {
|
|
|
29
30
|
constructor(primaryKeys, label, imageId, classInfo, values, displayValues, mergedFieldNames, extendedData) {
|
|
30
31
|
this.primaryKeys = primaryKeys;
|
|
31
32
|
this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated
|
|
32
|
-
|
|
33
|
+
if (classInfo) {
|
|
34
|
+
this.classInfo = classInfo;
|
|
35
|
+
}
|
|
33
36
|
this.values = values;
|
|
34
37
|
this.displayValues = displayValues;
|
|
35
38
|
this.mergedFieldNames = mergedFieldNames;
|
|
36
|
-
|
|
39
|
+
if (extendedData) {
|
|
40
|
+
this.extendedData = extendedData;
|
|
41
|
+
}
|
|
37
42
|
this.label = typeof label === "string" ? LabelDefinition_1.LabelDefinition.fromLabelString(label) : label;
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
@@ -44,16 +49,16 @@ class Item {
|
|
|
44
49
|
}
|
|
45
50
|
/** Serialize this object to JSON */
|
|
46
51
|
toJSON() {
|
|
47
|
-
const { label, ...baseItem } = this;
|
|
48
|
-
return {
|
|
52
|
+
const { label, values, displayValues, ...baseItem } = this;
|
|
53
|
+
return (0, Utils_1.omitUndefined)({
|
|
49
54
|
...baseItem,
|
|
50
55
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
51
|
-
values: Value_1.Value.toJSON(
|
|
56
|
+
values: Value_1.Value.toJSON(values),
|
|
52
57
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
53
|
-
displayValues: Value_1.DisplayValue.toJSON(
|
|
58
|
+
displayValues: Value_1.DisplayValue.toJSON(displayValues),
|
|
54
59
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
55
60
|
labelDefinition: LabelDefinition_1.LabelDefinition.toJSON(label),
|
|
56
|
-
};
|
|
61
|
+
});
|
|
57
62
|
}
|
|
58
63
|
/** Deserialize [[Item]] from JSON */
|
|
59
64
|
static fromJSON(json) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,wDAA0E;
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,wDAA0E;AAC1E,oCAA2D;AAC3D,mCAAgH;AAuBhH;;;GAGG;AACH,MAAa,IAAI;IA0Bf;;;;;;;;;;OAUG;IACH,YACE,WAA0B,EAC1B,KAA+B,EAC/B,OAAe,EACf,SAAgC,EAChC,MAA+B,EAC/B,aAA6C,EAC7C,gBAA0B,EAC1B,YAAqC;QAErC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,uDAAuD;QAC/E,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,YAAY,EAAE,CAAC;YACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACnC,CAAC;QACD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,EAAE;YACnC,4DAA4D;YAC5D,MAAM,EAAE,aAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YACnC,4DAA4D;YAC5D,aAAa,EAAE,oBAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;YACxD,4DAA4D;YAC5D,KAAK,EAAE,iCAAe,CAAC,QAAQ,CAAC,eAAe,CAAC;SAChC,CAAC,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,OAAO,CAAC,GAAW,EAAE,KAAU;QAC3C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,YAAY,CAAC,IAAyB;QAClD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,6DAA6D;YAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAC5C,CAAC;QACD,6DAA6D;QAC7D,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAgB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACxE,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CAAC,GAAW,EAAE,KAAU;QAC/C,OAAO,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACvD,CAAC;CACF;AAtID,oBAsIC","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\";\nimport { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\nimport { omitUndefined, ValuesDictionary } from \"../Utils\";\nimport { DisplayValue, DisplayValueJSON, DisplayValuesMapJSON, Value, ValueJSON, ValuesMapJSON } from \"./Value\";\n\n/**\n * Serialized [[Item]] JSON representation.\n * @public\n */\nexport interface ItemJSON {\n inputKeys?: InstanceKey[];\n primaryKeys: InstanceKey[];\n // TODO: rename to `label`\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelDefinition: LabelDefinitionJSON;\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\n imageId: string;\n classInfo?: ClassInfo;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: ValuesDictionary<ValueJSON>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: ValuesDictionary<DisplayValueJSON>;\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 /**\n * ID of the image associated with this item\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\n */\n public imageId: string;\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 */\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 this.primaryKeys = primaryKeys;\n this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated\n if (classInfo) {\n this.classInfo = classInfo;\n }\n this.values = values;\n this.displayValues = displayValues;\n this.mergedFieldNames = mergedFieldNames;\n if (extendedData) {\n this.extendedData = extendedData;\n }\n this.label = typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : 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, values, displayValues, ...baseItem } = this;\n return omitUndefined({\n ...baseItem,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.toJSON(values) as ValuesMapJSON,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.toJSON(displayValues) as DisplayValuesMapJSON,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n labelDefinition: LabelDefinition.toJSON(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 if (typeof json === \"string\") {\n return JSON.parse(json, (key, value) => Item.reviver(key, value));\n }\n const item = Object.create(Item.prototype);\n const { labelDefinition, ...baseJson } = json;\n return Object.assign(item, baseJson, {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n values: Value.fromJSON(json.values),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n displayValues: DisplayValue.fromJSON(json.displayValues),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n label: LabelDefinition.fromJSON(labelDefinition),\n } as Partial<Item>);\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing Item objects.\n * @internal\n */\n public static reviver(key: string, value: any): any {\n return key === \"\" ? Item.fromJSON(value) : value;\n }\n\n /**\n * Deserialize items list from JSON\n * @param json JSON or JSON serialized to string to deserialize from\n * @returns Deserialized items list\n * @internal\n */\n public static listFromJSON(json: ItemJSON[] | string): Item[] {\n if (typeof json === \"string\") {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return JSON.parse(json, Item.listReviver);\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return json.map(Item.fromJSON).filter((item): item is Item => !!item);\n }\n\n /**\n * Reviver function that can be used as a second argument for\n * `JSON.parse` method when parsing [[Item]][] objects.\n * @internal\n */\n public static listReviver(key: string, value: any): any {\n return key === \"\" ? Item.listFromJSON(value) : value;\n }\n}\n"]}
|
|
@@ -15,7 +15,7 @@ export * from "./presentation-common/RegisteredRuleset";
|
|
|
15
15
|
export * from "./presentation-common/RulesetVariables";
|
|
16
16
|
export * from "./presentation-common/RulesetsFactory";
|
|
17
17
|
export * from "./presentation-common/Update";
|
|
18
|
-
export
|
|
18
|
+
export { DEFAULT_KEYS_BATCH_SIZE, Omit, PagedResponse, PartialBy, Subtract, ValuesDictionary, getInstancesCount } from "./presentation-common/Utils";
|
|
19
19
|
export * from "./presentation-common/PresentationIpcInterface";
|
|
20
20
|
export * from "./presentation-common/LocalizationHelper";
|
|
21
21
|
export * from "./presentation-common/InstanceFilterDefinition";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-common.d.ts","sourceRoot":"","sources":["../../src/presentation-common.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc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,cAAc,0DAA0D,CAAC;AACzE,cAAc,mDAAmD,CAAC;AAClE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC"}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.getInstancesCount = exports.DEFAULT_KEYS_BATCH_SIZE = void 0;
|
|
17
18
|
/*---------------------------------------------------------------------------------------------
|
|
18
19
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
19
20
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -35,7 +36,9 @@ __exportStar(require("./presentation-common/RegisteredRuleset"), exports);
|
|
|
35
36
|
__exportStar(require("./presentation-common/RulesetVariables"), exports);
|
|
36
37
|
__exportStar(require("./presentation-common/RulesetsFactory"), exports);
|
|
37
38
|
__exportStar(require("./presentation-common/Update"), exports);
|
|
38
|
-
|
|
39
|
+
var Utils_1 = require("./presentation-common/Utils");
|
|
40
|
+
Object.defineProperty(exports, "DEFAULT_KEYS_BATCH_SIZE", { enumerable: true, get: function () { return Utils_1.DEFAULT_KEYS_BATCH_SIZE; } });
|
|
41
|
+
Object.defineProperty(exports, "getInstancesCount", { enumerable: true, get: function () { return Utils_1.getInstancesCount; } });
|
|
39
42
|
__exportStar(require("./presentation-common/PresentationIpcInterface"), exports);
|
|
40
43
|
__exportStar(require("./presentation-common/LocalizationHelper"), exports);
|
|
41
44
|
__exportStar(require("./presentation-common/InstanceFilterDefinition"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-common.js","sourceRoot":"","sources":["../../src/presentation-common.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"presentation-common.js","sourceRoot":"","sources":["../../src/presentation-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG;;;;;GAKG;AACH,mEAAiD;AACjD,oEAAkD;AAClD,2DAAyC;AACzC,8DAA4C;AAC5C,+DAA6C;AAC7C,wEAAsD;AACtD,mFAAiE;AACjE,0EAAwD;AACxD,yEAAuD;AACvD,wEAAsD;AACtD,+DAA6C;AAC7C,qDAAqJ;AAA5I,gHAAA,uBAAuB,OAAA;AAA8D,0GAAA,iBAAiB,OAAA;AAC/G,iFAA+D;AAC/D,2EAAyD;AACzD,iFAA+D;AAC/D,kFAAgE;AAEhE;;;;;;GAMG;AACH,iFAA+D;AAC/D,2EAAyD;AAEzD;;;;;GAKG;AACH,iFAA+D;AAE/D;;;;;GAKG;AACH,yEAAuD;AACvD,wEAAsD;AACtD,2EAAyD;AACzD,6EAA2D;AAC3D,uEAAqD;AACrD,uEAAqD;AACrD,qEAAmD;AACnD,yEAAuD;AACvD,yEAAuD;AACvD,gFAA8D;AAC9D,sEAAoD;AACpD,iFAA+D;AAC/D,uFAAqE;AACrE,0EAAwD;AAExD;;;;;GAKG;AACH,iFAA+D;AAC/D,sEAAoD;AACpD,uEAAqD;AACrD,kFAAgE;AAEhE;;;;;GAKG;AACH,sFAAoE;AACpE,+FAA6E;AAC7E,gGAA8E;AAC9E,8GAA4F;AAC5F,oHAAkG;AAClG,uFAAqE;AACrE,0FAAwE;AACxE,0GAAwF;AACxF,qFAAmE;AACnE,qFAAmE;AACnE,yFAAuE;AACvE,8FAA4E;AAC5E,6FAA2E;AAC3E,yFAAuE;AACvE,4FAA0E;AAC1E,kGAAgF;AAChF,0FAAwE;AACxE,wFAAsE;AACtE,0FAAwE;AACxE,qHAAmG;AACnG,2GAAyF;AACzF,kFAAgE;AAChE,2FAAyE;AACzE,4FAA0E;AAC1E,yGAAuF;AACvF,sGAAoF;AACpF,kHAAgG;AAChG,gGAA8E;AAC9E,8GAA4F;AAC5F,6GAA2F;AAC3F,4GAA0F;AAC1F,+GAA6F;AAC7F,kFAAgE;AAChE,2FAAyE;AACzE,oFAAkE;AAClE,4FAA0E;AAC1E,mEAAiD;AACjD,sEAAoD;AACpD,mFAAiE;AACjE,wEAAsD","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/**\n * @module Core\n *\n * @docs-group-description Core\n * Common types used all across Presentation packages.\n */\nexport * from \"./presentation-common/AsyncTasks\";\nexport * from \"./presentation-common/Diagnostics\";\nexport * from \"./presentation-common/EC\";\nexport * from \"./presentation-common/Error\";\nexport * from \"./presentation-common/KeySet\";\nexport * from \"./presentation-common/LabelDefinition\";\nexport * from \"./presentation-common/PresentationManagerOptions\";\nexport * from \"./presentation-common/RegisteredRuleset\";\nexport * from \"./presentation-common/RulesetVariables\";\nexport * from \"./presentation-common/RulesetsFactory\";\nexport * from \"./presentation-common/Update\";\nexport { DEFAULT_KEYS_BATCH_SIZE, Omit, PagedResponse, PartialBy, Subtract, ValuesDictionary, getInstancesCount } from \"./presentation-common/Utils\";\nexport * from \"./presentation-common/PresentationIpcInterface\";\nexport * from \"./presentation-common/LocalizationHelper\";\nexport * from \"./presentation-common/InstanceFilterDefinition\";\nexport * from \"./presentation-common/KoqPropertyValueFormatter\";\n\n/**\n * @module RPC\n *\n * @docs-group-description RPC\n * Types used for RPC communication between frontend and backend. Generally should\n * only be used internally by presentation packages.\n */\nexport * from \"./presentation-common/PresentationRpcInterface\";\nexport * from \"./presentation-common/RpcRequestsHandler\";\n\n/**\n * @module UnifiedSelection\n *\n * @docs-group-description UnifiedSelection\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\n */\nexport * from \"./presentation-common/selection/SelectionScope\";\n\n/**\n * @module Content\n *\n * @docs-group-description Content\n * Types related to presentation [content]($docs/presentation/content/index.md).\n */\nexport * from \"./presentation-common/content/Category\";\nexport * from \"./presentation-common/content/Content\";\nexport * from \"./presentation-common/content/Descriptor\";\nexport * from \"./presentation-common/content/DisplayTypes\";\nexport * from \"./presentation-common/content/Editor\";\nexport * from \"./presentation-common/content/Fields\";\nexport * from \"./presentation-common/content/Item\";\nexport * from \"./presentation-common/content/Property\";\nexport * from \"./presentation-common/content/Renderer\";\nexport * from \"./presentation-common/content/TypeDescription\";\nexport * from \"./presentation-common/content/Value\";\nexport * from \"./presentation-common/content/ContentTraverser\";\nexport * from \"./presentation-common/content/PropertyValueFormatter\";\nexport * from \"./presentation-common/ElementProperties\";\n\n/**\n * @module Hierarchies\n *\n * @docs-group-description Hierarchies\n * Types related to presentation [hierarchies]($docs/presentation/hierarchies/index.md).\n */\nexport * from \"./presentation-common/hierarchy/HierarchyLevel\";\nexport * from \"./presentation-common/hierarchy/Key\";\nexport * from \"./presentation-common/hierarchy/Node\";\nexport * from \"./presentation-common/hierarchy/NodePathElement\";\n\n/**\n * @module PresentationRules\n *\n * @docs-group-description PresentationRules\n * Types for defining the presentation ruleset.\n */\nexport * from \"./presentation-common/rules/hierarchy/ChildNodeRule\";\nexport * from \"./presentation-common/rules/hierarchy/ChildNodeSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/CustomNodeSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/NavigationRule\";\nexport * from \"./presentation-common/rules/hierarchy/NodeArtifactsRule\";\nexport * from \"./presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification\";\nexport * from \"./presentation-common/rules/hierarchy/RootNodeRule\";\nexport * from \"./presentation-common/rules/hierarchy/SubCondition\";\nexport * from \"./presentation-common/rules/customization/CheckBoxRule\";\nexport * from \"./presentation-common/rules/customization/CustomizationRule\";\nexport * from \"./presentation-common/rules/customization/ExtendedDataRule\";\nexport * from \"./presentation-common/rules/customization/GroupingRule\";\nexport * from \"./presentation-common/rules/customization/ImageIdOverride\";\nexport * from \"./presentation-common/rules/customization/InstanceLabelOverride\";\nexport * from \"./presentation-common/rules/customization/LabelOverride\";\nexport * from \"./presentation-common/rules/customization/SortingRule\";\nexport * from \"./presentation-common/rules/customization/StyleOverride\";\nexport * from \"./presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification\";\nexport * from \"./presentation-common/rules/content/ContentRelatedInstancesSpecification\";\nexport * from \"./presentation-common/rules/content/ContentRule\";\nexport * from \"./presentation-common/rules/content/ContentSpecification\";\nexport * from \"./presentation-common/rules/content/PropertySpecification\";\nexport * from \"./presentation-common/rules/content/SelectedNodeInstancesSpecification\";\nexport * from \"./presentation-common/rules/content/DefaultPropertyCategoryOverride\";\nexport * from \"./presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/ContentModifier\";\nexport * from \"./presentation-common/rules/content/modifiers/PropertyCategorySpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/PropertyEditorsSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/CustomRendererSpecification\";\nexport * from \"./presentation-common/rules/content/modifiers/RelatedPropertiesSpecification\";\nexport * from \"./presentation-common/rules/ClassSpecifications\";\nexport * from \"./presentation-common/rules/RelatedInstanceSpecification\";\nexport * from \"./presentation-common/rules/RelationshipDirection\";\nexport * from \"./presentation-common/rules/RelationshipPathSpecification\";\nexport * from \"./presentation-common/rules/Rule\";\nexport * from \"./presentation-common/rules/Ruleset\";\nexport * from \"./presentation-common/rules/SchemasSpecification\";\nexport * from \"./presentation-common/rules/Variables\";\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module Core
|
|
3
3
|
*/
|
|
4
|
-
import { IDisposable } from "@itwin/core-bentley";
|
|
5
4
|
/**
|
|
6
5
|
* A helper to track ongoing async tasks. Usage:
|
|
7
6
|
* ```
|
|
8
|
-
*
|
|
7
|
+
* {
|
|
8
|
+
* using _r = tracker.trackAsyncTask();
|
|
9
9
|
* await doSomethingAsync();
|
|
10
|
-
* }
|
|
10
|
+
* }
|
|
11
11
|
* ```
|
|
12
12
|
*
|
|
13
13
|
* Can be used with `waitForPendingAsyncs` in test helpers to wait for all
|
|
@@ -18,6 +18,6 @@ import { IDisposable } from "@itwin/core-bentley";
|
|
|
18
18
|
export declare class AsyncTasksTracker {
|
|
19
19
|
private _asyncsInProgress;
|
|
20
20
|
get pendingAsyncs(): Set<string>;
|
|
21
|
-
trackAsyncTask():
|
|
21
|
+
trackAsyncTask(): Disposable;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=AsyncTasks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncTasks.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/AsyncTasks.ts"],"names":[],"mappings":"AAIA;;GAEG;
|
|
1
|
+
{"version":3,"file":"AsyncTasks.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/AsyncTasks.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,iBAAiB,CAAyB;IAClD,IAAW,aAAa,gBAEvB;IACM,cAAc,IAAI,UAAU;CAOpC"}
|
|
@@ -9,9 +9,10 @@ import { Guid } from "@itwin/core-bentley";
|
|
|
9
9
|
/**
|
|
10
10
|
* A helper to track ongoing async tasks. Usage:
|
|
11
11
|
* ```
|
|
12
|
-
*
|
|
12
|
+
* {
|
|
13
|
+
* using _r = tracker.trackAsyncTask();
|
|
13
14
|
* await doSomethingAsync();
|
|
14
|
-
* }
|
|
15
|
+
* }
|
|
15
16
|
* ```
|
|
16
17
|
*
|
|
17
18
|
* Can be used with `waitForPendingAsyncs` in test helpers to wait for all
|
|
@@ -30,7 +31,7 @@ export class AsyncTasksTracker {
|
|
|
30
31
|
const id = Guid.createValue();
|
|
31
32
|
this._asyncsInProgress.add(id);
|
|
32
33
|
return {
|
|
33
|
-
dispose: () => this._asyncsInProgress.delete(id),
|
|
34
|
+
[Symbol.dispose]: () => this._asyncsInProgress.delete(id),
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -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,
|
|
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;IAA9B;QACU,sBAAiB,GAAG,IAAI,GAAG,EAAc,CAAC;IAWpD,CAAC;IAVC,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"]}
|
|
@@ -195,6 +195,37 @@ export interface PropertyInfo {
|
|
|
195
195
|
extendedType?: string;
|
|
196
196
|
/** Navigation property info if the field is navigation type */
|
|
197
197
|
navigationPropertyInfo?: NavigationPropertyInfo;
|
|
198
|
+
/** Constraints for values of ECProperty */
|
|
199
|
+
constraints?: PropertyValueConstraints;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Constraints for values of ECProperty
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
export type PropertyValueConstraints = StringPropertyValueConstraints | ArrayPropertyValueConstraints | NumericPropertyValueConstraints;
|
|
206
|
+
/**
|
|
207
|
+
* Describes constraints for `string` type ECProperty values
|
|
208
|
+
* @public
|
|
209
|
+
*/
|
|
210
|
+
export interface StringPropertyValueConstraints {
|
|
211
|
+
minimumLength?: number;
|
|
212
|
+
maximumLength?: number;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Describes constraints for `int` | `double` | `float` type ECProperty values
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
export interface NumericPropertyValueConstraints {
|
|
219
|
+
minimumValue?: number;
|
|
220
|
+
maximumValue?: number;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Describes constraints for `array` type ECProperty values
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
export interface ArrayPropertyValueConstraints {
|
|
227
|
+
minOccurs?: number;
|
|
228
|
+
maxOccurs?: number;
|
|
198
229
|
}
|
|
199
230
|
/** @public */
|
|
200
231
|
export declare namespace PropertyInfo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EC.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/EC.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAU,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,EAAE,EAAE,UAAU,CAAC;CAChB;AAED,cAAc;AACd,yBAAiB,WAAW,CAAC;IAC3B,8BAA8B;IAC9B,SAAgB,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,GAAG,MAAM,CAMlE;IAED;;;OAGG;IAGH,SAAgB,MAAM,CAAC,GAAG,EAAE,WAAW,GAAG,eAAe,CAExD;IAED;;;OAGG;IAGH,SAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe;mBAWnC,MAAM;YACb,MAAM;MAVT;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,iBAAiB;IACjB,EAAE,EAAE,OAAO,CAAC;IACZ,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,cAAc;AACd,yBAAiB,SAAS,CAAC;IACzB;;;OAGG;IA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