@itwin/presentation-common 4.10.0-dev.32 → 4.10.0-dev.33

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.
Files changed (105) hide show
  1. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  2. package/lib/cjs/presentation-common/EC.js +4 -4
  3. package/lib/cjs/presentation-common/EC.js.map +1 -1
  4. package/lib/cjs/presentation-common/Error.d.ts.map +1 -1
  5. package/lib/cjs/presentation-common/Error.js +0 -1
  6. package/lib/cjs/presentation-common/Error.js.map +1 -1
  7. package/lib/cjs/presentation-common/KeySet.js +5 -5
  8. package/lib/cjs/presentation-common/KeySet.js.map +1 -1
  9. package/lib/cjs/presentation-common/LabelDefinition.js +4 -4
  10. package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
  11. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +3 -3
  12. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  13. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  14. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  15. package/lib/cjs/presentation-common/PresentationRpcInterface.js +4 -5
  16. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  17. package/lib/cjs/presentation-common/RpcRequestsHandler.js +5 -5
  18. package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
  19. package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
  20. package/lib/cjs/presentation-common/RulesetsFactory.js +0 -1
  21. package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
  22. package/lib/cjs/presentation-common/Update.d.ts.map +1 -1
  23. package/lib/cjs/presentation-common/Update.js +14 -14
  24. package/lib/cjs/presentation-common/Update.js.map +1 -1
  25. package/lib/cjs/presentation-common/content/ContentTraverser.d.ts +1 -1
  26. package/lib/cjs/presentation-common/content/ContentTraverser.js +2 -2
  27. package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
  28. package/lib/cjs/presentation-common/content/Descriptor.js +6 -6
  29. package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
  30. package/lib/cjs/presentation-common/content/DisplayTypes.d.ts +1 -1
  31. package/lib/cjs/presentation-common/content/DisplayTypes.d.ts.map +1 -1
  32. package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
  33. package/lib/cjs/presentation-common/content/Fields.d.ts.map +1 -1
  34. package/lib/cjs/presentation-common/content/Fields.js +2 -2
  35. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  36. package/lib/cjs/presentation-common/content/Item.js +7 -7
  37. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  38. package/lib/cjs/presentation-common/content/Property.js.map +1 -1
  39. package/lib/cjs/presentation-common/content/Value.js +34 -34
  40. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  41. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js +2 -2
  42. package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  43. package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
  44. package/lib/cjs/presentation-common/hierarchy/Key.js +8 -8
  45. package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
  46. package/lib/cjs/presentation-common/hierarchy/Node.d.ts.map +1 -1
  47. package/lib/cjs/presentation-common/hierarchy/Node.js +9 -9
  48. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  49. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js +13 -13
  50. package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  51. package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  52. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  53. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  54. package/lib/esm/presentation-common/EC.js +4 -4
  55. package/lib/esm/presentation-common/EC.js.map +1 -1
  56. package/lib/esm/presentation-common/Error.d.ts.map +1 -1
  57. package/lib/esm/presentation-common/Error.js +0 -1
  58. package/lib/esm/presentation-common/Error.js.map +1 -1
  59. package/lib/esm/presentation-common/KeySet.js +5 -5
  60. package/lib/esm/presentation-common/KeySet.js.map +1 -1
  61. package/lib/esm/presentation-common/LabelDefinition.js +4 -4
  62. package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
  63. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +3 -3
  64. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts.map +1 -1
  65. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  66. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  67. package/lib/esm/presentation-common/PresentationRpcInterface.js +4 -5
  68. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  69. package/lib/esm/presentation-common/RpcRequestsHandler.js +5 -5
  70. package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
  71. package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
  72. package/lib/esm/presentation-common/RulesetsFactory.js +0 -1
  73. package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
  74. package/lib/esm/presentation-common/Update.d.ts.map +1 -1
  75. package/lib/esm/presentation-common/Update.js +14 -14
  76. package/lib/esm/presentation-common/Update.js.map +1 -1
  77. package/lib/esm/presentation-common/content/ContentTraverser.d.ts +1 -1
  78. package/lib/esm/presentation-common/content/ContentTraverser.js +2 -2
  79. package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
  80. package/lib/esm/presentation-common/content/Descriptor.js +6 -6
  81. package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
  82. package/lib/esm/presentation-common/content/DisplayTypes.d.ts +1 -1
  83. package/lib/esm/presentation-common/content/DisplayTypes.d.ts.map +1 -1
  84. package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
  85. package/lib/esm/presentation-common/content/Fields.d.ts.map +1 -1
  86. package/lib/esm/presentation-common/content/Fields.js +2 -2
  87. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  88. package/lib/esm/presentation-common/content/Item.js +7 -7
  89. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  90. package/lib/esm/presentation-common/content/Property.js.map +1 -1
  91. package/lib/esm/presentation-common/content/Value.js +34 -34
  92. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  93. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js +2 -2
  94. package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
  95. package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
  96. package/lib/esm/presentation-common/hierarchy/Key.js +8 -8
  97. package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
  98. package/lib/esm/presentation-common/hierarchy/Node.d.ts.map +1 -1
  99. package/lib/esm/presentation-common/hierarchy/Node.js +9 -9
  100. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  101. package/lib/esm/presentation-common/hierarchy/NodePathElement.js +13 -13
  102. package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
  103. package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
  104. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  105. package/package.json +13 -13
