@itwin/presentation-common 5.1.0-dev.4 → 5.1.0-dev.40

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 (63) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/Ruleset.schema.json +3 -3
  3. package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
  4. package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
  5. package/lib/cjs/presentation-common/EC.js +9 -2
  6. package/lib/cjs/presentation-common/EC.js.map +1 -1
  7. package/lib/cjs/presentation-common/Error.d.ts +1 -1
  8. package/lib/cjs/presentation-common/Error.js +1 -1
  9. package/lib/cjs/presentation-common/Error.js.map +1 -1
  10. package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +1 -1
  11. package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
  12. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +17 -17
  13. package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  14. package/lib/cjs/presentation-common/PresentationRpcInterface.js +17 -17
  15. package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
  16. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +1 -1
  17. package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  18. package/lib/cjs/presentation-common/RegisteredRuleset.js +1 -1
  19. package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
  20. package/lib/cjs/presentation-common/content/Fields.d.ts +9 -9
  21. package/lib/cjs/presentation-common/content/Fields.js +9 -9
  22. package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
  23. package/lib/cjs/presentation-common/content/Item.d.ts +1 -1
  24. package/lib/cjs/presentation-common/content/Item.js.map +1 -1
  25. package/lib/cjs/presentation-common/content/Value.d.ts +1 -1
  26. package/lib/cjs/presentation-common/content/Value.js.map +1 -1
  27. package/lib/cjs/presentation-common/hierarchy/Node.d.ts +1 -1
  28. package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
  29. package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +2 -2
  30. package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  31. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +1 -1
  32. package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  33. package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
  34. package/lib/esm/presentation-common/EC.d.ts.map +1 -1
  35. package/lib/esm/presentation-common/EC.js +9 -2
  36. package/lib/esm/presentation-common/EC.js.map +1 -1
  37. package/lib/esm/presentation-common/Error.d.ts +1 -1
  38. package/lib/esm/presentation-common/Error.js +1 -1
  39. package/lib/esm/presentation-common/Error.js.map +1 -1
  40. package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +1 -1
  41. package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
  42. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +17 -17
  43. package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
  44. package/lib/esm/presentation-common/PresentationRpcInterface.js +17 -17
  45. package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
  46. package/lib/esm/presentation-common/RegisteredRuleset.d.ts +1 -1
  47. package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
  48. package/lib/esm/presentation-common/RegisteredRuleset.js +1 -1
  49. package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
  50. package/lib/esm/presentation-common/content/Fields.d.ts +9 -9
  51. package/lib/esm/presentation-common/content/Fields.js +9 -9
  52. package/lib/esm/presentation-common/content/Fields.js.map +1 -1
  53. package/lib/esm/presentation-common/content/Item.d.ts +1 -1
  54. package/lib/esm/presentation-common/content/Item.js.map +1 -1
  55. package/lib/esm/presentation-common/content/Value.d.ts +1 -1
  56. package/lib/esm/presentation-common/content/Value.js.map +1 -1
  57. package/lib/esm/presentation-common/hierarchy/Node.d.ts +1 -1
  58. package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
  59. package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +2 -2
  60. package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
  61. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +1 -1
  62. package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
  63. package/package.json +15 -11
