@itwin/presentation-common 5.1.0-dev.9 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +91 -1
- package/Ruleset.schema.json +3 -3
- package/lib/assets/locales/en/Presentation.json +19 -19
- package/lib/cjs/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/cjs/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/presentation-common/Diagnostics.js.map +1 -1
- package/lib/cjs/presentation-common/EC.d.ts.map +1 -1
- package/lib/cjs/presentation-common/EC.js +9 -2
- package/lib/cjs/presentation-common/EC.js.map +1 -1
- package/lib/cjs/presentation-common/ElementProperties.js +1 -0
- package/lib/cjs/presentation-common/ElementProperties.js.map +1 -1
- package/lib/cjs/presentation-common/Error.d.ts +1 -1
- package/lib/cjs/presentation-common/Error.js +1 -1
- package/lib/cjs/presentation-common/Error.js.map +1 -1
- package/lib/cjs/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/KeySet.js.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.d.ts +24 -2
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js +97 -104
- package/lib/cjs/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/cjs/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationManagerOptions.d.ts +3 -3
- package/lib/cjs/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts +19 -19
- package/lib/cjs/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/cjs/presentation-common/PresentationRpcInterface.js +17 -17
- package/lib/cjs/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js +1 -1
- package/lib/cjs/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/cjs/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/cjs/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/cjs/presentation-common/Update.js.map +1 -1
- package/lib/cjs/presentation-common/Utils.js.map +1 -1
- package/lib/cjs/presentation-common/content/Category.js.map +1 -1
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/cjs/presentation-common/content/Editor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Fields.d.ts +14 -14
- package/lib/cjs/presentation-common/content/Fields.js +9 -9
- package/lib/cjs/presentation-common/content/Fields.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.d.ts +2 -2
- package/lib/cjs/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/content/Property.js.map +1 -1
- package/lib/cjs/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/cjs/presentation-common/content/Renderer.js.map +1 -1
- package/lib/cjs/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/cjs/presentation-common/content/Value.d.ts +1 -1
- package/lib/cjs/presentation-common/content/Value.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.d.ts +1 -1
- package/lib/cjs/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/cjs/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/cjs/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Rule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/cjs/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/Variables.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.d.ts +2 -2
- package/lib/cjs/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/cjs/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/cjs/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/cjs/presentation-common/selection/SelectionScope.d.ts +3 -3
- package/lib/cjs/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/cjs/presentation-common-internal.js.map +1 -1
- package/lib/cjs/presentation-common.js.map +1 -1
- package/lib/esm/presentation-common/AsyncTasks.js.map +1 -1
- package/lib/esm/presentation-common/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/presentation-common/Diagnostics.js.map +1 -1
- package/lib/esm/presentation-common/EC.d.ts.map +1 -1
- package/lib/esm/presentation-common/EC.js +9 -2
- package/lib/esm/presentation-common/EC.js.map +1 -1
- package/lib/esm/presentation-common/ElementProperties.js +1 -0
- package/lib/esm/presentation-common/ElementProperties.js.map +1 -1
- package/lib/esm/presentation-common/Error.d.ts +1 -1
- package/lib/esm/presentation-common/Error.js +1 -1
- package/lib/esm/presentation-common/Error.js.map +1 -1
- package/lib/esm/presentation-common/InstanceFilterDefinition.js.map +1 -1
- package/lib/esm/presentation-common/KeySet.js.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts +24 -2
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.d.ts.map +1 -1
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js +97 -104
- package/lib/esm/presentation-common/KoqPropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/LabelDefinition.js.map +1 -1
- package/lib/esm/presentation-common/LocalizationHelper.js.map +1 -1
- package/lib/esm/presentation-common/PresentationIpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/PresentationManagerOptions.d.ts +3 -3
- package/lib/esm/presentation-common/PresentationManagerOptions.js.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts +19 -19
- package/lib/esm/presentation-common/PresentationRpcInterface.d.ts.map +1 -1
- package/lib/esm/presentation-common/PresentationRpcInterface.js +17 -17
- package/lib/esm/presentation-common/PresentationRpcInterface.js.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.d.ts.map +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js +1 -1
- package/lib/esm/presentation-common/RegisteredRuleset.js.map +1 -1
- package/lib/esm/presentation-common/RpcRequestsHandler.js.map +1 -1
- package/lib/esm/presentation-common/RulesetVariables.js.map +1 -1
- package/lib/esm/presentation-common/RulesetsFactory.js.map +1 -1
- package/lib/esm/presentation-common/Update.js.map +1 -1
- package/lib/esm/presentation-common/Utils.js.map +1 -1
- package/lib/esm/presentation-common/content/Category.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/ContentTraverser.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/DisplayTypes.js.map +1 -1
- package/lib/esm/presentation-common/content/Editor.js.map +1 -1
- package/lib/esm/presentation-common/content/Fields.d.ts +14 -14
- package/lib/esm/presentation-common/content/Fields.js +9 -9
- package/lib/esm/presentation-common/content/Fields.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.d.ts +2 -2
- package/lib/esm/presentation-common/content/Item.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/content/Property.js.map +1 -1
- package/lib/esm/presentation-common/content/PropertyValueFormatter.js.map +1 -1
- package/lib/esm/presentation-common/content/Renderer.js.map +1 -1
- package/lib/esm/presentation-common/content/TypeDescription.js.map +1 -1
- package/lib/esm/presentation-common/content/Value.d.ts +1 -1
- package/lib/esm/presentation-common/content/Value.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/HierarchyLevel.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.d.ts +1 -1
- package/lib/esm/presentation-common/hierarchy/Node.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/NodePathElement.js.map +1 -1
- package/lib/esm/presentation-common/rules/ClassSpecifications.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelatedInstanceSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipDirection.js.map +1 -1
- package/lib/esm/presentation-common/rules/RelationshipPathSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Rule.js.map +1 -1
- package/lib/esm/presentation-common/rules/Ruleset.js.map +1 -1
- package/lib/esm/presentation-common/rules/SchemasSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/Variables.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentInstancesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRelatedInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/ContentSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/DefaultPropertyCategoryOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/PropertySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/SelectedNodeInstancesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/ContentModifier.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CustomRendererSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyEditorsSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/RelatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/CustomizationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/ExtendedDataRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/GroupingRule.d.ts +2 -2
- package/lib/esm/presentation-common/rules/customization/GroupingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/InstanceLabelOverride.js.map +1 -1
- package/lib/esm/presentation-common/rules/customization/SortingRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/ChildNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.d.ts +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomNodeSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/CustomQueryInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/InstanceNodesOfSpecificClassesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NavigationRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/NodeArtifactsRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RelatedInstanceNodesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/RootNodeRule.js.map +1 -1
- package/lib/esm/presentation-common/rules/hierarchy/SubCondition.js.map +1 -1
- package/lib/esm/presentation-common/selection/SelectionScope.d.ts +3 -3
- package/lib/esm/presentation-common/selection/SelectionScope.js.map +1 -1
- package/lib/esm/presentation-common-internal.js.map +1 -1
- package/lib/esm/presentation-common.js.map +1 -1
- package/lib/public/locales/en/Presentation.json +19 -19
- package/package.json +19 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-common/LocalizationHelper.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,qDAA+C;AAC/C,2DAAqD;AAGrD,iDAA4E;AAI5E,6DAAiH;AAEjH,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAMlD,gBAAgB;AAChB,MAAa,kBAAkB;IACrB,mBAAmB,CAA0B;IAErD,YAAY,KAA8B;QACxC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,kBAAkB,CAAC;IACtD,CAAC;IAEM,kBAAkB,CAAC,IAAY;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjG,CAAC;IAEM,iBAAiB,CAAC,KAAa;QACpC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAEM,2BAA2B,CAAC,GAAoB;QACrD,OAAO;YACL,GAAG,GAAG;YACN,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC;YACrC,QAAQ,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AAC,CAAC;QAC5D,CAAC;QACD,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AA1JD,gDA0JC","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 { CategoryDescription } from \"./content/Category.js\";\nimport { Content } from \"./content/Content.js\";\nimport { Descriptor } from \"./content/Descriptor.js\";\nimport { Field } from \"./content/Fields.js\";\nimport { Item } from \"./content/Item.js\";\nimport { DisplayValue, DisplayValueGroup, Value } from \"./content/Value.js\";\nimport { ElementProperties } from \"./ElementProperties.js\";\nimport { Node } from \"./hierarchy/Node.js\";\nimport { NodePathElement } from \"./hierarchy/NodePathElement.js\";\nimport { COMPOSITE_LABEL_DEFINITION_TYPENAME, LabelCompositeValue, LabelDefinition } from \"./LabelDefinition.js\";\n\nconst KEY_PATTERN = /@[\\w\\d\\-_]+:[\\w\\d\\-\\._]+?@/g;\n\ninterface LocalizationHelperProps {\n getLocalizedString: (key: string) => string;\n}\n\n/** @internal */\nexport class LocalizationHelper {\n private _getLocalizedString: (key: string) => string;\n\n constructor(props: LocalizationHelperProps) {\n this._getLocalizedString = props.getLocalizedString;\n }\n\n public getLocalizedString(text: string) {\n return text.replace(KEY_PATTERN, (key) => this._getLocalizedString(key.replace(/^@|@$/g, \"\")));\n }\n\n public getLocalizedNodes(nodes: Node[]): Node[] {\n return nodes.map((n) => this.getLocalizedNode(n));\n }\n\n public getLocalizedNodePathElement(npe: NodePathElement): NodePathElement {\n return {\n ...npe,\n node: this.getLocalizedNode(npe.node),\n children: npe.children.map((c) => this.getLocalizedNodePathElement(c)),\n };\n }\n\n public getLocalizedDisplayValueGroup(group: DisplayValueGroup): DisplayValueGroup {\n return {\n ...group,\n displayValue: this.getLocalizedDisplayValue(group.displayValue),\n };\n }\n\n public getLocalizedLabelDefinition(labelDefinition: LabelDefinition): LabelDefinition {\n const getLocalizedComposite = (compositeValue: LabelCompositeValue) => ({\n ...compositeValue,\n values: compositeValue.values.map((value) => this.getLocalizedLabelDefinition(value)),\n });\n\n if (labelDefinition.typeName === COMPOSITE_LABEL_DEFINITION_TYPENAME) {\n return {\n ...labelDefinition,\n rawValue: getLocalizedComposite(labelDefinition.rawValue as LabelCompositeValue),\n };\n }\n if (labelDefinition.typeName === \"string\") {\n return {\n ...labelDefinition,\n rawValue: this.getLocalizedString(labelDefinition.rawValue as string),\n displayValue: this.getLocalizedString(labelDefinition.displayValue),\n };\n }\n return labelDefinition;\n }\n\n public getLocalizedLabelDefinitions(labelDefinitions: LabelDefinition[]) {\n return labelDefinitions.map((labelDefinition) => this.getLocalizedLabelDefinition(labelDefinition));\n }\n\n public getLocalizedContentDescriptor(descriptor: Descriptor) {\n const clone = new Descriptor(descriptor);\n clone.fields.forEach((field) => this.getLocalizedContentField(field));\n clone.categories.forEach((category) => this.getLocalizedCategoryDescription(category));\n return clone;\n }\n\n public getLocalizedContentItems(items: Item[]): Item[] {\n return items.map((item) => this.getLocalizedContentItem(item));\n }\n\n public getLocalizedContent(content: Content): Content {\n return new Content(this.getLocalizedContentDescriptor(content.descriptor), this.getLocalizedContentItems(content.contentSet));\n }\n\n public getLocalizedElementProperties(elem: ElementProperties): ElementProperties {\n return {\n ...elem,\n label: this.getLocalizedString(elem.label),\n };\n }\n\n // warning: this function mutates the item\n private getLocalizedContentItem(item: Item): Item {\n item.label = this.getLocalizedLabelDefinition(item.label);\n item.values = Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\n item.displayValues = Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\n return item;\n }\n\n private getLocalizedRawValue(value: Value): Value {\n if (typeof value === \"string\") {\n return this.getLocalizedString(value);\n }\n if (Value.isNavigationValue(value)) {\n return {\n ...value,\n label: this.getLocalizedLabelDefinition(value.label),\n };\n }\n if (Value.isNestedContent(value)) {\n return value.map((item) => ({\n ...item,\n values: Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {}),\n displayValues: Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {}),\n }));\n }\n if (Value.isArray(value)) {\n return value.map((v) => this.getLocalizedRawValue(v));\n }\n if (Value.isMap(value)) {\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\n }\n return value;\n }\n\n // warning: this function mutates the field\n private getLocalizedContentField<TField extends Field>(field: TField) {\n field.label = this.getLocalizedString(field.label);\n if (field.isPropertiesField()) {\n if (field.isStructPropertiesField()) {\n field.memberFields = field.memberFields.map((m) => this.getLocalizedContentField(m));\n } else if (field.isArrayPropertiesField()) {\n field.itemsField = this.getLocalizedContentField(field.itemsField);\n }\n } else if (field.isNestedContentField()) {\n field.nestedFields = field.nestedFields.map((m) => this.getLocalizedContentField(m));\n }\n return field;\n }\n\n // warning: this function mutates the category\n private getLocalizedCategoryDescription(category: CategoryDescription) {\n category.label = this.getLocalizedString(category.label);\n category.description = this.getLocalizedString(category.description);\n return category;\n }\n\n public getLocalizedNode(node: Node): Node {\n return {\n ...node,\n label: this.getLocalizedLabelDefinition(node.label),\n ...(node.description ? { description: this.getLocalizedString(node.description) } : undefined),\n };\n }\n\n private getLocalizedDisplayValue(value: DisplayValue): DisplayValue {\n if (typeof value === \"undefined\") {\n return undefined;\n }\n if (typeof value === \"string\") {\n return this.getLocalizedString(value);\n }\n if (DisplayValue.isArray(value)) {\n return value.map((v) => this.getLocalizedDisplayValue(v));\n }\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"LocalizationHelper.js","sourceRoot":"","sources":["../../../src/presentation-common/LocalizationHelper.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAGH,qDAA+C;AAC/C,2DAAqD;AAGrD,iDAA4E;AAI5E,6DAAiH;AAEjH,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAMlD,gBAAgB;AAChB,MAAa,kBAAkB;IACrB,mBAAmB,CAA0B;IAErD,YAAY,KAA8B;QACxC,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,kBAAkB,CAAC;IACtD,CAAC;IAEM,kBAAkB,CAAC,IAAY;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACjG,CAAC;IAEM,iBAAiB,CAAC,KAAa;QACpC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAEM,2BAA2B,CAAC,GAAoB;QACrD,OAAO;YACL,GAAG,GAAG;YACN,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC;YACrC,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;SACvE,CAAC;IACJ,CAAC;IAEM,6BAA6B,CAAC,KAAwB;QAC3D,OAAO;YACL,GAAG,KAAK;YACR,YAA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,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AA1JD,gDA0JC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { CategoryDescription } from \"./content/Category.js\";\r\nimport { Content } from \"./content/Content.js\";\r\nimport { Descriptor } from \"./content/Descriptor.js\";\r\nimport { Field } from \"./content/Fields.js\";\r\nimport { Item } from \"./content/Item.js\";\r\nimport { DisplayValue, DisplayValueGroup, Value } from \"./content/Value.js\";\r\nimport { ElementProperties } from \"./ElementProperties.js\";\r\nimport { Node } from \"./hierarchy/Node.js\";\r\nimport { NodePathElement } from \"./hierarchy/NodePathElement.js\";\r\nimport { COMPOSITE_LABEL_DEFINITION_TYPENAME, LabelCompositeValue, LabelDefinition } from \"./LabelDefinition.js\";\r\n\r\nconst KEY_PATTERN = /@[\\w\\d\\-_]+:[\\w\\d\\-\\._]+?@/g;\r\n\r\ninterface LocalizationHelperProps {\r\n getLocalizedString: (key: string) => string;\r\n}\r\n\r\n/** @internal */\r\nexport class LocalizationHelper {\r\n private _getLocalizedString: (key: string) => string;\r\n\r\n constructor(props: LocalizationHelperProps) {\r\n this._getLocalizedString = props.getLocalizedString;\r\n }\r\n\r\n public getLocalizedString(text: string) {\r\n return text.replace(KEY_PATTERN, (key) => this._getLocalizedString(key.replace(/^@|@$/g, \"\")));\r\n }\r\n\r\n public getLocalizedNodes(nodes: Node[]): Node[] {\r\n return nodes.map((n) => this.getLocalizedNode(n));\r\n }\r\n\r\n public getLocalizedNodePathElement(npe: NodePathElement): NodePathElement {\r\n return {\r\n ...npe,\r\n node: this.getLocalizedNode(npe.node),\r\n children: npe.children.map((c) => this.getLocalizedNodePathElement(c)),\r\n };\r\n }\r\n\r\n public getLocalizedDisplayValueGroup(group: DisplayValueGroup): DisplayValueGroup {\r\n return {\r\n ...group,\r\n displayValue: this.getLocalizedDisplayValue(group.displayValue),\r\n };\r\n }\r\n\r\n public getLocalizedLabelDefinition(labelDefinition: LabelDefinition): LabelDefinition {\r\n const getLocalizedComposite = (compositeValue: LabelCompositeValue) => ({\r\n ...compositeValue,\r\n values: compositeValue.values.map((value) => this.getLocalizedLabelDefinition(value)),\r\n });\r\n\r\n if (labelDefinition.typeName === COMPOSITE_LABEL_DEFINITION_TYPENAME) {\r\n return {\r\n ...labelDefinition,\r\n rawValue: getLocalizedComposite(labelDefinition.rawValue as LabelCompositeValue),\r\n };\r\n }\r\n if (labelDefinition.typeName === \"string\") {\r\n return {\r\n ...labelDefinition,\r\n rawValue: this.getLocalizedString(labelDefinition.rawValue as string),\r\n displayValue: this.getLocalizedString(labelDefinition.displayValue),\r\n };\r\n }\r\n return labelDefinition;\r\n }\r\n\r\n public getLocalizedLabelDefinitions(labelDefinitions: LabelDefinition[]) {\r\n return labelDefinitions.map((labelDefinition) => this.getLocalizedLabelDefinition(labelDefinition));\r\n }\r\n\r\n public getLocalizedContentDescriptor(descriptor: Descriptor) {\r\n const clone = new Descriptor(descriptor);\r\n clone.fields.forEach((field) => this.getLocalizedContentField(field));\r\n clone.categories.forEach((category) => this.getLocalizedCategoryDescription(category));\r\n return clone;\r\n }\r\n\r\n public getLocalizedContentItems(items: Item[]): Item[] {\r\n return items.map((item) => this.getLocalizedContentItem(item));\r\n }\r\n\r\n public getLocalizedContent(content: Content): Content {\r\n return new Content(this.getLocalizedContentDescriptor(content.descriptor), this.getLocalizedContentItems(content.contentSet));\r\n }\r\n\r\n public getLocalizedElementProperties(elem: ElementProperties): ElementProperties {\r\n return {\r\n ...elem,\r\n label: this.getLocalizedString(elem.label),\r\n };\r\n }\r\n\r\n // warning: this function mutates the item\r\n private getLocalizedContentItem(item: Item): Item {\r\n item.label = this.getLocalizedLabelDefinition(item.label);\r\n item.values = Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\r\n item.displayValues = Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\r\n return item;\r\n }\r\n\r\n private getLocalizedRawValue(value: Value): Value {\r\n if (typeof value === \"string\") {\r\n return this.getLocalizedString(value);\r\n }\r\n if (Value.isNavigationValue(value)) {\r\n return {\r\n ...value,\r\n label: this.getLocalizedLabelDefinition(value.label),\r\n };\r\n }\r\n if (Value.isNestedContent(value)) {\r\n return value.map((item) => ({\r\n ...item,\r\n values: Object.entries(item.values).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {}),\r\n displayValues: Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {}),\r\n }));\r\n }\r\n if (Value.isArray(value)) {\r\n return value.map((v) => this.getLocalizedRawValue(v));\r\n }\r\n if (Value.isMap(value)) {\r\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});\r\n }\r\n return value;\r\n }\r\n\r\n // warning: this function mutates the field\r\n private getLocalizedContentField<TField extends Field>(field: TField) {\r\n field.label = this.getLocalizedString(field.label);\r\n if (field.isPropertiesField()) {\r\n if (field.isStructPropertiesField()) {\r\n field.memberFields = field.memberFields.map((m) => this.getLocalizedContentField(m));\r\n } else if (field.isArrayPropertiesField()) {\r\n field.itemsField = this.getLocalizedContentField(field.itemsField);\r\n }\r\n } else if (field.isNestedContentField()) {\r\n field.nestedFields = field.nestedFields.map((m) => this.getLocalizedContentField(m));\r\n }\r\n return field;\r\n }\r\n\r\n // warning: this function mutates the category\r\n private getLocalizedCategoryDescription(category: CategoryDescription) {\r\n category.label = this.getLocalizedString(category.label);\r\n category.description = this.getLocalizedString(category.description);\r\n return category;\r\n }\r\n\r\n public getLocalizedNode(node: Node): Node {\r\n return {\r\n ...node,\r\n label: this.getLocalizedLabelDefinition(node.label),\r\n ...(node.description ? { description: this.getLocalizedString(node.description) } : undefined),\r\n };\r\n }\r\n\r\n private getLocalizedDisplayValue(value: DisplayValue): DisplayValue {\r\n if (typeof value === \"undefined\") {\r\n return undefined;\r\n }\r\n if (typeof value === \"string\") {\r\n return this.getLocalizedString(value);\r\n }\r\n if (DisplayValue.isArray(value)) {\r\n return value.map((v) => this.getLocalizedDisplayValue(v));\r\n }\r\n return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationIpcInterface.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationIpcInterface.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAIH,gBAAgB;AACH,QAAA,6BAA6B,GAAG,oCAAoC,CAAC;AAyBlF,gBAAgB;AAChB,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B;;OAEG;IACH,yDAAgC,CAAA;AAClC,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC","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 { RulesetVariableJSON } from \"./RulesetVariables.js\";\n\n/** @internal */\nexport const PRESENTATION_IPC_CHANNEL_NAME = \"itwinjs-presentation/ipc-interface\";\n\ninterface CommonIpcParams {\n clientId: string;\n}\n\ninterface SetRulesetVariableParams<TVariable> extends CommonIpcParams {\n rulesetId: string;\n variable: TVariable;\n}\n\ninterface UnsetRulesetVariableParams extends CommonIpcParams {\n rulesetId: string;\n variableId: string;\n}\n\n/** @internal */\nexport interface PresentationIpcInterface {\n /** Sets ruleset variable value. */\n setRulesetVariable(params: SetRulesetVariableParams<RulesetVariableJSON>): Promise<void>;\n\n /** Unsets ruleset variable value. */\n unsetRulesetVariable(params: UnsetRulesetVariableParams): Promise<void>;\n}\n\n/** @internal */\nexport enum PresentationIpcEvents {\n /**\n * ID of an event that's emitted when backend detects changes in presented data.\n */\n Update = \"presentation.onUpdate\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PresentationIpcInterface.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationIpcInterface.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAIH,gBAAgB;AACH,QAAA,6BAA6B,GAAG,oCAAoC,CAAC;AAyBlF,gBAAgB;AAChB,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B;;OAEG;IACH,yDAAgC,CAAA;AAClC,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { RulesetVariableJSON } from \"./RulesetVariables.js\";\r\n\r\n/** @internal */\r\nexport const PRESENTATION_IPC_CHANNEL_NAME = \"itwinjs-presentation/ipc-interface\";\r\n\r\ninterface CommonIpcParams {\r\n clientId: string;\r\n}\r\n\r\ninterface SetRulesetVariableParams<TVariable> extends CommonIpcParams {\r\n rulesetId: string;\r\n variable: TVariable;\r\n}\r\n\r\ninterface UnsetRulesetVariableParams extends CommonIpcParams {\r\n rulesetId: string;\r\n variableId: string;\r\n}\r\n\r\n/** @internal */\r\nexport interface PresentationIpcInterface {\r\n /** Sets ruleset variable value. */\r\n setRulesetVariable(params: SetRulesetVariableParams<RulesetVariableJSON>): Promise<void>;\r\n\r\n /** Unsets ruleset variable value. */\r\n unsetRulesetVariable(params: UnsetRulesetVariableParams): Promise<void>;\r\n}\r\n\r\n/** @internal */\r\nexport enum PresentationIpcEvents {\r\n /**\r\n * ID of an event that's emitted when backend detects changes in presented data.\r\n */\r\n Update = \"presentation.onUpdate\",\r\n}\r\n"]}
|
|
@@ -152,7 +152,7 @@ export interface DistinctValuesRequestOptions<TIModel, TDescriptor, TKeySet, TRu
|
|
|
152
152
|
/**
|
|
153
153
|
* Request type for element properties requests
|
|
154
154
|
* @public
|
|
155
|
-
* @deprecated in 4.
|
|
155
|
+
* @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Use [[SingleElementPropertiesRequestOptions]] or [[MultiElementPropertiesRequestOptions]] directly.
|
|
156
156
|
*/
|
|
157
157
|
export type ElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> = SingleElementPropertiesRequestOptions<TIModel> | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>;
|
|
158
158
|
/**
|
|
@@ -244,14 +244,14 @@ export interface DisplayLabelsRequestOptions<TIModel, TInstanceKey> extends Requ
|
|
|
244
244
|
/**
|
|
245
245
|
* Request options used for selection scope related requests
|
|
246
246
|
* @public
|
|
247
|
-
* @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.
|
|
247
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
248
248
|
*/
|
|
249
249
|
export interface SelectionScopeRequestOptions<TIModel> extends RequestOptions<TIModel> {
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Request options used for calculating selection based on given instance keys and selection scope.
|
|
253
253
|
* @public
|
|
254
|
-
* @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.
|
|
254
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
255
255
|
*/
|
|
256
256
|
export interface ComputeSelectionRequestOptions<TIModel> extends RequestOptions<TIModel> {
|
|
257
257
|
elementIds: Id64String[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationManagerOptions.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationManagerOptions.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AA2VH,0FAIC;AARD;;;GAGG;AACH,SAAgB,uCAAuC,CACrD,OAAuH;IAEvH,OAAQ,OAA0D,CAAC,SAAS,KAAK,SAAS,CAAC;AAC7F,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 Core\n */\n\nimport { BeEvent, Id64String } from \"@itwin/core-bentley\";\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\nimport { Descriptor, SelectionInfo } from \"./content/Descriptor.js\";\nimport { FieldDescriptor } from \"./content/Fields.js\";\nimport { Item } from \"./content/Item.js\";\nimport { InstanceKey } from \"./EC.js\";\nimport { ElementProperties } from \"./ElementProperties.js\";\nimport { InstanceFilterDefinition } from \"./InstanceFilterDefinition.js\";\nimport { Ruleset } from \"./rules/Ruleset.js\";\nimport { RulesetVariable } from \"./RulesetVariables.js\";\nimport { SelectionScopeProps } from \"./selection/SelectionScope.js\";\n\n/**\n * A generic request options type used for both hierarchy and content requests.\n * @public\n */\nexport interface RequestOptions<TIModel> {\n /** iModel to request data from */\n imodel: TIModel;\n\n /** Optional locale to use when formatting / localizing data */\n locale?: string;\n\n /**\n * Unit system to use when formatting property values with units. Default presentation\n * unit is used if unit system is not specified.\n */\n unitSystem?: UnitSystemKey;\n}\n\n/**\n * Options for requests that require presentation ruleset. Not\n * meant to be used directly, see one of the subclasses.\n *\n * @public\n */\nexport interface RequestOptionsWithRuleset<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptions<TIModel> {\n /** Ruleset or id of the ruleset to use when requesting data */\n rulesetOrId: Ruleset | string;\n\n /** Ruleset variables to use when requesting data */\n rulesetVariables?: TRulesetVariable[];\n}\n\n/**\n * Request type for hierarchy requests.\n * @public\n */\nexport interface HierarchyRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n /** Key of the parent node to get children for */\n parentKey?: TNodeKey;\n\n /**\n * An instance filter that should be applied for this hierarchy level.\n *\n * **Note:** May only be used on hierarchy levels that support filtering - check [[NavNode.supportsFiltering]] before\n * requesting filtered children.\n */\n instanceFilter?: InstanceFilterDefinition;\n\n /**\n * A limit to how many instances at most should be loaded for a hierarchy level. If the limit is exceeded,\n * the request fails with [[PresentationError]] having [[PresentationStatus.ResultSetTooLarge]] error number.\n *\n * Specifying the limit is useful when creating unlimited size result sets is not meaningful - this allows the library\n * to return early as soon as the limit is reached, instead of creating a very large result that's possibly too large to\n * be useful to be displayed to end users.\n *\n * @see [Hierarchies' filtering and limiting]($docs/presentation/hierarchies/FilteringLimiting.md)\n */\n sizeLimit?: number;\n}\n\n/**\n * Params for hierarchy level descriptor requests.\n * @public\n */\nexport interface HierarchyLevelDescriptorRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable>\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n /** Key of the parent node to get hierarchy level descriptor for. */\n parentKey?: TNodeKey;\n}\n\n/**\n * Request type of filtering hierarchies by given ECInstance paths.\n * @public\n */\nexport interface FilterByInstancePathsHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable>\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n /** A list of paths from root ECInstance to target ECInstance. */\n instancePaths: InstanceKey[][];\n\n /**\n * An optional index (`0 <= markedIndex < instancePaths.length`) to mark one of the instance paths. The\n * path is marked using `NodePathElement.isMarked` flag in the result.\n */\n markedIndex?: number;\n}\n\n/**\n * Request type of filtering hierarchies by given text.\n * @public\n */\nexport interface FilterByTextHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n /** Text to filter the hierarchy by. */\n filterText: string;\n}\n\n/**\n * Request type for content sources requests.\n * @public\n */\nexport interface ContentSourcesRequestOptions<TIModel> extends RequestOptions<TIModel> {\n /** Full names of classes to get content sources for. Format for a full class name: `SchemaName:ClassName`. */\n classes: string[];\n}\n\n/**\n * Request type for content descriptor requests.\n * @public\n */\nexport interface ContentDescriptorRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n /**\n * Content display type.\n * @see [[DefaultContentDisplayTypes]]\n */\n displayType: string;\n /**\n * Content flags used for content customization.\n * @see [[ContentFlags]]\n */\n contentFlags?: number;\n /** Input keys for getting the content */\n keys: TKeySet;\n /** Information about the selection event that was the cause of this content request */\n selection?: SelectionInfo;\n}\n\n/**\n * Request type for content requests.\n * @public\n */\nexport interface ContentRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n /** Content descriptor for customizing the returned content */\n descriptor: TDescriptor;\n /** Input keys for getting the content */\n keys: TKeySet;\n /**\n * Flag that specifies whether value formatting should be omitted or not.\n * Content is returned without `displayValues` when this is set to `true`.\n */\n omitFormattedValues?: boolean;\n}\n\n/**\n * Request type for distinct values' requests.\n * @public\n */\nexport interface DistinctValuesRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\n /** Content descriptor for customizing the returned content */\n descriptor: TDescriptor;\n /** Input keys for getting the content */\n keys: TKeySet;\n /** Descriptor for a field distinct values are requested for */\n fieldDescriptor: FieldDescriptor;\n}\n\n/**\n * Request type for element properties requests\n * @public\n * @deprecated in 4.x. Use [[SingleElementPropertiesRequestOptions]] or [[MultiElementPropertiesRequestOptions]] directly.\n */\nexport type ElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\n | SingleElementPropertiesRequestOptions<TIModel>\n | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>;\n\n/**\n * Request type for single element properties requests.\n * @public\n */\nexport interface SingleElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\n /** ID of the element to get properties for. */\n elementId: Id64String;\n\n /**\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\n * to a parser that creates [[ElementProperties]] objects.\n */\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\n}\n\n/**\n * Base request type for multiple elements properties requests.\n * @public\n */\nexport interface MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\n /**\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\n * to a parser that creates [[ElementProperties]] objects.\n */\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\n\n /**\n * The properties of multiple elements are going to be retrieved and returned in batches. Depending on the batch\n * size load on CPU vs MEMORY load may vary, so changing this attribute allows to fine tune the performance.\n * Defaults to `1000`.\n */\n batchSize?: number;\n}\n/**\n * Request type for multiple elements properties requests, where elements are specified by class.\n * @public\n */\nexport interface MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent = ElementProperties>\n extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {\n /**\n * Classes of the elements to get properties for. If [[elementClasses]] is `undefined`, all classes\n * are used. Classes should be specified in one of these formats: \"<schema name or alias>.<class_name>\" or\n * \"<schema name or alias>:<class_name>\".\n */\n elementClasses?: string[];\n}\n/**\n * Request type for multiple elements properties requests, where elements are specified by element id.\n * @public\n */\nexport interface MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent = ElementProperties>\n extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {\n /**\n * A list of `bis.Element` IDs to get properties for.\n */\n elementIds?: Id64String[];\n}\n/**\n * Request type for multiple elements properties requests.\n * @public\n */\nexport type MultiElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\n | MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent>\n | MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent>;\n\n/**\n * Request type for content instance keys' requests.\n * @public\n */\nexport interface ContentInstanceKeysRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\n /**\n * Content display type.\n * @see [[DefaultContentDisplayTypes]]\n */\n displayType?: string;\n /** Input keys for getting the content. */\n keys: TKeySet;\n}\n\n/**\n * Request type for label requests\n * @public\n */\nexport interface DisplayLabelRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\n /** Key of ECInstance to get label for */\n key: TInstanceKey;\n}\n\n/**\n * Request type for labels requests\n * @public\n */\nexport interface DisplayLabelsRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\n /** Keys of ECInstances to get labels for */\n keys: TInstanceKey[];\n}\n\n/**\n * Request options used for selection scope related requests\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 interface SelectionScopeRequestOptions<TIModel> extends RequestOptions<TIModel> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\n\n/**\n * Request options used for calculating selection based on given instance keys and selection scope.\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 interface ComputeSelectionRequestOptions<TIModel> extends RequestOptions<TIModel> {\n elementIds: Id64String[];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n scope: SelectionScopeProps;\n}\n\n/**\n * Data structure for comparing a hierarchy after ruleset or ruleset variable changes.\n * @public\n */\nexport interface HierarchyCompareOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\n prev: {\n rulesetOrId?: Ruleset | string;\n rulesetVariables?: TRulesetVariable[];\n };\n expandedNodeKeys?: TNodeKey[];\n continuationToken?: {\n prevHierarchyNode: string;\n currHierarchyNode: string;\n };\n resultSetSize?: number;\n}\n\n/**\n * Paging options\n * @public\n */\nexport interface PageOptions {\n /** Inclusive start 0-based index of the page */\n start?: number;\n /** Maximum size of the page */\n size?: number;\n}\n\n/**\n * A wrapper type that injects [[PageOptions]] into supplied type\n * @public\n */\nexport type Paged<TOptions extends object> = TOptions & {\n /** Optional paging parameters */\n paging?: PageOptions;\n};\n\n/**\n * A wrapper type that injects priority into supplied type.\n * @public\n */\nexport type Prioritized<TOptions extends object> = TOptions & {\n /** Optional priority */\n priority?: number;\n};\n\n/**\n * Checks if supplied request options are for single or multiple element properties.\n * @internal\n */\nexport function isSingleElementPropertiesRequestOptions<TIModel, TParsedContent = any>(\n options: SingleElementPropertiesRequestOptions<TIModel> | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>,\n): options is SingleElementPropertiesRequestOptions<TIModel> {\n return (options as SingleElementPropertiesRequestOptions<TIModel>).elementId !== undefined;\n}\n\n/**\n * A wrapper type that injects cancelEvent into supplied type.\n * @public\n */\nexport type WithCancelEvent<TOptions extends object> = TOptions & {\n /** Event which is triggered when the request is canceled */\n cancelEvent?: BeEvent<() => void>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"PresentationManagerOptions.js","sourceRoot":"","sources":["../../../src/presentation-common/PresentationManagerOptions.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;AA2VH,0FAIC;AARD;;;GAGG;AACH,SAAgB,uCAAuC,CACrD,OAAuH;IAEvH,OAAQ,OAA0D,CAAC,SAAS,KAAK,SAAS,CAAC;AAC7F,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { BeEvent, Id64String } from \"@itwin/core-bentley\";\r\nimport { UnitSystemKey } from \"@itwin/core-quantity\";\r\nimport { Descriptor, SelectionInfo } from \"./content/Descriptor.js\";\r\nimport { FieldDescriptor } from \"./content/Fields.js\";\r\nimport { Item } from \"./content/Item.js\";\r\nimport { InstanceKey } from \"./EC.js\";\r\nimport { ElementProperties } from \"./ElementProperties.js\";\r\nimport { InstanceFilterDefinition } from \"./InstanceFilterDefinition.js\";\r\nimport { Ruleset } from \"./rules/Ruleset.js\";\r\nimport { RulesetVariable } from \"./RulesetVariables.js\";\r\nimport { SelectionScopeProps } from \"./selection/SelectionScope.js\";\r\n\r\n/**\r\n * A generic request options type used for both hierarchy and content requests.\r\n * @public\r\n */\r\nexport interface RequestOptions<TIModel> {\r\n /** iModel to request data from */\r\n imodel: TIModel;\r\n\r\n /** Optional locale to use when formatting / localizing data */\r\n locale?: string;\r\n\r\n /**\r\n * Unit system to use when formatting property values with units. Default presentation\r\n * unit is used if unit system is not specified.\r\n */\r\n unitSystem?: UnitSystemKey;\r\n}\r\n\r\n/**\r\n * Options for requests that require presentation ruleset. Not\r\n * meant to be used directly, see one of the subclasses.\r\n *\r\n * @public\r\n */\r\nexport interface RequestOptionsWithRuleset<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptions<TIModel> {\r\n /** Ruleset or id of the ruleset to use when requesting data */\r\n rulesetOrId: Ruleset | string;\r\n\r\n /** Ruleset variables to use when requesting data */\r\n rulesetVariables?: TRulesetVariable[];\r\n}\r\n\r\n/**\r\n * Request type for hierarchy requests.\r\n * @public\r\n */\r\nexport interface HierarchyRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Key of the parent node to get children for */\r\n parentKey?: TNodeKey;\r\n\r\n /**\r\n * An instance filter that should be applied for this hierarchy level.\r\n *\r\n * **Note:** May only be used on hierarchy levels that support filtering - check [[NavNode.supportsFiltering]] before\r\n * requesting filtered children.\r\n */\r\n instanceFilter?: InstanceFilterDefinition;\r\n\r\n /**\r\n * A limit to how many instances at most should be loaded for a hierarchy level. If the limit is exceeded,\r\n * the request fails with [[PresentationError]] having [[PresentationStatus.ResultSetTooLarge]] error number.\r\n *\r\n * Specifying the limit is useful when creating unlimited size result sets is not meaningful - this allows the library\r\n * to return early as soon as the limit is reached, instead of creating a very large result that's possibly too large to\r\n * be useful to be displayed to end users.\r\n *\r\n * @see [Hierarchies' filtering and limiting]($docs/presentation/hierarchies/FilteringLimiting.md)\r\n */\r\n sizeLimit?: number;\r\n}\r\n\r\n/**\r\n * Params for hierarchy level descriptor requests.\r\n * @public\r\n */\r\nexport interface HierarchyLevelDescriptorRequestOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Key of the parent node to get hierarchy level descriptor for. */\r\n parentKey?: TNodeKey;\r\n}\r\n\r\n/**\r\n * Request type of filtering hierarchies by given ECInstance paths.\r\n * @public\r\n */\r\nexport interface FilterByInstancePathsHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** A list of paths from root ECInstance to target ECInstance. */\r\n instancePaths: InstanceKey[][];\r\n\r\n /**\r\n * An optional index (`0 <= markedIndex < instancePaths.length`) to mark one of the instance paths. The\r\n * path is marked using `NodePathElement.isMarked` flag in the result.\r\n */\r\n markedIndex?: number;\r\n}\r\n\r\n/**\r\n * Request type of filtering hierarchies by given text.\r\n * @public\r\n */\r\nexport interface FilterByTextHierarchyRequestOptions<TIModel, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Text to filter the hierarchy by. */\r\n filterText: string;\r\n}\r\n\r\n/**\r\n * Request type for content sources requests.\r\n * @public\r\n */\r\nexport interface ContentSourcesRequestOptions<TIModel> extends RequestOptions<TIModel> {\r\n /** Full names of classes to get content sources for. Format for a full class name: `SchemaName:ClassName`. */\r\n classes: string[];\r\n}\r\n\r\n/**\r\n * Request type for content descriptor requests.\r\n * @public\r\n */\r\nexport interface ContentDescriptorRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /**\r\n * Content display type.\r\n * @see [[DefaultContentDisplayTypes]]\r\n */\r\n displayType: string;\r\n /**\r\n * Content flags used for content customization.\r\n * @see [[ContentFlags]]\r\n */\r\n contentFlags?: number;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /** Information about the selection event that was the cause of this content request */\r\n selection?: SelectionInfo;\r\n}\r\n\r\n/**\r\n * Request type for content requests.\r\n * @public\r\n */\r\nexport interface ContentRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n /** Content descriptor for customizing the returned content */\r\n descriptor: TDescriptor;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /**\r\n * Flag that specifies whether value formatting should be omitted or not.\r\n * Content is returned without `displayValues` when this is set to `true`.\r\n */\r\n omitFormattedValues?: boolean;\r\n}\r\n\r\n/**\r\n * Request type for distinct values' requests.\r\n * @public\r\n */\r\nexport interface DistinctValuesRequestOptions<TIModel, TDescriptor, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\r\n /** Content descriptor for customizing the returned content */\r\n descriptor: TDescriptor;\r\n /** Input keys for getting the content */\r\n keys: TKeySet;\r\n /** Descriptor for a field distinct values are requested for */\r\n fieldDescriptor: FieldDescriptor;\r\n}\r\n\r\n/**\r\n * Request type for element properties requests\r\n * @public\r\n * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Use [[SingleElementPropertiesRequestOptions]] or [[MultiElementPropertiesRequestOptions]] directly.\r\n */\r\nexport type ElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\r\n | SingleElementPropertiesRequestOptions<TIModel>\r\n | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>;\r\n\r\n/**\r\n * Request type for single element properties requests.\r\n * @public\r\n */\r\nexport interface SingleElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\r\n /** ID of the element to get properties for. */\r\n elementId: Id64String;\r\n\r\n /**\r\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\r\n * to a parser that creates [[ElementProperties]] objects.\r\n */\r\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\r\n}\r\n\r\n/**\r\n * Base request type for multiple elements properties requests.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent = ElementProperties> extends RequestOptions<TIModel> {\r\n /**\r\n * Content parser that creates a result item based on given content descriptor and content item. Defaults\r\n * to a parser that creates [[ElementProperties]] objects.\r\n */\r\n contentParser?: (descriptor: Descriptor, item: Item) => TParsedContent;\r\n\r\n /**\r\n * The properties of multiple elements are going to be retrieved and returned in batches. Depending on the batch\r\n * size load on CPU vs MEMORY load may vary, so changing this attribute allows to fine tune the performance.\r\n * Defaults to `1000`.\r\n */\r\n batchSize?: number;\r\n}\r\n/**\r\n * Request type for multiple elements properties requests, where elements are specified by class.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent = ElementProperties>\r\n extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {\r\n /**\r\n * Classes of the elements to get properties for. If [[elementClasses]] is `undefined`, all classes\r\n * are used. Classes should be specified in one of these formats: \"<schema name or alias>.<class_name>\" or\r\n * \"<schema name or alias>:<class_name>\".\r\n */\r\n elementClasses?: string[];\r\n}\r\n/**\r\n * Request type for multiple elements properties requests, where elements are specified by element id.\r\n * @public\r\n */\r\nexport interface MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent = ElementProperties>\r\n extends MultiElementPropertiesBaseRequestOptions<TIModel, TParsedContent> {\r\n /**\r\n * A list of `bis.Element` IDs to get properties for.\r\n */\r\n elementIds?: Id64String[];\r\n}\r\n/**\r\n * Request type for multiple elements properties requests.\r\n * @public\r\n */\r\nexport type MultiElementPropertiesRequestOptions<TIModel, TParsedContent = ElementProperties> =\r\n | MultiElementPropertiesByClassRequestOptions<TIModel, TParsedContent>\r\n | MultiElementPropertiesByIdsRequestOptions<TIModel, TParsedContent>;\r\n\r\n/**\r\n * Request type for content instance keys' requests.\r\n * @public\r\n */\r\nexport interface ContentInstanceKeysRequestOptions<TIModel, TKeySet, TRulesetVariable = RulesetVariable>\r\n extends Paged<RequestOptionsWithRuleset<TIModel, TRulesetVariable>> {\r\n /**\r\n * Content display type.\r\n * @see [[DefaultContentDisplayTypes]]\r\n */\r\n displayType?: string;\r\n /** Input keys for getting the content. */\r\n keys: TKeySet;\r\n}\r\n\r\n/**\r\n * Request type for label requests\r\n * @public\r\n */\r\nexport interface DisplayLabelRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\r\n /** Key of ECInstance to get label for */\r\n key: TInstanceKey;\r\n}\r\n\r\n/**\r\n * Request type for labels requests\r\n * @public\r\n */\r\nexport interface DisplayLabelsRequestOptions<TIModel, TInstanceKey> extends RequestOptions<TIModel> {\r\n /** Keys of ECInstances to get labels for */\r\n keys: TInstanceKey[];\r\n}\r\n\r\n/**\r\n * Request options used for selection scope related requests\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport interface SelectionScopeRequestOptions<TIModel> extends RequestOptions<TIModel> {} // eslint-disable-line @typescript-eslint/no-empty-object-type\r\n\r\n/**\r\n * Request options used for calculating selection based on given instance keys and selection scope.\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport interface ComputeSelectionRequestOptions<TIModel> extends RequestOptions<TIModel> {\r\n elementIds: Id64String[];\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n scope: SelectionScopeProps;\r\n}\r\n\r\n/**\r\n * Data structure for comparing a hierarchy after ruleset or ruleset variable changes.\r\n * @public\r\n */\r\nexport interface HierarchyCompareOptions<TIModel, TNodeKey, TRulesetVariable = RulesetVariable> extends RequestOptionsWithRuleset<TIModel, TRulesetVariable> {\r\n prev: {\r\n rulesetOrId?: Ruleset | string;\r\n rulesetVariables?: TRulesetVariable[];\r\n };\r\n expandedNodeKeys?: TNodeKey[];\r\n continuationToken?: {\r\n prevHierarchyNode: string;\r\n currHierarchyNode: string;\r\n };\r\n resultSetSize?: number;\r\n}\r\n\r\n/**\r\n * Paging options\r\n * @public\r\n */\r\nexport interface PageOptions {\r\n /** Inclusive start 0-based index of the page */\r\n start?: number;\r\n /** Maximum size of the page */\r\n size?: number;\r\n}\r\n\r\n/**\r\n * A wrapper type that injects [[PageOptions]] into supplied type\r\n * @public\r\n */\r\nexport type Paged<TOptions extends object> = TOptions & {\r\n /** Optional paging parameters */\r\n paging?: PageOptions;\r\n};\r\n\r\n/**\r\n * A wrapper type that injects priority into supplied type.\r\n * @public\r\n */\r\nexport type Prioritized<TOptions extends object> = TOptions & {\r\n /** Optional priority */\r\n priority?: number;\r\n};\r\n\r\n/**\r\n * Checks if supplied request options are for single or multiple element properties.\r\n * @internal\r\n */\r\nexport function isSingleElementPropertiesRequestOptions<TIModel, TParsedContent = any>(\r\n options: SingleElementPropertiesRequestOptions<TIModel> | MultiElementPropertiesRequestOptions<TIModel, TParsedContent>,\r\n): options is SingleElementPropertiesRequestOptions<TIModel> {\r\n return (options as SingleElementPropertiesRequestOptions<TIModel>).elementId !== undefined;\r\n}\r\n\r\n/**\r\n * A wrapper type that injects cancelEvent into supplied type.\r\n * @public\r\n */\r\nexport type WithCancelEvent<TOptions extends object> = TOptions & {\r\n /** Event which is triggered when the request is canceled */\r\n cancelEvent?: BeEvent<() => void>;\r\n};\r\n"]}
|
|
@@ -128,13 +128,13 @@ export type DisplayLabelsRpcRequestOptions = PresentationRpcRequestOptions<Displ
|
|
|
128
128
|
/**
|
|
129
129
|
* Data structure for selection scope request options.
|
|
130
130
|
* @public
|
|
131
|
-
* @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.
|
|
131
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
132
132
|
*/
|
|
133
133
|
export type SelectionScopeRpcRequestOptions = PresentationRpcRequestOptions<SelectionScopeRequestOptions<never>>;
|
|
134
134
|
/**
|
|
135
135
|
* Request options data structure for computing selection based on given selection scope and element IDs.
|
|
136
136
|
* @public
|
|
137
|
-
* @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.
|
|
137
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.
|
|
138
138
|
*/
|
|
139
139
|
export type ComputeSelectionRpcRequestOptions = PresentationRpcRequestOptions<ComputeSelectionRequestOptions<never>>;
|
|
140
140
|
/**
|
|
@@ -146,45 +146,45 @@ export declare class PresentationRpcInterface extends RpcInterface {
|
|
|
146
146
|
static readonly interfaceName = "PresentationRpcInterface";
|
|
147
147
|
/** The semantic version of the interface. */
|
|
148
148
|
static interfaceVersion: string;
|
|
149
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
149
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
150
150
|
getNodesCount(_token: IModelRpcProps, _options: HierarchyRpcRequestOptions): PresentationRpcResponse<number>;
|
|
151
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
151
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
152
152
|
getPagedNodes(_token: IModelRpcProps, _options: Paged<HierarchyRpcRequestOptions>): PresentationRpcResponse<PagedResponse<Node>>;
|
|
153
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
153
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
154
154
|
getNodesDescriptor(_token: IModelRpcProps, _options: HierarchyLevelDescriptorRpcRequestOptions): PresentationRpcResponse<string | DescriptorJSON | undefined>;
|
|
155
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
155
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
156
156
|
getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]>;
|
|
157
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
157
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
158
158
|
getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]>;
|
|
159
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
159
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
160
160
|
getContentSources(_token: IModelRpcProps, _options: ContentSourcesRpcRequestOptions): PresentationRpcResponse<ContentSourcesRpcResult>;
|
|
161
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
161
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
162
162
|
getContentDescriptor(_token: IModelRpcProps, _options: ContentDescriptorRpcRequestOptions): PresentationRpcResponse<DescriptorJSON | undefined>;
|
|
163
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
163
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
164
164
|
getContentSetSize(_token: IModelRpcProps, _options: ContentRpcRequestOptions): PresentationRpcResponse<number>;
|
|
165
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
165
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
166
166
|
getPagedContent(_token: IModelRpcProps, _options: Paged<ContentRpcRequestOptions>): PresentationRpcResponse<{
|
|
167
167
|
descriptor: DescriptorJSON;
|
|
168
168
|
contentSet: PagedResponse<ItemJSON>;
|
|
169
169
|
} | undefined>;
|
|
170
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
170
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
171
171
|
getPagedContentSet(_token: IModelRpcProps, _options: Paged<ContentRpcRequestOptions>): PresentationRpcResponse<PagedResponse<ItemJSON>>;
|
|
172
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
172
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
173
173
|
getElementProperties(_token: IModelRpcProps, _options: SingleElementPropertiesRpcRequestOptions): PresentationRpcResponse<ElementProperties | undefined>;
|
|
174
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
174
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
175
175
|
getPagedDistinctValues(_token: IModelRpcProps, _options: DistinctValuesRpcRequestOptions): PresentationRpcResponse<PagedResponse<DisplayValueGroup>>;
|
|
176
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
176
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
177
177
|
getContentInstanceKeys(_token: IModelRpcProps, _options: ContentInstanceKeysRpcRequestOptions): PresentationRpcResponse<{
|
|
178
178
|
total: number;
|
|
179
179
|
items: KeySetJSON;
|
|
180
180
|
}>;
|
|
181
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
181
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
182
182
|
getDisplayLabelDefinition(_token: IModelRpcProps, _options: DisplayLabelRpcRequestOptions): PresentationRpcResponse<LabelDefinition>;
|
|
183
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
183
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
184
184
|
getPagedDisplayLabelDefinitions(_token: IModelRpcProps, _options: DisplayLabelsRpcRequestOptions): PresentationRpcResponse<PagedResponse<LabelDefinition>>;
|
|
185
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
185
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
186
186
|
getSelectionScopes(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions): PresentationRpcResponse<SelectionScope[]>;
|
|
187
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
187
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
188
188
|
computeSelection(_token: IModelRpcProps, _options: ComputeSelectionRpcRequestOptions): PresentationRpcResponse<KeySetJSON>;
|
|
189
189
|
}
|
|
190
190
|
//# sourceMappingURL=PresentationRpcInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresentationRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/PresentationRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAgB,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACv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AE5J,kBAAkB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,+BAA+B,GAAG,uBAAuB,CAAC,cAAc,EAAE,CAAC;IAI7I,yKAAyK;IAE5J,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,iCAAiC,GAAG,uBAAuB,CAAC,UAAU,CAAC;CAGxI"}
|
|
@@ -29,33 +29,33 @@ let PresentationRpcInterface = class PresentationRpcInterface extends core_commo
|
|
|
29
29
|
NOTE: Any add/remove/change to the methods below requires an update of the interface version.
|
|
30
30
|
NOTE: Please consult the README in core/common/src/rpc for the semantic versioning rules.
|
|
31
31
|
===========================================================================================*/
|
|
32
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
32
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
33
33
|
async getNodesCount(_token, _options) {
|
|
34
34
|
return this.forward(arguments);
|
|
35
35
|
}
|
|
36
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
36
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
37
37
|
async getPagedNodes(_token, _options) {
|
|
38
38
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
39
39
|
}
|
|
40
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
40
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
41
41
|
async getNodesDescriptor(_token, _options) {
|
|
42
42
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
43
43
|
}
|
|
44
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
44
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
45
45
|
// TODO: add paged version of this (#387280)
|
|
46
46
|
async getNodePaths(_token, _options) {
|
|
47
47
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
48
48
|
}
|
|
49
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
49
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
50
50
|
// TODO: add paged version of this (#387280)
|
|
51
51
|
async getFilteredNodePaths(_token, _options) {
|
|
52
52
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
53
53
|
}
|
|
54
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
54
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
55
55
|
async getContentSources(_token, _options) {
|
|
56
56
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
57
57
|
}
|
|
58
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
58
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
59
59
|
async getContentDescriptor(_token, _options) {
|
|
60
60
|
const response = await this.forward(arguments);
|
|
61
61
|
return {
|
|
@@ -63,11 +63,11 @@ let PresentationRpcInterface = class PresentationRpcInterface extends core_commo
|
|
|
63
63
|
...(response.result ? { result: JSON.parse(response.result) } : {}),
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
66
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
67
67
|
async getContentSetSize(_token, _options) {
|
|
68
68
|
return this.forward(arguments);
|
|
69
69
|
}
|
|
70
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
70
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
71
71
|
async getPagedContent(_token, _options) {
|
|
72
72
|
const rpcResponse = await this.forward(arguments);
|
|
73
73
|
return {
|
|
@@ -77,36 +77,36 @@ let PresentationRpcInterface = class PresentationRpcInterface extends core_commo
|
|
|
77
77
|
: {}),
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
80
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
81
81
|
async getPagedContentSet(_token, _options) {
|
|
82
82
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
83
83
|
}
|
|
84
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
84
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
85
85
|
async getElementProperties(_token, _options) {
|
|
86
86
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
87
87
|
}
|
|
88
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
88
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
89
89
|
async getPagedDistinctValues(_token, _options) {
|
|
90
90
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
91
91
|
}
|
|
92
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
92
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
93
93
|
async getContentInstanceKeys(_token, _options) {
|
|
94
94
|
return this.forward(arguments);
|
|
95
95
|
}
|
|
96
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
96
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
97
97
|
async getDisplayLabelDefinition(_token, _options) {
|
|
98
98
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
99
99
|
}
|
|
100
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
100
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
101
101
|
async getPagedDisplayLabelDefinitions(_token, _options) {
|
|
102
102
|
return (0, Utils_js_1.deepReplaceNullsToUndefined)(await this.forward(arguments));
|
|
103
103
|
}
|
|
104
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
104
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
105
105
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
106
106
|
async getSelectionScopes(_token, _options) {
|
|
107
107
|
return this.forward(arguments);
|
|
108
108
|
}
|
|
109
|
-
/** @deprecated in 4.10. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
109
|
+
/** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */
|
|
110
110
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
111
111
|
async computeSelection(_token, _options) {
|
|
112
112
|
return this.forward(arguments);
|
|
@@ -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,sCAA2B,EAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,4HAA4H;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AO,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,yKAAyK;IAClK,KAAK,CAAC,aAAa,CAAC,MAAsB,EAAE,QAAoC;QACrF,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,yKAAyK;IAClK,KAAK,CAAC,aAAa,CAAC,MAAsB,EAAE,QAA2C;QAC5F,OAAO,IAAA,sCAA2B,EAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,yKAAyK;IAClK,KAAK,CAAC,kBAAkB,CAC7B,MAAsB,EACtB,QAAmD;QAEnD,OAAO,IAAA,sCAA2B,EAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,yKAAyK;IACzK,4CAA4C;IACrC,KAAK,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O,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,yKAAyK;IACzK,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":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RPC\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps, RpcInterface, RpcOperation } from \"@itwin/core-common\";\r\nimport { DescriptorJSON, DescriptorOverrides, SelectClassInfoJSON } from \"./content/Descriptor.js\";\r\nimport { ItemJSON } from \"./content/Item.js\";\r\nimport { DisplayValueGroup } from \"./content/Value.js\";\r\nimport { ClientDiagnostics, ClientDiagnosticsOptions } from \"./Diagnostics.js\";\r\nimport { CompressedClassInfoJSON, InstanceKey } from \"./EC.js\";\r\nimport { ElementProperties } from \"./ElementProperties.js\";\r\nimport { PresentationStatus } from \"./Error.js\";\r\nimport { NodeKey } from \"./hierarchy/Key.js\";\r\nimport { Node } from \"./hierarchy/Node.js\";\r\nimport { NodePathElement } from \"./hierarchy/NodePathElement.js\";\r\nimport { KeySetJSON } from \"./KeySet.js\";\r\nimport { LabelDefinition } from \"./LabelDefinition.js\";\r\nimport {\r\n ComputeSelectionRequestOptions,\r\n ContentDescriptorRequestOptions,\r\n ContentInstanceKeysRequestOptions,\r\n ContentRequestOptions,\r\n ContentSourcesRequestOptions,\r\n DisplayLabelRequestOptions,\r\n DisplayLabelsRequestOptions,\r\n DistinctValuesRequestOptions,\r\n FilterByInstancePathsHierarchyRequestOptions,\r\n FilterByTextHierarchyRequestOptions,\r\n HierarchyLevelDescriptorRequestOptions,\r\n HierarchyRequestOptions,\r\n Paged,\r\n SelectionScopeRequestOptions,\r\n SingleElementPropertiesRequestOptions,\r\n} from \"./PresentationManagerOptions.js\";\r\nimport { RulesetVariableJSON } from \"./RulesetVariables.js\";\r\nimport { SelectionScope } from \"./selection/SelectionScope.js\";\r\nimport { deepReplaceNullsToUndefined, Omit, PagedResponse } from \"./Utils.js\";\r\n\r\n/**\r\n * Base options for all presentation RPC requests.\r\n * @public\r\n */\r\nexport type PresentationRpcRequestOptions<TManagerRequestOptions> = Omit<TManagerRequestOptions, \"imodel\" | \"diagnostics\"> & {\r\n /** @internal ID of the client requesting data */\r\n clientId?: string;\r\n /** RPC request diagnostics options. */\r\n diagnostics?: RpcDiagnosticsOptions;\r\n};\r\n\r\n/**\r\n * Data structure for presentation RPC responses\r\n * @public\r\n */\r\nexport interface PresentationRpcResponseData<TResult = undefined> {\r\n /** Response status code */\r\n statusCode: PresentationStatus;\r\n /** In case of an error response, the error message */\r\n errorMessage?: string;\r\n /** In case of a success response, the result */\r\n result?: TResult;\r\n /** Diagnostics response. */\r\n diagnostics?: ClientDiagnostics;\r\n}\r\n\r\n/**\r\n * Data structure for RPC diagnostics options.\r\n * @public\r\n */\r\nexport type RpcDiagnosticsOptions = Omit<ClientDiagnosticsOptions, \"handler\">;\r\n\r\n/**\r\n * A promise of [[PresentationRpcResponseData]].\r\n * @public\r\n */\r\nexport type PresentationRpcResponse<TResult = undefined> = Promise<PresentationRpcResponseData<TResult>>;\r\n\r\n/**\r\n * Data structure for hierarchy request options.\r\n * @public\r\n */\r\nexport type HierarchyRpcRequestOptions = PresentationRpcRequestOptions<HierarchyRequestOptions<never, NodeKey, RulesetVariableJSON>>;\r\n\r\n/**\r\n * Data structure for hierarchy level descriptor RPC request options.\r\n * @public\r\n */\r\nexport type HierarchyLevelDescriptorRpcRequestOptions = PresentationRpcRequestOptions<\r\n HierarchyLevelDescriptorRequestOptions<never, NodeKey, RulesetVariableJSON>\r\n>;\r\n\r\n/**\r\n * Data structure for filtering hierarchy by ECInstance paths request options.\r\n * @public\r\n */\r\nexport type FilterByInstancePathsHierarchyRpcRequestOptions = PresentationRpcRequestOptions<\r\n FilterByInstancePathsHierarchyRequestOptions<never, RulesetVariableJSON>\r\n>;\r\n\r\n/**\r\n * Data structure for filtering hierarchy by text request options.\r\n * @public\r\n */\r\nexport type FilterByTextHierarchyRpcRequestOptions = PresentationRpcRequestOptions<FilterByTextHierarchyRequestOptions<never, RulesetVariableJSON>>;\r\n\r\n/**\r\n * Data structure for content sources RPC request options.\r\n * @public\r\n */\r\nexport type ContentSourcesRpcRequestOptions = PresentationRpcRequestOptions<ContentSourcesRequestOptions<never>>;\r\n/**\r\n * Data structure for content sources RPC response.\r\n * @public\r\n */\r\nexport interface ContentSourcesRpcResult {\r\n /** A list of objects containing content source information. */\r\n sources: SelectClassInfoJSON<Id64String>[];\r\n /** An `ECClassId` => [[CompressedClassInfoJSON]] map for deserializing [[sources]]. */\r\n classesMap: { [id: string]: CompressedClassInfoJSON };\r\n}\r\n\r\n/**\r\n * Data structure for content descriptor RPC request options.\r\n * @public\r\n */\r\nexport type ContentDescriptorRpcRequestOptions = PresentationRpcRequestOptions<ContentDescriptorRequestOptions<never, KeySetJSON, RulesetVariableJSON>>;\r\n\r\n/**\r\n * Data structure for content RPC request options.\r\n * @public\r\n */\r\nexport type ContentRpcRequestOptions = PresentationRpcRequestOptions<ContentRequestOptions<never, DescriptorOverrides, KeySetJSON, RulesetVariableJSON>>;\r\n\r\n/**\r\n * Data structure for single element properties RPC request options.\r\n * @public\r\n */\r\nexport type SingleElementPropertiesRpcRequestOptions = PresentationRpcRequestOptions<\r\n Omit<SingleElementPropertiesRequestOptions<never, never>, \"contentParser\">\r\n>;\r\n\r\n/**\r\n * Data structure for distinct values' request options.\r\n * @public\r\n */\r\nexport type DistinctValuesRpcRequestOptions = PresentationRpcRequestOptions<\r\n DistinctValuesRequestOptions<never, DescriptorOverrides, KeySetJSON, RulesetVariableJSON>\r\n>;\r\n\r\n/**\r\n * Data structure for content instance keys' request options.\r\n * @public\r\n */\r\nexport type ContentInstanceKeysRpcRequestOptions = PresentationRpcRequestOptions<ContentInstanceKeysRequestOptions<never, KeySetJSON, RulesetVariableJSON>>;\r\n\r\n/**\r\n * Data structure for label request options.\r\n * @public\r\n */\r\nexport type DisplayLabelRpcRequestOptions = PresentationRpcRequestOptions<DisplayLabelRequestOptions<never, InstanceKey>>;\r\n\r\n/**\r\n * Data structure for labels request options.\r\n * @public\r\n */\r\nexport type DisplayLabelsRpcRequestOptions = PresentationRpcRequestOptions<DisplayLabelsRequestOptions<never, InstanceKey>>;\r\n\r\n/**\r\n * Data structure for selection scope request options.\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport type SelectionScopeRpcRequestOptions = PresentationRpcRequestOptions<SelectionScopeRequestOptions<never>>;\r\n\r\n/**\r\n * Request options data structure for computing selection based on given selection scope and element IDs.\r\n * @public\r\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `computeSelection` from [@itwin/unified-selection](https://github.com/iTwin/presentation/blob/master/packages/unified-selection/README.md#selection-scopes) package instead.\r\n */\r\nexport type ComputeSelectionRpcRequestOptions = PresentationRpcRequestOptions<ComputeSelectionRequestOptions<never>>;\r\n\r\n/**\r\n * Interface used for communication between Presentation backend and frontend.\r\n * @public\r\n */\r\n@RpcOperation.setDefaultPolicy({ retryInterval: () => 0 })\r\nexport class PresentationRpcInterface extends RpcInterface {\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"PresentationRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"5.0.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in core/common/src/rpc for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getNodesCount(_token: IModelRpcProps, _options: HierarchyRpcRequestOptions): PresentationRpcResponse<number> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getPagedNodes(_token: IModelRpcProps, _options: Paged<HierarchyRpcRequestOptions>): PresentationRpcResponse<PagedResponse<Node>> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getNodesDescriptor(\r\n _token: IModelRpcProps,\r\n _options: HierarchyLevelDescriptorRpcRequestOptions,\r\n ): PresentationRpcResponse<string | DescriptorJSON | undefined> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n // TODO: add paged version of this (#387280)\r\n public async getNodePaths(_token: IModelRpcProps, _options: FilterByInstancePathsHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n // TODO: add paged version of this (#387280)\r\n public async getFilteredNodePaths(_token: IModelRpcProps, _options: FilterByTextHierarchyRpcRequestOptions): PresentationRpcResponse<NodePathElement[]> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getContentSources(_token: IModelRpcProps, _options: ContentSourcesRpcRequestOptions): PresentationRpcResponse<ContentSourcesRpcResult> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getContentDescriptor(_token: IModelRpcProps, _options: ContentDescriptorRpcRequestOptions): PresentationRpcResponse<DescriptorJSON | undefined> {\r\n const response: PresentationRpcResponseData<string | undefined> = await this.forward(arguments);\r\n return {\r\n ...response,\r\n ...(response.result ? { result: JSON.parse(response.result) } : {}),\r\n };\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getContentSetSize(_token: IModelRpcProps, _options: ContentRpcRequestOptions): PresentationRpcResponse<number> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getPagedContent(\r\n _token: IModelRpcProps,\r\n _options: Paged<ContentRpcRequestOptions>,\r\n ): PresentationRpcResponse<{ descriptor: DescriptorJSON; contentSet: PagedResponse<ItemJSON> } | undefined> {\r\n const rpcResponse = await this.forward(arguments);\r\n return {\r\n ...rpcResponse,\r\n ...(rpcResponse.result\r\n ? /* c8 ignore next */ { result: { ...rpcResponse.result, contentSet: deepReplaceNullsToUndefined(rpcResponse.result.contentSet) } }\r\n : {}),\r\n };\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getPagedContentSet(_token: IModelRpcProps, _options: Paged<ContentRpcRequestOptions>): PresentationRpcResponse<PagedResponse<ItemJSON>> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getElementProperties(\r\n _token: IModelRpcProps,\r\n _options: SingleElementPropertiesRpcRequestOptions,\r\n ): PresentationRpcResponse<ElementProperties | undefined> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getPagedDistinctValues(\r\n _token: IModelRpcProps,\r\n _options: DistinctValuesRpcRequestOptions,\r\n ): PresentationRpcResponse<PagedResponse<DisplayValueGroup>> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getContentInstanceKeys(\r\n _token: IModelRpcProps,\r\n _options: ContentInstanceKeysRpcRequestOptions,\r\n ): PresentationRpcResponse<{ total: number; items: KeySetJSON }> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getDisplayLabelDefinition(_token: IModelRpcProps, _options: DisplayLabelRpcRequestOptions): PresentationRpcResponse<LabelDefinition> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n public async getPagedDisplayLabelDefinitions(\r\n _token: IModelRpcProps,\r\n _options: DisplayLabelsRpcRequestOptions,\r\n ): PresentationRpcResponse<PagedResponse<LabelDefinition>> {\r\n return deepReplaceNullsToUndefined(await this.forward(arguments));\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public async getSelectionScopes(_token: IModelRpcProps, _options: SelectionScopeRpcRequestOptions): PresentationRpcResponse<SelectionScope[]> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @deprecated in 4.10 - will not be removed until after 2026-06-13. Use [PresentationManager]($presentation-frontend) instead of calling the RPC interface directly. */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public async computeSelection(_token: IModelRpcProps, _options: ComputeSelectionRpcRequestOptions): PresentationRpcResponse<KeySetJSON> {\r\n return this.forward(arguments);\r\n }\r\n}\r\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 - will not be removed until after 2026-06-13. 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;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,UAAU,EAAE,OAAO;IAC3D,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,YAAY,CAAuC;IAE3D,kCAAkC;gBACf,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI;IAMhH,kCAAkC;IAC3B,CAAC,MAAM,CAAC,OAAO,CAAC;IAIvB,
|
|
1
|
+
{"version":3,"file":"RegisteredRuleset.d.ts","sourceRoot":"","sources":["../../../src/presentation-common/RegisteredRuleset.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,UAAU,EAAE,OAAO;IAC3D,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,iBAAiB,CAAS;IAClC,OAAO,CAAC,YAAY,CAAuC;IAE3D,kCAAkC;gBACf,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI;IAMhH,kCAAkC;IAC3B,CAAC,MAAM,CAAC,OAAO,CAAC;IAIvB,qGAAqG;IAE9F,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 - will not be removed until after 2026-06-13. 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,
|
|
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,qGAAqG;IACrG,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":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Core\r\n */\r\n\r\nimport { Rule } from \"./rules/Rule.js\";\r\nimport { Ruleset, SupplementationInfo } from \"./rules/Ruleset.js\";\r\nimport { VariablesGroup } from \"./rules/Variables.js\";\r\n\r\n/**\r\n * A ruleset that is registered in a ruleset manager.\r\n * @public\r\n */\r\nexport class RegisteredRuleset implements Disposable, Ruleset {\r\n private _ruleset: Ruleset;\r\n private _uniqueIdentifier: string;\r\n private _disposeFunc: (ruleset: RegisteredRuleset) => void;\r\n\r\n /** Create a registered ruleset */\r\n public constructor(ruleset: Ruleset, uniqueIdentifier: string, disposeFunc: (ruleset: RegisteredRuleset) => void) {\r\n this._disposeFunc = disposeFunc;\r\n this._ruleset = ruleset;\r\n this._uniqueIdentifier = uniqueIdentifier;\r\n }\r\n\r\n /** Dispose registered ruleset. */\r\n public [Symbol.dispose]() {\r\n this._disposeFunc(this);\r\n }\r\n\r\n /** @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [Symbol.dispose] instead. */\r\n /* c8 ignore next 3 */\r\n public dispose() {\r\n this[Symbol.dispose]();\r\n }\r\n\r\n public get uniqueIdentifier() {\r\n return this._uniqueIdentifier;\r\n }\r\n public get id(): string {\r\n return this._ruleset.id;\r\n }\r\n public get supplementationInfo(): SupplementationInfo | undefined {\r\n return this._ruleset.supplementationInfo;\r\n }\r\n public get rules(): Rule[] {\r\n return this._ruleset.rules;\r\n }\r\n public get vars(): VariablesGroup[] | undefined {\r\n return this._ruleset.vars;\r\n }\r\n public toJSON(): Ruleset {\r\n return this._ruleset;\r\n }\r\n}\r\n"]}
|