@@ -1 +1 @@
1
- {"version":3,"file":"Fields.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAIL,sBAAsB,EAGtB,gBAAgB,EAChB,gBAAgB,GAGjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AA0EpD,SAAS,iBAAiB,CA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,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,MAAM,CAAC,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,sBAAsB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACpJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n ClassInfo,\r\n ClassInfoJSON,\r\n CompressedClassInfoJSON,\r\n NavigationPropertyInfo,\r\n PropertyInfo,\r\n PropertyInfoJSON,\r\n RelatedClassInfo,\r\n RelationshipPath,\r\n RelationshipPathJSON,\r\n StrippedRelationshipPath,\r\n} from \"../EC\";\r\nimport { PresentationError, PresentationStatus } from \"../Error\";\r\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification\";\r\nimport { CategoryDescription } from \"./Category\";\r\nimport { EditorDescription } from \"./Editor\";\r\nimport { Property, PropertyJSON } from \"./Property\";\r\nimport { RendererDescription } from \"./Renderer\";\r\nimport { TypeDescription } from \"./TypeDescription\";\r\n\r\n/**\r\n * Data structure for a [[Field]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface BaseFieldJSON {\r\n category: string;\r\n name: string;\r\n label: string;\r\n type: TypeDescription;\r\n isReadonly: boolean;\r\n priority: number;\r\n renderer?: RendererDescription;\r\n editor?: EditorDescription;\r\n extendedData?: { [key: string]: unknown };\r\n}\r\n\r\n/**\r\n * Data structure for a [[PropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfoJSON> extends BaseFieldJSON {\r\n properties: PropertyJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * Data structure for a [[ArrayPropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\r\n itemsField: PropertiesFieldJSON<TClassInfoJSON>;\r\n}\r\n\r\n/**\r\n * Data structure for a [[StructPropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\r\n memberFields: PropertiesFieldJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * Data structure for a [[NestedContentField]] serialized to JSON.\r\n * @public\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> extends BaseFieldJSON {\r\n contentClassInfo: TClassInfoJSON;\r\n pathToPrimaryClass: RelationshipPathJSON<TClassInfoJSON>;\r\n relationshipMeaning?: RelationshipMeaning;\r\n actualPrimaryClassIds?: Id64String[];\r\n autoExpand?: boolean;\r\n nestedFields: FieldJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * JSON representation of a [[Field]]\r\n * @public\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport type FieldJSON<TClassInfoJSON = ClassInfoJSON> =\r\n | BaseFieldJSON\r\n | PropertiesFieldJSON<TClassInfoJSON>\r\n | ArrayPropertiesFieldJSON<TClassInfoJSON>\r\n | StructPropertiesFieldJSON<TClassInfoJSON>\r\n | NestedContentFieldJSON<TClassInfoJSON>;\r\n\r\n/** Is supplied field a properties field. */\r\nfunction isPropertiesField(field: FieldJSON): field is PropertiesFieldJSON<any>;\r\nfunction isPropertiesField(field: Field): field is PropertiesField;\r\nfunction isPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as any).properties;\r\n}\r\n\r\n/** Is supplied field an array properties field. */\r\nfunction isArrayPropertiesField(field: FieldJSON): field is ArrayPropertiesFieldJSON<any>;\r\nfunction isArrayPropertiesField(field: Field): field is ArrayPropertiesField;\r\nfunction isArrayPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as ArrayPropertiesFieldJSON).itemsField;\r\n}\r\n\r\n/** Is supplied field an array properties field. */\r\nfunction isStructPropertiesField(field: FieldJSON): field is StructPropertiesFieldJSON<any>;\r\nfunction isStructPropertiesField(field: Field): field is StructPropertiesField;\r\nfunction isStructPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as StructPropertiesFieldJSON).memberFields;\r\n}\r\n\r\n/** Is supplied field a nested content field. */\r\nfunction isNestedContentField(field: FieldJSON): field is NestedContentFieldJSON<any>;\r\nfunction isNestedContentField(field: Field): field is NestedContentField;\r\nfunction isNestedContentField(field: FieldJSON | Field) {\r\n return !!(field as any).nestedFields;\r\n}\r\n\r\n/**\r\n * Describes a single content field. A field is usually represented as a grid column\r\n * or a property pane row.\r\n *\r\n * @public\r\n */\r\nexport class Field {\r\n /** Category information */\r\n public category: CategoryDescription;\r\n /** Unique name */\r\n public name: string;\r\n /** Display label */\r\n public label: string;\r\n /** Description of this field's values data type */\r\n public type: TypeDescription;\r\n /** Are values in this field read-only */\r\n public isReadonly: boolean;\r\n /** Priority of the field. Higher priority fields should appear first in the UI */\r\n public priority: number;\r\n /** Property renderer used to render values of this field */\r\n public renderer?: RendererDescription;\r\n /** Property editor used to edit values of this field */\r\n public editor?: EditorDescription;\r\n /** Extended data associated with this field */\r\n public extendedData?: { [key: string]: unknown };\r\n /** Parent field */\r\n private _parent?: NestedContentField;\r\n\r\n /**\r\n * Creates an instance of Field.\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param editor Property editor used to edit values of this field\r\n * @param renderer Property renderer used to render values of this field\r\n * @param extendedData Extended data associated with this field\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n extendedData?: { [key: string] : unknown }\r\n ) {\r\n this.category = category;\r\n this.name = name;\r\n this.label = label;\r\n this.type = type;\r\n this.isReadonly = isReadonly;\r\n this.priority = priority;\r\n this.editor = editor;\r\n this.renderer = renderer;\r\n this.extendedData = extendedData;\r\n }\r\n\r\n /**\r\n * Is this a [[PropertiesField]]\r\n */\r\n public isPropertiesField(): this is PropertiesField {\r\n return isPropertiesField(this);\r\n }\r\n\r\n /**\r\n * Is this a [[NestedContentField]]\r\n */\r\n public isNestedContentField(): this is NestedContentField {\r\n return isNestedContentField(this);\r\n }\r\n\r\n /**\r\n * Get parent\r\n */\r\n public get parent(): NestedContentField | undefined {\r\n return this._parent;\r\n }\r\n\r\n public clone() {\r\n const clone = new Field(this.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.editor, this.renderer, this.extendedData);\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public toJSON(): FieldJSON {\r\n return {\r\n category: this.category.name,\r\n name: this.name,\r\n label: this.label,\r\n type: this.type,\r\n isReadonly: this.isReadonly,\r\n priority: this.priority,\r\n renderer: this.renderer,\r\n editor: this.editor,\r\n extendedData: this.extendedData\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\r\n return this.toJSON();\r\n }\r\n\r\n /** Deserialize [[Field]] from JSON */\r\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (isPropertiesField(json)) {\r\n return PropertiesField.fromJSON(json, categories);\r\n }\r\n if (isNestedContentField(json)) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n return NestedContentField.fromJSON(json, categories);\r\n }\r\n const field = Object.create(Field.prototype);\r\n return Object.assign(field, json, {\r\n category: Field.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n /** Deserialize a [[Field]] from compressed JSON. */\r\n public static fromCompressedJSON(\r\n json: FieldJSON<string> | undefined,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): Field | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n if (isPropertiesField(json)) {\r\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n\r\n if (isNestedContentField(json)) {\r\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n\r\n const field = Object.create(Field.prototype);\r\n return Object.assign(field, json, {\r\n category: Field.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, categories: CategoryDescription[]): CategoryDescription {\r\n const category = categories.find((c) => c.name === fieldJson.category);\r\n if (!category) {\r\n throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);\r\n }\r\n return category;\r\n }\r\n\r\n /** Resets field's parent. */\r\n public resetParentship(): void {\r\n this._parent = undefined;\r\n }\r\n\r\n /** Sets provided [[NestedContentField]] as parent of this field. */\r\n public rebuildParentship(parentField?: NestedContentField): void {\r\n this._parent = parentField;\r\n }\r\n\r\n /**\r\n * Get descriptor for this field.\r\n * @public\r\n */\r\n public getFieldDescriptor(): FieldDescriptor {\r\n return {\r\n type: FieldDescriptorType.Name,\r\n fieldName: this.name,\r\n } as NamedFieldDescriptor;\r\n }\r\n\r\n /**\r\n * Checks if this field matches given field descriptor\r\n * @see [[getFieldDescriptor]]\r\n */\r\n public matchesDescriptor(descriptor: FieldDescriptor) {\r\n return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar\r\n * EC properties.\r\n *\r\n * @public\r\n */\r\nexport class PropertiesField extends Field {\r\n /** A list of properties this field is created from */\r\n public properties: Property[];\r\n\r\n /**\r\n * Creates an instance of PropertiesField.\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param properties A list of properties this field is created from\r\n * @param editor Property editor used to edit values of this field\r\n * @param renderer Property renderer used to render values of this field\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, editor, renderer);\r\n this.properties = properties;\r\n }\r\n\r\n /** Is this a an array property field */\r\n public isArrayPropertiesField(): this is ArrayPropertiesField {\r\n return false;\r\n }\r\n /** Is this a an struct property field */\r\n public isStructPropertiesField(): this is StructPropertiesField {\r\n return false;\r\n }\r\n\r\n public override clone() {\r\n const clone = new PropertiesField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.isReadonly,\r\n this.priority,\r\n this.properties,\r\n this.editor,\r\n this.renderer,\r\n );\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): PropertiesFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n properties: this.properties,\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): PropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),\r\n };\r\n }\r\n\r\n /** Deserialize [[PropertiesField]] from JSON */\r\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n if (isArrayPropertiesField(json)) {\r\n return ArrayPropertiesField.fromJSON(json, categories);\r\n }\r\n if (isStructPropertiesField(json)) {\r\n return StructPropertiesField.fromJSON(json, categories);\r\n }\r\n\r\n const field = Object.create(PropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize a [[PropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: PropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): PropertiesField | undefined {\r\n if (isArrayPropertiesField(json)) {\r\n return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n if (isStructPropertiesField(json)) {\r\n return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n const field = Object.create(PropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n });\r\n }\r\n\r\n /**\r\n * Get descriptor for this field.\r\n * @public\r\n */\r\n public override getFieldDescriptor(): FieldDescriptor {\r\n const pathFromPropertyToSelectClass = new Array<RelatedClassInfo>();\r\n let currAncestor = this.parent;\r\n while (currAncestor) {\r\n pathFromPropertyToSelectClass.push(...currAncestor.pathToPrimaryClass);\r\n currAncestor = currAncestor.parent;\r\n }\r\n return {\r\n type: FieldDescriptorType.Properties,\r\n pathFromSelectToPropertyClass: RelationshipPath.strip(RelationshipPath.reverse(pathFromPropertyToSelectClass)),\r\n properties: this.properties.map((p) => ({\r\n class: p.property.classInfo.name,\r\n name: p.property.name,\r\n })),\r\n } as PropertiesFieldDescriptor;\r\n }\r\n\r\n /**\r\n * Checks if this field matches given field descriptor\r\n * @see [[getFieldDescriptor]]\r\n */\r\n public override matchesDescriptor(descriptor: FieldDescriptor) {\r\n if (!FieldDescriptor.isProperties(descriptor)) {\r\n return false;\r\n }\r\n\r\n // ensure at least one descriptor property matches at least one property of this field\r\n if (\r\n !this.properties.some(({ property: fieldProperty }) =>\r\n descriptor.properties.some(\r\n (descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class,\r\n ),\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n // ensure path from select to property in field and in descriptor matches\r\n let stepsCount = 0;\r\n let currAncestor = this.parent;\r\n while (currAncestor) {\r\n const pathFromCurrentToItsParent = RelationshipPath.reverse(currAncestor.pathToPrimaryClass);\r\n for (const step of pathFromCurrentToItsParent) {\r\n if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {\r\n return false;\r\n }\r\n if (!RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {\r\n return false;\r\n }\r\n ++stepsCount;\r\n }\r\n currAncestor = currAncestor.parent;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar EC array properties.\r\n * @public\r\n */\r\nexport class ArrayPropertiesField extends PropertiesField {\r\n public itemsField: PropertiesField;\r\n\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n itemsField: PropertiesField,\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\r\n this.itemsField = itemsField;\r\n }\r\n\r\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\r\n return true;\r\n }\r\n\r\n public override clone() {\r\n const clone = new ArrayPropertiesField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.itemsField.clone(),\r\n this.isReadonly,\r\n this.priority,\r\n this.properties,\r\n this.editor,\r\n this.renderer,\r\n );\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): ArrayPropertiesFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n itemsField: this.itemsField.toJSON(),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): ArrayPropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n itemsField: this.itemsField.toCompressedJSON(classesMap),\r\n };\r\n }\r\n\r\n /** Deserialize [[ArrayPropertiesField]] from JSON */\r\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\r\n const field = Object.create(ArrayPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n itemsField: PropertiesField.fromJSON(json.itemsField, categories),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize an [[ArrayPropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: ArrayPropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): ArrayPropertiesField {\r\n const field = Object.create(ArrayPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar EC struct properties.\r\n * @public\r\n */\r\nexport class StructPropertiesField extends PropertiesField {\r\n public memberFields: PropertiesField[];\r\n\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n memberFields: PropertiesField[],\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\r\n this.memberFields = memberFields;\r\n }\r\n\r\n public override isStructPropertiesField(): this is StructPropertiesField {\r\n return true;\r\n }\r\n\r\n public override clone() {\r\n const clone = new StructPropertiesField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.memberFields.map((m) => m.clone()),\r\n this.isReadonly,\r\n this.priority,\r\n this.properties,\r\n this.editor,\r\n this.renderer,\r\n );\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): StructPropertiesFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n memberFields: this.memberFields.map((m) => m.toJSON()),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): StructPropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),\r\n };\r\n }\r\n\r\n /** Deserialize [[StructPropertiesField]] from JSON */\r\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\r\n const field = Object.create(StructPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize a [[StructPropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: StructPropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): StructPropertiesField {\r\n const field = Object.create(StructPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).\r\n *\r\n * @public\r\n */\r\nexport class NestedContentField extends Field {\r\n /** Information about an ECClass whose properties are nested inside this field */\r\n public contentClassInfo: ClassInfo;\r\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\r\n public pathToPrimaryClass: RelationshipPath;\r\n /**\r\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\r\n * and content class of this field.\r\n *\r\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\r\n * presentation rules for creating the content.\r\n */\r\n public relationshipMeaning: RelationshipMeaning;\r\n /**\r\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\r\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\r\n * here to help.\r\n *\r\n * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.\r\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\r\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\r\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\r\n */\r\n public actualPrimaryClassIds: Id64String[];\r\n /** Contained nested fields */\r\n public nestedFields: Field[];\r\n /** Flag specifying whether field should be expanded */\r\n public autoExpand?: boolean;\r\n\r\n /**\r\n * Creates an instance of NestedContentField.\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param contentClassInfo Information about an ECClass whose properties are nested inside this field\r\n * @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)\r\n * @param nestedFields Contained nested fields\r\n * @param editor Property editor used to edit values of this field\r\n * @param autoExpand Flag specifying whether field should be expanded\r\n * @param relationshipMeaning RelationshipMeaning of the field\r\n * @param renderer Property renderer used to render values of this field\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n contentClassInfo: ClassInfo,\r\n pathToPrimaryClass: RelationshipPath,\r\n nestedFields: Field[],\r\n editor?: EditorDescription,\r\n autoExpand?: boolean,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, editor, renderer);\r\n this.contentClassInfo = contentClassInfo;\r\n this.pathToPrimaryClass = pathToPrimaryClass;\r\n this.relationshipMeaning = RelationshipMeaning.RelatedInstance;\r\n this.nestedFields = nestedFields;\r\n this.autoExpand = autoExpand;\r\n this.actualPrimaryClassIds = [];\r\n }\r\n\r\n public override clone() {\r\n const clone = new NestedContentField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.isReadonly,\r\n this.priority,\r\n this.contentClassInfo,\r\n this.pathToPrimaryClass,\r\n this.nestedFields.map((n) => n.clone()),\r\n this.editor,\r\n this.autoExpand,\r\n this.renderer,\r\n );\r\n clone.actualPrimaryClassIds = this.actualPrimaryClassIds;\r\n clone.relationshipMeaning = this.relationshipMeaning;\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Get field by its name\r\n * @param name Name of the field to find\r\n * @param recurse Recurse into nested fields\r\n */\r\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\r\n return getFieldByName(this.nestedFields, name, recurse);\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): NestedContentFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n contentClassInfo: this.contentClassInfo,\r\n pathToPrimaryClass: this.pathToPrimaryClass,\r\n relationshipMeaning: this.relationshipMeaning,\r\n actualPrimaryClassIds: this.actualPrimaryClassIds,\r\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\r\n autoExpand: this.autoExpand,\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): NestedContentFieldJSON<string> {\r\n const { id, ...leftOverInfo } = this.contentClassInfo;\r\n classesMap[id] = leftOverInfo;\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n contentClassInfo: id,\r\n pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\r\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentField]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]\r\n */\r\n public static override fromJSON(json: NestedContentFieldJSON | undefined, categories: CategoryDescription[]): NestedContentField | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n const field = Object.create(NestedContentField.prototype);\r\n return Object.assign(field, json, this.fromCommonJSON(json, categories), {\r\n nestedFields: json.nestedFields\r\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\r\n .filter((nestedField): nestedField is Field => !!nestedField),\r\n });\r\n }\r\n\r\n /** Deserialize a [[NestedContentField]] from compressed JSON. */\r\n public static override fromCompressedJSON(\r\n json: NestedContentFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ) {\r\n assert(classesMap.hasOwnProperty(json.contentClassInfo));\r\n const field = Object.create(NestedContentField.prototype);\r\n return Object.assign(field, json, this.fromCommonJSON(json, categories), {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n nestedFields: json.nestedFields\r\n .map((nestedFieldJson: FieldJSON) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))\r\n .filter((nestedField): nestedField is Field => !!nestedField),\r\n contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },\r\n pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),\r\n });\r\n }\r\n\r\n // eslint-disable-next-line deprecation/deprecation\r\n private static fromCommonJSON(json: NestedContentFieldJSON<ClassInfoJSON | string>, categories: CategoryDescription[]): Partial<NestedContentField> {\r\n return {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\r\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\r\n autoExpand: json.autoExpand,\r\n };\r\n }\r\n\r\n /** Resets parent of this field and all nested fields. */\r\n public override resetParentship(): void {\r\n super.resetParentship();\r\n for (const nestedField of this.nestedFields) {\r\n nestedField.resetParentship();\r\n }\r\n }\r\n\r\n /**\r\n * Sets provided [[NestedContentField]] as parent of this fields and recursively updates\r\n * all nested fields parents.\r\n */\r\n public override rebuildParentship(parentField?: NestedContentField): void {\r\n super.rebuildParentship(parentField);\r\n for (const nestedField of this.nestedFields) {\r\n nestedField.rebuildParentship(this);\r\n }\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const getFieldByName = (fields: Field[], name: string | undefined, recurse?: boolean): Field | undefined => {\r\n if (name) {\r\n for (const field of fields) {\r\n if (field.name === name) {\r\n return field;\r\n }\r\n\r\n if (recurse && field.isNestedContentField()) {\r\n const nested = getFieldByName(field.nestedFields, name, recurse);\r\n if (nested) {\r\n return nested;\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/** @internal */\r\nexport const getFieldByDescriptor = (fields: Field[], fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined => {\r\n for (const field of fields) {\r\n if (field.matchesDescriptor(fieldDescriptor)) {\r\n return field;\r\n }\r\n\r\n if (recurse && field.isNestedContentField()) {\r\n const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);\r\n if (nested) {\r\n return nested;\r\n }\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Types of different field descriptors.\r\n * @public\r\n */\r\nexport enum FieldDescriptorType {\r\n Name = \"name\",\r\n Properties = \"properties\",\r\n}\r\n\r\n/**\r\n * Base for a field descriptor\r\n * @public\r\n */\r\nexport interface FieldDescriptorBase {\r\n type: FieldDescriptorType;\r\n}\r\n\r\n/**\r\n * A union of all possible field descriptor types\r\n * @public\r\n */\r\nexport type FieldDescriptor = NamedFieldDescriptor | PropertiesFieldDescriptor;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace FieldDescriptor {\r\n /** Is this a named field descriptor */\r\n export function isNamed(d: FieldDescriptor): d is NamedFieldDescriptor {\r\n return d.type === FieldDescriptorType.Name;\r\n }\r\n /** Is this a properties field descriptor */\r\n export function isProperties(d: FieldDescriptor): d is PropertiesFieldDescriptor {\r\n return d.type === FieldDescriptorType.Properties;\r\n }\r\n}\r\n\r\n/**\r\n * Field descriptor that identifies a content field by its unique name.\r\n * @public\r\n */\r\nexport interface NamedFieldDescriptor extends FieldDescriptorBase {\r\n type: FieldDescriptorType.Name;\r\n fieldName: string;\r\n}\r\n\r\n/**\r\n * Field descriptor that identifies a properties field using a list of\r\n * properties that the field contains.\r\n * @public\r\n */\r\nexport interface PropertiesFieldDescriptor extends FieldDescriptorBase {\r\n type: FieldDescriptorType.Properties;\r\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\r\n /**\r\n * A list of properties that describe the field. At least one property in the list must\r\n * match at least one property in the field for the descriptor to be considered matching.\r\n */\r\n properties: Array<{\r\n /** Full class name */\r\n class: string;\r\n /** Property name */\r\n name: string;\r\n }>;\r\n}\r\n\r\nfunction fromCompressedPropertyJSON(compressedPropertyJSON: PropertyJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): Property {\r\n return {\r\n property: fromCompressedPropertyInfoJSON(compressedPropertyJSON.property, classesMap),\r\n };\r\n}\r\n\r\nfunction fromCompressedPropertyInfoJSON(compressedPropertyJSON: PropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfo {\r\n assert(classesMap.hasOwnProperty(compressedPropertyJSON.classInfo));\r\n\r\n const { navigationPropertyInfo, ...leftOverPropertyJSON } = compressedPropertyJSON;\r\n\r\n return {\r\n ...leftOverPropertyJSON,\r\n classInfo: { id: compressedPropertyJSON.classInfo, ...classesMap[compressedPropertyJSON.classInfo] },\r\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\r\n };\r\n}\r\n"]}
1
+ {"version":3,"file":"Fields.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAc,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAIL,sBAAsB,EAGtB,gBAAgB,EAChB,gBAAgB,GAGjB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AAyEpD,SAAS,iBAAiB,CAAC,KAAwB;IACjD,OAAO,CAAC,CAAE,KA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AO;QACL,QAAQ,EAAE,8BAA8B,CAAC,sBAAsB,CAAC,QAAQ,EAAE,UAAU,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,SAAS,8BAA8B,CAAC,sBAAgD,EAAE,UAAqD;IAC7I,MAAM,CAAC,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,sBAAsB,CAAC,kBAAkB,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;KACpJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n ClassInfo,\r\n ClassInfoJSON,\r\n CompressedClassInfoJSON,\r\n NavigationPropertyInfo,\r\n PropertyInfo,\r\n PropertyInfoJSON,\r\n RelatedClassInfo,\r\n RelationshipPath,\r\n RelationshipPathJSON,\r\n StrippedRelationshipPath,\r\n} from \"../EC\";\r\nimport { PresentationError, PresentationStatus } from \"../Error\";\r\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification\";\r\nimport { CategoryDescription } from \"./Category\";\r\nimport { EditorDescription } from \"./Editor\";\r\nimport { Property, PropertyJSON } from \"./Property\";\r\nimport { RendererDescription } from \"./Renderer\";\r\nimport { TypeDescription } from \"./TypeDescription\";\r\n\r\n/**\r\n * Data structure for a [[Field]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface BaseFieldJSON {\r\n category: string;\r\n name: string;\r\n label: string;\r\n type: TypeDescription;\r\n isReadonly: boolean;\r\n priority: number;\r\n renderer?: RendererDescription;\r\n editor?: EditorDescription;\r\n extendedData?: { [key: string]: unknown };\r\n}\r\n\r\n/**\r\n * Data structure for a [[PropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfoJSON> extends BaseFieldJSON {\r\n properties: PropertyJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * Data structure for a [[ArrayPropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\r\n itemsField: PropertiesFieldJSON<TClassInfoJSON>;\r\n}\r\n\r\n/**\r\n * Data structure for a [[StructPropertiesField]] serialized to JSON.\r\n * @public\r\n */\r\nexport interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\r\n memberFields: PropertiesFieldJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * Data structure for a [[NestedContentField]] serialized to JSON.\r\n * @public\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfoJSON> extends BaseFieldJSON {\r\n contentClassInfo: TClassInfoJSON;\r\n pathToPrimaryClass: RelationshipPathJSON<TClassInfoJSON>;\r\n relationshipMeaning?: RelationshipMeaning;\r\n actualPrimaryClassIds?: Id64String[];\r\n autoExpand?: boolean;\r\n nestedFields: FieldJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/**\r\n * JSON representation of a [[Field]]\r\n * @public\r\n */\r\nexport type FieldJSON<TClassInfoJSON = ClassInfoJSON> =\r\n | BaseFieldJSON\r\n | PropertiesFieldJSON<TClassInfoJSON>\r\n | ArrayPropertiesFieldJSON<TClassInfoJSON>\r\n | StructPropertiesFieldJSON<TClassInfoJSON>\r\n | NestedContentFieldJSON<TClassInfoJSON>;\r\n\r\n/** Is supplied field a properties field. */\r\nfunction isPropertiesField(field: FieldJSON): field is PropertiesFieldJSON<any>;\r\nfunction isPropertiesField(field: Field): field is PropertiesField;\r\nfunction isPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as any).properties;\r\n}\r\n\r\n/** Is supplied field an array properties field. */\r\nfunction isArrayPropertiesField(field: FieldJSON): field is ArrayPropertiesFieldJSON<any>;\r\nfunction isArrayPropertiesField(field: Field): field is ArrayPropertiesField;\r\nfunction isArrayPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as ArrayPropertiesFieldJSON).itemsField;\r\n}\r\n\r\n/** Is supplied field an array properties field. */\r\nfunction isStructPropertiesField(field: FieldJSON): field is StructPropertiesFieldJSON<any>;\r\nfunction isStructPropertiesField(field: Field): field is StructPropertiesField;\r\nfunction isStructPropertiesField(field: FieldJSON | Field) {\r\n return !!(field as StructPropertiesFieldJSON).memberFields;\r\n}\r\n\r\n/** Is supplied field a nested content field. */\r\nfunction isNestedContentField(field: FieldJSON): field is NestedContentFieldJSON<any>;\r\nfunction isNestedContentField(field: Field): field is NestedContentField;\r\nfunction isNestedContentField(field: FieldJSON | Field) {\r\n return !!(field as any).nestedFields;\r\n}\r\n\r\n/**\r\n * Describes a single content field. A field is usually represented as a grid column\r\n * or a property pane row.\r\n *\r\n * @public\r\n */\r\nexport class Field {\r\n /** Category information */\r\n public category: CategoryDescription;\r\n /** Unique name */\r\n public name: string;\r\n /** Display label */\r\n public label: string;\r\n /** Description of this field's values data type */\r\n public type: TypeDescription;\r\n /** Are values in this field read-only */\r\n public isReadonly: boolean;\r\n /** Priority of the field. Higher priority fields should appear first in the UI */\r\n public priority: number;\r\n /** Property renderer used to render values of this field */\r\n public renderer?: RendererDescription;\r\n /** Property editor used to edit values of this field */\r\n public editor?: EditorDescription;\r\n /** Extended data associated with this field */\r\n public extendedData?: { [key: string]: unknown };\r\n /** Parent field */\r\n private _parent?: NestedContentField;\r\n\r\n /**\r\n * Creates an instance of Field.\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param editor Property editor used to edit values of this field\r\n * @param renderer Property renderer used to render values of this field\r\n * @param extendedData Extended data associated with this field\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n type: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n extendedData?: { [key: string] : unknown }\r\n ) {\r\n this.category = category;\r\n this.name = name;\r\n this.label = label;\r\n this.type = type;\r\n this.isReadonly = isReadonly;\r\n this.priority = priority;\r\n this.editor = editor;\r\n this.renderer = renderer;\r\n this.extendedData = extendedData;\r\n }\r\n\r\n /**\r\n * Is this a [[PropertiesField]]\r\n */\r\n public isPropertiesField(): this is PropertiesField {\r\n return isPropertiesField(this);\r\n }\r\n\r\n /**\r\n * Is this a [[NestedContentField]]\r\n */\r\n public isNestedContentField(): this is NestedContentField {\r\n return isNestedContentField(this);\r\n }\r\n\r\n /**\r\n * Get parent\r\n */\r\n public get parent(): NestedContentField | undefined {\r\n return this._parent;\r\n }\r\n\r\n public clone() {\r\n const clone = new Field(this.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.editor, this.renderer, this.extendedData);\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public toJSON(): FieldJSON {\r\n return {\r\n category: this.category.name,\r\n name: this.name,\r\n label: this.label,\r\n type: this.type,\r\n isReadonly: this.isReadonly,\r\n priority: this.priority,\r\n renderer: this.renderer,\r\n editor: this.editor,\r\n extendedData: this.extendedData\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\r\n return this.toJSON();\r\n }\r\n\r\n /** Deserialize [[Field]] from JSON */\r\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (isPropertiesField(json)) {\r\n return PropertiesField.fromJSON(json, categories);\r\n }\r\n if (isNestedContentField(json)) {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return NestedContentField.fromJSON(json, categories);\r\n }\r\n const field = Object.create(Field.prototype);\r\n return Object.assign(field, json, {\r\n category: Field.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n /** Deserialize a [[Field]] from compressed JSON. */\r\n public static fromCompressedJSON(\r\n json: FieldJSON<string> | undefined,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): Field | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n if (isPropertiesField(json)) {\r\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n\r\n if (isNestedContentField(json)) {\r\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n\r\n const field = Object.create(Field.prototype);\r\n return Object.assign(field, json, {\r\n category: Field.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, categories: CategoryDescription[]): CategoryDescription {\r\n const category = categories.find((c) => c.name === fieldJson.category);\r\n if (!category) {\r\n throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);\r\n }\r\n return category;\r\n }\r\n\r\n /** Resets field's parent. */\r\n public resetParentship(): void {\r\n this._parent = undefined;\r\n }\r\n\r\n /** Sets provided [[NestedContentField]] as parent of this field. */\r\n public rebuildParentship(parentField?: NestedContentField): void {\r\n this._parent = parentField;\r\n }\r\n\r\n /**\r\n * Get descriptor for this field.\r\n * @public\r\n */\r\n public getFieldDescriptor(): FieldDescriptor {\r\n return {\r\n type: FieldDescriptorType.Name,\r\n fieldName: this.name,\r\n } as NamedFieldDescriptor;\r\n }\r\n\r\n /**\r\n * Checks if this field matches given field descriptor\r\n * @see [[getFieldDescriptor]]\r\n */\r\n public matchesDescriptor(descriptor: FieldDescriptor) {\r\n return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar\r\n * EC properties.\r\n *\r\n * @public\r\n */\r\nexport class PropertiesField extends Field {\r\n /** A list of properties this field is created from */\r\n public properties: Property[];\r\n\r\n /**\r\n * Creates an instance of PropertiesField.\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param properties A list of properties this field is created from\r\n * @param editor Property editor used to edit values of this field\r\n * @param renderer Property renderer used to render values of this field\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, editor, renderer);\r\n this.properties = properties;\r\n }\r\n\r\n /** Is this a an array property field */\r\n public isArrayPropertiesField(): this is ArrayPropertiesField {\r\n return false;\r\n }\r\n /** Is this a an struct property field */\r\n public isStructPropertiesField(): this is StructPropertiesField {\r\n return false;\r\n }\r\n\r\n public override clone() {\r\n const clone = new PropertiesField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.isReadonly,\r\n this.priority,\r\n this.properties,\r\n this.editor,\r\n this.renderer,\r\n );\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): PropertiesFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n properties: this.properties,\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): PropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),\r\n };\r\n }\r\n\r\n /** Deserialize [[PropertiesField]] from JSON */\r\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n if (isArrayPropertiesField(json)) {\r\n return ArrayPropertiesField.fromJSON(json, categories);\r\n }\r\n if (isStructPropertiesField(json)) {\r\n return StructPropertiesField.fromJSON(json, categories);\r\n }\r\n\r\n const field = Object.create(PropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize a [[PropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: PropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): PropertiesField | undefined {\r\n if (isArrayPropertiesField(json)) {\r\n return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n if (isStructPropertiesField(json)) {\r\n return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);\r\n }\r\n const field = Object.create(PropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n });\r\n }\r\n\r\n /**\r\n * Get descriptor for this field.\r\n * @public\r\n */\r\n public override getFieldDescriptor(): FieldDescriptor {\r\n const pathFromPropertyToSelectClass = new Array<RelatedClassInfo>();\r\n let currAncestor = this.parent;\r\n while (currAncestor) {\r\n pathFromPropertyToSelectClass.push(...currAncestor.pathToPrimaryClass);\r\n currAncestor = currAncestor.parent;\r\n }\r\n return {\r\n type: FieldDescriptorType.Properties,\r\n pathFromSelectToPropertyClass: RelationshipPath.strip(RelationshipPath.reverse(pathFromPropertyToSelectClass)),\r\n properties: this.properties.map((p) => ({\r\n class: p.property.classInfo.name,\r\n name: p.property.name,\r\n })),\r\n } as PropertiesFieldDescriptor;\r\n }\r\n\r\n /**\r\n * Checks if this field matches given field descriptor\r\n * @see [[getFieldDescriptor]]\r\n */\r\n public override matchesDescriptor(descriptor: FieldDescriptor) {\r\n if (!FieldDescriptor.isProperties(descriptor)) {\r\n return false;\r\n }\r\n\r\n // ensure at least one descriptor property matches at least one property of this field\r\n if (\r\n !this.properties.some(({ property: fieldProperty }) =>\r\n descriptor.properties.some(\r\n (descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class,\r\n ),\r\n )\r\n ) {\r\n return false;\r\n }\r\n\r\n // ensure path from select to property in field and in descriptor matches\r\n let stepsCount = 0;\r\n let currAncestor = this.parent;\r\n while (currAncestor) {\r\n const pathFromCurrentToItsParent = RelationshipPath.reverse(currAncestor.pathToPrimaryClass);\r\n for (const step of pathFromCurrentToItsParent) {\r\n if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {\r\n return false;\r\n }\r\n if (!RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {\r\n return false;\r\n }\r\n ++stepsCount;\r\n }\r\n currAncestor = currAncestor.parent;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar EC array properties.\r\n * @public\r\n */\r\nexport class ArrayPropertiesField extends PropertiesField {\r\n public itemsField: PropertiesField;\r\n\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n itemsField: PropertiesField,\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\r\n this.itemsField = itemsField;\r\n }\r\n\r\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\r\n return true;\r\n }\r\n\r\n public override clone() {\r\n const clone = new ArrayPropertiesField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.itemsField.clone(),\r\n this.isReadonly,\r\n this.priority,\r\n this.properties,\r\n this.editor,\r\n this.renderer,\r\n );\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): ArrayPropertiesFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n itemsField: this.itemsField.toJSON(),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): ArrayPropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n itemsField: this.itemsField.toCompressedJSON(classesMap),\r\n };\r\n }\r\n\r\n /** Deserialize [[ArrayPropertiesField]] from JSON */\r\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\r\n const field = Object.create(ArrayPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n itemsField: PropertiesField.fromJSON(json.itemsField, categories),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize an [[ArrayPropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: ArrayPropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): ArrayPropertiesField {\r\n const field = Object.create(ArrayPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that's based on one or more similar EC struct properties.\r\n * @public\r\n */\r\nexport class StructPropertiesField extends PropertiesField {\r\n public memberFields: PropertiesField[];\r\n\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n memberFields: PropertiesField[],\r\n isReadonly: boolean,\r\n priority: number,\r\n properties: Property[],\r\n editor?: EditorDescription,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, properties, editor, renderer);\r\n this.memberFields = memberFields;\r\n }\r\n\r\n public override isStructPropertiesField(): this is StructPropertiesField {\r\n return true;\r\n }\r\n\r\n public override clone() {\r\n const clone = new StructPropertiesField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.memberFields.map((m) => m.clone()),\r\n this.isReadonly,\r\n this.priority,\r\n this.properties,\r\n this.editor,\r\n this.renderer,\r\n );\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): StructPropertiesFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n memberFields: this.memberFields.map((m) => m.toJSON()),\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): StructPropertiesFieldJSON<string> {\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),\r\n };\r\n }\r\n\r\n /** Deserialize [[StructPropertiesField]] from JSON */\r\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\r\n const field = Object.create(StructPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)),\r\n });\r\n }\r\n\r\n /**\r\n * Deserialize a [[StructPropertiesField]] from compressed JSON.\r\n * @public\r\n */\r\n public static override fromCompressedJSON(\r\n json: StructPropertiesFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ): StructPropertiesField {\r\n const field = Object.create(StructPropertiesField.prototype);\r\n return Object.assign(field, json, {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\r\n memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)),\r\n });\r\n }\r\n}\r\n\r\n/**\r\n * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).\r\n *\r\n * @public\r\n */\r\nexport class NestedContentField extends Field {\r\n /** Information about an ECClass whose properties are nested inside this field */\r\n public contentClassInfo: ClassInfo;\r\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\r\n public pathToPrimaryClass: RelationshipPath;\r\n /**\r\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\r\n * and content class of this field.\r\n *\r\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\r\n * presentation rules for creating the content.\r\n */\r\n public relationshipMeaning: RelationshipMeaning;\r\n /**\r\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\r\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\r\n * here to help.\r\n *\r\n * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.\r\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\r\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\r\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\r\n */\r\n public actualPrimaryClassIds: Id64String[];\r\n /** Contained nested fields */\r\n public nestedFields: Field[];\r\n /** Flag specifying whether field should be expanded */\r\n public autoExpand?: boolean;\r\n\r\n /**\r\n * Creates an instance of NestedContentField.\r\n * @param category Category information\r\n * @param name Unique name\r\n * @param label Display label\r\n * @param type Description of this field's values data type\r\n * @param isReadonly Are values in this field read-only\r\n * @param priority Priority of the field\r\n * @param contentClassInfo Information about an ECClass whose properties are nested inside this field\r\n * @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)\r\n * @param nestedFields Contained nested fields\r\n * @param editor Property editor used to edit values of this field\r\n * @param autoExpand Flag specifying whether field should be expanded\r\n * @param relationshipMeaning RelationshipMeaning of the field\r\n * @param renderer Property renderer used to render values of this field\r\n */\r\n public constructor(\r\n category: CategoryDescription,\r\n name: string,\r\n label: string,\r\n description: TypeDescription,\r\n isReadonly: boolean,\r\n priority: number,\r\n contentClassInfo: ClassInfo,\r\n pathToPrimaryClass: RelationshipPath,\r\n nestedFields: Field[],\r\n editor?: EditorDescription,\r\n autoExpand?: boolean,\r\n renderer?: RendererDescription,\r\n ) {\r\n super(category, name, label, description, isReadonly, priority, editor, renderer);\r\n this.contentClassInfo = contentClassInfo;\r\n this.pathToPrimaryClass = pathToPrimaryClass;\r\n this.relationshipMeaning = RelationshipMeaning.RelatedInstance;\r\n this.nestedFields = nestedFields;\r\n this.autoExpand = autoExpand;\r\n this.actualPrimaryClassIds = [];\r\n }\r\n\r\n public override clone() {\r\n const clone = new NestedContentField(\r\n this.category,\r\n this.name,\r\n this.label,\r\n this.type,\r\n this.isReadonly,\r\n this.priority,\r\n this.contentClassInfo,\r\n this.pathToPrimaryClass,\r\n this.nestedFields.map((n) => n.clone()),\r\n this.editor,\r\n this.autoExpand,\r\n this.renderer,\r\n );\r\n clone.actualPrimaryClassIds = this.actualPrimaryClassIds;\r\n clone.relationshipMeaning = this.relationshipMeaning;\r\n clone.rebuildParentship(this.parent);\r\n return clone;\r\n }\r\n\r\n /**\r\n * Get field by its name\r\n * @param name Name of the field to find\r\n * @param recurse Recurse into nested fields\r\n */\r\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\r\n return getFieldByName(this.nestedFields, name, recurse);\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public override toJSON(): NestedContentFieldJSON {\r\n return {\r\n ...super.toJSON(),\r\n contentClassInfo: this.contentClassInfo,\r\n pathToPrimaryClass: this.pathToPrimaryClass,\r\n relationshipMeaning: this.relationshipMeaning,\r\n actualPrimaryClassIds: this.actualPrimaryClassIds,\r\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\r\n autoExpand: this.autoExpand,\r\n };\r\n }\r\n\r\n /** Serialize this object to compressed JSON */\r\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): NestedContentFieldJSON<string> {\r\n const { id, ...leftOverInfo } = this.contentClassInfo;\r\n classesMap[id] = leftOverInfo;\r\n return {\r\n ...super.toCompressedJSON(classesMap),\r\n contentClassInfo: id,\r\n pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\r\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\r\n };\r\n }\r\n\r\n /**\r\n * Deserialize [[NestedContentField]] from JSON\r\n * @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]\r\n */\r\n public static override fromJSON(json: NestedContentFieldJSON | undefined, categories: CategoryDescription[]): NestedContentField | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n const field = Object.create(NestedContentField.prototype);\r\n return Object.assign(field, json, this.fromCommonJSON(json, categories), {\r\n nestedFields: json.nestedFields\r\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\r\n .filter((nestedField): nestedField is Field => !!nestedField),\r\n });\r\n }\r\n\r\n /** Deserialize a [[NestedContentField]] from compressed JSON. */\r\n public static override fromCompressedJSON(\r\n json: NestedContentFieldJSON<Id64String>,\r\n classesMap: { [id: string]: CompressedClassInfoJSON },\r\n categories: CategoryDescription[],\r\n ) {\r\n assert(classesMap.hasOwnProperty(json.contentClassInfo));\r\n const field = Object.create(NestedContentField.prototype);\r\n return Object.assign(field, json, this.fromCommonJSON(json, categories), {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n nestedFields: json.nestedFields\r\n .map((nestedFieldJson: FieldJSON) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))\r\n .filter((nestedField): nestedField is Field => !!nestedField),\r\n contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },\r\n pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),\r\n });\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n private static fromCommonJSON(json: NestedContentFieldJSON<ClassInfoJSON | string>, categories: CategoryDescription[]): Partial<NestedContentField> {\r\n return {\r\n category: this.getCategoryFromFieldJson(json, categories),\r\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\r\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\r\n autoExpand: json.autoExpand,\r\n };\r\n }\r\n\r\n /** Resets parent of this field and all nested fields. */\r\n public override resetParentship(): void {\r\n super.resetParentship();\r\n for (const nestedField of this.nestedFields) {\r\n nestedField.resetParentship();\r\n }\r\n }\r\n\r\n /**\r\n * Sets provided [[NestedContentField]] as parent of this fields and recursively updates\r\n * all nested fields parents.\r\n */\r\n public override rebuildParentship(parentField?: NestedContentField): void {\r\n super.rebuildParentship(parentField);\r\n for (const nestedField of this.nestedFields) {\r\n nestedField.rebuildParentship(this);\r\n }\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const getFieldByName = (fields: Field[], name: string | undefined, recurse?: boolean): Field | undefined => {\r\n if (name) {\r\n for (const field of fields) {\r\n if (field.name === name) {\r\n return field;\r\n }\r\n\r\n if (recurse && field.isNestedContentField()) {\r\n const nested = getFieldByName(field.nestedFields, name, recurse);\r\n if (nested) {\r\n return nested;\r\n }\r\n }\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/** @internal */\r\nexport const getFieldByDescriptor = (fields: Field[], fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined => {\r\n for (const field of fields) {\r\n if (field.matchesDescriptor(fieldDescriptor)) {\r\n return field;\r\n }\r\n\r\n if (recurse && field.isNestedContentField()) {\r\n const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);\r\n if (nested) {\r\n return nested;\r\n }\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Types of different field descriptors.\r\n * @public\r\n */\r\nexport enum FieldDescriptorType {\r\n Name = \"name\",\r\n Properties = \"properties\",\r\n}\r\n\r\n/**\r\n * Base for a field descriptor\r\n * @public\r\n */\r\nexport interface FieldDescriptorBase {\r\n type: FieldDescriptorType;\r\n}\r\n\r\n/**\r\n * A union of all possible field descriptor types\r\n * @public\r\n */\r\nexport type FieldDescriptor = NamedFieldDescriptor | PropertiesFieldDescriptor;\r\n\r\n/** @public */\r\n// eslint-disable-next-line @typescript-eslint/no-redeclare\r\nexport namespace FieldDescriptor {\r\n /** Is this a named field descriptor */\r\n export function isNamed(d: FieldDescriptor): d is NamedFieldDescriptor {\r\n return d.type === FieldDescriptorType.Name;\r\n }\r\n /** Is this a properties field descriptor */\r\n export function isProperties(d: FieldDescriptor): d is PropertiesFieldDescriptor {\r\n return d.type === FieldDescriptorType.Properties;\r\n }\r\n}\r\n\r\n/**\r\n * Field descriptor that identifies a content field by its unique name.\r\n * @public\r\n */\r\nexport interface NamedFieldDescriptor extends FieldDescriptorBase {\r\n type: FieldDescriptorType.Name;\r\n fieldName: string;\r\n}\r\n\r\n/**\r\n * Field descriptor that identifies a properties field using a list of\r\n * properties that the field contains.\r\n * @public\r\n */\r\nexport interface PropertiesFieldDescriptor extends FieldDescriptorBase {\r\n type: FieldDescriptorType.Properties;\r\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\r\n /**\r\n * A list of properties that describe the field. At least one property in the list must\r\n * match at least one property in the field for the descriptor to be considered matching.\r\n */\r\n properties: Array<{\r\n /** Full class name */\r\n class: string;\r\n /** Property name */\r\n name: string;\r\n }>;\r\n}\r\n\r\nfunction fromCompressedPropertyJSON(compressedPropertyJSON: PropertyJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): Property {\r\n return {\r\n property: fromCompressedPropertyInfoJSON(compressedPropertyJSON.property, classesMap),\r\n };\r\n}\r\n\r\nfunction fromCompressedPropertyInfoJSON(compressedPropertyJSON: PropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfo {\r\n assert(classesMap.hasOwnProperty(compressedPropertyJSON.classInfo));\r\n\r\n const { navigationPropertyInfo, ...leftOverPropertyJSON } = compressedPropertyJSON;\r\n\r\n return {\r\n ...leftOverPropertyJSON,\r\n classInfo: { id: compressedPropertyJSON.classInfo, ...classesMap[compressedPropertyJSON.classInfo] },\r\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\r\n };\r\n}\r\n"]}
@@ -25,7 +25,7 @@ export class Item {
25
25
  */
26
26
  constructor(primaryKeys, label, imageId, classInfo, values, displayValues, mergedFieldNames, extendedData) {
27
27
  this.primaryKeys = primaryKeys;
28
- this.imageId = imageId; // eslint-disable-line deprecation/deprecation
28
+ this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated
29
29
  this.classInfo = classInfo;
30
30
  this.values = values;
31
31
  this.displayValues = displayValues;
@@ -44,11 +44,11 @@ export class Item {
44
44
  const { label, ...baseItem } = this;
45
45
  return {
46
46
  ...baseItem,
47
- // eslint-disable-next-line deprecation/deprecation
47
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
48
48
  values: Value.toJSON(this.values),
49
- // eslint-disable-next-line deprecation/deprecation
49
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
50
50
  displayValues: DisplayValue.toJSON(this.displayValues),
51
- // eslint-disable-next-line deprecation/deprecation
51
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
52
52
  labelDefinition: LabelDefinition.toJSON(label),
53
53
  };
54
54
  }
@@ -63,11 +63,11 @@ export class Item {
63
63
  const item = Object.create(Item.prototype);
64
64
  const { labelDefinition, ...baseJson } = json;
65
65
  return Object.assign(item, baseJson, {
66
- // eslint-disable-next-line deprecation/deprecation
66
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
67
67
  values: Value.fromJSON(json.values),
68
- // eslint-disable-next-line deprecation/deprecation
68
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
69
69
  displayValues: DisplayValue.fromJSON(json.displayValues),
70
- // eslint-disable-next-line deprecation/deprecation
70
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
71
71
  label: LabelDefinition.fromJSON(labelDefinition),
72
72
  });
73
73
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAuB,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAA0C,KAAK,EAA4B,MAAM,SAAS,CAAC;AAuBhH;;;GAGG;AACH,MAAM,OAAO,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,8CAA8C;QACtE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAA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,MAAM,CAAC,IAAI,EAAE,QAAQ,EAAE;YACnC,mDAAmD;YACnD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YACnC,mDAAmD;YACnD,aAAa,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;YACxD,mDAAmD;YACnD,KAAK,EAAE,eAAe,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","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfo, InstanceKey } from \"../EC\";\r\nimport { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\nimport { DisplayValue, DisplayValueJSON, DisplayValuesMapJSON, Value, ValueJSON, ValuesMapJSON } from \"./Value\";\r\n\r\n/**\r\n * Serialized [[Item]] JSON representation.\r\n * @public\r\n */\r\nexport interface ItemJSON {\r\n inputKeys?: InstanceKey[];\r\n primaryKeys: InstanceKey[];\r\n // TODO: rename to `label`\r\n // eslint-disable-next-line deprecation/deprecation\r\n labelDefinition: LabelDefinitionJSON;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n imageId: string;\r\n classInfo?: ClassInfo;\r\n // eslint-disable-next-line deprecation/deprecation\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n extendedData?: { [key: string]: any };\r\n}\r\n\r\n/**\r\n * A data structure that represents a single content record.\r\n * @public\r\n */\r\nexport class Item {\r\n /**\r\n * Keys of input instances that caused this item to be included in content. Only set if the content is\r\n * created with [[ContentFlags.IncludeInputKeys]] flag.\r\n */\r\n public inputKeys?: InstanceKey[];\r\n /** Keys of instances whose data is contained in this item */\r\n public primaryKeys: InstanceKey[];\r\n /** Display label of the item */\r\n public label: LabelDefinition;\r\n /**\r\n * ID of the image associated with this item\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n public imageId: string;\r\n /** For cases when item consists only of same class instances, information about the ECClass */\r\n public classInfo?: ClassInfo;\r\n /** Raw values dictionary */\r\n public values: ValuesDictionary<Value>;\r\n /** Display values dictionary */\r\n public displayValues: ValuesDictionary<DisplayValue>;\r\n /** List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging)) */\r\n public mergedFieldNames: string[];\r\n /** Extended data injected into this content item */\r\n public extendedData?: { [key: string]: any };\r\n\r\n /**\r\n * Creates an instance of Item.\r\n * @param primaryKeys Keys of instances whose data is contained in this item\r\n * @param label Display label of the item\r\n * @param imageId ID of the image associated with this item\r\n * @param classInfo For cases when item consists only of same class instances, information about the ECClass\r\n * @param values Raw values dictionary\r\n * @param displayValues Display values dictionary\r\n * @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))\r\n * @param extendedData Extended data injected into this content item\r\n */\r\n public constructor(\r\n primaryKeys: InstanceKey[],\r\n label: string | LabelDefinition,\r\n imageId: string,\r\n classInfo: ClassInfo | undefined,\r\n values: ValuesDictionary<Value>,\r\n displayValues: ValuesDictionary<DisplayValue>,\r\n mergedFieldNames: string[],\r\n extendedData?: { [key: string]: any },\r\n ) {\r\n this.primaryKeys = primaryKeys;\r\n this.imageId = imageId; // eslint-disable-line deprecation/deprecation\r\n this.classInfo = classInfo;\r\n this.values = values;\r\n this.displayValues = displayValues;\r\n this.mergedFieldNames = mergedFieldNames;\r\n this.extendedData = extendedData;\r\n this.label = typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : label;\r\n }\r\n\r\n /**\r\n * Is value of field with the specified name merged in this record.\r\n */\r\n public isFieldMerged(fieldName: string): boolean {\r\n return -1 !== this.mergedFieldNames.indexOf(fieldName);\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public toJSON(): ItemJSON {\r\n const { label, ...baseItem } = this;\r\n return {\r\n ...baseItem,\r\n // eslint-disable-next-line deprecation/deprecation\r\n values: Value.toJSON(this.values) as ValuesMapJSON,\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValues: DisplayValue.toJSON(this.displayValues) as DisplayValuesMapJSON,\r\n // eslint-disable-next-line deprecation/deprecation\r\n labelDefinition: LabelDefinition.toJSON(label),\r\n };\r\n }\r\n\r\n /** Deserialize [[Item]] from JSON */\r\n public static fromJSON(json: ItemJSON | string | undefined): Item | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, (key, value) => Item.reviver(key, value));\r\n }\r\n const item = Object.create(Item.prototype);\r\n const { labelDefinition, ...baseJson } = json;\r\n return Object.assign(item, baseJson, {\r\n // eslint-disable-next-line deprecation/deprecation\r\n values: Value.fromJSON(json.values),\r\n // eslint-disable-next-line deprecation/deprecation\r\n displayValues: DisplayValue.fromJSON(json.displayValues),\r\n // eslint-disable-next-line deprecation/deprecation\r\n label: LabelDefinition.fromJSON(labelDefinition),\r\n } as Partial<Item>);\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing Item objects.\r\n * @internal\r\n */\r\n public static reviver(key: string, value: any): any {\r\n return key === \"\" ? Item.fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize items list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized items list\r\n * @internal\r\n */\r\n public static listFromJSON(json: ItemJSON[] | string): Item[] {\r\n if (typeof json === \"string\") {\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n return JSON.parse(json, Item.listReviver);\r\n }\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n return json.map(Item.fromJSON).filter((item): item is Item => !!item);\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Item]][] objects.\r\n * @internal\r\n */\r\n public static listReviver(key: string, value: any): any {\r\n return key === \"\" ? Item.listFromJSON(value) : value;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Item.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAGH,OAAO,EAAE,eAAe,EAAuB,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAA0C,KAAK,EAA4B,MAAM,SAAS,CAAC;AAuBhH;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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","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfo, InstanceKey } from \"../EC\";\r\nimport { LabelDefinition, LabelDefinitionJSON } from \"../LabelDefinition\";\r\nimport { ValuesDictionary } from \"../Utils\";\r\nimport { DisplayValue, DisplayValueJSON, DisplayValuesMapJSON, Value, ValueJSON, ValuesMapJSON } from \"./Value\";\r\n\r\n/**\r\n * Serialized [[Item]] JSON representation.\r\n * @public\r\n */\r\nexport interface ItemJSON {\r\n inputKeys?: InstanceKey[];\r\n primaryKeys: InstanceKey[];\r\n // TODO: rename to `label`\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n labelDefinition: LabelDefinitionJSON;\r\n /** @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details. */\r\n imageId: string;\r\n classInfo?: ClassInfo;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n values: ValuesDictionary<ValueJSON>;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValues: ValuesDictionary<DisplayValueJSON>;\r\n mergedFieldNames: string[];\r\n extendedData?: { [key: string]: any };\r\n}\r\n\r\n/**\r\n * A data structure that represents a single content record.\r\n * @public\r\n */\r\nexport class Item {\r\n /**\r\n * Keys of input instances that caused this item to be included in content. Only set if the content is\r\n * created with [[ContentFlags.IncludeInputKeys]] flag.\r\n */\r\n public inputKeys?: InstanceKey[];\r\n /** Keys of instances whose data is contained in this item */\r\n public primaryKeys: InstanceKey[];\r\n /** Display label of the item */\r\n public label: LabelDefinition;\r\n /**\r\n * ID of the image associated with this item\r\n * @deprecated in 3.x. Use [[extendedData]] instead. See [extended data usage page]($docs/presentation/customization/ExtendedDataUsage.md) for more details.\r\n */\r\n public imageId: string;\r\n /** For cases when item consists only of same class instances, information about the ECClass */\r\n public classInfo?: ClassInfo;\r\n /** Raw values dictionary */\r\n public values: ValuesDictionary<Value>;\r\n /** Display values dictionary */\r\n public displayValues: ValuesDictionary<DisplayValue>;\r\n /** List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging)) */\r\n public mergedFieldNames: string[];\r\n /** Extended data injected into this content item */\r\n public extendedData?: { [key: string]: any };\r\n\r\n /**\r\n * Creates an instance of Item.\r\n * @param primaryKeys Keys of instances whose data is contained in this item\r\n * @param label Display label of the item\r\n * @param imageId ID of the image associated with this item\r\n * @param classInfo For cases when item consists only of same class instances, information about the ECClass\r\n * @param values Raw values dictionary\r\n * @param displayValues Display values dictionary\r\n * @param mergedFieldNames List of field names whose values are merged (see [Merging values]($docs/presentation/content/Terminology#value-merging))\r\n * @param extendedData Extended data injected into this content item\r\n */\r\n public constructor(\r\n primaryKeys: InstanceKey[],\r\n label: string | LabelDefinition,\r\n imageId: string,\r\n classInfo: ClassInfo | undefined,\r\n values: ValuesDictionary<Value>,\r\n displayValues: ValuesDictionary<DisplayValue>,\r\n mergedFieldNames: string[],\r\n extendedData?: { [key: string]: any },\r\n ) {\r\n this.primaryKeys = primaryKeys;\r\n this.imageId = imageId; // eslint-disable-line @typescript-eslint/no-deprecated\r\n this.classInfo = classInfo;\r\n this.values = values;\r\n this.displayValues = displayValues;\r\n this.mergedFieldNames = mergedFieldNames;\r\n this.extendedData = extendedData;\r\n this.label = typeof label === \"string\" ? LabelDefinition.fromLabelString(label) : label;\r\n }\r\n\r\n /**\r\n * Is value of field with the specified name merged in this record.\r\n */\r\n public isFieldMerged(fieldName: string): boolean {\r\n return -1 !== this.mergedFieldNames.indexOf(fieldName);\r\n }\r\n\r\n /** Serialize this object to JSON */\r\n public toJSON(): ItemJSON {\r\n const { label, ...baseItem } = this;\r\n return {\r\n ...baseItem,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n values: Value.toJSON(this.values) as ValuesMapJSON,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValues: DisplayValue.toJSON(this.displayValues) as DisplayValuesMapJSON,\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n labelDefinition: LabelDefinition.toJSON(label),\r\n };\r\n }\r\n\r\n /** Deserialize [[Item]] from JSON */\r\n public static fromJSON(json: ItemJSON | string | undefined): Item | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n if (typeof json === \"string\") {\r\n return JSON.parse(json, (key, value) => Item.reviver(key, value));\r\n }\r\n const item = Object.create(Item.prototype);\r\n const { labelDefinition, ...baseJson } = json;\r\n return Object.assign(item, baseJson, {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n values: Value.fromJSON(json.values),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n displayValues: DisplayValue.fromJSON(json.displayValues),\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n label: LabelDefinition.fromJSON(labelDefinition),\r\n } as Partial<Item>);\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing Item objects.\r\n * @internal\r\n */\r\n public static reviver(key: string, value: any): any {\r\n return key === \"\" ? Item.fromJSON(value) : value;\r\n }\r\n\r\n /**\r\n * Deserialize items list from JSON\r\n * @param json JSON or JSON serialized to string to deserialize from\r\n * @returns Deserialized items list\r\n * @internal\r\n */\r\n public static listFromJSON(json: ItemJSON[] | string): Item[] {\r\n if (typeof json === \"string\") {\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n return JSON.parse(json, Item.listReviver);\r\n }\r\n // eslint-disable-next-line @typescript-eslint/unbound-method\r\n return json.map(Item.fromJSON).filter((item): item is Item => !!item);\r\n }\r\n\r\n /**\r\n * Reviver function that can be used as a second argument for\r\n * `JSON.parse` method when parsing [[Item]][] objects.\r\n * @internal\r\n */\r\n public static listReviver(key: string, value: any): any {\r\n return key === \"\" ? Item.listFromJSON(value) : value;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAA0C,YAAY,EAAoB,MAAM,OAAO,CAAC;AAkC/F,cAAc;AACd,MAAM,KAAW,QAAQ,CAyBxB;AAzBD,WAAiB,QAAQ;IACvB;;;OAGG;IACH,uBAAuB;IACvB,SAAgB,MAAM,CAAC,IAAc;QACnC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,eAAM,SAErB,CAAA;IAED,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,SAAgB,QAAQ,CAAC,IAAkB;QACzC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,iBAAQ,WAEvB,CAAA;AACH,CAAC,EAzBgB,QAAQ,KAAR,QAAQ,QAyBxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfoJSON, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC\";\r\n\r\n/**\r\n * Data structure that describes one step of property\r\n * accessor path.\r\n *\r\n * @public\r\n */\r\nexport interface PropertyAccessor {\r\n /** Name of ECProperty */\r\n propertyName: string;\r\n /** If the property is an array, array index. Otherwise undefined. */\r\n arrayIndex?: number;\r\n}\r\n\r\n/**\r\n * Describes path to a property.\r\n * @public\r\n */\r\nexport type PropertyAccessorPath = PropertyAccessor[];\r\n\r\n/**\r\n * Data structure that describes a single ECProperty that's\r\n * included in a [[PropertiesField]].\r\n *\r\n * TODO: Remove?\r\n *\r\n * @public\r\n */\r\nexport interface Property {\r\n /** ECProperty information */\r\n property: PropertyInfo;\r\n}\r\n\r\n/** @public */\r\nexport namespace Property {\r\n /**\r\n * Serialize [[Property]] to JSON\r\n * @deprecated in 3.x. Use [[toCompressedJSON]]\r\n */\r\n // istanbul ignore next\r\n export function toJSON(prop: Property): PropertyJSON {\r\n return { ...prop };\r\n }\r\n\r\n /** Serialize [[Property]] to compressed JSON */\r\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\r\n return {\r\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\r\n };\r\n }\r\n\r\n /**\r\n * Deserializes [[Property]] from JSON\r\n * @deprecated in 3.x. Use [[Property]]\r\n */\r\n // istanbul ignore next\r\n export function fromJSON(json: PropertyJSON): Property {\r\n return { ...json };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Property]]\r\n * @public\r\n */\r\n// eslint-disable-next-line deprecation/deprecation\r\nexport interface PropertyJSON<TClassInfoJSON = ClassInfoJSON> {\r\n property: PropertyInfoJSON<TClassInfoJSON>;\r\n}\r\n"]}
1
+ {"version":3,"file":"Property.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Property.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG;;GAEG;AAEH,OAAO,EAA0C,YAAY,EAAoB,MAAM,OAAO,CAAC;AAkC/F,cAAc;AACd,MAAM,KAAW,QAAQ,CAyBxB;AAzBD,WAAiB,QAAQ;IACvB;;;OAGG;IACH,uBAAuB;IACvB,SAAgB,MAAM,CAAC,IAAc;QACnC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,eAAM,SAErB,CAAA;IAED,gDAAgD;IAChD,SAAgB,gBAAgB,CAAC,IAAc,EAAE,UAAqD;QACpG,OAAO;YACL,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;SACnE,CAAC;IACJ,CAAC;IAJe,yBAAgB,mBAI/B,CAAA;IAED;;;OAGG;IACH,uBAAuB;IACvB,SAAgB,QAAQ,CAAC,IAAkB;QACzC,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;IACrB,CAAC;IAFe,iBAAQ,WAEvB,CAAA;AACH,CAAC,EAzBgB,QAAQ,KAAR,QAAQ,QAyBxB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { ClassInfoJSON, CompressedClassInfoJSON, PropertyInfo, PropertyInfoJSON } from \"../EC\";\r\n\r\n/**\r\n * Data structure that describes one step of property\r\n * accessor path.\r\n *\r\n * @public\r\n */\r\nexport interface PropertyAccessor {\r\n /** Name of ECProperty */\r\n propertyName: string;\r\n /** If the property is an array, array index. Otherwise undefined. */\r\n arrayIndex?: number;\r\n}\r\n\r\n/**\r\n * Describes path to a property.\r\n * @public\r\n */\r\nexport type PropertyAccessorPath = PropertyAccessor[];\r\n\r\n/**\r\n * Data structure that describes a single ECProperty that's\r\n * included in a [[PropertiesField]].\r\n *\r\n * TODO: Remove?\r\n *\r\n * @public\r\n */\r\nexport interface Property {\r\n /** ECProperty information */\r\n property: PropertyInfo;\r\n}\r\n\r\n/** @public */\r\nexport namespace Property {\r\n /**\r\n * Serialize [[Property]] to JSON\r\n * @deprecated in 3.x. Use [[toCompressedJSON]]\r\n */\r\n // istanbul ignore next\r\n export function toJSON(prop: Property): PropertyJSON {\r\n return { ...prop };\r\n }\r\n\r\n /** Serialize [[Property]] to compressed JSON */\r\n export function toCompressedJSON(prop: Property, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyJSON<string> {\r\n return {\r\n property: PropertyInfo.toCompressedJSON(prop.property, classesMap),\r\n };\r\n }\r\n\r\n /**\r\n * Deserializes [[Property]] from JSON\r\n * @deprecated in 3.x. Use [[Property]]\r\n */\r\n // istanbul ignore next\r\n export function fromJSON(json: PropertyJSON): Property {\r\n return { ...json };\r\n }\r\n}\r\n\r\n/**\r\n * JSON representation of [[Property]]\r\n * @public\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-deprecated\r\nexport interface PropertyJSON<TClassInfoJSON = ClassInfoJSON> {\r\n property: PropertyInfoJSON<TClassInfoJSON>;\r\n}\r\n"]}
@@ -41,13 +41,13 @@ export var Value;
41
41
  * Serialize [[Value]] to JSON
