@itwin/presentation-common 4.9.0-dev.25 → 4.9.0-dev.27

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.
@@ -17,6 +17,9 @@
17
17
  {
18
18
  "$ref": "#/definitions/IdCategoryIdentifier"
19
19
  },
20
+ {
21
+ "$ref": "#/definitions/SchemaCategoryIdentifier"
22
+ },
20
23
  {
21
24
  "type": "string"
22
25
  }
@@ -1584,6 +1587,9 @@
1584
1587
  {
1585
1588
  "$ref": "#/definitions/IdCategoryIdentifier"
1586
1589
  },
1590
+ {
1591
+ "$ref": "#/definitions/SchemaCategoryIdentifier"
1592
+ },
1587
1593
  {
1588
1594
  "type": "string"
1589
1595
  }
@@ -1908,6 +1914,9 @@
1908
1914
  {
1909
1915
  "$ref": "#/definitions/IdCategoryIdentifier"
1910
1916
  },
1917
+ {
1918
+ "$ref": "#/definitions/SchemaCategoryIdentifier"
1919
+ },
1911
1920
  {
1912
1921
  "type": "string"
1913
1922
  }
@@ -2507,6 +2516,28 @@
2507
2516
  ],
2508
2517
  "type": "object"
2509
2518
  },
2519
+ "SchemaCategoryIdentifier": {
2520
+ "additionalProperties": false,
2521
+ "description": "Identifier of a schema-based category, referenced by its full name.",
2522
+ "properties": {
2523
+ "categoryName": {
2524
+ "description": "Full name of the property category, e.g. `MySchema:MyPropertyCategory`.",
2525
+ "type": "string"
2526
+ },
2527
+ "type": {
2528
+ "description": "Type of the identifier",
2529
+ "enum": [
2530
+ "SchemaCategory"
2531
+ ],
2532
+ "type": "string"
2533
+ }
2534
+ },
2535
+ "required": [
2536
+ "categoryName",
2537
+ "type"
2538
+ ],
2539
+ "type": "object"
2540
+ },
2510
2541
  "SelectedNodeInstancesSpecification": {
2511
2542
  "additionalProperties": false,
2512
2543
  "description": "Returns content for selected (input) instances.",
@@ -54,11 +54,21 @@ export interface IdCategoryIdentifier {
54
54
  /** Controls whether a class category should be included under the category pointed to by this identifier */
55
55
  createClassCategory?: boolean;
56
56
  }
57
+ /**
58
+ * Identifier of a schema-based category, referenced by its full name.
59
+ * @public
60
+ */
61
+ export interface SchemaCategoryIdentifier {
62
+ /** Type of the identifier */
63
+ type: "SchemaCategory";
64
+ /** Full name of the property category, e.g. `MySchema:MyPropertyCategory`. */
65
+ categoryName: string;
66
+ }
57
67
  /**
58
68
  * Category identifier used to assign properties to a category.
59
69
  * @public
60
70
  */
61
- export type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier;
71
+ export type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier | SchemaCategoryIdentifier;
62
72
  /**
63
73
  * Content modifier for defining custom property categories. Custom categories are not present in the result unless
64
74
  * they contain at least one property. One way to assign a property to the category is by using
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategorySpecification.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,IAAI,CAAC;IAEX,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IAEnB,4GAA4G;IAC5G,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AAE1G;;;;;;;GAOG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;IAE9D,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CACxC"}
1
+ {"version":3,"file":"PropertyCategorySpecification.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,IAAI,CAAC;IAEX,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IAEnB,4GAA4G;IAC5G,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IAEvB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAErI;;;;;;;GAOG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;IAE9D,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategorySpecification.js","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.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 PresentationRules\n */\n\nimport { CustomRendererSpecification } from \"./CustomRendererSpecification\";\n\n/**\n * Identifier for no category. Used to make category displayed at root level by using\n * this identifier for [[PropertyCategorySpecification.parentId]].\n *\n * @public\n */\nexport interface NoCategoryIdentifier {\n /** Type of the identifier */\n type: \"None\";\n}\n\n/**\n * Identifier of the default parent category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **last**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface ParentCategoryIdentifier {\n /** Type of the identifier */\n type: \"DefaultParent\";\n}\n\n/**\n * Identifier of the root category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **first**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface RootCategoryIdentifier {\n /** Type of the identifier */\n type: \"Root\";\n}\n\n/**\n * Identifier of a category specified through [[PropertyCategorySpecification]] in this scope.\n * @public\n */\nexport interface IdCategoryIdentifier {\n /** Type of the identifier */\n type: \"Id\";\n\n /** ID of the category pointed to by this identifier */\n categoryId: string;\n\n /** Controls whether a class category should be included under the category pointed to by this identifier */\n createClassCategory?: boolean;\n}\n\n/**\n * Category identifier used to assign properties to a category.\n * @public\n */\nexport type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier;\n\n/**\n * Content modifier for defining custom property categories. Custom categories are not present in the result unless\n * they contain at least one property. One way to assign a property to the category is by using\n * [property overrides]($docs/presentation/content/PropertySpecification.md).\n *\n * @see [Property category specification reference documentation page]($docs/presentation/content/PropertyCategorySpecification.md)\n * @public\n */\nexport interface PropertyCategorySpecification {\n /**\n * Category identifier used to reference the category definition from property overrides or other category\n * definitions. The identifier has to be unique within the list of category definitions where this\n * specification is used.\n */\n id: string;\n\n /**\n * Identifier of a parent category. When specifying the parent category by ID, it has to be available in\n * the scope of this category definition.\n */\n parentId?: string | CategoryIdentifier | NoCategoryIdentifier;\n\n /** Display label of the category. May be [localized]($docs/presentation/advanced/Localization.md). */\n label: string;\n\n /**\n * Extensive description of the category. The description is assigned to the category object that's set\n * on content fields and it's up to UI component to decide how the description is displayed.\n */\n description?: string;\n\n /**\n * Assign a custom [[CategoryDescription.priority]] to the category. It's up to the\n * UI component to make sure that priority is respected - categories with higher priority should appear\n * before or above categories with lower priority.\n *\n * @type integer\n */\n priority?: number;\n\n /**\n * Controls the value of [[CategoryDescription.expand]] which tells the UI component\n * displaying the category to auto-expand the category.\n */\n autoExpand?: boolean;\n\n /**\n * Custom category [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows\n * assigning a custom category renderer to be used in UI. This specification is used to set up\n * [[CategoryDescription.renderer]] for this category and it's up to the UI component to\n * make sure appropriate renderer is used to render the category.\n */\n renderer?: CustomRendererSpecification;\n}\n"]}
1
+ {"version":3,"file":"PropertyCategorySpecification.js","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.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 PresentationRules\n */\n\nimport { CustomRendererSpecification } from \"./CustomRendererSpecification\";\n\n/**\n * Identifier for no category. Used to make category displayed at root level by using\n * this identifier for [[PropertyCategorySpecification.parentId]].\n *\n * @public\n */\nexport interface NoCategoryIdentifier {\n /** Type of the identifier */\n type: \"None\";\n}\n\n/**\n * Identifier of the default parent category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **last**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface ParentCategoryIdentifier {\n /** Type of the identifier */\n type: \"DefaultParent\";\n}\n\n/**\n * Identifier of the root category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **first**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface RootCategoryIdentifier {\n /** Type of the identifier */\n type: \"Root\";\n}\n\n/**\n * Identifier of a category specified through [[PropertyCategorySpecification]] in this scope.\n * @public\n */\nexport interface IdCategoryIdentifier {\n /** Type of the identifier */\n type: \"Id\";\n\n /** ID of the category pointed to by this identifier */\n categoryId: string;\n\n /** Controls whether a class category should be included under the category pointed to by this identifier */\n createClassCategory?: boolean;\n}\n\n/**\n * Identifier of a schema-based category, referenced by its full name.\n * @public\n */\nexport interface SchemaCategoryIdentifier {\n /** Type of the identifier */\n type: \"SchemaCategory\";\n\n /** Full name of the property category, e.g. `MySchema:MyPropertyCategory`. */\n categoryName: string;\n}\n\n/**\n * Category identifier used to assign properties to a category.\n * @public\n */\nexport type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier | SchemaCategoryIdentifier;\n\n/**\n * Content modifier for defining custom property categories. Custom categories are not present in the result unless\n * they contain at least one property. One way to assign a property to the category is by using\n * [property overrides]($docs/presentation/content/PropertySpecification.md).\n *\n * @see [Property category specification reference documentation page]($docs/presentation/content/PropertyCategorySpecification.md)\n * @public\n */\nexport interface PropertyCategorySpecification {\n /**\n * Category identifier used to reference the category definition from property overrides or other category\n * definitions. The identifier has to be unique within the list of category definitions where this\n * specification is used.\n */\n id: string;\n\n /**\n * Identifier of a parent category. When specifying the parent category by ID, it has to be available in\n * the scope of this category definition.\n */\n parentId?: string | CategoryIdentifier | NoCategoryIdentifier;\n\n /** Display label of the category. May be [localized]($docs/presentation/advanced/Localization.md). */\n label: string;\n\n /**\n * Extensive description of the category. The description is assigned to the category object that's set\n * on content fields and it's up to UI component to decide how the description is displayed.\n */\n description?: string;\n\n /**\n * Assign a custom [[CategoryDescription.priority]] to the category. It's up to the\n * UI component to make sure that priority is respected - categories with higher priority should appear\n * before or above categories with lower priority.\n *\n * @type integer\n */\n priority?: number;\n\n /**\n * Controls the value of [[CategoryDescription.expand]] which tells the UI component\n * displaying the category to auto-expand the category.\n */\n autoExpand?: boolean;\n\n /**\n * Custom category [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows\n * assigning a custom category renderer to be used in UI. This specification is used to set up\n * [[CategoryDescription.renderer]] for this category and it's up to the UI component to\n * make sure appropriate renderer is used to render the category.\n */\n renderer?: CustomRendererSpecification;\n}\n"]}
@@ -54,11 +54,21 @@ export interface IdCategoryIdentifier {
54
54
  /** Controls whether a class category should be included under the category pointed to by this identifier */
55
55
  createClassCategory?: boolean;
56
56
  }