@@ -1 +1 @@
1
- {"version":3,"file":"PresentationRpcInterface.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationRpcInterface.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;AAGH,oDAAgF;AAgChF,yCAA8E;AAgJ9E;;;GAGG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,0BAAY;IACxD,2CAA2C;IACpC,MAAM,CAAU,aAAa,GAAG,0BAA0B,CAAC;IAElE,6CAA6C;IACtC,MAAM,CAAC,gBAAgB,GAAG,OAAO,CAAC;IAEzC;;;iGAG6F;IAE7F,4HAA4H;IACrH,KAAK,CAAC,aAAa,CAAC,MAAsB,EAAE,QAAoC;QACrF,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,4HAA4H;IACrH,KAAK,CAAC,aAAa,CAAC,MAAsB,EAAE,QAA2C;QAC5F,OAAO,IAAA,sCAA2B,EAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,4HAA4H;IACrH,KAAK,CAAC,kBAAkB,CAC7B,MAAsB,EACtB,QAAmD;QAEnD,OAAO,IAAA,sCAA2B,EAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,4HAA4H;IAC5H,4CAA4C;IACrC,KAAK,CAAC,YAAY,CAAC,MAAsB,EAAE,QAAyD;QACzG,OAAO,IAAA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AC5H,4DAA4D;IACrD,KAAK,CAAC,gBAAgB,CAAC,MAAsB,EAAE,QAA2C;QAC/F,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;;AA/HU,4DAAwB;mCAAxB,wBAAwB;IADpC,0BAAY,CAAC,gBAAgB,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;GAC7C,wBAAwB,CAgIpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RPC\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { IModelRpcProps, RpcInterface, RpcOperation } from \"@itwin/core-common\";\nimport { DescriptorJSON, DescriptorOverrides, SelectClassInfoJSON } from \"./content/Descriptor.js\";\nimport { ItemJSON } from \"./content/Item.js\";\nimport { DisplayValueGroup } from \"./content/Value.js\";\nimport { ClientDiagnostics, ClientDiagnosticsOptions } from \"./Diagnostics.js\";\nimport { CompressedClassInfoJSON, InstanceKey } from \"./EC.js\";\nimport { ElementProperties } from \"./ElementProperties.js\";\nimport { PresentationStatus } from \"./Error.js\";\nimport { NodeKey } from \"./hierarchy/Key.js\";\nimport { Node } from \"./hierarchy/Node.js\";\nimport { NodePathElement } from \"./hierarchy/NodePathElement.js\";\nimport { KeySetJSON } from \"./KeySet.js\";\nimport { LabelDefinition } from \"./LabelDefinition.js\";\nimport {\n ComputeSelectionRequestOptions,\n ContentDescriptorRequestOptions,\n ContentInstanceKeysRequestOptions,\n ContentRequestOptions,\n ContentSourcesRequestOptions,\n DisplayLabelRequestOptions,\n DisplayLabelsRequestOptions,\n DistinctValuesRequestOptions,\n FilterByInstancePathsHierarchyRequestOptions,\n FilterByTextHierarchyRequestOptions,\n HierarchyLevelDescriptorRequestOptions,\n HierarchyRequestOptions,\n Paged,\n SelectionScopeRequestOptions,\n SingleElementPropertiesRequestOptions,\n} from \"./PresentationManagerOptions.js\";\nimport { RulesetVariableJSON } from \"./RulesetVariables.js\";\nimport { SelectionScope } from \"./selection/SelectionScope.js\";\nimport { deepReplaceNullsToUndefined, Omit, PagedResponse } from \"./Utils.js\";\n\n/**\n * Base options for all presentation RPC requests.\n * @public\n */\nexport type PresentationRpcRequestOptions<TManagerRequestOptions> = Omit<TManagerRequestOptions, \"imodel\" | \"diagnostics\"> & {\n /** @internal ID of the client requesting data */\n clientId?: string;\n /** RPC request diagnostics options. */\n diagnostics?: RpcDiagnosticsOptions;\n};\n\n/**\n * Data structure for presentation RPC responses\n * @public\n */\nexport interface PresentationRpcResponseData<TResult = undefined> {\n /** Response status code */\n statusCode: PresentationStatus;\n /** In case of an error response, the error message */\n errorMessage?: string;\n /** In case of a success response, the result */\n result?: TResult;\n /** Diagnostics response. */\n diagnostics?: ClientDiagnostics;\n}\n\n/**\n * Data structure for RPC diagnostics options.\n * @public\n */\nexport type RpcDiagnosticsOptions = Omit<ClientDiagnosticsOptions, \"handler\">;\n\n/**\n * A promise of [[PresentationRpcResponseData]].\n * @public\n */\nexport type PresentationRpcResponse<TResult = undefined> = Promise<PresentationRpcResponseData<TResult>>;\n\n/**\n * Data structure for hierarchy request options.\n * @public\n */\nexport type HierarchyRpcRequestOptions = PresentationRpcRequestOptions<HierarchyRequestOptions<never, NodeKey, RulesetVariableJSON>>;\n\n/**\n * Data structure for hierarchy level descriptor RPC request options.\n * @public\n */\nexport type HierarchyLevelDescriptorRpcRequestOptions = PresentationRpcRequestOptions<\n HierarchyLevelDescriptorRequestOptions<never, NodeKey, RulesetVariableJSON>\n>;\n\n/**\n * Data structure for filtering hierarchy by ECInstance paths request options.\n * @public\n */\nexport type FilterByInstancePathsHierarchyRpcRequestOptions = PresentationRpcRequestOptions<\n FilterByInstancePathsHierarchyRequestOptions<never, RulesetVariableJSON>\n>;\n\n/**\n * Data structure for filtering hierarchy by text request options.\n * @public\n */\nexport type FilterByTextHierarchyRpcRequestOptions = PresentationRpcRequestOptions<FilterByTextHierarchyRequestOptions<never, RulesetVariableJSON>>;\n\n/**\n * Data structure for content sources RPC request options.\n * @public\n */\nexport type ContentSourcesRpcRequestOptions = PresentationRpcRequestOptions<ContentSourcesRequestOptions<never>>;\n/**\n * Data structure for content sources RPC response.\n * @public\n */\nexport interface ContentSourcesRpcResult {\n /** A list of objects containing content source information. */\n sources: SelectClassInfoJSON<Id64String>[];\n /** An `ECClassId` => [[CompressedClassInfoJSON]] map for deserializing [[sources]]. */\n classesMap: { [id: string]: CompressedClassInfoJSON };\n}\n\n/**\n * Data structure for content descriptor RPC request options.\n * @public\n */\nexport type ContentDescriptorRpcRequestOptions = PresentationRpcRequestOptions<ContentDescriptorRequestOptions<never, KeySetJSON, RulesetVariableJSON>>;\n\n/**\n * Data structure for content RPC request options.\n * @public\n */\nexport type ContentRpcRequestOptions = PresentationRpcRequestOptions<ContentRequestOptions<never, DescriptorOverrides, KeySetJSON, RulesetVariableJSON>>;\n\n/**\n * Data structure for single element properties RPC request options.\n * @public\n */\nexport type SingleElementPropertiesRpcRequestOptions = PresentationRpcRequestOptions<\n Omit<SingleElementPropertiesRequestOptions<never, never>, \"contentParser\">\n>;\n\n/**\n * Data structure for distinct values' request options.\n * @public\n */\nexport type DistinctValuesRpcRequestOptions = PresentationRpcRequestOptions<\n DistinctValuesRequestOptions<never, DescriptorOverrides, KeySetJSON, RulesetVariableJSON>\n>;\n\n/**\n * Data structure for content instance keys' request options.\n * @public\n */\nexport type ContentInstanceKeysRpcRequestOptions = PresentationRpcRequestOptions<ContentInstanceKeysRequestOptions<never, KeySetJSON, RulesetVariableJSON>>;\n\n/**\n * Data structure for label request options.\n * @public\n */\nexport type DisplayLabelRpcRequestOptions = PresentationRpcRequestOptions<DisplayLabelRequestOptions<never, InstanceKey>>;\n\n/**\n * Data structure for labels request options.\n * @public\n */\nexport type DisplayLabelsRpcRequestOptions = PresentationRpcRequestOptions<DisplayLabelsRequestOptions<never, InstanceKey>>;\n\n/**\n * Data structure for selection scope request options.\n * @public\n * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport type SelectionScopeRpcRequestOptions = PresentationRpcRequestOptions<SelectionScopeRequestOptions<never>>;\n\n/**\n * Request options data structure for computing selection based on given selection scope and element IDs.\n * @public\n * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport type ComputeSelectionRpcRequestOptions = PresentationRpcRequestOptions<ComputeSelectionRequestOptions<never>>;\n\n/**\n * Interface used for communication between Presentation backend and frontend.\n * @public\n */\n@RpcOperation.setDefaultPolicy({ retryInterval: () => 0 })\nexport class PresentationRpcInterface extends RpcInterface {\n /** The immutable name of the interface. */\n public static readonly interfaceName = \"PresentationRpcInterface\";\n\n /** The semantic version of the interface. */\n public static interfaceVersion = \"5.0.0\";\n\n /*===========================================================================================\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\n NOTE: Please consult the README in core/common/src/rpc for the semantic versioning rules.\n ===========================================================================================*/\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getNodesCount(_token: IModelRpcProps, _options: HierarchyRpcRequestOptions): PresentationRpcResponse<number> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedNodes(_token: IModelRpcProps, _options: Paged<HierarchyRpcRequestOptions>): PresentationRpcResponse<PagedResponse<Node>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getNodesDescriptor(\n _token: IModelRpcProps,\n _options: HierarchyLevelDescriptorRpcRequestOptions,\n ): PresentationRpcResponse<string | DescriptorJSON | undefined> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // TODO: add paged version of this (#387280)\n public async getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // TODO: add paged version of this (#387280)\n public async getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentSources(_token: IModelRpcProps, _options: ContentSourcesRpcRequestOptions): PresentationRpcResponse<ContentSourcesRpcResult> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentDescriptor(_token: IModelRpcProps, _options: ContentDescriptorRpcRequestOptions): PresentationRpcResponse<DescriptorJSON | undefined> {\n const response: PresentationRpcResponseData<string | undefined> = await this.forward(arguments);\n return {\n ...response,\n ...(response.result ? { result: JSON.parse(response.result) } : {}),\n };\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentSetSize(_token: IModelRpcProps, _options: ContentRpcRequestOptions): PresentationRpcResponse<number> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedContent(\n _token: IModelRpcProps,\n _options: Paged<ContentRpcRequestOptions>,\n ): PresentationRpcResponse<{ descriptor: DescriptorJSON; contentSet: PagedResponse<ItemJSON> } | undefined> {\n const rpcResponse = await this.forward(arguments);\n return {\n ...rpcResponse,\n ...(rpcResponse.result\n ? /* c8 ignore next */ { result: { ...rpcResponse.result, contentSet: deepReplaceNullsToUndefined(rpcResponse.result.contentSet) } }\n : {}),\n };\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedContentSet(_token: IModelRpcProps, _options: Paged<ContentRpcRequestOptions>): PresentationRpcResponse<PagedResponse<ItemJSON>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getElementProperties(\n _token: IModelRpcProps,\n _options: SingleElementPropertiesRpcRequestOptions,\n ): PresentationRpcResponse<ElementProperties | undefined> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedDistinctValues(\n _token: IModelRpcProps,\n _options: DistinctValuesRpcRequestOptions,\n ): PresentationRpcResponse<PagedResponse<DisplayValueGroup>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentInstanceKeys(\n _token: IModelRpcProps,\n _options: ContentInstanceKeysRpcRequestOptions,\n ): PresentationRpcResponse<{ total: number; items: KeySetJSON }> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getDisplayLabelDefinition(_token: IModelRpcProps, _options: DisplayLabelRpcRequestOptions): PresentationRpcResponse<LabelDefinition> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedDisplayLabelDefinitions(\n _token: IModelRpcProps,\n _options: DisplayLabelsRpcRequestOptions,\n ): PresentationRpcResponse<PagedResponse<LabelDefinition>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public async getSelectionScopes(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions): PresentationRpcResponse<SelectionScope[]> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public async computeSelection(_token: IModelRpcProps, _options: ComputeSelectionRpcRequestOptions): PresentationRpcResponse<KeySetJSON> {\n return this.forward(arguments);\n }\n}\n"]}
1
+ {"version":3,"file":"PresentationRpcInterface.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationRpcInterface.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;;;;;;;AAGH,oDAAgF;AAgChF,yCAA8E;AAgJ9E;;;GAGG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,0BAAY;IACxD,2CAA2C;IACpC,MAAM,CAAU,aAAa,GAAG,0BAA0B,CAAC;IAElE,6CAA6C;IACtC,MAAM,CAAC,gBAAgB,GAAG,OAAO,CAAC;IAEzC;;;iGAG6F;IAE7F,qKAAqK;IAC9J,KAAK,CAAC,aAAa,CAAC,MAAsB,EAAE,QAAoC;QACrF,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,qKAAqK;IAC9J,KAAK,CAAC,aAAa,CAAC,MAAsB,EAAE,QAA2C;QAC5F,OAAO,IAAA,sCAA2B,EAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,qKAAqK;IAC9J,KAAK,CAAC,kBAAkB,CAC7B,MAAsB,EACtB,QAAmD;QAEnD,OAAO,IAAA,sCAA2B,EAAC,MAAM,IAAI,CA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KAAqK;IACrK,4DAA4D;IACrD,KAAK,CAAC,kBAAkB,CAAC,MAAsB,EAAE,QAAyC;QAC/F,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,qKAAqK;IACrK,4DAA4D;IACrD,KAAK,CAAC,gBAAgB,CAAC,MAAsB,EAAE,QAA2C;QAC/F,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;;AA/HU,4DAAwB;mCAAxB,wBAAwB;IADpC,0BAAY,CAAC,gBAAgB,CAAC,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;GAC7C,wBAAwB,CAgIpC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RPC\n */\n\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { IModelRpcProps, RpcInterface, RpcOperation } from \"@itwin/core-common\";\nimport { DescriptorJSON, DescriptorOverrides, SelectClassInfoJSON } from \"./content/Descriptor.js\";\nimport { ItemJSON } from \"./content/Item.js\";\nimport { DisplayValueGroup } from \"./content/Value.js\";\nimport { ClientDiagnostics, ClientDiagnosticsOptions } from \"./Diagnostics.js\";\nimport { CompressedClassInfoJSON, InstanceKey } from \"./EC.js\";\nimport { ElementProperties } from \"./ElementProperties.js\";\nimport { PresentationStatus } from \"./Error.js\";\nimport { NodeKey } from \"./hierarchy/Key.js\";\nimport { Node } from \"./hierarchy/Node.js\";\nimport { NodePathElement } from \"./hierarchy/NodePathElement.js\";\nimport { KeySetJSON } from \"./KeySet.js\";\nimport { LabelDefinition } from \"./LabelDefinition.js\";\nimport {\n ComputeSelectionRequestOptions,\n ContentDescriptorRequestOptions,\n ContentInstanceKeysRequestOptions,\n ContentRequestOptions,\n ContentSourcesRequestOptions,\n DisplayLabelRequestOptions,\n DisplayLabelsRequestOptions,\n DistinctValuesRequestOptions,\n FilterByInstancePathsHierarchyRequestOptions,\n FilterByTextHierarchyRequestOptions,\n HierarchyLevelDescriptorRequestOptions,\n HierarchyRequestOptions,\n Paged,\n SelectionScopeRequestOptions,\n SingleElementPropertiesRequestOptions,\n} from \"./PresentationManagerOptions.js\";\nimport { RulesetVariableJSON } from \"./RulesetVariables.js\";\nimport { SelectionScope } from \"./selection/SelectionScope.js\";\nimport { deepReplaceNullsToUndefined, Omit, PagedResponse } from \"./Utils.js\";\n\n/**\n * Base options for all presentation RPC requests.\n * @public\n */\nexport type PresentationRpcRequestOptions<TManagerRequestOptions> = Omit<TManagerRequestOptions, \"imodel\" | \"diagnostics\"> & {\n /** @internal ID of the client requesting data */\n clientId?: string;\n /** RPC request diagnostics options. */\n diagnostics?: RpcDiagnosticsOptions;\n};\n\n/**\n * Data structure for presentation RPC responses\n * @public\n */\nexport interface PresentationRpcResponseData<TResult = undefined> {\n /** Response status code */\n statusCode: PresentationStatus;\n /** In case of an error response, the error message */\n errorMessage?: string;\n /** In case of a success response, the result */\n result?: TResult;\n /** Diagnostics response. */\n diagnostics?: ClientDiagnostics;\n}\n\n/**\n * Data structure for RPC diagnostics options.\n * @public\n */\nexport type RpcDiagnosticsOptions = Omit<ClientDiagnosticsOptions, \"handler\">;\n\n/**\n * A promise of [[PresentationRpcResponseData]].\n * @public\n */\nexport type PresentationRpcResponse<TResult = undefined> = Promise<PresentationRpcResponseData<TResult>>;\n\n/**\n * Data structure for hierarchy request options.\n * @public\n */\nexport type HierarchyRpcRequestOptions = PresentationRpcRequestOptions<HierarchyRequestOptions<never, NodeKey, RulesetVariableJSON>>;\n\n/**\n * Data structure for hierarchy level descriptor RPC request options.\n * @public\n */\nexport type HierarchyLevelDescriptorRpcRequestOptions = PresentationRpcRequestOptions<\n HierarchyLevelDescriptorRequestOptions<never, NodeKey, RulesetVariableJSON>\n>;\n\n/**\n * Data structure for filtering hierarchy by ECInstance paths request options.\n * @public\n */\nexport type FilterByInstancePathsHierarchyRpcRequestOptions = PresentationRpcRequestOptions<\n FilterByInstancePathsHierarchyRequestOptions<never, RulesetVariableJSON>\n>;\n\n/**\n * Data structure for filtering hierarchy by text request options.\n * @public\n */\nexport type FilterByTextHierarchyRpcRequestOptions = PresentationRpcRequestOptions<FilterByTextHierarchyRequestOptions<never, RulesetVariableJSON>>;\n\n/**\n * Data structure for content sources RPC request options.\n * @public\n */\nexport type ContentSourcesRpcRequestOptions = PresentationRpcRequestOptions<ContentSourcesRequestOptions<never>>;\n/**\n * Data structure for content sources RPC response.\n * @public\n */\nexport interface ContentSourcesRpcResult {\n /** A list of objects containing content source information. */\n sources: SelectClassInfoJSON<Id64String>[];\n /** An `ECClassId` => [[CompressedClassInfoJSON]] map for deserializing [[sources]]. */\n classesMap: { [id: string]: CompressedClassInfoJSON };\n}\n\n/**\n * Data structure for content descriptor RPC request options.\n * @public\n */\nexport type ContentDescriptorRpcRequestOptions = PresentationRpcRequestOptions<ContentDescriptorRequestOptions<never, KeySetJSON, RulesetVariableJSON>>;\n\n/**\n * Data structure for content RPC request options.\n * @public\n */\nexport type ContentRpcRequestOptions = PresentationRpcRequestOptions<ContentRequestOptions<never, DescriptorOverrides, KeySetJSON, RulesetVariableJSON>>;\n\n/**\n * Data structure for single element properties RPC request options.\n * @public\n */\nexport type SingleElementPropertiesRpcRequestOptions = PresentationRpcRequestOptions<\n Omit<SingleElementPropertiesRequestOptions<never, never>, \"contentParser\">\n>;\n\n/**\n * Data structure for distinct values' request options.\n * @public\n */\nexport type DistinctValuesRpcRequestOptions = PresentationRpcRequestOptions<\n DistinctValuesRequestOptions<never, DescriptorOverrides, KeySetJSON, RulesetVariableJSON>\n>;\n\n/**\n * Data structure for content instance keys' request options.\n * @public\n */\nexport type ContentInstanceKeysRpcRequestOptions = PresentationRpcRequestOptions<ContentInstanceKeysRequestOptions<never, KeySetJSON, RulesetVariableJSON>>;\n\n/**\n * Data structure for label request options.\n * @public\n */\nexport type DisplayLabelRpcRequestOptions = PresentationRpcRequestOptions<DisplayLabelRequestOptions<never, InstanceKey>>;\n\n/**\n * Data structure for labels request options.\n * @public\n */\nexport type DisplayLabelsRpcRequestOptions = PresentationRpcRequestOptions<DisplayLabelsRequestOptions<never, InstanceKey>>;\n\n/**\n * Data structure for selection scope request options.\n * @public\n * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport type SelectionScopeRpcRequestOptions = PresentationRpcRequestOptions<SelectionScopeRequestOptions<never>>;\n\n/**\n * Request options data structure for computing selection based on given selection scope and element IDs.\n * @public\n * @deprecated in 5.0. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\n */\nexport type ComputeSelectionRpcRequestOptions = PresentationRpcRequestOptions<ComputeSelectionRequestOptions<never>>;\n\n/**\n * Interface used for communication between Presentation backend and frontend.\n * @public\n */\n@RpcOperation.setDefaultPolicy({ retryInterval: () => 0 })\nexport class PresentationRpcInterface extends RpcInterface {\n /** The immutable name of the interface. */\n public static readonly interfaceName = \"PresentationRpcInterface\";\n\n /** The semantic version of the interface. */\n public static interfaceVersion = \"5.0.0\";\n\n /*===========================================================================================\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\n NOTE: Please consult the README in core/common/src/rpc for the semantic versioning rules.\n ===========================================================================================*/\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getNodesCount(_token: IModelRpcProps, _options: HierarchyRpcRequestOptions): PresentationRpcResponse<number> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedNodes(_token: IModelRpcProps, _options: Paged<HierarchyRpcRequestOptions>): PresentationRpcResponse<PagedResponse<Node>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getNodesDescriptor(\n _token: IModelRpcProps,\n _options: HierarchyLevelDescriptorRpcRequestOptions,\n ): PresentationRpcResponse<string | DescriptorJSON | undefined> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // TODO: add paged version of this (#387280)\n public async getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // TODO: add paged version of this (#387280)\n public async getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentSources(_token: IModelRpcProps, _options: ContentSourcesRpcRequestOptions): PresentationRpcResponse<ContentSourcesRpcResult> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentDescriptor(_token: IModelRpcProps, _options: ContentDescriptorRpcRequestOptions): PresentationRpcResponse<DescriptorJSON | undefined> {\n const response: PresentationRpcResponseData<string | undefined> = await this.forward(arguments);\n return {\n ...response,\n ...(response.result ? { result: JSON.parse(response.result) } : {}),\n };\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentSetSize(_token: IModelRpcProps, _options: ContentRpcRequestOptions): PresentationRpcResponse<number> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedContent(\n _token: IModelRpcProps,\n _options: Paged<ContentRpcRequestOptions>,\n ): PresentationRpcResponse<{ descriptor: DescriptorJSON; contentSet: PagedResponse<ItemJSON> } | undefined> {\n const rpcResponse = await this.forward(arguments);\n return {\n ...rpcResponse,\n ...(rpcResponse.result\n ? /* c8 ignore next */ { result: { ...rpcResponse.result, contentSet: deepReplaceNullsToUndefined(rpcResponse.result.contentSet) } }\n : {}),\n };\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedContentSet(_token: IModelRpcProps, _options: Paged<ContentRpcRequestOptions>): PresentationRpcResponse<PagedResponse<ItemJSON>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getElementProperties(\n _token: IModelRpcProps,\n _options: SingleElementPropertiesRpcRequestOptions,\n ): PresentationRpcResponse<ElementProperties | undefined> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedDistinctValues(\n _token: IModelRpcProps,\n _options: DistinctValuesRpcRequestOptions,\n ): PresentationRpcResponse<PagedResponse<DisplayValueGroup>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getContentInstanceKeys(\n _token: IModelRpcProps,\n _options: ContentInstanceKeysRpcRequestOptions,\n ): PresentationRpcResponse<{ total: number; items: KeySetJSON }> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getDisplayLabelDefinition(_token: IModelRpcProps, _options: DisplayLabelRpcRequestOptions): PresentationRpcResponse<LabelDefinition> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n public async getPagedDisplayLabelDefinitions(\n _token: IModelRpcProps,\n _options: DisplayLabelsRpcRequestOptions,\n ): PresentationRpcResponse<PagedResponse<LabelDefinition>> {\n return deepReplaceNullsToUndefined(await this.forward(arguments));\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public async getSelectionScopes(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions): PresentationRpcResponse<SelectionScope[]> {\n return this.forward(arguments);\n }\n\n /** @deprecated in 4.10 - might be removed in next major version. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public async computeSelection(_token: IModelRpcProps, _options: ComputeSelectionRpcRequestOptions): PresentationRpcResponse<KeySetJSON> {\n return this.forward(arguments);\n }\n}\n"]}
@@ -16,7 +16,7 @@ export declare class RegisteredRuleset implements Disposable, Ruleset {
16
16
  constructor(ruleset: Ruleset, uniqueIdentifier: string, disposeFunc: (ruleset: RegisteredRuleset) => void);
17
17
  /** Dispose registered ruleset. */
18
18
  [Symbol.dispose](): void;
19
- /** @deprecated in 5.0 Use [Symbol.dispose] instead. */
19
+ /** @deprecated in 5.0. Use [Symbol.dispose] instead. */
20
20
  dispose(): void;
21
21
  get uniqueIdentifier(): string;
22
22
  get id(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"RegisteredRuleset.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/RegisteredRuleset.ts"],"names":[],"mappings":"AAIA;;GAEG;AAE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,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI;IAMhH,kCAAkC;IAC3B,CAAC,MAAM,CAAC,OAAO,CAAC;IAIvB,wDAAwD;IAEjD,OAAO;IAId,IAAW,gBAAgB,WAE1B;IACD,IAAW,EAAE,IAAI,MAAM,CAEtB;IACD,IAAW,mBAAmB,IAAI,mBAAmB,GAAG,SAAS,CAEhE;IACD,IAAW,KAAK,IAAI,IAAI,EAAE,CAEzB;IACD,IAAW,IAAI,IAAI,cAAc,EAAE,GAAG,SAAS,CAE9C;IACM,MAAM,IAAI,OAAO;CAGzB"}
