@itwin/presentation-common 4.1.0-dev.8 → 4.1.0-dev.81
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 +89 -1
- package/Ruleset.schema.json +29 -0
- package/lib/cjs/presentation-common/content/Content.js +1 -1
- package/lib/cjs/presentation-common/content/Content.js.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.d.ts +15 -0
- package/lib/cjs/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/cjs/presentation-common/content/Descriptor.js +2 -1
- package/lib/cjs/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/cjs/presentation-common/content/Item.js +1 -1
- package/lib/cjs/presentation-common/content/Item.js.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts +2 -0
- package/lib/cjs/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/cjs/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +16 -0
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +2 -0
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
- package/lib/cjs/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/lib/esm/presentation-common/content/Content.js +1 -1
- package/lib/esm/presentation-common/content/Content.js.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.d.ts +15 -0
- package/lib/esm/presentation-common/content/Descriptor.d.ts.map +1 -1
- package/lib/esm/presentation-common/content/Descriptor.js +2 -1
- package/lib/esm/presentation-common/content/Descriptor.js.map +1 -1
- package/lib/esm/presentation-common/content/Item.js +1 -1
- package/lib/esm/presentation-common/content/Item.js.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.d.ts +2 -0
- package/lib/esm/presentation-common/hierarchy/Key.d.ts.map +1 -1
- package/lib/esm/presentation-common/hierarchy/Key.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts +16 -0
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/CalculatedPropertiesSpecification.js.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts +2 -0
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.d.ts.map +1 -1
- package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map +1 -1
- package/package.json +14 -20
package/lib/esm/presentation-common/rules/content/modifiers/PropertyCategorySpecification.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyCategorySpecification.js","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;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 PresentationRules\r\n */\r\n\r\nimport { CustomRendererSpecification } from \"./CustomRendererSpecification\";\r\n\r\n/**\r\n * Identifier for no category. Used to make category displayed at root level by using\r\n * this identifier for [[PropertyCategorySpecification.parentId]].\r\n *\r\n * @public\r\n */\r\nexport interface NoCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"None\";\r\n}\r\n\r\n/**\r\n * Identifier of the default parent category.\r\n *\r\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\r\n *\r\n * For related properties it's the category made up from the related ECClass defined by the **last**\r\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\r\n * the default category is used.\r\n *\r\n * @public\r\n */\r\nexport interface ParentCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"DefaultParent\";\r\n}\r\n\r\n/**\r\n * Identifier of the root category.\r\n *\r\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\r\n *\r\n * For related properties it's the category made up from the related ECClass defined by the **first**\r\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\r\n * the default category is used.\r\n *\r\n * @public\r\n */\r\nexport interface RootCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"Root\";\r\n}\r\n\r\n/**\r\n * Identifier of a category specified through [[PropertyCategorySpecification]] in this scope.\r\n * @public\r\n */\r\nexport interface IdCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"Id\";\r\n\r\n /** ID of the category pointed to by this identifier */\r\n categoryId: string;\r\n}\r\n\r\n/**\r\n * Category identifier used to assign properties to a category.\r\n * @public\r\n */\r\nexport type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier;\r\n\r\n/**\r\n * Content modifier for defining custom property categories. Custom categories are not present in the result unless\r\n * they contain at least one property. One way to assign a property to the category is by using\r\n * [property overrides]($docs/presentation/content/PropertySpecification.md).\r\n *\r\n * @see [Property category specification reference documentation page]($docs/presentation/content/PropertyCategorySpecification.md)\r\n * @public\r\n */\r\nexport interface PropertyCategorySpecification {\r\n /**\r\n * Category identifier used to reference the category definition from property overrides or other category\r\n * definitions. The identifier has to be unique within the list of category definitions where this\r\n * specification is used.\r\n */\r\n id: string;\r\n\r\n /**\r\n * Identifier of a parent category. When specifying the parent category by ID, it has to be available in\r\n * the scope of this category definition.\r\n */\r\n parentId?: string | CategoryIdentifier | NoCategoryIdentifier;\r\n\r\n /** Display label of the category. May be [localized]($docs/presentation/advanced/Localization.md). */\r\n label: string;\r\n\r\n /**\r\n * Extensive description of the category. The description is assigned to the category object that's set\r\n * on content fields and it's up to UI component to decide how the description is displayed.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * Assign a custom [[CategoryDescription.priority]] to the category. It's up to the\r\n * UI component to make sure that priority is respected - categories with higher priority should appear\r\n * before or above categories with lower priority.\r\n *\r\n * @type integer\r\n */\r\n priority?: number;\r\n\r\n /**\r\n * Controls the value of [[CategoryDescription.expand]] which tells the UI component\r\n * displaying the category to auto-expand the category.\r\n */\r\n autoExpand?: boolean;\r\n\r\n /**\r\n * Custom category [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows\r\n * assigning a custom category renderer to be used in UI. This specification is used to set up\r\n * [[CategoryDescription.renderer]] for this category and it's up to the UI component to\r\n * make sure appropriate renderer is used to render the category.\r\n */\r\n renderer?: CustomRendererSpecification;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"PropertyCategorySpecification.js","sourceRoot":"","sources":["../../../../../../src/presentation-common/rules/content/modifiers/PropertyCategorySpecification.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;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 PresentationRules\r\n */\r\n\r\nimport { CustomRendererSpecification } from \"./CustomRendererSpecification\";\r\n\r\n/**\r\n * Identifier for no category. Used to make category displayed at root level by using\r\n * this identifier for [[PropertyCategorySpecification.parentId]].\r\n *\r\n * @public\r\n */\r\nexport interface NoCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"None\";\r\n}\r\n\r\n/**\r\n * Identifier of the default parent category.\r\n *\r\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\r\n *\r\n * For related properties it's the category made up from the related ECClass defined by the **last**\r\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\r\n * the default category is used.\r\n *\r\n * @public\r\n */\r\nexport interface ParentCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"DefaultParent\";\r\n}\r\n\r\n/**\r\n * Identifier of the root category.\r\n *\r\n * For direct properties it's the default category. See [[DefaultPropertyCategoryOverride]] for overriding the default category.\r\n *\r\n * For related properties it's the category made up from the related ECClass defined by the **first**\r\n * [[RelatedPropertiesSpecification]] with [[RelationshipMeaning.RelatedInstance]]. If there's no such specification,\r\n * the default category is used.\r\n *\r\n * @public\r\n */\r\nexport interface RootCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"Root\";\r\n}\r\n\r\n/**\r\n * Identifier of a category specified through [[PropertyCategorySpecification]] in this scope.\r\n * @public\r\n */\r\nexport interface IdCategoryIdentifier {\r\n /** Type of the identifier */\r\n type: \"Id\";\r\n\r\n /** ID of the category pointed to by this identifier */\r\n categoryId: string;\r\n\r\n /** Controls whether a class category should be included under the category pointed to by this identifier */\r\n createClassCategory?: boolean;\r\n}\r\n\r\n/**\r\n * Category identifier used to assign properties to a category.\r\n * @public\r\n */\r\nexport type CategoryIdentifier = ParentCategoryIdentifier | RootCategoryIdentifier | IdCategoryIdentifier;\r\n\r\n/**\r\n * Content modifier for defining custom property categories. Custom categories are not present in the result unless\r\n * they contain at least one property. One way to assign a property to the category is by using\r\n * [property overrides]($docs/presentation/content/PropertySpecification.md).\r\n *\r\n * @see [Property category specification reference documentation page]($docs/presentation/content/PropertyCategorySpecification.md)\r\n * @public\r\n */\r\nexport interface PropertyCategorySpecification {\r\n /**\r\n * Category identifier used to reference the category definition from property overrides or other category\r\n * definitions. The identifier has to be unique within the list of category definitions where this\r\n * specification is used.\r\n */\r\n id: string;\r\n\r\n /**\r\n * Identifier of a parent category. When specifying the parent category by ID, it has to be available in\r\n * the scope of this category definition.\r\n */\r\n parentId?: string | CategoryIdentifier | NoCategoryIdentifier;\r\n\r\n /** Display label of the category. May be [localized]($docs/presentation/advanced/Localization.md). */\r\n label: string;\r\n\r\n /**\r\n * Extensive description of the category. The description is assigned to the category object that's set\r\n * on content fields and it's up to UI component to decide how the description is displayed.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * Assign a custom [[CategoryDescription.priority]] to the category. It's up to the\r\n * UI component to make sure that priority is respected - categories with higher priority should appear\r\n * before or above categories with lower priority.\r\n *\r\n * @type integer\r\n */\r\n priority?: number;\r\n\r\n /**\r\n * Controls the value of [[CategoryDescription.expand]] which tells the UI component\r\n * displaying the category to auto-expand the category.\r\n */\r\n autoExpand?: boolean;\r\n\r\n /**\r\n * Custom category [renderer specification]($docs/presentation/content/RendererSpecification.md) that allows\r\n * assigning a custom category renderer to be used in UI. This specification is used to set up\r\n * [[CategoryDescription.renderer]] for this category and it's up to the UI component to\r\n * make sure appropriate renderer is used to render the category.\r\n */\r\n renderer?: CustomRendererSpecification;\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/presentation-common",
|
|
3
|
-
"version": "4.1.0-dev.
|
|
3
|
+
"version": "4.1.0-dev.81",
|
|
4
4
|
"description": "Common pieces for iModel.js presentation packages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"module": "lib/esm/presentation-common.js",
|
|
23
23
|
"typings": "lib/cjs/presentation-common",
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@itwin/core-bentley": "^4.1.0-dev.
|
|
26
|
-
"@itwin/core-common": "^4.1.0-dev.
|
|
27
|
-
"@itwin/core-quantity": "^4.1.0-dev.
|
|
28
|
-
"@itwin/ecschema-metadata": "^4.1.0-dev.
|
|
25
|
+
"@itwin/core-bentley": "^4.1.0-dev.81",
|
|
26
|
+
"@itwin/core-common": "^4.1.0-dev.81",
|
|
27
|
+
"@itwin/core-quantity": "^4.1.0-dev.81",
|
|
28
|
+
"@itwin/ecschema-metadata": "^4.1.0-dev.81"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@itwin/eslint-plugin": "
|
|
31
|
+
"@itwin/eslint-plugin": "4.0.0-dev.44",
|
|
32
32
|
"@types/chai": "4.3.1",
|
|
33
33
|
"@types/chai-as-promised": "^7",
|
|
34
34
|
"@types/chai-jest-snapshot": "^1.3.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/deep-equal": "^1",
|
|
37
37
|
"@types/faker": "^4.1.0",
|
|
38
38
|
"@types/mocha": "^8.2.2",
|
|
39
|
-
"@types/sinon": "^
|
|
39
|
+
"@types/sinon": "^10.0.15",
|
|
40
40
|
"@types/sinon-chai": "^3.2.0",
|
|
41
41
|
"@types/source-map-support": "^0.4.0",
|
|
42
42
|
"chai": "^4.1.2",
|
|
@@ -46,33 +46,27 @@
|
|
|
46
46
|
"cpx2": "^3.0.0",
|
|
47
47
|
"cross-env": "^5.1.4",
|
|
48
48
|
"deep-equal": "^1",
|
|
49
|
-
"eslint": "^8.
|
|
49
|
+
"eslint": "^8.44.0",
|
|
50
50
|
"faker": "^4.1.0",
|
|
51
51
|
"json-schema-faker": "0.5.0-rc16",
|
|
52
52
|
"mocha": "^10.0.0",
|
|
53
53
|
"nyc": "^15.1.0",
|
|
54
54
|
"rimraf": "^3.0.2",
|
|
55
|
-
"sinon": "^
|
|
55
|
+
"sinon": "^15.0.4",
|
|
56
56
|
"sinon-chai": "^3.2.0",
|
|
57
57
|
"typemoq": "^2.1.0",
|
|
58
58
|
"typescript": "~5.0.2",
|
|
59
59
|
"typescript-json-schema": "^0.55.0",
|
|
60
60
|
"yargs": "^17.4.0",
|
|
61
|
-
"@itwin/
|
|
62
|
-
"@itwin/
|
|
63
|
-
"@itwin/core-
|
|
64
|
-
"@itwin/ecschema-metadata": "4.1.0-dev.
|
|
65
|
-
"@itwin/core-
|
|
61
|
+
"@itwin/build-tools": "4.1.0-dev.81",
|
|
62
|
+
"@itwin/core-bentley": "4.1.0-dev.81",
|
|
63
|
+
"@itwin/core-common": "4.1.0-dev.81",
|
|
64
|
+
"@itwin/ecschema-metadata": "4.1.0-dev.81",
|
|
65
|
+
"@itwin/core-quantity": "4.1.0-dev.81"
|
|
66
66
|
},
|
|
67
67
|
"nyc": {
|
|
68
68
|
"extends": "./node_modules/@itwin/build-tools/.nycrc"
|
|
69
69
|
},
|
|
70
|
-
"eslintConfig": {
|
|
71
|
-
"plugins": [
|
|
72
|
-
"@itwin"
|
|
73
|
-
],
|
|
74
|
-
"extends": "plugin:@itwin/itwinjs-recommended"
|
|
75
|
-
},
|
|
76
70
|
"scripts": {
|
|
77
71
|
"build": "npm run -s ruleset-json-schema && npm run -s build:assets && npm run -s build:public && npm run -s build:cjs && npm run -s build:esm",
|
|
78
72
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|