57
+ /**
58
+ * Identifier of a schema-based category, referenced by its full name.
59
+ * @public
60
+ */
61
+ export interface SchemaCategoryIdentifier {
62
+ /** Type of the identifier */
63
+ type: "SchemaCategory";
64
+ /** Full name of the property category, e.g. `MySchema:MyPropertyCategory`. */
65
+ categoryName: string;
66
+ }
57
67
  /**
58
68
  * Category identifier used to assign properties to a category.
59
69
  * @public
60
70
  */
61
- export type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier;
71
+ export type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier | SchemaCategoryIdentifier;
62
72
  /**
63
73
  * Content modifier for defining custom property categories. Custom categories are not present in the result unless
64
74
  * they contain at least one property. One way to assign a property to the category is by using
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategorySpecification.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,IAAI,CAAC;IAEX,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IAEnB,4GAA4G;IAC5G,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,oBAAoB,CAAC;AAE1G;;;;;;;GAOG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;IAE9D,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CACxC"}
1
+ {"version":3,"file":"PropertyCategorySpecification.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,IAAI,EAAE,IAAI,CAAC;IAEX,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;IAEnB,4GAA4G;IAC5G,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,6BAA6B;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IAEvB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC;AAErI;;;;;;;GAOG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;IAE9D,sGAAsG;IACtG,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CACxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyCategorySpecification.js","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.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 PresentationRules\n */\n\nimport { CustomRendererSpecification } from \"./CustomRendererSpecification\";\n\n/**\n * Identifier for no category. Used to make category displayed at root level by using\n * this identifier for [[PropertyCategorySpecification.parentId]].\n *\n * @public\n */\nexport interface NoCategoryIdentifier {\n /** Type of the identifier */\n type: \"None\";\n}\n\n/**\n * Identifier of the default parent category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **last**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface ParentCategoryIdentifier {\n /** Type of the identifier */\n type: \"DefaultParent\";\n}\n\n/**\n * Identifier of the root category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **first**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface RootCategoryIdentifier {\n /** Type of the identifier */\n type: \"Root\";\n}\n\n/**\n * Identifier of a category specified through [[PropertyCategorySpecification]] in this scope.\n * @public\n */\nexport interface IdCategoryIdentifier {\n /** Type of the identifier */\n type: \"Id\";\n\n /** ID of the category pointed to by this identifier */\n categoryId: string;\n\n /** Controls whether a class category should be included under the category pointed to by this identifier */\n createClassCategory?: boolean;\n}\n\n/**\n * Category identifier used to assign properties to a category.\n * @public\n */\nexport type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier;\n\n/**\n * Content modifier for defining custom property categories. Custom categories are not present in the result unless\n * they contain at least one property. One way to assign a property to the category is by using\n * [property overrides]($docs/presentation/content/PropertySpecification.md).\n *\n * @see [Property category specification reference documentation page]($docs/presentation/content/PropertyCategorySpecification.md)\n * @public\n */\nexport interface PropertyCategorySpecification {\n /**\n * Category identifier used to reference the category definition from property overrides or other category\n * definitions. The identifier has to be unique within the list of category definitions where this\n * specification is used.\n */\n id: string;\n\n /**\n * Identifier of a parent category. When specifying the parent category by ID, it has to be available in\n * the scope of this category definition.\n */\n parentId?: string | CategoryIdentifier | NoCategoryIdentifier;\n\n /** Display label of the category. May be [localized]($docs/presentation/advanced/Localization.md). */\n label: string;\n\n /**\n * Extensive description of the category. The description is assigned to the category object that's set\n * on content fields and it's up to UI component to decide how the description is displayed.\n */\n description?: string;\n\n /**\n * Assign a custom [[CategoryDescription.priority]] to the category. It's up to the\n * UI component to make sure that priority is respected - categories with higher priority should appear\n * before or above categories with lower priority.\n *\n * @type integer\n */\n priority?: number;\n\n /**\n * Controls the value of [[CategoryDescription.expand]] which tells the UI component\n * displaying the category to auto-expand the category.\n */\n autoExpand?: boolean;\n\n /**\n * Custom category [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows\n * assigning a custom category renderer to be used in UI. This specification is used to set up\n * [[CategoryDescription.renderer]] for this category and it's up to the UI component to\n * make sure appropriate renderer is used to render the category.\n */\n renderer?: CustomRendererSpecification;\n}\n"]}
1
+ {"version":3,"file":"PropertyCategorySpecification.js","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.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 PresentationRules\n */\n\nimport { CustomRendererSpecification } from \"./CustomRendererSpecification\";\n\n/**\n * Identifier for no category. Used to make category displayed at root level by using\n * this identifier for [[PropertyCategorySpecification.parentId]].\n *\n * @public\n */\nexport interface NoCategoryIdentifier {\n /** Type of the identifier */\n type: \"None\";\n}\n\n/**\n * Identifier of the default parent category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **last**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface ParentCategoryIdentifier {\n /** Type of the identifier */\n type: \"DefaultParent\";\n}\n\n/**\n * Identifier of the root category.\n *\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\n *\n * For related properties it's the category made up from the related ECClass defined by the **first**\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\n * the default category is used.\n *\n * @public\n */\nexport interface RootCategoryIdentifier {\n /** Type of the identifier */\n type: \"Root\";\n}\n\n/**\n * Identifier of a category specified through [[PropertyCategorySpecification]] in this scope.\n * @public\n */\nexport interface IdCategoryIdentifier {\n /** Type of the identifier */\n type: \"Id\";\n\n /** ID of the category pointed to by this identifier */\n categoryId: string;\n\n /** Controls whether a class category should be included under the category pointed to by this identifier */\n createClassCategory?: boolean;\n}\n\n/**\n * Identifier of a schema-based category, referenced by its full name.\n * @public\n */\nexport interface SchemaCategoryIdentifier {\n /** Type of the identifier */\n type: \"SchemaCategory\";\n\n /** Full name of the property category, e.g. `MySchema:MyPropertyCategory`. */\n categoryName: string;\n}\n\n/**\n * Category identifier used to assign properties to a category.\n * @public\n */\nexport type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier | SchemaCategoryIdentifier;\n\n/**\n * Content modifier for defining custom property categories. Custom categories are not present in the result unless\n * they contain at least one property. One way to assign a property to the category is by using\n * [property overrides]($docs/presentation/content/PropertySpecification.md).\n *\n * @see [Property category specification reference documentation page]($docs/presentation/content/PropertyCategorySpecification.md)\n * @public\n */\nexport interface PropertyCategorySpecification {\n /**\n * Category identifier used to reference the category definition from property overrides or other category\n * definitions. The identifier has to be unique within the list of category definitions where this\n * specification is used.\n */\n id: string;\n\n /**\n * Identifier of a parent category. When specifying the parent category by ID, it has to be available in\n * the scope of this category definition.\n */\n parentId?: string | CategoryIdentifier | NoCategoryIdentifier;\n\n /** Display label of the category. May be [localized]($docs/presentation/advanced/Localization.md). */\n label: string;\n\n /**\n * Extensive description of the category. The description is assigned to the category object that's set\n * on content fields and it's up to UI component to decide how the description is displayed.\n */\n description?: string;\n\n /**\n * Assign a custom [[CategoryDescription.priority]] to the category. It's up to the\n * UI component to make sure that priority is respected - categories with higher priority should appear\n * before or above categories with lower priority.\n *\n * @type integer\n */\n priority?: number;\n\n /**\n * Controls the value of [[CategoryDescription.expand]] which tells the UI component\n * displaying the category to auto-expand the category.\n */\n autoExpand?: boolean;\n\n /**\n * Custom category [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows\n * assigning a custom category renderer to be used in UI. This specification is used to set up\n * [[CategoryDescription.renderer]] for this category and it's up to the UI component to\n * make sure appropriate renderer is used to render the category.\n */\n renderer?: CustomRendererSpecification;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/presentation-common",
3
- "version": "4.9.0-dev.25",
3
+ "version": "4.9.0-dev.27",
4
4
  "description": "Common pieces for iModel.js presentation packages",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,10 +22,10 @@
22
22
  "module": "lib/esm/presentation-common.js",
23
23
  "typings": "lib/cjs/presentation-common",
24
24
  "peerDependencies": {
25
- "@itwin/core-bentley": "^4.9.0-dev.25",
26
- "@itwin/core-common": "^4.9.0-dev.25",
27
- "@itwin/core-quantity": "^4.9.0-dev.25",
28
- "@itwin/ecschema-metadata": "^4.9.0-dev.25"
25
+ "@itwin/core-bentley": "^4.9.0-dev.27",
26
+ "@itwin/core-common": "^4.9.0-dev.27",
27
+ "@itwin/core-quantity": "^4.9.0-dev.27",
28
+ "@itwin/ecschema-metadata": "^4.9.0-dev.27"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@itwin/eslint-plugin": "^4.0.2",
@@ -61,11 +61,11 @@
61
61
  "typescript": "~5.3.3",
62
62
  "typescript-json-schema": "^0.55.0",
63
63
  "yargs": "^17.4.0",
64
- "@itwin/build-tools": "4.9.0-dev.25",
65
- "@itwin/core-bentley": "4.9.0-dev.25",
66
- "@itwin/core-common": "4.9.0-dev.25",
67
- "@itwin/ecschema-metadata": "4.9.0-dev.25",
68
- "@itwin/core-quantity": "4.9.0-dev.25"
64
+ "@itwin/build-tools": "4.9.0-dev.27",
65
+ "@itwin/core-bentley": "4.9.0-dev.27",
66
+ "@itwin/core-common": "4.9.0-dev.27",
67
+ "@itwin/core-quantity": "4.9.0-dev.27",
68
+ "@itwin/ecschema-metadata": "4.9.0-dev.27"
69
69
  },
70
70
  "nyc": {
71
71
  "extends": "./node_modules/@itwin/build-tools/.nycrc"