@itwin/presentation-common 5.1.0-dev.9 → 5.1.1
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 +96 -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":"Descriptor.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Descriptor.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AACzD,oCASkB;AAGlB,0CAA4C;AAC5C,+CAA6E;AAC7E,2CAAsG;AAuCtG,cAAc;AACd,IAAiB,eAAe,CA2D/B;AA3DD,WAAiB,eAAe;IAC9B,2DAA2D;IAC3D,SAAgB,kBAAkB,CAAC,IAAiC,EAAE,UAAqD;QACzH,IAAA,qBAAM,EAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QACxD,OAAO;YACL,eAAe,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,eAAe,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;YAClF,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,GAAG,CAAC,IAAI,CAAC,yBAAyB;gBAChC,CAAC,CAAC,EAAE,yBAAyB,EAAE,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,wBAAgB,CAAC,kBAAkB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,EAAE;gBACpI,CAAC,CAAC,SAAS,CAAC;YACd,GAAG,CAAC,IAAI,CAAC,oBAAoB;gBAC3B,CAAC,CAAC,EAAE,o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AS,EAAE,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,EAAE,CAAC;QAClI,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA1KD,gCA0KC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\nimport { assert, Id64String } from \"@itwin/core-bentley\";\nimport {\n ClassInfo,\n CompressedClassInfoJSON,\n RelatedClassInfo,\n RelatedClassInfoJSON,\n RelatedClassInfoWithOptionalRelationship,\n RelatedClassInfoWithOptionalRelationshipJSON,\n RelationshipPath,\n RelationshipPathJSON,\n} from \"../EC.js\";\nimport { InstanceFilterDefinition } from \"../InstanceFilterDefinition.js\";\nimport { Ruleset } from \"../rules/Ruleset.js\";\nimport { omitUndefined } from \"../Utils.js\";\nimport { CategoryDescription, CategoryDescriptionJSON } from \"./Category.js\";\nimport { Field, FieldDescriptor, FieldJSON, getFieldByDescriptor, getFieldByName } from \"./Fields.js\";\n\n/**\n * Data structure that describes an ECClass in content [[Descriptor]].\n * @public\n */\nexport interface SelectClassInfo {\n /** Information about the ECClass */\n selectClassInfo: ClassInfo;\n\n /** Is the class handled polymorphically */\n isSelectPolymorphic: boolean;\n\n /** Relationship path from input class to the select class. */\n pathFromInputToSelectClass?: RelatedClassInfoWithOptionalRelationship[];\n\n /** Relationship paths to [related property]($docs/presentation/content/Terminology#related-properties) classes */\n relatedPropertyPaths?: RelationshipPath[];\n\n /** Relationship paths to navigation property classes */\n navigationPropertyClasses?: RelatedClassInfo[];\n\n /** Relationship paths to [related instance]($docs/presentation/content/Terminology#related-instance) classes. */\n relatedInstancePaths?: RelationshipPath[];\n}\n\n/**\n * Serialized [[SelectClassInfo]] JSON representation\n * @public\n */\nexport interface SelectClassInfoJSON<TClassInfoJSON = ClassInfo> {\n selectClassInfo: TClassInfoJSON;\n isSelectPolymorphic: boolean;\n pathFromInputToSelectClass?: RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON>[];\n relatedPropertyPaths?: RelationshipPathJSON<TClassInfoJSON>[];\n navigationPropertyClasses?: RelatedClassInfoJSON<TClassInfoJSON>[];\n relatedInstancePaths?: RelationshipPathJSON<TClassInfoJSON>[];\n}\n\n/** @public */\nexport namespace SelectClassInfo {\n /** Deserialize [[SelectClassInfo]] from compressed JSON */\n export function fromCompressedJSON(json: SelectClassInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): SelectClassInfo {\n assert(classesMap.hasOwnProperty(json.selectClassInfo));\n return {\n selectClassInfo: { id: json.selectClassInfo, ...classesMap[json.selectClassInfo] },\n isSelectPolymorphic: json.isSelectPolymorphic,\n ...(json.navigationPropertyClasses\n ? { navigationPropertyClasses: json.navigationPropertyClasses.map((item) => RelatedClassInfo.fromCompressedJSON(item, classesMap)) }\n : undefined),\n ...(json.relatedInstancePaths\n ? { relatedInstancePaths: json.relatedInstancePaths.map((rip) => rip.map((item) => RelatedClassInfo.fromCompressedJSON(item, classesMap))) }\n : undefined),\n ...(json.pathFromInputToSelectClass\n ? {\n pathFromInputToSelectClass: json.pathFromInputToSelectClass.map((item) =>\n RelatedClassInfoWithOptionalRelationship.fromCompressedJSON(item, classesMap),\n ),\n }\n : undefined),\n ...(json.relatedPropertyPaths\n ? { relatedPropertyPaths: json.relatedPropertyPaths.map((path) => path.map((item) => RelatedClassInfo.fromCompressedJSON(item, classesMap))) }\n : undefined),\n };\n }\n\n /** Serialize [[SelectClassInfo]] to compressed JSON */\n export function toCompressedJSON(selectClass: SelectClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): SelectClassInfoJSON<string> {\n const { id, ...leftOverClassInfo } = selectClass.selectClassInfo;\n classesMap[id] = leftOverClassInfo;\n return {\n selectClassInfo: id,\n isSelectPolymorphic: selectClass.isSelectPolymorphic,\n ...(selectClass.relatedInstancePaths\n ? { relatedInstancePaths: selectClass.relatedInstancePaths.map((rip) => rip.map((item) => RelatedClassInfo.toCompressedJSON(item, classesMap))) }\n : undefined),\n ...(selectClass.navigationPropertyClasses\n ? {\n navigationPropertyClasses: selectClass.navigationPropertyClasses.map((propertyClass) =>\n RelatedClassInfo.toCompressedJSON(propertyClass, classesMap),\n ),\n }\n : undefined),\n ...(selectClass.pathFromInputToSelectClass\n ? {\n pathFromInputToSelectClass: selectClass.pathFromInputToSelectClass.map((item) =>\n RelatedClassInfoWithOptionalRelationship.toCompressedJSON(item, classesMap),\n ),\n }\n : undefined),\n ...(selectClass.relatedPropertyPaths\n ? {\n relatedPropertyPaths: selectClass.relatedPropertyPaths.map((path) =>\n path.map((relatedClass) => RelatedClassInfo.toCompressedJSON(relatedClass, classesMap)),\n ),\n }\n : undefined),\n };\n }\n}\n\n/**\n * Flags that control content format.\n * @public\n */\nexport enum ContentFlags {\n /** Each content record only has [[InstanceKey]] and no data */\n KeysOnly = 1 << 0,\n\n /** Each content record additionally has a display label */\n ShowLabels = 1 << 2,\n\n /** All content records are merged into a single record (see [Merging values]($docs/presentation/content/terminology#value-merging)) */\n MergeResults = 1 << 3,\n\n /** Content has only distinct values */\n DistinctValues = 1 << 4,\n\n /** Doesn't create property or calculated fields. Can be used in conjunction with [[ShowLabels]]. */\n NoFields = 1 << 5,\n\n /**\n * Set related input keys on [[Item]] objects when creating content. This helps identify which [[Item]] is associated to which\n * given input key at the cost of performance creating those items.\n */\n IncludeInputKeys = 1 << 8,\n}\n\n/**\n * Data sorting direction\n * @public\n */\nexport enum SortDirection {\n Ascending,\n Descending,\n}\n\n/**\n * Data structure that contains selection information. Used\n * for cases when requesting content after a selection change.\n *\n * @public\n */\nexport interface SelectionInfo {\n /** Name of selection provider which cause the selection change */\n providerName: string;\n /** Level of selection that changed */\n level?: number;\n}\n\n/**\n * Serialized [[Descriptor]] JSON representation.\n * @public\n */\nexport interface DescriptorJSON {\n classesMap: { [id: string]: CompressedClassInfoJSON };\n connectionId: string;\n inputKeysHash: string;\n selectionInfo?: SelectionInfo;\n displayType: string;\n selectClasses: SelectClassInfoJSON<Id64String>[];\n categories: CategoryDescriptionJSON[];\n fields: FieldJSON<Id64String>[];\n sortingFieldName?: string;\n sortDirection?: SortDirection;\n contentFlags: number;\n fieldsFilterExpression?: string;\n instanceFilter?: InstanceFilterDefinition;\n ruleset?: Ruleset;\n}\n\n/**\n * Descriptor overrides that can be used to customize content\n * @public\n */\nexport interface DescriptorOverrides {\n /**\n * Content display type. Can be accessed in presentation rules and used\n * to modify content in various ways. Defaults to empty string.\n */\n displayType?: string;\n\n /** Content flags used for content customization. See [[ContentFlags]] */\n contentFlags?: number;\n\n /** Fields selector that allows excluding or including only specified fields. */\n fieldsSelector?: {\n /** Should the specified fields be included or excluded */\n type: \"include\" | \"exclude\";\n /** A list of field descriptors that identify fields to include / exclude */\n fields: FieldDescriptor[];\n };\n\n /** Specification for sorting data. */\n sorting?: {\n /** Identifier of the field to use for sorting */\n field: FieldDescriptor;\n /** Sort direction */\n direction: SortDirection;\n };\n\n /**\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering content by\n * select fields.\n *\n * This is different from [[instanceFilter]] as filtering is applied on the union of all selects,\n * which removes access to content instance property values. Instead of referencing properties\n * through `this.PropertyName` alias, the expression should reference them by field names. In cases\n * when properties field merges multiple properties, this allows applying the filter on all of them\n * at once. This is useful for filtering table rows by column value, when content is displayed in\n * table format.\n */\n fieldsFilterExpression?: string;\n /**\n * Instances filter that allows filtering content by class, properties of specific class\n * or properties of instances related to the content instance.\n *\n * This is different from [[fieldsFilterExpression]] as filter is applied at a lower level - on\n * specific select class rather than a union of multiple select classes. This means the filter has\n * access to properties of that class and they can be referenced using symbols like `this.Property`.\n * This is useful for filtering instances of specific class.\n */\n instanceFilter?: InstanceFilterDefinition;\n}\n\n/**\n * Descriptor properties\n * @public\n */\nexport interface DescriptorSource {\n /** Id of the connection used to create the descriptor */\n readonly connectionId?: string;\n /** Hash of the input keys used to create the descriptor */\n readonly inputKeysHash?: string;\n /** Selection info used to create the descriptor */\n readonly selectionInfo?: SelectionInfo;\n /** Display type used to create the descriptor */\n readonly displayType: string;\n /** A list of classes that will be selected from when creating content with this descriptor */\n readonly selectClasses: SelectClassInfo[];\n /** A list of content field categories used in this descriptor */\n readonly categories: CategoryDescription[];\n /** A list of fields contained in the descriptor */\n readonly fields: Field[];\n /** [[ContentFlags]] used to create the descriptor */\n readonly contentFlags: number;\n /** Field used to sort the content */\n readonly sortingField?: Field;\n /** Sorting direction */\n readonly sortDirection?: SortDirection;\n /**\n * A ruleset used to create this descriptor.\n * Only set if descriptor is created using a ruleset different from the input ruleset, e.g. when creating a hierarchy level descriptor.\n */\n readonly ruleset?: Ruleset;\n /**\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering content by\n * select fields.\n *\n * This is different from [[instanceFilter]] as filtering is applied on the union of all selects,\n * which removes access to content instance property values. Instead of referencing properties\n * through `this.PropertyName` alias, the expression should reference them by field names. In cases\n * when properties field merges multiple properties, this allows applying the filter on all of them\n * at once. This is useful for filtering table rows by column value, when content is displayed in\n * table format.\n */\n fieldsFilterExpression?: string;\n /**\n * Instances filter that allows filtering content by class, properties of specific class\n * or properties of instances related to the content instance.\n *\n * This is different from [[fieldsFilterExpression]] as filter is applied at a lower level - on\n * specific select class rather than a union of multiple select classes. This means the filter has\n * access to properties of that class and they can be referenced using symbols like `this.Property`.\n * This is useful for filtering instances of specific class.\n */\n instanceFilter?: InstanceFilterDefinition;\n}\n\n/**\n * Data structure that describes content: fields, sorting, filtering, format, etc.\n * Descriptor may be changed to control how content is created.\n *\n * @public\n */\nexport class Descriptor implements DescriptorSource {\n /** Id of the connection used to create the descriptor */\n public readonly connectionId?: string;\n /** Hash of the input keys used to create the descriptor */\n public readonly inputKeysHash?: string;\n /** Selection info used to create the descriptor */\n public readonly selectionInfo?: SelectionInfo;\n /** Display type used to create the descriptor */\n public readonly displayType: string;\n /** A list of classes that will be selected when creating content with this descriptor */\n public readonly selectClasses: SelectClassInfo[];\n /** A list of content field categories used in this descriptor */\n public readonly categories: CategoryDescription[];\n /** A list of fields contained in the descriptor */\n public readonly fields: Field[];\n /** [[ContentFlags]] used to create the descriptor */\n public readonly contentFlags: number;\n /**\n * A ruleset used to create this descriptor.\n * Only set if descriptor is created using a ruleset different from the input ruleset, e.g. when creating a hierarchy level descriptor.\n */\n public readonly ruleset?: Ruleset;\n /** Field used to sort the content */\n public sortingField?: Field;\n /** Sorting direction */\n public sortDirection?: SortDirection;\n /**\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering content by\n * select fields.\n *\n * This is different from [[instanceFilter]] as filtering is applied on the union of all selects,\n * which removes access to content instance property values. Instead of referencing properties\n * through `this.PropertyName` alias, the expression should reference them by field names. In cases\n * when properties field merges multiple properties, this allows applying the filter on all of them\n * at once. This is useful for filtering table rows by column value, when content is displayed in\n * table format.\n */\n public fieldsFilterExpression?: string;\n /**\n * Instances filter that allows filtering content by class, properties of specific class\n * or properties of instances related to the content instance.\n *\n * This is different from [[fieldsFilterExpression]] as filter is applied at a lower level - on\n * specific select class rather than a union of multiple select classes. This means the filter has\n * access to properties of that class and they can be referenced using symbols like `this.Property`.\n * This is useful for filtering instances of specific class.\n */\n public instanceFilter?: InstanceFilterDefinition;\n\n /** Construct a new Descriptor using a [[DescriptorSource]] */\n public constructor(source: DescriptorSource) {\n this.connectionId = source.connectionId;\n this.inputKeysHash = source.inputKeysHash;\n this.selectionInfo = source.selectionInfo;\n this.displayType = source.displayType;\n this.contentFlags = source.contentFlags;\n this.selectClasses = [...source.selectClasses];\n this.categories = [...source.categories];\n this.fields = [...source.fields];\n this.sortingField = source.sortingField;\n this.sortDirection = source.sortDirection;\n this.fieldsFilterExpression = source.fieldsFilterExpression;\n this.instanceFilter = source.instanceFilter;\n this.ruleset = source.ruleset;\n }\n\n /** Serialize [[Descriptor]] to JSON */\n public toJSON(): DescriptorJSON {\n const classesMap: { [id: string]: CompressedClassInfoJSON } = {};\n const selectClasses: SelectClassInfoJSON<string>[] = this.selectClasses.map((selectClass) => SelectClassInfo.toCompressedJSON(selectClass, classesMap));\n const fields: FieldJSON<string>[] = this.fields.map((field) => field.toCompressedJSON(classesMap));\n return omitUndefined({\n displayType: this.displayType,\n contentFlags: this.contentFlags,\n categories: this.categories.map(CategoryDescription.toJSON),\n fields,\n selectClasses,\n classesMap,\n connectionId: this.connectionId ?? \"\",\n inputKeysHash: this.inputKeysHash ?? \"\",\n sortingFieldName: this.sortingField?.name,\n sortDirection: this.sortDirection,\n fieldsFilterExpression: this.fieldsFilterExpression,\n instanceFilter: this.instanceFilter,\n selectionInfo: this.selectionInfo,\n ruleset: this.ruleset,\n });\n }\n\n /** Deserialize [[Descriptor]] from JSON */\n public static fromJSON(json: DescriptorJSON | undefined): Descriptor | undefined {\n if (!json) {\n return undefined;\n }\n\n const {\n categories: jsonCategories,\n selectClasses: jsonSelectClasses,\n fields: jsonFields,\n connectionId,\n inputKeysHash,\n classesMap,\n sortingFieldName,\n ...leftOverJson\n } = json;\n const categories = CategoryDescription.listFromJSON(jsonCategories);\n const selectClasses = jsonSelectClasses.map((jsc) => SelectClassInfo.fromCompressedJSON(jsc, classesMap));\n const fields = this.getFieldsFromJSON(jsonFields, (fieldJson) => Field.fromCompressedJSON(fieldJson, classesMap, categories));\n return new Descriptor({\n ...leftOverJson,\n ...(connectionId ? /* c8 ignore next */ { connectionId } : undefined),\n ...(inputKeysHash ? /* c8 ignore next */ { inputKeysHash } : undefined),\n selectClasses,\n categories,\n fields,\n sortingField: getFieldByName(fields, sortingFieldName, true),\n });\n }\n\n private static getFieldsFromJSON(json: FieldJSON[], factory: (json: FieldJSON) => Field | undefined): Field[] {\n return json\n .map((fieldJson: FieldJSON) => {\n const field = factory(fieldJson);\n if (field) {\n field.rebuildParentship();\n }\n return field;\n })\n .filter((field): field is Field => !!field);\n }\n\n /**\n * Get field by its name\n * @param name Name of the field to find\n * @param recurse Recurse into nested fields\n */\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\n return getFieldByName(this.fields, name, recurse);\n }\n\n /**\n * Get field by its descriptor.\n */\n public getFieldByDescriptor(fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined {\n return getFieldByDescriptor(this.fields, fieldDescriptor, recurse);\n }\n\n /**\n * Create descriptor overrides object from this descriptor.\n * @public\n */\n public createDescriptorOverrides(): DescriptorOverrides {\n const overrides: DescriptorOverrides = {};\n if (this.displayType) {\n overrides.displayType = this.displayType;\n }\n if (this.contentFlags !== 0) {\n overrides.contentFlags = this.contentFlags;\n }\n if (this.fieldsFilterExpression) {\n overrides.fieldsFilterExpression = this.fieldsFilterExpression;\n }\n if (this.instanceFilter) {\n overrides.instanceFilter = this.instanceFilter;\n }\n if (this.sortingField) {\n overrides.sorting = { field: this.sortingField.getFieldDescriptor(), direction: this.sortDirection ?? SortDirection.Ascending };\n }\n return overrides;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Descriptor.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Descriptor.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH,sDAAyD;AACzD,oCASkB;AAGlB,0CAA4C;AAC5C,+CAA6E;AAC7E,2CAAsG;AAuCtG,cAAc;AACd,IAAiB,eAAe,CA2D/B;AA3DD,WAAiB,eAAe;IAC9B,2DAA2D;IAC3D,SAAgB,kBAAkB,CAAC,IAAiC,EAAE,UAAqD;QACzH,IAAA,qBAAM,EAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QACxD,OAAO;YACL,eAAe,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,eAAe,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE;YAClF,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,GAAG,CAAC,IAAI,CAAC,yBAAyB;gBAChC,CAAC,CAAC,EAAE,yBAAyB,EAAE,IAAI,CAAC,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Ac,EAAE,CAAC;YACxB,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QACjD,CAAC;QACD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,SAAS,CAAC,OAAO,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,EAAE,CAAC;QAClI,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA1KD,gCA0KC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\nimport { assert, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n ClassInfo,\r\n CompressedClassInfoJSON,\r\n RelatedClassInfo,\r\n RelatedClassInfoJSON,\r\n RelatedClassInfoWithOptionalRelationship,\r\n RelatedClassInfoWithOptionalRelationshipJSON,\r\n RelationshipPath,\r\n RelationshipPathJSON,\r\n} from \"../EC.js\";\r\nimport { InstanceFilterDefinition } from \"../InstanceFilterDefinition.js\";\r\nimport { Ruleset } from \"../rules/Ruleset.js\";\r\nimport { omitUndefined } from \"../Utils.js\";\r\nimport { CategoryDescription, CategoryDescriptionJSON } from \"./Category.js\";\r\nimport { Field, FieldDescriptor, FieldJSON, getFieldByDescriptor, getFieldByName } from \"./Fields.js\";\r\n\r\n/**\r\n * Data structure that describes an ECClass in content [[Descriptor]].\r\n * @public\r\n */\r\nexport interface SelectClassInfo {\r\n /** Information about the ECClass */\r\n selectClassInfo: ClassInfo;\r\n\r\n /** Is the class handled polymorphically */\r\n isSelectPolymorphic: boolean;\r\n\r\n /** Relationship path from input class to the select class. */\r\n pathFromInputToSelectClass?: RelatedClassInfoWithOptionalRelationship[];\r\n\r\n /** Relationship paths to [related property]($docs/presentation/content/Terminology#related-properties) classes */\r\n relatedPropertyPaths?: RelationshipPath[];\r\n\r\n /** Relationship paths to navigation property classes */\r\n navigationPropertyClasses?: RelatedClassInfo[];\r\n\r\n /** Relationship paths to [related instance]($docs/presentation/content/Terminology#related-instance) classes. */\r\n relatedInstancePaths?: RelationshipPath[];\r\n}\r\n\r\n/**\r\n * Serialized [[SelectClassInfo]] JSON representation\r\n * @public\r\n */\r\nexport interface SelectClassInfoJSON<TClassInfoJSON = ClassInfo> {\r\n selectClassInfo: TClassInfoJSON;\r\n isSelectPolymorphic: boolean;\r\n pathFromInputToSelectClass?: RelatedClassInfoWithOptionalRelationshipJSON<TClassInfoJSON>[];\r\n relatedPropertyPaths?: RelationshipPathJSON<TClassInfoJSON>[];\r\n navigationPropertyClasses?: RelatedClassInfoJSON<TClassInfoJSON>[];\r\n relatedInstancePaths?: RelationshipPathJSON<TClassInfoJSON>[];\r\n}\r\n\r\n/** @public */\r\nexport namespace SelectClassInfo {\r\n /** Deserialize [[SelectClassInfo]] from compressed JSON */\r\n export function fromCompressedJSON(json: SelectClassInfoJSON<string>, classesMap: { [id: string]: CompressedClassInfoJSON }): SelectClassInfo {\r\n assert(classesMap.hasOwnProperty(json.selectClassInfo));\r\n return {\r\n selectClassInfo: { id: json.selectClassInfo, ...classesMap[json.selectClassInfo] },\r\n isSelectPolymorphic: json.isSelectPolymorphic,\r\n ...(json.navigationPropertyClasses\r\n ? { navigationPropertyClasses: json.navigationPropertyClasses.map((item) => RelatedClassInfo.fromCompressedJSON(item, classesMap)) }\r\n : undefined),\r\n ...(json.relatedInstancePaths\r\n ? { relatedInstancePaths: json.relatedInstancePaths.map((rip) => rip.map((item) => RelatedClassInfo.fromCompressedJSON(item, classesMap))) }\r\n : undefined),\r\n ...(json.pathFromInputToSelectClass\r\n ? {\r\n pathFromInputToSelectClass: json.pathFromInputToSelectClass.map((item) =>\r\n RelatedClassInfoWithOptionalRelationship.fromCompressedJSON(item, classesMap),\r\n ),\r\n }\r\n : undefined),\r\n ...(json.relatedPropertyPaths\r\n ? { relatedPropertyPaths: json.relatedPropertyPaths.map((path) => path.map((item) => RelatedClassInfo.fromCompressedJSON(item, classesMap))) }\r\n : undefined),\r\n };\r\n }\r\n\r\n /** Serialize [[SelectClassInfo]] to compressed JSON */\r\n export function toCompressedJSON(selectClass: SelectClassInfo, classesMap: { [id: string]: CompressedClassInfoJSON }): SelectClassInfoJSON<string> {\r\n const { id, ...leftOverClassInfo } = selectClass.selectClassInfo;\r\n classesMap[id] = leftOverClassInfo;\r\n return {\r\n selectClassInfo: id,\r\n isSelectPolymorphic: selectClass.isSelectPolymorphic,\r\n ...(selectClass.relatedInstancePaths\r\n ? { relatedInstancePaths: selectClass.relatedInstancePaths.map((rip) => rip.map((item) => RelatedClassInfo.toCompressedJSON(item, classesMap))) }\r\n : undefined),\r\n ...(selectClass.navigationPropertyClasses\r\n ? {\r\n navigationPropertyClasses: selectClass.navigationPropertyClasses.map((propertyClass) =>\r\n RelatedClassInfo.toCompressedJSON(propertyClass, classesMap),\r\n ),\r\n }\r\n : undefined),\r\n ...(selectClass.pathFromInputToSelectClass\r\n ? {\r\n pathFromInputToSelectClass: selectClass.pathFromInputToSelectClass.map((item) =>\r\n RelatedClassInfoWithOptionalRelationship.toCompressedJSON(item, classesMap),\r\n ),\r\n }\r\n : undefined),\r\n ...(selectClass.relatedPropertyPaths\r\n ? {\r\n relatedPropertyPaths: selectClass.relatedPropertyPaths.map((path) =>\r\n path.map((relatedClass) => RelatedClassInfo.toCompressedJSON(relatedClass, classesMap)),\r\n ),\r\n }\r\n : undefined),\r\n };\r\n }\r\n}\r\n\r\n/**\r\n * Flags that control content format.\r\n * @public\r\n */\r\nexport enum ContentFlags {\r\n /** Each content record only has [[InstanceKey]] and no data */\r\n KeysOnly = 1 << 0,\r\n\r\n /** Each content record additionally has a display label */\r\n ShowLabels = 1 << 2,\r\n\r\n /** All content records are merged into a single record (see [Merging values]($docs/presentation/content/terminology#value-merging)) */\r\n MergeResults = 1 << 3,\r\n\r\n /** Content has only distinct values */\r\n DistinctValues = 1 << 4,\r\n\r\n /** Doesn't create property or calculated fields. Can be used in conjunction with [[ShowLabels]]. */\r\n NoFields = 1 << 5,\r\n\r\n /**\r\n * Set related input keys on [[Item]] objects when creating content. This helps identify which [[Item]] is associated to which\r\n * given input key at the cost of performance creating those items.\r\n */\r\n IncludeInputKeys = 1 << 8,\r\n}\r\n\r\n/**\r\n * Data sorting direction\r\n * @public\r\n */\r\nexport enum SortDirection {\r\n Ascending,\r\n Descending,\r\n}\r\n\r\n/**\r\n * Data structure that contains selection information. Used\r\n * for cases when requesting content after a selection change.\r\n *\r\n * @public\r\n */\r\nexport interface SelectionInfo {\r\n /** Name of selection provider which cause the selection change */\r\n providerName: string;\r\n /** Level of selection that changed */\r\n level?: number;\r\n}\r\n\r\n/**\r\n * Serialized [[Descriptor]] JSON representation.\r\n * @public\r\n */\r\nexport interface DescriptorJSON {\r\n classesMap: { [id: string]: CompressedClassInfoJSON };\r\n connectionId: string;\r\n inputKeysHash: string;\r\n selectionInfo?: SelectionInfo;\r\n displayType: string;\r\n selectClasses: SelectClassInfoJSON<Id64String>[];\r\n categories: CategoryDescriptionJSON[];\r\n fields: FieldJSON<Id64String>[];\r\n sortingFieldName?: string;\r\n sortDirection?: SortDirection;\r\n contentFlags: number;\r\n fieldsFilterExpression?: string;\r\n instanceFilter?: InstanceFilterDefinition;\r\n ruleset?: Ruleset;\r\n}\r\n\r\n/**\r\n * Descriptor overrides that can be used to customize content\r\n * @public\r\n */\r\nexport interface DescriptorOverrides {\r\n /**\r\n * Content display type. Can be accessed in presentation rules and used\r\n * to modify content in various ways. Defaults to empty string.\r\n */\r\n displayType?: string;\r\n\r\n /** Content flags used for content customization. See [[ContentFlags]] */\r\n contentFlags?: number;\r\n\r\n /** Fields selector that allows excluding or including only specified fields. */\r\n fieldsSelector?: {\r\n /** Should the specified fields be included or excluded */\r\n type: \"include\" | \"exclude\";\r\n /** A list of field descriptors that identify fields to include / exclude */\r\n fields: FieldDescriptor[];\r\n };\r\n\r\n /** Specification for sorting data. */\r\n sorting?: {\r\n /** Identifier of the field to use for sorting */\r\n field: FieldDescriptor;\r\n /** Sort direction */\r\n direction: SortDirection;\r\n };\r\n\r\n /**\r\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering content by\r\n * select fields.\r\n *\r\n * This is different from [[instanceFilter]] as filtering is applied on the union of all selects,\r\n * which removes access to content instance property values. Instead of referencing properties\r\n * through `this.PropertyName` alias, the expression should reference them by field names. In cases\r\n * when properties field merges multiple properties, this allows applying the filter on all of them\r\n * at once. This is useful for filtering table rows by column value, when content is displayed in\r\n * table format.\r\n */\r\n fieldsFilterExpression?: string;\r\n /**\r\n * Instances filter that allows filtering content by class, properties of specific class\r\n * or properties of instances related to the content instance.\r\n *\r\n * This is different from [[fieldsFilterExpression]] as filter is applied at a lower level - on\r\n * specific select class rather than a union of multiple select classes. This means the filter has\r\n * access to properties of that class and they can be referenced using symbols like `this.Property`.\r\n * This is useful for filtering instances of specific class.\r\n */\r\n instanceFilter?: InstanceFilterDefinition;\r\n}\r\n\r\n/**\r\n * Descriptor properties\r\n * @public\r\n */\r\nexport interface DescriptorSource {\r\n /** Id of the connection used to create the descriptor */\r\n readonly connectionId?: string;\r\n /** Hash of the input keys used to create the descriptor */\r\n readonly inputKeysHash?: string;\r\n /** Selection info used to create the descriptor */\r\n readonly selectionInfo?: SelectionInfo;\r\n /** Display type used to create the descriptor */\r\n readonly displayType: string;\r\n /** A list of classes that will be selected from when creating content with this descriptor */\r\n readonly selectClasses: SelectClassInfo[];\r\n /** A list of content field categories used in this descriptor */\r\n readonly categories: CategoryDescription[];\r\n /** A list of fields contained in the descriptor */\r\n readonly fields: Field[];\r\n /** [[ContentFlags]] used to create the descriptor */\r\n readonly contentFlags: number;\r\n /** Field used to sort the content */\r\n readonly sortingField?: Field;\r\n /** Sorting direction */\r\n readonly sortDirection?: SortDirection;\r\n /**\r\n * A ruleset used to create this descriptor.\r\n * Only set if descriptor is created using a ruleset different from the input ruleset, e.g. when creating a hierarchy level descriptor.\r\n */\r\n readonly ruleset?: Ruleset;\r\n /**\r\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering content by\r\n * select fields.\r\n *\r\n * This is different from [[instanceFilter]] as filtering is applied on the union of all selects,\r\n * which removes access to content instance property values. Instead of referencing properties\r\n * through `this.PropertyName` alias, the expression should reference them by field names. In cases\r\n * when properties field merges multiple properties, this allows applying the filter on all of them\r\n * at once. This is useful for filtering table rows by column value, when content is displayed in\r\n * table format.\r\n */\r\n fieldsFilterExpression?: string;\r\n /**\r\n * Instances filter that allows filtering content by class, properties of specific class\r\n * or properties of instances related to the content instance.\r\n *\r\n * This is different from [[fieldsFilterExpression]] as filter is applied at a lower level - on\r\n * specific select class rather than a union of multiple select classes. This means the filter has\r\n * access to properties of that class and they can be referenced using symbols like `this.Property`.\r\n * This is useful for filtering instances of specific class.\r\n */\r\n instanceFilter?: InstanceFilterDefinition;\r\n}\r\n\r\n/**\r\n * Data structure that describes content: fields, sorting, filtering, format, etc.\r\n * Descriptor may be changed to control how content is created.\r\n *\r\n * @public\r\n */\r\nexport class Descriptor implements DescriptorSource {\r\n /** Id of the connection used to create the descriptor */\r\n public readonly connectionId?: string;\r\n /** Hash of the input keys used to create the descriptor */\r\n public readonly inputKeysHash?: string;\r\n /** Selection info used to create the descriptor */\r\n public readonly selectionInfo?: SelectionInfo;\r\n /** Display type used to create the descriptor */\r\n public readonly displayType: string;\r\n /** A list of classes that will be selected when creating content with this descriptor */\r\n public readonly selectClasses: SelectClassInfo[];\r\n /** A list of content field categories used in this descriptor */\r\n public readonly categories: CategoryDescription[];\r\n /** A list of fields contained in the descriptor */\r\n public readonly fields: Field[];\r\n /** [[ContentFlags]] used to create the descriptor */\r\n public readonly contentFlags: number;\r\n /**\r\n * A ruleset used to create this descriptor.\r\n * Only set if descriptor is created using a ruleset different from the input ruleset, e.g. when creating a hierarchy level descriptor.\r\n */\r\n public readonly ruleset?: Ruleset;\r\n /** Field used to sort the content */\r\n public sortingField?: Field;\r\n /** Sorting direction */\r\n public sortDirection?: SortDirection;\r\n /**\r\n * [ECExpression]($docs/presentation/advanced/ECExpressions.md) for filtering content by\r\n * select fields.\r\n *\r\n * This is different from [[instanceFilter]] as filtering is applied on the union of all selects,\r\n * which removes access to content instance property values. Instead of referencing properties\r\n * through `this.PropertyName` alias, the expression should reference them by field names. In cases\r\n * when properties field merges multiple properties, this allows applying the filter on all of them\r\n * at once. This is useful for filtering table rows by column value, when content is displayed in\r\n * table format.\r\n */\r\n public fieldsFilterExpression?: string;\r\n /**\r\n * Instances filter that allows filtering content by class, properties of specific class\r\n * or properties of instances related to the content instance.\r\n *\r\n * This is different from [[fieldsFilterExpression]] as filter is applied at a lower level - on\r\n * specific select class rather than a union of multiple select classes. This means the filter has\r\n * access to properties of that class and they can be referenced using symbols like `this.Property`.\r\n * This is useful for filtering instances of specific class.\r\n */\r\n public instanceFilter?: InstanceFilterDefinition;\r\n\r\n /** Construct a new Descriptor using a [[DescriptorSource]] */\r\n public constructor(source: DescriptorSource) {\r\n this.connectionId = source.connectionId;\r\n this.inputKeysHash = source.inputKeysHash;\r\n this.selectionInfo = source.selectionInfo;\r\n this.displayType = source.displayType;\r\n this.contentFlags = source.contentFlags;\r\n this.selectClasses = [...source.selectClasses];\r\n this.categories = [...source.categories];\r\n this.fields = [...source.fields];\r\n this.sortingField = source.sortingField;\r\n this.sortDirection = source.sortDirection;\r\n this.fieldsFilterExpression = source.fieldsFilterExpression;\r\n this.instanceFilter = source.instanceFilter;\r\n this.ruleset = source.ruleset;\r\n }\r\n\r\n /** Serialize [[Descriptor]] to JSON */\r\n public toJSON(): DescriptorJSON {\r\n const classesMap: { [id: string]: CompressedClassInfoJSON } = {};\r\n const selectClasses: SelectClassInfoJSON<string>[] = this.selectClasses.map((selectClass) => SelectClassInfo.toCompressedJSON(selectClass, classesMap));\r\n const fields: FieldJSON<string>[] = this.fields.map((field) => field.toCompressedJSON(classesMap));\r\n return omitUndefined({\r\n displayType: this.displayType,\r\n contentFlags: this.contentFlags,\r\n categories: this.categories.map(CategoryDescription.toJSON),\r\n fields,\r\n selectClasses,\r\n classesMap,\r\n connectionId: this.connectionId ?? \"\",\r\n inputKeysHash: this.inputKeysHash ?? \"\",\r\n sortingFieldName: this.sortingField?.name,\r\n sortDirection: this.sortDirection,\r\n fieldsFilterExpression: this.fieldsFilterExpression,\r\n instanceFilter: this.instanceFilter,\r\n selectionInfo: this.selectionInfo,\r\n ruleset: this.ruleset,\r\n });\r\n }\r\n\r\n /** Deserialize [[Descriptor]] from JSON */\r\n public static fromJSON(json: DescriptorJSON | undefined): Descriptor | undefined {\r\n if (!json) {\r\n return undefined;\r\n }\r\n\r\n const {\r\n categories: jsonCategories,\r\n selectClasses: jsonSelectClasses,\r\n fields: jsonFields,\r\n connectionId,\r\n inputKeysHash,\r\n classesMap,\r\n sortingFieldName,\r\n ...leftOverJson\r\n } = json;\r\n const categories = CategoryDescription.listFromJSON(jsonCategories);\r\n const selectClasses = jsonSelectClasses.map((jsc) => SelectClassInfo.fromCompressedJSON(jsc, classesMap));\r\n const fields = this.getFieldsFromJSON(jsonFields, (fieldJson) => Field.fromCompressedJSON(fieldJson, classesMap, categories));\r\n return new Descriptor({\r\n ...leftOverJson,\r\n ...(connectionId ? /* c8 ignore next */ { connectionId } : undefined),\r\n ...(inputKeysHash ? /* c8 ignore next */ { inputKeysHash } : undefined),\r\n selectClasses,\r\n categories,\r\n fields,\r\n sortingField: getFieldByName(fields, sortingFieldName, true),\r\n });\r\n }\r\n\r\n private static getFieldsFromJSON(json: FieldJSON[], factory: (json: FieldJSON) => Field | undefined): Field[] {\r\n return json\r\n .map((fieldJson: FieldJSON) => {\r\n const field = factory(fieldJson);\r\n if (field) {\r\n field.rebuildParentship();\r\n }\r\n return field;\r\n })\r\n .filter((field): field is Field => !!field);\r\n }\r\n\r\n /**\r\n * Get field by its name\r\n * @param name Name of the field to find\r\n * @param recurse Recurse into nested fields\r\n */\r\n public getFieldByName(name: string, recurse?: boolean): Field | undefined {\r\n return getFieldByName(this.fields, name, recurse);\r\n }\r\n\r\n /**\r\n * Get field by its descriptor.\r\n */\r\n public getFieldByDescriptor(fieldDescriptor: FieldDescriptor, recurse?: boolean): Field | undefined {\r\n return getFieldByDescriptor(this.fields, fieldDescriptor, recurse);\r\n }\r\n\r\n /**\r\n * Create descriptor overrides object from this descriptor.\r\n * @public\r\n */\r\n public createDescriptorOverrides(): DescriptorOverrides {\r\n const overrides: DescriptorOverrides = {};\r\n if (this.displayType) {\r\n overrides.displayType = this.displayType;\r\n }\r\n if (this.contentFlags !== 0) {\r\n overrides.contentFlags = this.contentFlags;\r\n }\r\n if (this.fieldsFilterExpression) {\r\n overrides.fieldsFilterExpression = this.fieldsFilterExpression;\r\n }\r\n if (this.instanceFilter) {\r\n overrides.instanceFilter = this.instanceFilter;\r\n }\r\n if (this.sortingField) {\r\n overrides.sorting = { field: this.sortingField.getFieldDescriptor(), direction: this.sortDirection ?? SortDirection.Ascending };\r\n }\r\n return overrides;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisplayTypes.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/DisplayTypes.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,0BAeX;AAfD,WAAY,0BAA0B;IACpC,4BAA4B;IAC5B,qDAAuB,CAAA;IAEvB,yFAAyF;IACzF,2CAAa,CAAA;IAEb,sFAAsF;IACtF,2DAA6B,CAAA;IAE7B,yGAAyG;IACzG,2CAAa,CAAA;IAEb,6EAA6E;IAC7E,mDAAqB,CAAA;AACvB,CAAC,EAfW,0BAA0B,0CAA1B,0BAA0B,QAerC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\n/**\n * Displayed content types. Affects how the content is formatted, e.g.\n * the [[ContentFlags]].\n *\n * @public\n */\nexport enum DefaultContentDisplayTypes {\n /** Unknown content type. */\n Undefined = \"Undefined\", // eslint-disable-line id-denylist\n\n /** Grid or table view content type. By default adds [[ContentFlags.ShowLabels]] flag. */\n Grid = \"Grid\",\n\n /** Property pane content type. By default adds [[ContentFlags.MergeResults]] flag. */\n PropertyPane = \"PropertyPane\",\n\n /** List content type. By default adds [[ContentFlags.NoFields]] and [[ContentFlags.ShowLabels]] flags */\n List = \"List\",\n\n /** Viewport content type. By default adds [[ContentFlags.KeysOnly]] flag. */\n Viewport = \"Graphics\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DisplayTypes.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/DisplayTypes.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAEH;;;;;GAKG;AACH,IAAY,0BAeX;AAfD,WAAY,0BAA0B;IACpC,4BAA4B;IAC5B,qDAAuB,CAAA;IAEvB,yFAAyF;IACzF,2CAAa,CAAA;IAEb,sFAAsF;IACtF,2DAA6B,CAAA;IAE7B,yGAAyG;IACzG,2CAAa,CAAA;IAEb,6EAA6E;IAC7E,mDAAqB,CAAA;AACvB,CAAC,EAfW,0BAA0B,0CAA1B,0BAA0B,QAerC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\n/**\r\n * Displayed content types. Affects how the content is formatted, e.g.\r\n * the [[ContentFlags]].\r\n *\r\n * @public\r\n */\r\nexport enum DefaultContentDisplayTypes {\r\n /** Unknown content type. */\r\n Undefined = \"Undefined\", // eslint-disable-line id-denylist\r\n\r\n /** Grid or table view content type. By default adds [[ContentFlags.ShowLabels]] flag. */\r\n Grid = \"Grid\",\r\n\r\n /** Property pane content type. By default adds [[ContentFlags.MergeResults]] flag. */\r\n PropertyPane = \"PropertyPane\",\r\n\r\n /** List content type. By default adds [[ContentFlags.NoFields]] and [[ContentFlags.ShowLabels]] flags */\r\n List = \"List\",\r\n\r\n /** Viewport content type. By default adds [[ContentFlags.KeysOnly]] flag. */\r\n Viewport = \"Graphics\",\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Editor.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n * See LICENSE.md in the project root for license terms and full copyright notice.\n *--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Content\n */\n\n/**\n * A data structure which describes property editor used\n * for a content [[Field]].\n *\n * @public\n */\nexport interface EditorDescription {\n /** Unique name */\n name: string;\n /** Editor-specific parameters */\n params?: any;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Editor.js","sourceRoot":"","sources":["../../../../src/presentation-common/content/Editor.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n * See LICENSE.md in the project root for license terms and full copyright notice.\r\n *--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Content\r\n */\r\n\r\n/**\r\n * A data structure which describes property editor used\r\n * for a content [[Field]].\r\n *\r\n * @public\r\n */\r\nexport interface EditorDescription {\r\n /** Unique name */\r\n name: string;\r\n /** Editor-specific parameters */\r\n params?: any;\r\n}\r\n"]}
|
|
@@ -130,7 +130,7 @@ export declare class Field {
|
|
|
130
130
|
* @param editor Property editor used to edit values of this field
|
|
131
131
|
* @param renderer Property renderer used to render values of this field
|
|
132
132
|
* @param extendedData Extended data associated with this field
|
|
133
|
-
* @deprecated in 5.0. Use an overload with `FieldProps` instead.
|
|
133
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `FieldProps` instead.
|
|
134
134
|
*/
|
|
135
135
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, editor?: EditorDescription, renderer?: RendererDescription, extendedData?: {
|
|
136
136
|
[key: string]: unknown;
|
|
@@ -152,7 +152,7 @@ export declare class Field {
|
|
|
152
152
|
clone(): Field;
|
|
153
153
|
/**
|
|
154
154
|
* Serialize this object to JSON.
|
|
155
|
-
* @deprecated in 5.
|
|
155
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
156
156
|
*/
|
|
157
157
|
toJSON(): FieldJSON;
|
|
158
158
|
/** Serialize this object to compressed JSON */
|
|
@@ -161,7 +161,7 @@ export declare class Field {
|
|
|
161
161
|
}): FieldJSON<string>;
|
|
162
162
|
/**
|
|
163
163
|
* Deserialize [[Field]] from JSON.
|
|
164
|
-
* @deprecated in 5.
|
|
164
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
165
165
|
*/
|
|
166
166
|
static fromJSON(json: FieldJSON | undefined, categories: CategoryDescription[]): Field | undefined;
|
|
167
167
|
/** Deserialize a [[Field]] from compressed JSON. */
|
|
@@ -212,7 +212,7 @@ export declare class PropertiesField extends Field {
|
|
|
212
212
|
* @param properties A list of properties this field is created from
|
|
213
213
|
* @param editor Property editor used to edit values of this field
|
|
214
214
|
* @param renderer Property renderer used to render values of this field
|
|
215
|
-
* @deprecated in 5.0. Use an overload with `PropertiesFieldProps` instead.
|
|
215
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `PropertiesFieldProps` instead.
|
|
216
216
|
*/
|
|
217
217
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
218
218
|
/** Creates an instance of [[PropertiesField]]. */
|
|
@@ -224,7 +224,7 @@ export declare class PropertiesField extends Field {
|
|
|
224
224
|
clone(): PropertiesField;
|
|
225
225
|
/**
|
|
226
226
|
* Serialize this object to JSON
|
|
227
|
-
* @deprecated in 5.
|
|
227
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
228
228
|
*/
|
|
229
229
|
toJSON(): PropertiesFieldJSON;
|
|
230
230
|
/** Serialize this object to compressed JSON */
|
|
@@ -233,7 +233,7 @@ export declare class PropertiesField extends Field {
|
|
|
233
233
|
}): PropertiesFieldJSON<string>;
|
|
234
234
|
/**
|
|
235
235
|
* Deserialize [[PropertiesField]] from JSON.
|
|
236
|
-
* @deprecated in 5.
|
|
236
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
237
237
|
*/
|
|
238
238
|
static fromJSON(json: PropertiesFieldJSON | undefined, categories: CategoryDescription[]): PropertiesField | undefined;
|
|
239
239
|
/**
|
|
@@ -269,7 +269,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
269
269
|
itemsField: PropertiesField;
|
|
270
270
|
/**
|
|
271
271
|
* Creates an instance of [[ArrayPropertiesField]].
|
|
272
|
-
* @deprecated in 5.0. Use an overload with `ArrayPropertiesFieldProps` instead.
|
|
272
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `ArrayPropertiesFieldProps` instead.
|
|
273
273
|
*/
|
|
274
274
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, itemsField: PropertiesField, isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
275
275
|
/** Creates an instance of [[ArrayPropertiesField]]. */
|
|
@@ -278,7 +278,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
278
278
|
clone(): ArrayPropertiesField;
|
|
279
279
|
/**
|
|
280
280
|
* Serialize this object to JSON.
|
|
281
|
-
* @deprecated in 5.
|
|
281
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
282
282
|
*/
|
|
283
283
|
toJSON(): ArrayPropertiesFieldJSON;
|
|
284
284
|
/** Serialize this object to compressed JSON */
|
|
@@ -287,7 +287,7 @@ export declare class ArrayPropertiesField extends PropertiesField {
|
|
|
287
287
|
}): ArrayPropertiesFieldJSON<string>;
|
|
288
288
|
/**
|
|
289
289
|
* Deserialize [[ArrayPropertiesField]] from JSON.
|
|
290
|
-
* @deprecated in 5.
|
|
290
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
291
291
|
*/
|
|
292
292
|
static fromJSON(json: ArrayPropertiesFieldJSON, categories: CategoryDescription[]): ArrayPropertiesField;
|
|
293
293
|
/**
|
|
@@ -313,7 +313,7 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
313
313
|
memberFields: PropertiesField[];
|
|
314
314
|
/**
|
|
315
315
|
* Creates an instance of [[StructPropertiesField]].
|
|
316
|
-
* @deprecated in 5.0. Use an overload with `StructPropertiesFieldProps` instead.
|
|
316
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `StructPropertiesFieldProps` instead.
|
|
317
317
|
*/
|
|
318
318
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, memberFields: PropertiesField[], isReadonly: boolean, priority: number, properties: Property[], editor?: EditorDescription, renderer?: RendererDescription);
|
|
319
319
|
/** Creates an instance of [[StructPropertiesField]]. */
|
|
@@ -322,7 +322,7 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
322
322
|
clone(): StructPropertiesField;
|
|
323
323
|
/**
|
|
324
324
|
* Serialize this object to JSON.
|
|
325
|
-
* @deprecated in 5.
|
|
325
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
326
326
|
*/
|
|
327
327
|
toJSON(): StructPropertiesFieldJSON;
|
|
328
328
|
/** Serialize this object to compressed JSON */
|
|
@@ -331,7 +331,7 @@ export declare class StructPropertiesField extends PropertiesField {
|
|
|
331
331
|
}): StructPropertiesFieldJSON<string>;
|
|
332
332
|
/**
|
|
333
333
|
* Deserialize [[StructPropertiesField]] from JSON.
|
|
334
|
-
* @deprecated in 5.
|
|
334
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
335
335
|
*/
|
|
336
336
|
static fromJSON(json: StructPropertiesFieldJSON, categories: CategoryDescription[]): StructPropertiesField;
|
|
337
337
|
/**
|
|
@@ -423,7 +423,7 @@ export declare class NestedContentField extends Field {
|
|
|
423
423
|
* @param autoExpand Flag specifying whether field should be expanded
|
|
424
424
|
* @param relationshipMeaning RelationshipMeaning of the field
|
|
425
425
|
* @param renderer Property renderer used to render values of this field
|
|
426
|
-
* @deprecated in 5.0. Use an overload with `NestedContentFieldProps` instead.
|
|
426
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use an overload with `NestedContentFieldProps` instead.
|
|
427
427
|
*/
|
|
428
428
|
constructor(category: CategoryDescription, name: string, label: string, type: TypeDescription, isReadonly: boolean, priority: number, contentClassInfo: ClassInfo, pathToPrimaryClass: RelationshipPath, nestedFields: Field[], editor?: EditorDescription, autoExpand?: boolean, renderer?: RendererDescription);
|
|
429
429
|
/** Creates an instance of [[NestedContentField]]. */
|
|
@@ -437,7 +437,7 @@ export declare class NestedContentField extends Field {
|
|
|
437
437
|
getFieldByName(name: string, recurse?: boolean): Field | undefined;
|
|
438
438
|
/**
|
|
439
439
|
* Serialize this object to JSON.
|
|
440
|
-
* @deprecated in 5.
|
|
440
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
441
441
|
*/
|
|
442
442
|
toJSON(): NestedContentFieldJSON;
|
|
443
443
|
/** Serialize this object to compressed JSON */
|
|
@@ -103,7 +103,7 @@ class Field {
|
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Serialize this object to JSON.
|
|
106
|
-
* @deprecated in 5.
|
|
106
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
107
107
|
*/
|
|
108
108
|
toJSON() {
|
|
109
109
|
return this.toCompressedJSON({});
|
|
@@ -124,7 +124,7 @@ class Field {
|
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
126
126
|
* Deserialize [[Field]] from JSON.
|
|
127
|
-
* @deprecated in 5.
|
|
127
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
128
128
|
*/
|
|
129
129
|
static fromJSON(json, categories) {
|
|
130
130
|
if (!json) {
|
|
@@ -237,7 +237,7 @@ class PropertiesField extends Field {
|
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
239
|
* Serialize this object to JSON
|
|
240
|
-
* @deprecated in 5.
|
|
240
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
241
241
|
*/
|
|
242
242
|
toJSON() {
|
|
243
243
|
return {
|
|
@@ -255,7 +255,7 @@ class PropertiesField extends Field {
|
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
257
|
* Deserialize [[PropertiesField]] from JSON.
|
|
258
|
-
* @deprecated in 5.
|
|
258
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
259
259
|
*/
|
|
260
260
|
static fromJSON(json, categories) {
|
|
261
261
|
if (!json) {
|
|
@@ -378,7 +378,7 @@ class ArrayPropertiesField extends PropertiesField {
|
|
|
378
378
|
}
|
|
379
379
|
/**
|
|
380
380
|
* Serialize this object to JSON.
|
|
381
|
-
* @deprecated in 5.
|
|
381
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
382
382
|
*/
|
|
383
383
|
toJSON() {
|
|
384
384
|
return {
|
|
@@ -397,7 +397,7 @@ class ArrayPropertiesField extends PropertiesField {
|
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
399
|
* Deserialize [[ArrayPropertiesField]] from JSON.
|
|
400
|
-
* @deprecated in 5.
|
|
400
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
401
401
|
*/
|
|
402
402
|
static fromJSON(json, categories) {
|
|
403
403
|
return new ArrayPropertiesField({
|
|
@@ -456,7 +456,7 @@ class StructPropertiesField extends PropertiesField {
|
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
* Serialize this object to JSON.
|
|
459
|
-
* @deprecated in 5.
|
|
459
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
460
460
|
*/
|
|
461
461
|
toJSON() {
|
|
462
462
|
return {
|
|
@@ -475,7 +475,7 @@ class StructPropertiesField extends PropertiesField {
|
|
|
475
475
|
}
|
|
476
476
|
/**
|
|
477
477
|
* Deserialize [[StructPropertiesField]] from JSON.
|
|
478
|
-
* @deprecated in 5.
|
|
478
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[fromCompressedJSON]] instead.
|
|
479
479
|
*/
|
|
480
480
|
static fromJSON(json, categories) {
|
|
481
481
|
return new StructPropertiesField({
|
|
@@ -576,7 +576,7 @@ class NestedContentField extends Field {
|
|
|
576
576
|
}
|
|
577
577
|
/**
|
|
578
578
|
* Serialize this object to JSON.
|
|
579
|
-
* @deprecated in 5.
|
|
579
|
+
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Use [[toCompressedJSON]] instead.
|
|
580
580
|
*/
|
|
581
581
|
toJSON() {
|
|
582
582
|
return {
|