@@ -26,7 +26,7 @@ class RegisteredRuleset {
26
26
  [Symbol.dispose]() {
27
27
  this._disposeFunc(this);
28
28
  }
29
- /** @deprecated in 5.0 Use [Symbol.dispose] instead. */
29
+ /** @deprecated in 5.0. Use [Symbol.dispose] instead. */
30
30
  /* c8 ignore next 3 */
31
31
  dispose() {
32
32
  this[Symbol.dispose]();
@@ -1 +1 @@
1
- {"version":3,"file":"RegisteredRuleset.js","sourceRoot":"","sources":["../../../src/presentation-common/RegisteredRuleset.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAMH;;;GAGG;AACH,MAAa,iBAAiB;IACpB,QAAQ,CAAU;IAClB,iBAAiB,CAAS;IAC1B,YAAY,CAAuC;IAE3D,kCAAkC;IAClC,YAAmB,OAAgB,EAAE,gBAAwB,EAAE,WAAiD;QAC9G,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED,kCAAkC;IAC3B,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,uDAAuD;IACvD,sBAAsB;IACf,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IACD,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1B,CAAC;IACD,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC3C,CAAC;IACD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC7B,CAAC;IACD,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAzCD,8CAyCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { Rule } from \"./rules/Rule.js\";\nimport { Ruleset, SupplementationInfo } from \"./rules/Ruleset.js\";\nimport { VariablesGroup } from \"./rules/Variables.js\";\n\n/**\n * A ruleset that is registered in a ruleset manager.\n * @public\n */\nexport class RegisteredRuleset implements Disposable, Ruleset {\n private _ruleset: Ruleset;\n private _uniqueIdentifier: string;\n private _disposeFunc: (ruleset: RegisteredRuleset) => void;\n\n /** Create a registered ruleset */\n public constructor(ruleset: Ruleset, uniqueIdentifier: string, disposeFunc: (ruleset: RegisteredRuleset) => void) {\n this._disposeFunc = disposeFunc;\n this._ruleset = ruleset;\n this._uniqueIdentifier = uniqueIdentifier;\n }\n\n /** Dispose registered ruleset. */\n public [Symbol.dispose]() {\n this._disposeFunc(this);\n }\n\n /** @deprecated in 5.0 Use [Symbol.dispose] instead. */\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n public get uniqueIdentifier() {\n return this._uniqueIdentifier;\n }\n public get id(): string {\n return this._ruleset.id;\n }\n public get supplementationInfo(): SupplementationInfo | undefined {\n return this._ruleset.supplementationInfo;\n }\n public get rules(): Rule[] {\n return this._ruleset.rules;\n }\n public get vars(): VariablesGroup[] | undefined {\n return this._ruleset.vars;\n }\n public toJSON(): Ruleset {\n return this._ruleset;\n }\n}\n"]}
1
+ {"version":3,"file":"RegisteredRuleset.js","sourceRoot":"","sources":["../../../src/presentation-common/RegisteredRuleset.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAMH;;;GAGG;AACH,MAAa,iBAAiB;IACpB,QAAQ,CAAU;IAClB,iBAAiB,CAAS;IAC1B,YAAY,CAAuC;IAE3D,kCAAkC;IAClC,YAAmB,OAAgB,EAAE,gBAAwB,EAAE,WAAiD;QAC9G,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;IAC5C,CAAC;IAED,kCAAkC;IAC3B,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,wDAAwD;IACxD,sBAAsB;IACf,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;IACzB,CAAC;IAED,IAAW,gBAAgB;QACzB,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IACD,IAAW,EAAE;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1B,CAAC;IACD,IAAW,mBAAmB;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IAC3C,CAAC;IACD,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;IAC7B,CAAC;IACD,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IACM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAzCD,8CAyCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Core\n */\n\nimport { Rule } from \"./rules/Rule.js\";\nimport { Ruleset, SupplementationInfo } from \"./rules/Ruleset.js\";\nimport { VariablesGroup } from \"./rules/Variables.js\";\n\n/**\n * A ruleset that is registered in a ruleset manager.\n * @public\n */\nexport class RegisteredRuleset implements Disposable, Ruleset {\n private _ruleset: Ruleset;\n private _uniqueIdentifier: string;\n private _disposeFunc: (ruleset: RegisteredRuleset) => void;\n\n /** Create a registered ruleset */\n public constructor(ruleset: Ruleset, uniqueIdentifier: string, disposeFunc: (ruleset: RegisteredRuleset) => void) {\n this._disposeFunc = disposeFunc;\n this._ruleset = ruleset;\n this._uniqueIdentifier = uniqueIdentifier;\n }\n\n /** Dispose registered ruleset. */\n public [Symbol.dispose]() {\n this._disposeFunc(this);\n }\n\n /** @deprecated in 5.0. Use [Symbol.dispose] instead. */\n /* c8 ignore next 3 */\n public dispose() {\n this[Symbol.dispose]();\n }\n\n public get uniqueIdentifier() {\n return this._uniqueIdentifier;\n }\n public get id(): string {\n return this._ruleset.id;\n }\n public get supplementationInfo(): SupplementationInfo | undefined {\n return this._ruleset.supplementationInfo;\n }\n public get rules(): Rule[] {\n return this._ruleset.rules;\n }\n public get vars(): VariablesGroup[] | undefined {\n return this._ruleset.vars;\n }\n public toJSON(): Ruleset {\n return this._ruleset;\n }\n}\n"]}
@@ -152,7 +152,7 @@ export declare class Field {
152
152
  clone(): Field;
153
153
  /**
154
154
  * Serialize this object to JSON.
155
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
155
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
156
156
  */
157
157
  toJSON(): FieldJSON;
158
158
  /** Serialize this object to compressed JSON */
@@ -161,7 +161,7 @@ export declare class Field {
161
161
  }): FieldJSON<string>;
162
162
  /**
163
163
  * Deserialize [[Field]] from JSON.
164
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
164
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
165
165
  */
166
166
  static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined;
167
167
  /** Deserialize a [[Field]] from compressed JSON. */
@@ -224,7 +224,7 @@ export declare class PropertiesField extends Field {
224
224
  clone(): PropertiesField;
225
225
  /**
226
226
  * Serialize this object to JSON
227
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
227
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
228
228
  */
229
229
  toJSON(): PropertiesFieldJSON;
230
230
  /** Serialize this object to compressed JSON */
@@ -233,7 +233,7 @@ export declare class PropertiesField extends Field {
233
233
  }): PropertiesFieldJSON<string>;
234
234
  /**
235
235
  * Deserialize [[PropertiesField]] from JSON.
236
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
236
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
237
237
  */
238
238
  static fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined;
239
239
  /**
@@ -278,7 +278,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
278
278
  clone(): ArrayPropertiesField;
279
279
  /**
280
280
  * Serialize this object to JSON.
281
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
281
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
282
282
  */
283
283
  toJSON(): ArrayPropertiesFieldJSON;
284
284
  /** Serialize this object to compressed JSON */
@@ -287,7 +287,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
287
287
  }): ArrayPropertiesFieldJSON<string>;