42
42
  * @deprecated in 3.x. Use [[Value]]
43
43
  */
44
- // eslint-disable-next-line deprecation/deprecation
44
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
45
45
  function fromJSON(json) {
46
46
  if (json === null) {
47
47
  return undefined;
48
48
  }
49
49
  if (isNestedContentValue(json)) {
50
- // eslint-disable-next-line deprecation/deprecation
50
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
51
51
  return json.map(NestedContentValue.fromJSON);
52
52
  }
53
53
  if (isArrayValue(json)) {
@@ -63,13 +63,13 @@ export var Value;
63
63
  * Deserialize [[Value]] from JSON
64
64
  * @deprecated in 3.x. Use [[Value]]
65
65
  */
66
- // eslint-disable-next-line deprecation/deprecation
66
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
67
67
  function toJSON(value) {
68
68
  if (undefined === value) {
69
69
  return null;
70
70
  }
71
71
  if (isNestedContentValue(value)) {
72
- // eslint-disable-next-line deprecation/deprecation
72
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
73
73
  return value.map(NestedContentValue.toJSON);
74
74
  }
75
75
  if (isArrayValue(value)) {
@@ -105,7 +105,7 @@ export var DisplayValue;
105
105
  * Serialize [[DisplayValue]] to JSON
106
106
  * @deprecated in 3.x. Use [[DisplayValue]]
107
107
  */
108
- // eslint-disable-next-line deprecation/deprecation
108
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
109
109
  function fromJSON(json) {
110
110
  if (json === null) {
111
111
  return undefined;
@@ -123,7 +123,7 @@ export var DisplayValue;
123
123
  * Deserialize [[DisplayValue]] from JSON
124
124
  * @deprecated in 3.x. Use [[DisplayValue]]
125
125
  */
126
- // eslint-disable-next-line deprecation/deprecation
126
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
127
127
  function toJSON(value) {
128
128
  if (undefined === value) {
129
129
  return null;
@@ -145,7 +145,7 @@ export var NestedContentValue;
145
145
  * Serialize [[NestedContentValue]] to JSON
146
146
  * @deprecated in 3.x. Use [[NestedContentValue]]
147
147
  */
148
- // eslint-disable-next-line deprecation/deprecation
148
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
149
149
  function toJSON(value) {
150
150
  return {
151
151
  ...value,
@@ -158,7 +158,7 @@ export var NestedContentValue;
158
158
  * Deserialize [[NestedContentValue]] from JSON
159
159
  * @deprecated in 3.x. Use [[NestedContentValue]]
160
160
  */
161
- // eslint-disable-next-line deprecation/deprecation
161
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
162
162
  function fromJSON(json) {
163
163
  return {
164
164
  ...json,
@@ -175,12 +175,12 @@ export var DisplayValueGroup;
175
175
  * Serialize [[DisplayValueGroup]] to JSON
176
176
  * @deprecated in 3.x. Use [[DisplayValueGroup]]
177
177
  */
178
- // eslint-disable-next-line deprecation/deprecation
178
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
179
179
  function toJSON(group) {
180
180
  return {
181
- // eslint-disable-next-line deprecation/deprecation
181
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
182
182
  displayValue: DisplayValue.toJSON(group.displayValue),
183
- // eslint-disable-next-line deprecation/deprecation
183
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
184
184
  groupedRawValues: group.groupedRawValues.map(Value.toJSON),
185
185
  };
186
186
  }
@@ -189,18 +189,18 @@ export var DisplayValueGroup;
189
189
  * Deserialize [[DisplayValueGroup]] from JSON
190
190
  * @deprecated in 3.x. Use [[DisplayValueGroup]]
191
191
  */
192
- // eslint-disable-next-line deprecation/deprecation
192
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
193
193
  function fromJSON(json) {
194
194
  return {
195
- // eslint-disable-next-line deprecation/deprecation
195
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
196
196
  displayValue: DisplayValue.fromJSON(json.displayValue),
197
- // eslint-disable-next-line deprecation/deprecation
197
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
198
198
  groupedRawValues: json.groupedRawValues.map(Value.fromJSON),
199
199
  };
200
200
  }
201
201
  DisplayValueGroup.fromJSON = fromJSON;
202
202
  })(DisplayValueGroup || (DisplayValueGroup = {}));
203
- // eslint-disable-next-line deprecation/deprecation
203
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
204
204
  function isNestedContentValue(v) {
205
205
  return (v !== undefined &&
206
206
  Array.isArray(v) &&
@@ -216,78 +216,78 @@ function isArrayValue(v) {
216
216
  // we have other means to determine the type of value.
217
217
  return v !== undefined && Array.isArray(v);
218
218
  }
219
- // eslint-disable-next-line deprecation/deprecation
219
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
220
220
  function isMapValue(v) {
221
221
  return v !== undefined && typeof v === "object" && !Array.isArray(v);
222
222
  }
223
223
  function isPrimitiveValue(v) {
224
224
  return !isArrayValue(v) && !isMapValue(v);
225
225
  }
226
- // eslint-disable-next-line deprecation/deprecation
226
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
227
227
  function valuesArrayFromJSON(json) {
228
- // eslint-disable-next-line deprecation/deprecation
228
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
229
229
  return json.map(Value.fromJSON);
230
230
  }
231
- // eslint-disable-next-line deprecation/deprecation
231
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
232
232
  function valuesArrayToJSON(values) {
233
- // eslint-disable-next-line deprecation/deprecation
233
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
234
234
  return values.map(Value.toJSON);
235
235
  }
236
- // eslint-disable-next-line deprecation/deprecation
236
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
237
237
  function valuesMapFromJSON(json) {
238
238
  const map = {};
239
239
  for (const key in json) {
240
240
  /* istanbul ignore else */
241
241
  if (json.hasOwnProperty(key)) {
242
- // eslint-disable-next-line deprecation/deprecation
242
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
243
243
  map[key] = Value.fromJSON(json[key]);
244
244
  }
245
245
  }
246
246
  return map;
247
247
  }
248
- // eslint-disable-next-line deprecation/deprecation
248
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
249
249
  function valuesMapToJSON(values) {
250
- // eslint-disable-next-line deprecation/deprecation
250
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
251
251
  const map = {};
252
252
  for (const key in values) {
253
253
  /* istanbul ignore else */
254
254
  if (values.hasOwnProperty(key)) {
255
- // eslint-disable-next-line deprecation/deprecation
255
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
256
256
  map[key] = Value.toJSON(values[key]);
257
257
  }
258
258
  }
259
259
  return map;
260
260
  }
261
- // eslint-disable-next-line deprecation/deprecation
261
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
262
262
  function displayValuesArrayFromJSON(json) {
263
- // eslint-disable-next-line deprecation/deprecation
263
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
264
264
  return json.map(DisplayValue.fromJSON);
265
265
  }
266
- // eslint-disable-next-line deprecation/deprecation
266
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
267
267
  function displayValuesArrayToJSON(values) {
268
- // eslint-disable-next-line deprecation/deprecation
268
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
269
269
  return values.map(DisplayValue.toJSON);
270
270
  }
271
- // eslint-disable-next-line deprecation/deprecation
271
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
272
272
  function displayValuesMapFromJSON(json) {
273
273
  const map = {};
274
274
  for (const key in json) {
275
275
  /* istanbul ignore else */
276
276
  if (json.hasOwnProperty(key)) {
277
- // eslint-disable-next-line deprecation/deprecation
277
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
278
278
  map[key] = DisplayValue.fromJSON(json[key]);
279
279
  }
280
280
  }
281
281
  return map;
282
282
  }
283
- // eslint-disable-next-line deprecation/deprecation
283
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
284
284
  function displayValuesMapToJSON(values) {
285
- // eslint-disable-next-line deprecation/deprecation
285
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
286
286
  const map = {};
287
287
  for (const key in values) {
288
288
  /* istanbul ignore else */
289
289
  if (values.hasOwnProperty(key)) {
290
- // eslint-disable-next-line deprecation/deprecation
290
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
291
291
  map[key] = DisplayValue.toJSON(values[key]);
292
292
  }
293
293
  }