UNPKG

@itwin/presentation-backend

Version:

Backend of iTwin.js Presentation library

702 lines (701 loc) • 27.1 kB
{ "$schema": "../../../common/Ruleset.schema.json", "id": "BisCore", "supplementationInfo": { "supplementationPurpose": "BisCore specific customization rules" }, "requiredSchemas": [ { "name": "BisCore" } ], "rules": [ { "ruleType": "InstanceLabelOverride", "onlyIfNotHandled": true, "class": { "schemaName": "BisCore", "className": "GeometricElement" }, "values": [ { "specType": "Property", "propertyName": "CodeValue" }, { "specType": "Composite", "separator": " ", "parts": [ { "spec": { "specType": "Property", "propertyName": "UserLabel" }, "isRequired": true }, { "spec": { "specType": "Composite", "separator": "", "parts": [ { "spec": { "specType": "String", "value": "[" } }, { "spec": { "specType": "BriefcaseId" } }, { "spec": { "specType": "String", "value": "-" } }, { "spec": { "specType": "LocalId" } }, { "spec": { "specType": "String", "value": "]" } } ] } } ] }, { "specType": "Composite", "separator": " ", "parts": [ { "spec": { "specType": "ClassLabel" }, "isRequired": true }, { "spec": { "specType": "Composite", "separator": "", "parts": [ { "spec": { "specType": "String", "value": "[" } }, { "spec": { "specType": "BriefcaseId" } }, { "spec": { "specType": "String", "value": "-" } }, { "spec": { "specType": "LocalId" } }, { "spec": { "specType": "String", "value": "]" } } ] } } ] } ] }, { "ruleType": "InstanceLabelOverride", "onlyIfNotHandled": true, "class": { "schemaName": "BisCore", "className": "Element" }, "values": [ { "specType": "Property", "propertyName": "UserLabel" }, { "specType": "Property", "propertyName": "CodeValue" }, { "specType": "Composite", "separator": " ", "parts": [ { "spec": { "specType": "ClassLabel" }, "isRequired": true }, { "spec": { "specType": "Composite", "separator": "", "parts": [ { "spec": { "specType": "String", "value": "[" } }, { "spec": { "specType": "BriefcaseId" } }, { "spec": { "specType": "String", "value": "-" } }, { "spec": { "specType": "LocalId" } }, { "spec": { "specType": "String", "value": "]" } } ] } } ] } ] }, { "ruleType": "InstanceLabelOverride", "onlyIfNotHandled": true, "class": { "schemaName": "BisCore", "className": "RepositoryModel" }, "values": [ { "specType": "RelatedInstanceLabel", "pathToRelatedInstance": { "relationship": { "schemaName": "BisCore", "className": "ModelModelsElement" }, "direction": "Forward", "targetClass": { "schemaName": "BisCore", "className": "Subject" } } } ] }, { "ruleType": "InstanceLabelOverride", "onlyIfNotHandled": true, "class": { "schemaName": "BisCore", "className": "Model" }, "values": [ { "specType": "RelatedInstanceLabel", "pathToRelatedInstance": { "relationship": { "schemaName": "BisCore", "className": "ModelModelsElement" }, "direction": "Forward" } } ] }, { "ruleType": "ContentModifier", "propertyCategories": [ { "id": "source_information", "label": "Source Information", "parentId": { "type": "Root" }, "autoExpand": true }, { "id": "model_source", "label": "Model Source", "parentId": "source_information", "autoExpand": true }, { "id": "secondary_sources", "label": "Secondary Sources", "parentId": "source_information", "autoExpand": true }, { "id": "document_link", "label": "Document Link", "parentId": "source_information", "autoExpand": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "ElementAspect" }, "propertyCategories": [ { "id": "source_information", "label": "Source Information", "parentId": { "type": "Root" }, "autoExpand": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "Element" }, "relatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "ElementOwnsUniqueAspect" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "SameInstance", "skipIfDuplicate": true }, { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "ElementOwnsMultiAspects" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "SameInstance", "skipIfDuplicate": true } ], "applyOnNestedContent": true }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "Element" }, "relatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "ElementHasLinks" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "RelatedInstance", "skipIfDuplicate": true }, { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "ElementGroupsMembers" }, "targetClass": { "schemaName": "BisCore", "className": "GroupInformationElement" }, "direction": "Backward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "RelatedInstance", "nestedRelatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "ElementHasLinks" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "autoExpand": true, "relationshipMeaning": "RelatedInstance" } ], "skipIfDuplicate": true }, { "propertiesSource": [ { "relationship": { "schemaName": "BisCore", "className": "ModelContainsElements" }, "direction": "Backward" }, { "relationship": { "schemaName": "BisCore", "className": "ModelModelsElement" }, "direction": "Forward" }, { "relationship": { "schemaName": "BisCore", "className": "ElementHasLinks" }, "targetClass": { "schemaName": "BisCore", "className": "RepositoryLink" }, "direction": "Forward" } ], "properties": [ { "name": "Url", "overridesPriority": 1001, "labelOverride": "Path", "categoryId": "model_source", "isDisplayed": true }, { "name": "UserLabel", "overridesPriority": 1001, "labelOverride": "Name", "categoryId": "model_source", "isDisplayed": true } ], "relationshipMeaning": "SameInstance", "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "requiredSchemas": [ { "name": "BisCore", "minVersion": "1.0.2" } ], "class": { "schemaName": "BisCore", "className": "Element" }, "relatedProperties": [ { "relationshipMeaning": "SameInstance", "propertiesSource": [ { "relationship": { "schemaName": "BisCore", "className": "ElementOwnsMultiAspects" }, "direction": "Forward", "targetClass": { "schemaName": "BisCore", "className": "ExternalSourceAspect" } } ], "instanceFilter": "this.Kind <> \"Relationship\"", "properties": [ { "name": "Identifier", "overridesPriority": 1001, "categoryId": "source_information", "labelOverride": "Source Element ID", "isDisplayed": true } ], "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "requiredSchemas": [ { "name": "BisCore", "minVersion": "1.0.13" } ], "class": { "schemaName": "BisCore", "className": "Element" }, "relatedProperties": [ { "relationshipMeaning": "SameInstance", "propertiesSource": [ { "relationship": { "schemaName": "BisCore", "className": "ElementOwnsMultiAspects" }, "direction": "Forward", "targetClass": { "schemaName": "BisCore", "className": "ExternalSourceAspect" } } ], "instanceFilter": "this.Kind <> \"Relationship\"", "properties": "_none_", "autoExpand": true, "nestedRelatedProperties": [ { "relationshipMeaning": "SameInstance", "autoExpand": true, "propertiesSource": [ { "relationship": { "schemaName": "BisCore", "className": "ElementIsFromSource" }, "direction": "Forward" }, { "relationship": { "schemaName": "BisCore", "className": "ExternalSourceIsInRepository" }, "direction": "Forward" } ], "handleTargetClassPolymorphically": true, "properties": [ { "name": "*", "categoryId": "document_link" }, { "name": "UserLabel", "labelOverride": "Name", "isDisplayed": true, "doNotHideOtherPropertiesOnDisplayOverride": true }, { "name": "Url", "labelOverride": "Path" }, { "name": "Model", "isDisplayed": false } ], "skipIfDuplicate": true }, { "relationshipMeaning": "SameInstance", "autoExpand": true, "propertiesSource": [ { "relationship": { "schemaName": "BisCore", "className": "ElementIsFromSource" }, "direction": "Forward", "targetClass": { "schemaName": "BisCore", "className": "ExternalSourceGroup" } }, { "relationship": { "schemaName": "BisCore", "className": "ExternalSourceGroupGroupsSources" }, "direction": "Forward" }, { "relationship": { "schemaName": "BisCore", "className": "ExternalSourceIsInRepository" }, "direction": "Forward" } ], "properties": [ { "name": "UserLabel", "categoryId": "secondary_sources", "labelOverride": "Name", "isDisplayed": true }, { "name": "Url", "categoryId": "secondary_sources", "labelOverride": "Path" } ], "skipIfDuplicate": true } ], "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "GeometricElement3d" }, "relatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "GeometricElement3dHasTypeDefinition" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "RelatedInstance", "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "GeometricElement2d" }, "relatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "GeometricElement2dHasTypeDefinition" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "RelatedInstance", "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "DrawingGraphic" }, "relatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "DrawingGraphicRepresentsElement" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "RelatedInstance", "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "GraphicalElement3d" }, "relatedProperties": [ { "propertiesSource": { "relationship": { "schemaName": "BisCore", "className": "GraphicalElement3dRepresentsElement" }, "direction": "Forward" }, "handleTargetClassPolymorphically": true, "relationshipMeaning": "RelatedInstance", "skipIfDuplicate": true } ] }, { "ruleType": "ContentModifier", "class": { "schemaName": "BisCore", "className": "TypeDefinitionElement" }, "propertyOverrides": [ { "name": "IsPrivate", "isDisplayed": false }, { "name": "Recipe", "isDisplayed": false } ] }, { "ruleType": "ContentModifier", "requiredSchemas": [ { "name": "BisCore", "minVersion": "1.0.11" } ], "class": { "schemaName": "BisCore", "className": "PhysicalType" }, "propertyOverrides": [ { "name": "PhysicalMaterial", "labelOverride": "Physical Material" } ] } ] }