288
288
  /**
289
289
  * Deserialize [[ArrayPropertiesField]] from JSON.
290
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
290
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
291
291
  */
292
292
  static fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField;
293
293
  /**
@@ -322,7 +322,7 @@ export declare class StructPropertiesField extends PropertiesField {
322
322
  clone(): StructPropertiesField;
323
323
  /**
324
324
  * Serialize this object to JSON.
325
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
325
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
326
326
  */
327
327
  toJSON(): StructPropertiesFieldJSON;
328
328
  /** Serialize this object to compressed JSON */
@@ -331,7 +331,7 @@ export declare class StructPropertiesField extends PropertiesField {
331
331
  }): StructPropertiesFieldJSON<string>;
332
332
  /**
333
333
  * Deserialize [[StructPropertiesField]] from JSON.
334
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
334
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
335
335
  */
336
336
  static fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField;
337
337
  /**
@@ -437,7 +437,7 @@ export declare class NestedContentField extends Field {
437
437
  getFieldByName(name: string, recurse?: boolean): Field | undefined;
438
438
  /**
439
439
  * Serialize this object to JSON.
440
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
440
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
441
441
  */
442
442
  toJSON(): NestedContentFieldJSON;
443
443
  /** Serialize this object to compressed JSON */
@@ -103,7 +103,7 @@ class Field {
103
103
  }
104
104
  /**
105
105
  * Serialize this object to JSON.
106
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
106
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
107
107
  */
108
108
  toJSON() {
109
109
  return this.toCompressedJSON({});
@@ -124,7 +124,7 @@ class Field {
124
124
  }
125
125
  /**
126
126
  * Deserialize [[Field]] from JSON.
127
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
127
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
128
128
  */
129
129
  static fromJSON(json, categories) {
130
130
  if (!json) {
@@ -237,7 +237,7 @@ class PropertiesField extends Field {
237
237
  }
238
238
  /**
239
239
  * Serialize this object to JSON
240
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
240
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
241
241
  */
242
242
  toJSON() {
243
243
  return {
@@ -255,7 +255,7 @@ class PropertiesField extends Field {
255
255
  }
256
256
  /**
257
257
  * Deserialize [[PropertiesField]] from JSON.
258
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
258
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
259
259
  */
260
260
  static fromJSON(json, categories) {
261
261
  if (!json) {
@@ -378,7 +378,7 @@ class ArrayPropertiesField extends PropertiesField {
378
378
  }
379
379
  /**
380
380
  * Serialize this object to JSON.
381
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
381
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
382
382
  */
383
383
  toJSON() {
384
384
  return {
@@ -397,7 +397,7 @@ class ArrayPropertiesField extends PropertiesField {
397
397
  }
398
398
  /**
399
399
  * Deserialize [[ArrayPropertiesField]] from JSON.
400
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
400
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
401
401
  */
402
402
  static fromJSON(json, categories) {
403
403
  return new ArrayPropertiesField({
@@ -456,7 +456,7 @@ class StructPropertiesField extends PropertiesField {
456
456
  }
457
457
  /**
458
458
  * Serialize this object to JSON.
459
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
459
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
460
460
  */
461
461
  toJSON() {
462
462
  return {
@@ -475,7 +475,7 @@ class StructPropertiesField extends PropertiesField {
475
475
  }
476
476
  /**
477
477
  * Deserialize [[StructPropertiesField]] from JSON.
478
- * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.
478
+ * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.
479
479
  */
480
480
  static fromJSON(json, categories) {
481
481
  return new StructPropertiesField({
@@ -576,7 +576,7 @@ class NestedContentField extends Field {
576
576
  }
577
577
  /**
578
578
  * Serialize this object to JSON.
579
- * @deprecated in 5.x. Use [[toCompressedJSON]] instead.
579
+ * @deprecated in 5.0. Use [[toCompressedJSON]] instead.
580
580
  */
581
581
  toJSON() {
582
582
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"Fields.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AACzD,oCAUkB;AAClB,0CAAoE;AACpE,oHAAmG;AACnG,0CAA4C;AAG5C,+CAAuD;AAwEvD,SAAS,iBAAiB,CAAC,KAAwB;IACjD,OAAO,CAAC,CAAE,KAAa,CAAC,UAAU,CAAC;AACrC,CAAC;AAKD,SAAS,sBAAsB,CAAC,KAAwB;IACtD,OAAO,CAAC,CAAE,KAAkC,CAAC,UAAU,CAAC;AAC1D,CAAC;AAKD,SAAS,uBAAuB,CAAC,KAAwB;IACvD,OAAO,CAAC,CAAE,KAAmC,CAAC,YAAY,CAAC;AAC7D,CAAC;AAKD,SAAS,oBAAoB,CAAC,KAAwB;IACpD,OAAO,CAAC,CAAE,KAAa,CAAC,YAAY,CAAC;AACvC,CAAC;AA2BD;;;;;GAKG;AACH,MAAa,KAAK;IAChB,2BAA2B;IACpB,QAAQ,CAAsB;IACrC,kBAAkB;IACX,IAAI,CAAS;IACpB,oBAAoB;IACb,KAAK,CAAS;IACrB,mDAAmD;IAC5C,IAAI,CAAkB;IAC7B,yCAAyC;IAClC,UAAU,CAAU;IAC3B,kFAAkF;IAC3E,QAAQ,CAAS;IACxB,4DAA4D;IACrD,QAAQ,CAAuB;IACtC,wDAAwD;I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AC,CAAC;IACpG,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAgD,EAAE,UAAiC;IACrH,OAAO;QACL,QAAQ,EAAE,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC;QACpD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,IAAI,uDAAmB,CAAC,eAAe;QACpF,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,IAAI,EAAE;QACvD,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n ClassInfo,\n CompressedClassInfoJSON,\n NavigationPropertyInfo,\n PropertyInfo,\n PropertyInfoJSON,\n RelatedClassInfo,\n RelationshipPath,\n RelationshipPathJSON,\n StrippedRelationshipPath,\n} from \"../EC.js\";\nimport { PresentationError, PresentationStatus } from \"../Error.js\";\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification.js\";\nimport { omitUndefined } from \"../Utils.js\";\nimport { CategoryDescription } from \"./Category.js\";\nimport { EditorDescription } from \"./Editor.js\";\nimport { Property, PropertyJSON } from \"./Property.js\";\nimport { RendererDescription } from \"./Renderer.js\";\nimport { TypeDescription } from \"./TypeDescription.js\";\n\n/**\n * Data structure for a [[Field]] serialized to JSON.\n * @public\n */\nexport interface BaseFieldJSON {\n category: string;\n name: string;\n label: string;\n type: TypeDescription;\n isReadonly: boolean;\n priority: number;\n renderer?: RendererDescription;\n editor?: EditorDescription;\n extendedData?: { [key: string]: unknown };\n}\n\n/**\n * Data structure for a [[PropertiesField]] serialized to JSON.\n * @public\n */\n\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\n properties: PropertyJSON<TClassInfoJSON>[];\n}\n\n/**\n * Data structure for a [[ArrayPropertiesField]] serialized to JSON.\n * @public\n */\nexport interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\n itemsField: PropertiesFieldJSON<TClassInfoJSON>;\n}\n\n/**\n * Data structure for a [[StructPropertiesField]] serialized to JSON.\n * @public\n */\nexport interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\n memberFields: PropertiesFieldJSON<TClassInfoJSON>[];\n}\n\n/**\n * Data structure for a [[NestedContentField]] serialized to JSON.\n * @public\n */\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\n contentClassInfo: TClassInfoJSON;\n pathToPrimaryClass: RelationshipPathJSON<TClassInfoJSON>;\n relationshipMeaning?: RelationshipMeaning;\n actualPrimaryClassIds?: Id64String[];\n autoExpand?: boolean;\n nestedFields: FieldJSON<TClassInfoJSON>[];\n}\n\n/**\n * JSON representation of a [[Field]]\n * @public\n */\nexport type FieldJSON<TClassInfoJSON = ClassInfo> =\n | BaseFieldJSON\n | PropertiesFieldJSON<TClassInfoJSON>\n | ArrayPropertiesFieldJSON<TClassInfoJSON>\n | StructPropertiesFieldJSON<TClassInfoJSON>\n | NestedContentFieldJSON<TClassInfoJSON>;\n\n/** Is supplied field a properties field. */\nfunction isPropertiesField(field: FieldJSON): field is PropertiesFieldJSON<any>;\nfunction isPropertiesField(field: Field): field is PropertiesField;\nfunction isPropertiesField(field: FieldJSON | Field) {\n return !!(field as any).properties;\n}\n\n/** Is supplied field an array properties field. */\nfunction isArrayPropertiesField(field: FieldJSON): field is ArrayPropertiesFieldJSON<any>;\nfunction isArrayPropertiesField(field: Field): field is ArrayPropertiesField;\nfunction isArrayPropertiesField(field: FieldJSON | Field) {\n return !!(field as ArrayPropertiesFieldJSON).itemsField;\n}\n\n/** Is supplied field an array properties field. */\nfunction isStructPropertiesField(field: FieldJSON): field is StructPropertiesFieldJSON<any>;\nfunction isStructPropertiesField(field: Field): field is StructPropertiesField;\nfunction isStructPropertiesField(field: FieldJSON | Field) {\n return !!(field as StructPropertiesFieldJSON).memberFields;\n}\n\n/** Is supplied field a nested content field. */\nfunction isNestedContentField(field: FieldJSON): field is NestedContentFieldJSON<any>;\nfunction isNestedContentField(field: Field): field is NestedContentField;\nfunction isNestedContentField(field: FieldJSON | Field) {\n return !!(field as any).nestedFields;\n}\n\n/**\n * Props for creating [[Field]].\n * @public\n */\ninterface FieldProps {\n /** Category information */\n category: CategoryDescription;\n /** Unique name */\n name: string;\n /** Display label */\n label: string;\n /** Description of this field's values data type */\n type: TypeDescription;\n /** Are values in this field read-only */\n isReadonly: boolean;\n /** Priority of the field */\n priority: number;\n /** Property editor used to edit values of this field */\n editor?: EditorDescription;\n /** Property renderer used to render values of this field */\n renderer?: RendererDescription;\n /** Extended data associated with this field */\n extendedData?: { [key: string]: unknown };\n}\n\n/**\n * Describes a single content field. A field is usually represented as a grid column\n * or a property pane row.\n *\n * @public\n */\nexport class Field {\n /** Category information */\n public category: CategoryDescription;\n /** Unique name */\n public name: string;\n /** Display label */\n public label: string;\n /** Description of this field's values data type */\n public type: TypeDescription;\n /** Are values in this field read-only */\n public isReadonly: boolean;\n /** Priority of the field. Higher priority fields should appear first in the UI */\n public priority: number;\n /** Property renderer used to render values of this field */\n public renderer?: RendererDescription;\n /** Property editor used to edit values of this field */\n public editor?: EditorDescription;\n /** Extended data associated with this field */\n public extendedData?: { [key: string]: unknown };\n /** Parent field */\n private _parent?: NestedContentField;\n\n /**\n * Creates an instance of [[Field]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param editor Property editor used to edit values of this field\n * @param renderer Property renderer used to render values of this field\n * @param extendedData Extended data associated with this field\n * @deprecated in 5.0. Use an overload with `FieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n editor?: EditorDescription,\n renderer?: RendererDescription,\n extendedData?: { [key: string]: unknown },\n );\n /** Creates an instance of [[Field]]. */\n public constructor(props: FieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | FieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n editor?: EditorDescription,\n renderer?: RendererDescription,\n extendedData?: { [key: string]: unknown },\n ) {\n /* c8 ignore next 14 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n extendedData,\n };\n this.category = props.category;\n this.name = props.name;\n this.label = props.label;\n this.type = props.type;\n this.isReadonly = props.isReadonly;\n this.priority = props.priority;\n this.editor = props.editor;\n this.renderer = props.renderer;\n this.extendedData = props.extendedData;\n }\n\n /**\n * Is this a [[PropertiesField]]\n */\n public isPropertiesField(): this is PropertiesField {\n return isPropertiesField(this);\n }\n\n /**\n * Is this a [[NestedContentField]]\n */\n public isNestedContentField(): this is NestedContentField {\n return isNestedContentField(this);\n }\n\n /**\n * Get parent\n */\n public get parent(): NestedContentField | undefined {\n return this._parent;\n }\n\n public clone() {\n const clone = new Field(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public toJSON(): FieldJSON {\n return this.toCompressedJSON({});\n }\n\n /** Serialize this object to compressed JSON */\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\n return omitUndefined({\n category: this.category.name,\n name: this.name,\n label: this.label,\n type: this.type,\n isReadonly: this.isReadonly,\n priority: this.priority,\n renderer: this.renderer,\n editor: this.editor,\n extendedData: this.extendedData,\n });\n }\n\n /**\n * Deserialize [[Field]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return PropertiesField.fromJSON(json, categories);\n }\n if (isNestedContentField(json)) {\n return new NestedContentField({\n ...json,\n ...fromNestedContentFieldJSON(json, categories),\n nestedFields: json.nestedFields\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\n });\n }\n return new Field({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n /** Deserialize a [[Field]] from compressed JSON. */\n public static fromCompressedJSON(\n json: FieldJSON<string> | undefined,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n if (isNestedContentField(json)) {\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\n }\n return new Field({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, categories: CategoryDescription[]): CategoryDescription {\n return getCategoryFromFieldJson(fieldJson, categories);\n }\n\n /** Resets field's parent. */\n public resetParentship(): void {\n this._parent = undefined;\n }\n\n /** Sets provided [[NestedContentField]] as parent of this field. */\n public rebuildParentship(parentField?: NestedContentField): void {\n this._parent = parentField;\n }\n\n /**\n * Get descriptor for this field.\n * @public\n */\n public getFieldDescriptor(): FieldDescriptor {\n return {\n type: FieldDescriptorType.Name,\n fieldName: this.name,\n } as NamedFieldDescriptor;\n }\n\n /**\n * Checks if this field matches given field descriptor\n * @see [[getFieldDescriptor]]\n */\n public matchesDescriptor(descriptor: FieldDescriptor) {\n return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;\n }\n}\n\n/**\n * Props for creating [[PropertiesField]].\n * @public\n */\ninterface PropertiesFieldProps extends FieldProps {\n /** A list of properties this field is created from */\n properties: Property[];\n}\n\n/**\n * Describes a content field that's based on one or more similar\n * EC properties.\n *\n * @public\n */\nexport class PropertiesField extends Field {\n /** A list of properties this field is created from */\n public properties: Property[];\n\n /**\n * Creates an instance of [[PropertiesField]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param properties A list of properties this field is created from\n * @param editor Property editor used to edit values of this field\n * @param renderer Property renderer used to render values of this field\n * @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[PropertiesField]]. */\n public constructor(props: PropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | PropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 14 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n };\n super(props);\n this.properties = props.properties;\n }\n\n /** Is this a an array property field */\n public isArrayPropertiesField(): this is ArrayPropertiesField {\n return false;\n }\n /** Is this a an struct property field */\n public isStructPropertiesField(): this is StructPropertiesField {\n return false;\n }\n\n public override clone() {\n const clone = new PropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): PropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n properties: this.properties,\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): PropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),\n };\n }\n\n /**\n * Deserialize [[PropertiesField]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\n if (!json) {\n return undefined;\n }\n if (isArrayPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return ArrayPropertiesField.fromJSON(json, categories);\n }\n if (isStructPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return StructPropertiesField.fromJSON(json, categories);\n }\n return new PropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n /**\n * Deserialize a [[PropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: PropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): PropertiesField | undefined {\n if (isArrayPropertiesField(json)) {\n return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n if (isStructPropertiesField(json)) {\n return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n return new PropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n });\n }\n\n /**\n * Get descriptor for this field.\n * @public\n */\n public override getFieldDescriptor(): FieldDescriptor {\n const pathFromPropertyToSelectClass = new Array<RelatedClassInfo>();\n let currAncestor = this.parent;\n while (currAncestor) {\n pathFromPropertyToSelectClass.push(...currAncestor.pathToPrimaryClass);\n currAncestor = currAncestor.parent;\n }\n return {\n type: FieldDescriptorType.Properties,\n pathFromSelectToPropertyClass: RelationshipPath.strip(RelationshipPath.reverse(pathFromPropertyToSelectClass)),\n properties: this.properties.map((p) => ({\n class: p.property.classInfo.name,\n name: p.property.name,\n })),\n } as PropertiesFieldDescriptor;\n }\n\n /**\n * Checks if this field matches given field descriptor\n * @see [[getFieldDescriptor]]\n */\n public override matchesDescriptor(descriptor: FieldDescriptor) {\n if (!FieldDescriptor.isProperties(descriptor)) {\n return false;\n }\n\n // ensure at least one descriptor property matches at least one property of this field\n if (\n !this.properties.some(({ property: fieldProperty }) =>\n descriptor.properties.some(\n (descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class,\n ),\n )\n ) {\n return false;\n }\n\n // ensure path from select to property in field and in descriptor matches\n let stepsCount = 0;\n let currAncestor = this.parent;\n while (currAncestor) {\n const pathFromCurrentToItsParent = RelationshipPath.reverse(currAncestor.pathToPrimaryClass);\n for (const step of pathFromCurrentToItsParent) {\n if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {\n return false;\n }\n if (!RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {\n return false;\n }\n ++stepsCount;\n }\n currAncestor = currAncestor.parent;\n }\n return true;\n }\n}\n\n/**\n * Props for creating [[ArrayPropertiesField]].\n * @public\n */\ninterface ArrayPropertiesFieldProps extends PropertiesFieldProps {\n itemsField: PropertiesField;\n}\n\n/**\n * Describes a content field that's based on one or more similar EC array properties.\n * @public\n */\nexport class ArrayPropertiesField extends PropertiesField {\n public itemsField: PropertiesField;\n\n /**\n * Creates an instance of [[ArrayPropertiesField]].\n * @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n itemsField: PropertiesField,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[ArrayPropertiesField]]. */\n public constructor(props: ArrayPropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | ArrayPropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n itemsField?: PropertiesField,\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 15 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n itemsField: itemsField!,\n };\n super(props);\n this.itemsField = props.itemsField;\n }\n\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new ArrayPropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): ArrayPropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n itemsField: this.itemsField.toJSON(),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): ArrayPropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n itemsField: this.itemsField.toCompressedJSON(classesMap),\n };\n }\n\n /**\n * Deserialize [[ArrayPropertiesField]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\n return new ArrayPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n itemsField: PropertiesField.fromJSON(json.itemsField, categories)!,\n });\n }\n\n /**\n * Deserialize an [[ArrayPropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: ArrayPropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): ArrayPropertiesField {\n return new ArrayPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories)!,\n });\n }\n}\n\n/**\n * Props for creating [[StructPropertiesField]].\n * @public\n */\ninterface StructPropertiesFieldProps extends PropertiesFieldProps {\n memberFields: PropertiesField[];\n}\n\n/**\n * Describes a content field that's based on one or more similar EC struct properties.\n * @public\n */\nexport class StructPropertiesField extends PropertiesField {\n public memberFields: PropertiesField[];\n\n /**\n * Creates an instance of [[StructPropertiesField]].\n * @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n memberFields: PropertiesField[],\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[StructPropertiesField]]. */\n public constructor(props: StructPropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | StructPropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n memberFields?: PropertiesField[],\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 15 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n memberFields: memberFields!,\n };\n super(props);\n this.memberFields = props.memberFields;\n }\n\n public override isStructPropertiesField(): this is StructPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new StructPropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): StructPropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n memberFields: this.memberFields.map((m) => m.toJSON()),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): StructPropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),\n };\n }\n\n /**\n * Deserialize [[StructPropertiesField]] from JSON.\n * @deprecated in 5.x. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\n return new StructPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)!),\n });\n }\n\n /**\n * Deserialize a [[StructPropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: StructPropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): StructPropertiesField {\n return new StructPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)!),\n });\n }\n}\n\n/**\n * Props for creating [[NestedContentField]].\n * @public\n */\ninterface NestedContentFieldProps extends FieldProps {\n /** Information about an ECClass whose properties are nested inside this field */\n contentClassInfo: ClassInfo;\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\n pathToPrimaryClass: RelationshipPath;\n /**\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\n * and content class of this field.\n *\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\n * presentation rules for creating the content.\n */\n relationshipMeaning?: RelationshipMeaning;\n /**\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\n * here to help.\n *\n * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\n */\n actualPrimaryClassIds?: Id64String[];\n /** Contained nested fields */\n nestedFields: Field[];\n /** Flag specifying whether field should be expanded */\n autoExpand?: boolean;\n}\n\n/**\n * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).\n *\n * @public\n */\nexport class NestedContentField extends Field {\n /** Information about an ECClass whose properties are nested inside this field */\n public contentClassInfo: ClassInfo;\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\n public pathToPrimaryClass: RelationshipPath;\n /**\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\n * and content class of this field.\n *\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\n * presentation rules for creating the content.\n */\n public relationshipMeaning: RelationshipMeaning;\n /**\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\n * here to help.\n *\n * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\n */\n public actualPrimaryClassIds: Id64String[];\n /** Contained nested fields */\n public nestedFields: Field[];\n /** Flag specifying whether field should be expanded */\n public autoExpand?: boolean;\n\n /**\n * Creates an instance of [[NestedContentField]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param contentClassInfo Information about an ECClass whose properties are nested inside this field\n * @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)\n * @param nestedFields Contained nested fields\n * @param editor Property editor used to edit values of this field\n * @param autoExpand Flag specifying whether field should be expanded\n * @param relationshipMeaning RelationshipMeaning of the field\n * @param renderer Property renderer used to render values of this field\n * @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n contentClassInfo: ClassInfo,\n pathToPrimaryClass: RelationshipPath,\n nestedFields: Field[],\n editor?: EditorDescription,\n autoExpand?: boolean,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[NestedContentField]]. */\n public constructor(props: NestedContentFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | NestedContentFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n contentClassInfo?: ClassInfo,\n pathToPrimaryClass?: RelationshipPath,\n nestedFields?: Field[],\n editor?: EditorDescription,\n autoExpand?: boolean,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 17 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n contentClassInfo: contentClassInfo!,\n pathToPrimaryClass: pathToPrimaryClass!,\n nestedFields: nestedFields!,\n autoExpand,\n };\n super(props);\n this.contentClassInfo = props.contentClassInfo;\n this.pathToPrimaryClass = props.pathToPrimaryClass;\n this.relationshipMeaning = props.relationshipMeaning ?? RelationshipMeaning.RelatedInstance;\n this.nestedFields = props.nestedFields;\n this.autoExpand = props.autoExpand;\n this.actualPrimaryClassIds = props.actualPrimaryClassIds ?? [];\n }\n\n public override clone() {\n const clone = new NestedContentField({\n ...this,\n nestedFields: this.nestedFields.map((n) => n.clone()),\n });\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Get field by its name\n * @param name Name of the field to find\n * @param recurse Recurse into nested fields\n */\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\n return getFieldByName(this.nestedFields, name, recurse);\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.x. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): NestedContentFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n contentClassInfo: this.contentClassInfo,\n pathToPrimaryClass: this.pathToPrimaryClass,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\n ...(this.autoExpand ? { autoExpand: true } : undefined),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): NestedContentFieldJSON<string> {\n const { id, ...leftOverInfo } = this.contentClassInfo;\n classesMap[id] = leftOverInfo;\n return {\n ...super.toCompressedJSON(classesMap),\n contentClassInfo: id,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\n ...(this.autoExpand ? { autoExpand: true } : undefined),\n };\n }\n\n /** Deserialize a [[NestedContentField]] from compressed JSON. */\n public static override fromCompressedJSON(\n json: NestedContentFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ) {\n assert(classesMap.hasOwnProperty(json.contentClassInfo));\n return new NestedContentField({\n ...json,\n ...fromNestedContentFieldJSON(json, categories),\n category: this.getCategoryFromFieldJson(json, categories),\n nestedFields: json.nestedFields\n .map((nestedFieldJson: FieldJSON) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\n contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },\n pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),\n });\n }\n\n /** Resets parent of this field and all nested fields. */\n public override resetParentship(): void {\n super.resetParentship();\n for (const nestedField of this.nestedFields) {\n nestedField.resetParentship();\n }\n }\n\n /**\n * Sets provided [[NestedContentField]] as parent of this fields and recursively updates\n * all nested fields parents.\n */\n public override rebuildParentship(parentField?: NestedContentField): void {\n super.rebuildParentship(parentField);\n for (const nestedField of this.nestedFields) {\n nestedField.rebuildParentship(this);\n }\n }\n}\n\n/** @internal */\nexport const getFieldByName = (fields: Field[], name: string | undefined, recurse?: boolean): Field | undefined => {\n if (name) {\n for (const field of fields) {\n if (field.name === name) {\n return field;\n }\n\n if (recurse && field.isNestedContentField()) {\n const nested = getFieldByName(field.nestedFields, name, recurse);\n if (nested) {\n return nested;\n }\n }\n }\n }\n return undefined;\n};\n\n/** @internal */\nexport const getFieldByDescriptor = (fields: Field[], fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined => {\n for (const field of fields) {\n if (field.matchesDescriptor(fieldDescriptor)) {\n return field;\n }\n\n if (recurse && field.isNestedContentField()) {\n const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);\n if (nested) {\n return nested;\n }\n }\n }\n return undefined;\n};\n\n/**\n * Types of different field descriptors.\n * @public\n */\nexport enum FieldDescriptorType {\n Name = \"name\",\n Properties = \"properties\",\n}\n\n/**\n * Base for a field descriptor\n * @public\n */\nexport interface FieldDescriptorBase {\n type: FieldDescriptorType;\n}\n\n/**\n * A union of all possible field descriptor types\n * @public\n */\nexport type FieldDescriptor = NamedFieldDescriptor | PropertiesFieldDescriptor;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace FieldDescriptor {\n /** Is this a named field descriptor */\n export function isNamed(d: FieldDescriptor): d is NamedFieldDescriptor {\n return d.type === FieldDescriptorType.Name;\n }\n /** Is this a properties field descriptor */\n export function isProperties(d: FieldDescriptor): d is PropertiesFieldDescriptor {\n return d.type === FieldDescriptorType.Properties;\n }\n}\n\n/**\n * Field descriptor that identifies a content field by its unique name.\n * @public\n */\nexport interface NamedFieldDescriptor extends FieldDescriptorBase {\n type: FieldDescriptorType.Name;\n fieldName: string;\n}\n\n/**\n * Field descriptor that identifies a properties field using a list of\n * properties that the field contains.\n * @public\n */\nexport interface PropertiesFieldDescriptor extends FieldDescriptorBase {\n type: FieldDescriptorType.Properties;\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\n /**\n * A list of properties that describe the field. At least one property in the list must\n * match at least one property in the field for the descriptor to be considered matching.\n */\n properties: Array<{\n /** Full class name */\n class: string;\n /** Property name */\n name: string;\n }>;\n}\n\nfunction fromCompressedPropertyJSON(compressedPropertyJSON: PropertyJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): Property {\n return {\n property: fromCompressedPropertyInfoJSON(compressedPropertyJSON.property, classesMap),\n };\n}\n\nfunction fromCompressedPropertyInfoJSON(compressedPropertyJSON: PropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfo {\n assert(classesMap.hasOwnProperty(compressedPropertyJSON.classInfo));\n\n const { navigationPropertyInfo, ...leftOverPropertyJSON } = compressedPropertyJSON;\n\n return {\n ...leftOverPropertyJSON,\n classInfo: { id: compressedPropertyJSON.classInfo, ...classesMap[compressedPropertyJSON.classInfo] },\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n}\n\nfunction getCategoryFromFieldJson(fieldJson: { category: string }, categories: CategoryDescription[]): CategoryDescription {\n const category = categories.find((c) => c.name === fieldJson.category);\n if (!category) {\n throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);\n }\n return category;\n}\n\nfunction fromNestedContentFieldJSON(json: NestedContentFieldJSON<ClassInfo | string>, categories: CategoryDescription[]) {\n return {\n category: getCategoryFromFieldJson(json, categories),\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\n autoExpand: json.autoExpand,\n };\n}\n"]}
1
+ {"version":3,"file":"Fields.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Fields.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AACzD,oCAUkB;AAClB,0CAAoE;AACpE,oHAAmG;AACnG,0CAA4C;AAG5C,+CAAuD;AAwEvD,SAAS,iBAAiB,CAAC,KAAwB;IACjD,OAAO,CAAC,CAAE,KAAa,CAAC,UAAU,CAAC;AACrC,CAAC;AAKD,SAAS,sBAAsB,CAAC,KAAwB;IACtD,OAAO,CAAC,CAAE,KAAkC,CAAC,UAAU,CAAC;AAC1D,CAAC;AAKD,SAAS,uBAAuB,CAAC,KAAwB;IACvD,OAAO,CAAC,CAAE,KAAmC,CAAC,YAAY,CAAC;AAC7D,CAAC;AAKD,SAAS,oBAAoB,CAAC,KAAwB;IACpD,OAAO,CAAC,CAAE,KAAa,CAAC,YAAY,CAAC;AACvC,CAAC;AA2BD;;;;;GAKG;AACH,MAAa,KAAK;IAChB,2BAA2B;IACpB,QAAQ,CAAsB;IACrC,kBAAkB;IACX,IAAI,CAAS;IACpB,oBAAoB;IACb,KAAK,CAAS;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CAAC,IAAI,KAAK,SAAS,CAAC,QAAQ,CAAC,CAAC;IACvE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,4BAAiB,CAAC,6BAAkB,CAAC,eAAe,EAAE,gCAAgC,CAAC,CAAC;IACpG,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAgD,EAAE,UAAiC;IACrH,OAAO;QACL,QAAQ,EAAE,wBAAwB,CAAC,IAAI,EAAE,UAAU,CAAC;QACpD,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,IAAI,uDAAmB,CAAC,eAAe;QACpF,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,IAAI,EAAE;QACvD,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n ClassInfo,\n CompressedClassInfoJSON,\n NavigationPropertyInfo,\n PropertyInfo,\n PropertyInfoJSON,\n RelatedClassInfo,\n RelationshipPath,\n RelationshipPathJSON,\n StrippedRelationshipPath,\n} from \"../EC.js\";\nimport { PresentationError, PresentationStatus } from \"../Error.js\";\nimport { RelationshipMeaning } from \"../rules/content/modifiers/RelatedPropertiesSpecification.js\";\nimport { omitUndefined } from \"../Utils.js\";\nimport { CategoryDescription } from \"./Category.js\";\nimport { EditorDescription } from \"./Editor.js\";\nimport { Property, PropertyJSON } from \"./Property.js\";\nimport { RendererDescription } from \"./Renderer.js\";\nimport { TypeDescription } from \"./TypeDescription.js\";\n\n/**\n * Data structure for a [[Field]] serialized to JSON.\n * @public\n */\nexport interface BaseFieldJSON {\n category: string;\n name: string;\n label: string;\n type: TypeDescription;\n isReadonly: boolean;\n priority: number;\n renderer?: RendererDescription;\n editor?: EditorDescription;\n extendedData?: { [key: string]: unknown };\n}\n\n/**\n * Data structure for a [[PropertiesField]] serialized to JSON.\n * @public\n */\n\nexport interface PropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\n properties: PropertyJSON<TClassInfoJSON>[];\n}\n\n/**\n * Data structure for a [[ArrayPropertiesField]] serialized to JSON.\n * @public\n */\nexport interface ArrayPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\n itemsField: PropertiesFieldJSON<TClassInfoJSON>;\n}\n\n/**\n * Data structure for a [[StructPropertiesField]] serialized to JSON.\n * @public\n */\nexport interface StructPropertiesFieldJSON<TClassInfoJSON = ClassInfo> extends PropertiesFieldJSON<TClassInfoJSON> {\n memberFields: PropertiesFieldJSON<TClassInfoJSON>[];\n}\n\n/**\n * Data structure for a [[NestedContentField]] serialized to JSON.\n * @public\n */\nexport interface NestedContentFieldJSON<TClassInfoJSON = ClassInfo> extends BaseFieldJSON {\n contentClassInfo: TClassInfoJSON;\n pathToPrimaryClass: RelationshipPathJSON<TClassInfoJSON>;\n relationshipMeaning?: RelationshipMeaning;\n actualPrimaryClassIds?: Id64String[];\n autoExpand?: boolean;\n nestedFields: FieldJSON<TClassInfoJSON>[];\n}\n\n/**\n * JSON representation of a [[Field]]\n * @public\n */\nexport type FieldJSON<TClassInfoJSON = ClassInfo> =\n | BaseFieldJSON\n | PropertiesFieldJSON<TClassInfoJSON>\n | ArrayPropertiesFieldJSON<TClassInfoJSON>\n | StructPropertiesFieldJSON<TClassInfoJSON>\n | NestedContentFieldJSON<TClassInfoJSON>;\n\n/** Is supplied field a properties field. */\nfunction isPropertiesField(field: FieldJSON): field is PropertiesFieldJSON<any>;\nfunction isPropertiesField(field: Field): field is PropertiesField;\nfunction isPropertiesField(field: FieldJSON | Field) {\n return !!(field as any).properties;\n}\n\n/** Is supplied field an array properties field. */\nfunction isArrayPropertiesField(field: FieldJSON): field is ArrayPropertiesFieldJSON<any>;\nfunction isArrayPropertiesField(field: Field): field is ArrayPropertiesField;\nfunction isArrayPropertiesField(field: FieldJSON | Field) {\n return !!(field as ArrayPropertiesFieldJSON).itemsField;\n}\n\n/** Is supplied field an array properties field. */\nfunction isStructPropertiesField(field: FieldJSON): field is StructPropertiesFieldJSON<any>;\nfunction isStructPropertiesField(field: Field): field is StructPropertiesField;\nfunction isStructPropertiesField(field: FieldJSON | Field) {\n return !!(field as StructPropertiesFieldJSON).memberFields;\n}\n\n/** Is supplied field a nested content field. */\nfunction isNestedContentField(field: FieldJSON): field is NestedContentFieldJSON<any>;\nfunction isNestedContentField(field: Field): field is NestedContentField;\nfunction isNestedContentField(field: FieldJSON | Field) {\n return !!(field as any).nestedFields;\n}\n\n/**\n * Props for creating [[Field]].\n * @public\n */\ninterface FieldProps {\n /** Category information */\n category: CategoryDescription;\n /** Unique name */\n name: string;\n /** Display label */\n label: string;\n /** Description of this field's values data type */\n type: TypeDescription;\n /** Are values in this field read-only */\n isReadonly: boolean;\n /** Priority of the field */\n priority: number;\n /** Property editor used to edit values of this field */\n editor?: EditorDescription;\n /** Property renderer used to render values of this field */\n renderer?: RendererDescription;\n /** Extended data associated with this field */\n extendedData?: { [key: string]: unknown };\n}\n\n/**\n * Describes a single content field. A field is usually represented as a grid column\n * or a property pane row.\n *\n * @public\n */\nexport class Field {\n /** Category information */\n public category: CategoryDescription;\n /** Unique name */\n public name: string;\n /** Display label */\n public label: string;\n /** Description of this field's values data type */\n public type: TypeDescription;\n /** Are values in this field read-only */\n public isReadonly: boolean;\n /** Priority of the field. Higher priority fields should appear first in the UI */\n public priority: number;\n /** Property renderer used to render values of this field */\n public renderer?: RendererDescription;\n /** Property editor used to edit values of this field */\n public editor?: EditorDescription;\n /** Extended data associated with this field */\n public extendedData?: { [key: string]: unknown };\n /** Parent field */\n private _parent?: NestedContentField;\n\n /**\n * Creates an instance of [[Field]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param editor Property editor used to edit values of this field\n * @param renderer Property renderer used to render values of this field\n * @param extendedData Extended data associated with this field\n * @deprecated in 5.0. Use an overload with `FieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n editor?: EditorDescription,\n renderer?: RendererDescription,\n extendedData?: { [key: string]: unknown },\n );\n /** Creates an instance of [[Field]]. */\n public constructor(props: FieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | FieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n editor?: EditorDescription,\n renderer?: RendererDescription,\n extendedData?: { [key: string]: unknown },\n ) {\n /* c8 ignore next 14 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n extendedData,\n };\n this.category = props.category;\n this.name = props.name;\n this.label = props.label;\n this.type = props.type;\n this.isReadonly = props.isReadonly;\n this.priority = props.priority;\n this.editor = props.editor;\n this.renderer = props.renderer;\n this.extendedData = props.extendedData;\n }\n\n /**\n * Is this a [[PropertiesField]]\n */\n public isPropertiesField(): this is PropertiesField {\n return isPropertiesField(this);\n }\n\n /**\n * Is this a [[NestedContentField]]\n */\n public isNestedContentField(): this is NestedContentField {\n return isNestedContentField(this);\n }\n\n /**\n * Get parent\n */\n public get parent(): NestedContentField | undefined {\n return this._parent;\n }\n\n public clone() {\n const clone = new Field(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.0. Use [[toCompressedJSON]] instead.\n */\n public toJSON(): FieldJSON {\n return this.toCompressedJSON({});\n }\n\n /** Serialize this object to compressed JSON */\n public toCompressedJSON(_classesMap: { [id: string]: CompressedClassInfoJSON }): FieldJSON<string> {\n return omitUndefined({\n category: this.category.name,\n name: this.name,\n label: this.label,\n type: this.type,\n isReadonly: this.isReadonly,\n priority: this.priority,\n renderer: this.renderer,\n editor: this.editor,\n extendedData: this.extendedData,\n });\n }\n\n /**\n * Deserialize [[Field]] from JSON.\n * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.\n */\n public static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return PropertiesField.fromJSON(json, categories);\n }\n if (isNestedContentField(json)) {\n return new NestedContentField({\n ...json,\n ...fromNestedContentFieldJSON(json, categories),\n nestedFields: json.nestedFields\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n .map((nestedFieldJson: FieldJSON) => Field.fromJSON(nestedFieldJson, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\n });\n }\n return new Field({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n /** Deserialize a [[Field]] from compressed JSON. */\n public static fromCompressedJSON(\n json: FieldJSON<string> | undefined,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): Field | undefined {\n if (!json) {\n return undefined;\n }\n if (isPropertiesField(json)) {\n return PropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n if (isNestedContentField(json)) {\n return NestedContentField.fromCompressedJSON(json, classesMap, categories);\n }\n return new Field({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n protected static getCategoryFromFieldJson(fieldJson: FieldJSON, categories: CategoryDescription[]): CategoryDescription {\n return getCategoryFromFieldJson(fieldJson, categories);\n }\n\n /** Resets field's parent. */\n public resetParentship(): void {\n this._parent = undefined;\n }\n\n /** Sets provided [[NestedContentField]] as parent of this field. */\n public rebuildParentship(parentField?: NestedContentField): void {\n this._parent = parentField;\n }\n\n /**\n * Get descriptor for this field.\n * @public\n */\n public getFieldDescriptor(): FieldDescriptor {\n return {\n type: FieldDescriptorType.Name,\n fieldName: this.name,\n } as NamedFieldDescriptor;\n }\n\n /**\n * Checks if this field matches given field descriptor\n * @see [[getFieldDescriptor]]\n */\n public matchesDescriptor(descriptor: FieldDescriptor) {\n return FieldDescriptor.isNamed(descriptor) && descriptor.fieldName === this.name;\n }\n}\n\n/**\n * Props for creating [[PropertiesField]].\n * @public\n */\ninterface PropertiesFieldProps extends FieldProps {\n /** A list of properties this field is created from */\n properties: Property[];\n}\n\n/**\n * Describes a content field that's based on one or more similar\n * EC properties.\n *\n * @public\n */\nexport class PropertiesField extends Field {\n /** A list of properties this field is created from */\n public properties: Property[];\n\n /**\n * Creates an instance of [[PropertiesField]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param properties A list of properties this field is created from\n * @param editor Property editor used to edit values of this field\n * @param renderer Property renderer used to render values of this field\n * @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[PropertiesField]]. */\n public constructor(props: PropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | PropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 14 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n };\n super(props);\n this.properties = props.properties;\n }\n\n /** Is this a an array property field */\n public isArrayPropertiesField(): this is ArrayPropertiesField {\n return false;\n }\n /** Is this a an struct property field */\n public isStructPropertiesField(): this is StructPropertiesField {\n return false;\n }\n\n public override clone() {\n const clone = new PropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON\n * @deprecated in 5.0. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): PropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n properties: this.properties,\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): PropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n properties: this.properties.map((property) => Property.toCompressedJSON(property, classesMap)),\n };\n }\n\n /**\n * Deserialize [[PropertiesField]] from JSON.\n * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined {\n if (!json) {\n return undefined;\n }\n if (isArrayPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return ArrayPropertiesField.fromJSON(json, categories);\n }\n if (isStructPropertiesField(json)) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return StructPropertiesField.fromJSON(json, categories);\n }\n return new PropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n });\n }\n\n /**\n * Deserialize a [[PropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: PropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): PropertiesField | undefined {\n if (isArrayPropertiesField(json)) {\n return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n if (isStructPropertiesField(json)) {\n return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);\n }\n return new PropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n });\n }\n\n /**\n * Get descriptor for this field.\n * @public\n */\n public override getFieldDescriptor(): FieldDescriptor {\n const pathFromPropertyToSelectClass = new Array<RelatedClassInfo>();\n let currAncestor = this.parent;\n while (currAncestor) {\n pathFromPropertyToSelectClass.push(...currAncestor.pathToPrimaryClass);\n currAncestor = currAncestor.parent;\n }\n return {\n type: FieldDescriptorType.Properties,\n pathFromSelectToPropertyClass: RelationshipPath.strip(RelationshipPath.reverse(pathFromPropertyToSelectClass)),\n properties: this.properties.map((p) => ({\n class: p.property.classInfo.name,\n name: p.property.name,\n })),\n } as PropertiesFieldDescriptor;\n }\n\n /**\n * Checks if this field matches given field descriptor\n * @see [[getFieldDescriptor]]\n */\n public override matchesDescriptor(descriptor: FieldDescriptor) {\n if (!FieldDescriptor.isProperties(descriptor)) {\n return false;\n }\n\n // ensure at least one descriptor property matches at least one property of this field\n if (\n !this.properties.some(({ property: fieldProperty }) =>\n descriptor.properties.some(\n (descriptorProperty) => fieldProperty.name === descriptorProperty.name && fieldProperty.classInfo.name === descriptorProperty.class,\n ),\n )\n ) {\n return false;\n }\n\n // ensure path from select to property in field and in descriptor matches\n let stepsCount = 0;\n let currAncestor = this.parent;\n while (currAncestor) {\n const pathFromCurrentToItsParent = RelationshipPath.reverse(currAncestor.pathToPrimaryClass);\n for (const step of pathFromCurrentToItsParent) {\n if (descriptor.pathFromSelectToPropertyClass.length < stepsCount + 1) {\n return false;\n }\n if (!RelatedClassInfo.equals(step, descriptor.pathFromSelectToPropertyClass[descriptor.pathFromSelectToPropertyClass.length - stepsCount - 1])) {\n return false;\n }\n ++stepsCount;\n }\n currAncestor = currAncestor.parent;\n }\n return true;\n }\n}\n\n/**\n * Props for creating [[ArrayPropertiesField]].\n * @public\n */\ninterface ArrayPropertiesFieldProps extends PropertiesFieldProps {\n itemsField: PropertiesField;\n}\n\n/**\n * Describes a content field that's based on one or more similar EC array properties.\n * @public\n */\nexport class ArrayPropertiesField extends PropertiesField {\n public itemsField: PropertiesField;\n\n /**\n * Creates an instance of [[ArrayPropertiesField]].\n * @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n itemsField: PropertiesField,\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[ArrayPropertiesField]]. */\n public constructor(props: ArrayPropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | ArrayPropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n itemsField?: PropertiesField,\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 15 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n itemsField: itemsField!,\n };\n super(props);\n this.itemsField = props.itemsField;\n }\n\n public override isArrayPropertiesField(): this is ArrayPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new ArrayPropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.0. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): ArrayPropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n itemsField: this.itemsField.toJSON(),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): ArrayPropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n itemsField: this.itemsField.toCompressedJSON(classesMap),\n };\n }\n\n /**\n * Deserialize [[ArrayPropertiesField]] from JSON.\n * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField {\n return new ArrayPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n itemsField: PropertiesField.fromJSON(json.itemsField, categories)!,\n });\n }\n\n /**\n * Deserialize an [[ArrayPropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: ArrayPropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): ArrayPropertiesField {\n return new ArrayPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories)!,\n });\n }\n}\n\n/**\n * Props for creating [[StructPropertiesField]].\n * @public\n */\ninterface StructPropertiesFieldProps extends PropertiesFieldProps {\n memberFields: PropertiesField[];\n}\n\n/**\n * Describes a content field that's based on one or more similar EC struct properties.\n * @public\n */\nexport class StructPropertiesField extends PropertiesField {\n public memberFields: PropertiesField[];\n\n /**\n * Creates an instance of [[StructPropertiesField]].\n * @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n memberFields: PropertiesField[],\n isReadonly: boolean,\n priority: number,\n properties: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[StructPropertiesField]]. */\n public constructor(props: StructPropertiesFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | StructPropertiesFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n memberFields?: PropertiesField[],\n isReadonly?: boolean,\n priority?: number,\n properties?: Property[],\n editor?: EditorDescription,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 15 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n properties: properties!,\n memberFields: memberFields!,\n };\n super(props);\n this.memberFields = props.memberFields;\n }\n\n public override isStructPropertiesField(): this is StructPropertiesField {\n return true;\n }\n\n public override clone() {\n const clone = new StructPropertiesField(this);\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.0. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): StructPropertiesFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n memberFields: this.memberFields.map((m) => m.toJSON()),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): StructPropertiesFieldJSON<string> {\n return {\n ...super.toCompressedJSON(classesMap),\n memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),\n };\n }\n\n /**\n * Deserialize [[StructPropertiesField]] from JSON.\n * @deprecated in 5.0. Use [[fromCompressedJSON]] instead.\n */\n public static override fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField {\n return new StructPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)!),\n });\n }\n\n /**\n * Deserialize a [[StructPropertiesField]] from compressed JSON.\n * @public\n */\n public static override fromCompressedJSON(\n json: StructPropertiesFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ): StructPropertiesField {\n return new StructPropertiesField({\n ...json,\n category: this.getCategoryFromFieldJson(json, categories),\n properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),\n memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)!),\n });\n }\n}\n\n/**\n * Props for creating [[NestedContentField]].\n * @public\n */\ninterface NestedContentFieldProps extends FieldProps {\n /** Information about an ECClass whose properties are nested inside this field */\n contentClassInfo: ClassInfo;\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\n pathToPrimaryClass: RelationshipPath;\n /**\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\n * and content class of this field.\n *\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\n * presentation rules for creating the content.\n */\n relationshipMeaning?: RelationshipMeaning;\n /**\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\n * here to help.\n *\n * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\n */\n actualPrimaryClassIds?: Id64String[];\n /** Contained nested fields */\n nestedFields: Field[];\n /** Flag specifying whether field should be expanded */\n autoExpand?: boolean;\n}\n\n/**\n * Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).\n *\n * @public\n */\nexport class NestedContentField extends Field {\n /** Information about an ECClass whose properties are nested inside this field */\n public contentClassInfo: ClassInfo;\n /** Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class) */\n public pathToPrimaryClass: RelationshipPath;\n /**\n * Meaning of the relationship between the [primary class]($docs/presentation/content/Terminology#primary-class)\n * and content class of this field.\n *\n * The value is set up through [[RelatedPropertiesSpecification.relationshipMeaning]] attribute when setting up\n * presentation rules for creating the content.\n */\n public relationshipMeaning: RelationshipMeaning;\n /**\n * When content descriptor is requested in a polymorphic fashion, fields get created if at least one of the concrete classes\n * has it. In certain situations it's necessary to know which concrete classes caused that and this attribute is\n * here to help.\n *\n * **Example:** There's a base class `A` and it has two derived classes `B` and `C` and class `B` has a relationship to class `D`.\n * When content descriptor is requested for class `A` polymorphically, it's going to contain fields for all properties of class `B`,\n * class `C` and a nested content field for the `B -> D` relationship. The nested content field's `actualPrimaryClassIds` attribute\n * will contain ID of class `B`, identifying that only this specific class has the relationship.\n */\n public actualPrimaryClassIds: Id64String[];\n /** Contained nested fields */\n public nestedFields: Field[];\n /** Flag specifying whether field should be expanded */\n public autoExpand?: boolean;\n\n /**\n * Creates an instance of [[NestedContentField]].\n * @param category Category information\n * @param name Unique name\n * @param label Display label\n * @param type Description of this field's values data type\n * @param isReadonly Are values in this field read-only\n * @param priority Priority of the field\n * @param contentClassInfo Information about an ECClass whose properties are nested inside this field\n * @param pathToPrimaryClass Relationship path to [Primary class]($docs/presentation/content/Terminology#primary-class)\n * @param nestedFields Contained nested fields\n * @param editor Property editor used to edit values of this field\n * @param autoExpand Flag specifying whether field should be expanded\n * @param relationshipMeaning RelationshipMeaning of the field\n * @param renderer Property renderer used to render values of this field\n * @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.\n */\n public constructor(\n category: CategoryDescription,\n name: string,\n label: string,\n type: TypeDescription,\n isReadonly: boolean,\n priority: number,\n contentClassInfo: ClassInfo,\n pathToPrimaryClass: RelationshipPath,\n nestedFields: Field[],\n editor?: EditorDescription,\n autoExpand?: boolean,\n renderer?: RendererDescription,\n );\n /** Creates an instance of [[NestedContentField]]. */\n public constructor(props: NestedContentFieldProps);\n public constructor(\n categoryOrProps: CategoryDescription | NestedContentFieldProps,\n name?: string,\n label?: string,\n type?: TypeDescription,\n isReadonly?: boolean,\n priority?: number,\n contentClassInfo?: ClassInfo,\n pathToPrimaryClass?: RelationshipPath,\n nestedFields?: Field[],\n editor?: EditorDescription,\n autoExpand?: boolean,\n renderer?: RendererDescription,\n ) {\n /* c8 ignore next 17 */\n const props =\n \"category\" in categoryOrProps\n ? categoryOrProps\n : {\n category: categoryOrProps,\n name: name!,\n label: label!,\n type: type!,\n isReadonly: isReadonly!,\n priority: priority!,\n editor,\n renderer,\n contentClassInfo: contentClassInfo!,\n pathToPrimaryClass: pathToPrimaryClass!,\n nestedFields: nestedFields!,\n autoExpand,\n };\n super(props);\n this.contentClassInfo = props.contentClassInfo;\n this.pathToPrimaryClass = props.pathToPrimaryClass;\n this.relationshipMeaning = props.relationshipMeaning ?? RelationshipMeaning.RelatedInstance;\n this.nestedFields = props.nestedFields;\n this.autoExpand = props.autoExpand;\n this.actualPrimaryClassIds = props.actualPrimaryClassIds ?? [];\n }\n\n public override clone() {\n const clone = new NestedContentField({\n ...this,\n nestedFields: this.nestedFields.map((n) => n.clone()),\n });\n clone.rebuildParentship(this.parent);\n return clone;\n }\n\n /**\n * Get field by its name\n * @param name Name of the field to find\n * @param recurse Recurse into nested fields\n */\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\n return getFieldByName(this.nestedFields, name, recurse);\n }\n\n /**\n * Serialize this object to JSON.\n * @deprecated in 5.0. Use [[toCompressedJSON]] instead.\n */\n public override toJSON(): NestedContentFieldJSON {\n return {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n ...super.toJSON(),\n contentClassInfo: this.contentClassInfo,\n pathToPrimaryClass: this.pathToPrimaryClass,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n nestedFields: this.nestedFields.map((field: Field) => field.toJSON()),\n ...(this.autoExpand ? { autoExpand: true } : undefined),\n };\n }\n\n /** Serialize this object to compressed JSON */\n public override toCompressedJSON(classesMap: { [id: string]: CompressedClassInfoJSON }): NestedContentFieldJSON<string> {\n const { id, ...leftOverInfo } = this.contentClassInfo;\n classesMap[id] = leftOverInfo;\n return {\n ...super.toCompressedJSON(classesMap),\n contentClassInfo: id,\n relationshipMeaning: this.relationshipMeaning,\n actualPrimaryClassIds: this.actualPrimaryClassIds,\n pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),\n nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),\n ...(this.autoExpand ? { autoExpand: true } : undefined),\n };\n }\n\n /** Deserialize a [[NestedContentField]] from compressed JSON. */\n public static override fromCompressedJSON(\n json: NestedContentFieldJSON<Id64String>,\n classesMap: { [id: string]: CompressedClassInfoJSON },\n categories: CategoryDescription[],\n ) {\n assert(classesMap.hasOwnProperty(json.contentClassInfo));\n return new NestedContentField({\n ...json,\n ...fromNestedContentFieldJSON(json, categories),\n category: this.getCategoryFromFieldJson(json, categories),\n nestedFields: json.nestedFields\n .map((nestedFieldJson: FieldJSON) => Field.fromCompressedJSON(nestedFieldJson, classesMap, categories))\n .filter((nestedField): nestedField is Field => !!nestedField),\n contentClassInfo: { id: json.contentClassInfo, ...classesMap[json.contentClassInfo] },\n pathToPrimaryClass: json.pathToPrimaryClass.map((stepJson) => RelatedClassInfo.fromCompressedJSON(stepJson, classesMap)),\n });\n }\n\n /** Resets parent of this field and all nested fields. */\n public override resetParentship(): void {\n super.resetParentship();\n for (const nestedField of this.nestedFields) {\n nestedField.resetParentship();\n }\n }\n\n /**\n * Sets provided [[NestedContentField]] as parent of this fields and recursively updates\n * all nested fields parents.\n */\n public override rebuildParentship(parentField?: NestedContentField): void {\n super.rebuildParentship(parentField);\n for (const nestedField of this.nestedFields) {\n nestedField.rebuildParentship(this);\n }\n }\n}\n\n/** @internal */\nexport const getFieldByName = (fields: Field[], name: string | undefined, recurse?: boolean): Field | undefined => {\n if (name) {\n for (const field of fields) {\n if (field.name === name) {\n return field;\n }\n\n if (recurse && field.isNestedContentField()) {\n const nested = getFieldByName(field.nestedFields, name, recurse);\n if (nested) {\n return nested;\n }\n }\n }\n }\n return undefined;\n};\n\n/** @internal */\nexport const getFieldByDescriptor = (fields: Field[], fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined => {\n for (const field of fields) {\n if (field.matchesDescriptor(fieldDescriptor)) {\n return field;\n }\n\n if (recurse && field.isNestedContentField()) {\n const nested = getFieldByDescriptor(field.nestedFields, fieldDescriptor, recurse);\n if (nested) {\n return nested;\n }\n }\n }\n return undefined;\n};\n\n/**\n * Types of different field descriptors.\n * @public\n */\nexport enum FieldDescriptorType {\n Name = \"name\",\n Properties = \"properties\",\n}\n\n/**\n * Base for a field descriptor\n * @public\n */\nexport interface FieldDescriptorBase {\n type: FieldDescriptorType;\n}\n\n/**\n * A union of all possible field descriptor types\n * @public\n */\nexport type FieldDescriptor = NamedFieldDescriptor | PropertiesFieldDescriptor;\n\n/** @public */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport namespace FieldDescriptor {\n /** Is this a named field descriptor */\n export function isNamed(d: FieldDescriptor): d is NamedFieldDescriptor {\n return d.type === FieldDescriptorType.Name;\n }\n /** Is this a properties field descriptor */\n export function isProperties(d: FieldDescriptor): d is PropertiesFieldDescriptor {\n return d.type === FieldDescriptorType.Properties;\n }\n}\n\n/**\n * Field descriptor that identifies a content field by its unique name.\n * @public\n */\nexport interface NamedFieldDescriptor extends FieldDescriptorBase {\n type: FieldDescriptorType.Name;\n fieldName: string;\n}\n\n/**\n * Field descriptor that identifies a properties field using a list of\n * properties that the field contains.\n * @public\n */\nexport interface PropertiesFieldDescriptor extends FieldDescriptorBase {\n type: FieldDescriptorType.Properties;\n pathFromSelectToPropertyClass: StrippedRelationshipPath;\n /**\n * A list of properties that describe the field. At least one property in the list must\n * match at least one property in the field for the descriptor to be considered matching.\n */\n properties: Array<{\n /** Full class name */\n class: string;\n /** Property name */\n name: string;\n }>;\n}\n\nfunction fromCompressedPropertyJSON(compressedPropertyJSON: PropertyJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): Property {\n return {\n property: fromCompressedPropertyInfoJSON(compressedPropertyJSON.property, classesMap),\n };\n}\n\nfunction fromCompressedPropertyInfoJSON(compressedPropertyJSON: PropertyInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): PropertyInfo {\n assert(classesMap.hasOwnProperty(compressedPropertyJSON.classInfo));\n\n const { navigationPropertyInfo, ...leftOverPropertyJSON } = compressedPropertyJSON;\n\n return {\n ...leftOverPropertyJSON,\n classInfo: { id: compressedPropertyJSON.classInfo, ...classesMap[compressedPropertyJSON.classInfo] },\n ...(navigationPropertyInfo ? { navigationPropertyInfo: NavigationPropertyInfo.fromCompressedJSON(navigationPropertyInfo, classesMap) } : undefined),\n };\n}\n\nfunction getCategoryFromFieldJson(fieldJson: { category: string }, categories: CategoryDescription[]): CategoryDescription {\n const category = categories.find((c) => c.name === fieldJson.category);\n if (!category) {\n throw new PresentationError(PresentationStatus.InvalidArgument, `Invalid content field category`);\n }\n return category;\n}\n\nfunction fromNestedContentFieldJSON(json: NestedContentFieldJSON<ClassInfo | string>, categories: CategoryDescription[]) {\n return {\n category: getCategoryFromFieldJson(json, categories),\n relationshipMeaning: json.relationshipMeaning ?? RelationshipMeaning.RelatedInstance,\n actualPrimaryClassIds: json.actualPrimaryClassIds ?? [],\n autoExpand: json.autoExpand,\n };\n}\n"]}
@@ -12,7 +12,7 @@ import { DisplayValue, Value } from "./Value.js";
12
12
  export interface ItemJSON {
13
13
  inputKeys?: InstanceKey[];
14
14
  primaryKeys: InstanceKey[];
15
- /** @deprecated in 5.x. Use [[label]] instead. */
15
+ /** @deprecated in 5.0. Use [[label]] instead. */
16
16
  labelDefinition: LabelDefinition;
17
17
  label?: LabelDefinition;
18
18
  classInfo?: ClassInfo;