@itwin/presentation-testing 3.6.0-dev.51 → 3.6.0-dev.53
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/lib/cjs/presentation-testing/ContentBuilder.d.ts +87 -87
- package/lib/cjs/presentation-testing/ContentBuilder.js +147 -147
- package/lib/cjs/presentation-testing/ContentBuilder.js.map +1 -1
- package/lib/cjs/presentation-testing/Helpers.d.ts +42 -42
- package/lib/cjs/presentation-testing/Helpers.js +139 -139
- package/lib/cjs/presentation-testing/Helpers.js.map +1 -1
- package/lib/cjs/presentation-testing/HierarchyBuilder.d.ts +66 -66
- package/lib/cjs/presentation-testing/HierarchyBuilder.js +68 -68
- package/lib/cjs/presentation-testing/HierarchyBuilder.js.map +1 -1
- package/lib/cjs/presentation-testing/IModelUtilities.d.ts +46 -46
- package/lib/cjs/presentation-testing/IModelUtilities.js +77 -77
- package/lib/cjs/presentation-testing/IModelUtilities.js.map +1 -1
- package/lib/cjs/presentation-testing.d.ts +28 -28
- package/lib/cjs/presentation-testing.js +44 -44
- package/lib/cjs/presentation-testing.js.map +1 -1
- package/lib/esm/presentation-testing/ContentBuilder.d.ts +87 -87
- package/lib/esm/presentation-testing/ContentBuilder.js +143 -143
- package/lib/esm/presentation-testing/ContentBuilder.js.map +1 -1
- package/lib/esm/presentation-testing/Helpers.d.ts +42 -42
- package/lib/esm/presentation-testing/Helpers.js +114 -114
- package/lib/esm/presentation-testing/Helpers.js.map +1 -1
- package/lib/esm/presentation-testing/HierarchyBuilder.d.ts +66 -66
- package/lib/esm/presentation-testing/HierarchyBuilder.js +63 -63
- package/lib/esm/presentation-testing/HierarchyBuilder.js.map +1 -1
- package/lib/esm/presentation-testing/IModelUtilities.d.ts +46 -46
- package/lib/esm/presentation-testing/IModelUtilities.js +69 -69
- package/lib/esm/presentation-testing/IModelUtilities.js.map +1 -1
- package/lib/esm/presentation-testing.d.ts +28 -28
- package/lib/esm/presentation-testing.js +32 -32
- package/lib/esm/presentation-testing.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module IModel
|
|
3
|
-
*/
|
|
4
|
-
import { IModelDb } from "@itwin/core-backend";
|
|
5
|
-
import { Id64String } from "@itwin/core-bentley";
|
|
6
|
-
import { BisCodeSpec, Code, CodeScopeProps, ElementAspectProps, ElementProps, ModelProps } from "@itwin/core-common";
|
|
7
|
-
import { IModelConnection } from "@itwin/core-frontend";
|
|
8
|
-
/**
|
|
9
|
-
* Interface for IModel builder pattern. Used for building IModels to test rulesets.
|
|
10
|
-
*
|
|
11
|
-
* @beta
|
|
12
|
-
*/
|
|
13
|
-
export interface TestIModelBuilder {
|
|
14
|
-
/** Insert a model into the builder's iModel */
|
|
15
|
-
insertModel<TProps extends ModelProps>(props: TProps): Id64String;
|
|
16
|
-
/** Insert an element into the builder's iModel */
|
|
17
|
-
insertElement<TProps extends ElementProps>(props: TProps): Id64String;
|
|
18
|
-
/** Insert an element aspect into the specified element */
|
|
19
|
-
insertAspect<TProps extends ElementAspectProps>(props: TProps): void;
|
|
20
|
-
/**
|
|
21
|
-
* Create code for specified element.
|
|
22
|
-
* Code value has to be unique within its scope (see [Codes documentation page]($docs/bis/guide/fundamentals/codes.md)).
|
|
23
|
-
*/
|
|
24
|
-
createCode(scopeModelId: CodeScopeProps, codeSpecName: BisCodeSpec, codeValue: string): Code;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Function that creates an iModel and returns a connection to it.
|
|
28
|
-
* @param name Name of test IModel
|
|
29
|
-
* @param cb Callback function that receives an [[TestIModelBuilder]] to fill the iModel with data
|
|
30
|
-
*
|
|
31
|
-
* @beta
|
|
32
|
-
*/
|
|
33
|
-
export declare function buildTestIModel(name: string, cb: (builder: TestIModelBuilder) => void): Promise<IModelConnection>;
|
|
34
|
-
/**
|
|
35
|
-
* Default implementation of IModel builder pattern. Used for building IModels to test rulesets.
|
|
36
|
-
*
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
export declare class IModelBuilder implements TestIModelBuilder {
|
|
40
|
-
private _iModel;
|
|
41
|
-
constructor(iModel: IModelDb);
|
|
42
|
-
insertModel<TProps extends ModelProps>(props: TProps): Id64String;
|
|
43
|
-
insertElement<TProps extends ElementProps>(props: TProps): Id64String;
|
|
44
|
-
insertAspect<TProps extends ElementAspectProps>(props: TProps): void;
|
|
45
|
-
createCode(scopeModelId: CodeScopeProps, codeSpecName: BisCodeSpec, codeValue: string): Code;
|
|
46
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module IModel
|
|
3
|
+
*/
|
|
4
|
+
import { IModelDb } from "@itwin/core-backend";
|
|
5
|
+
import { Id64String } from "@itwin/core-bentley";
|
|
6
|
+
import { BisCodeSpec, Code, CodeScopeProps, ElementAspectProps, ElementProps, ModelProps } from "@itwin/core-common";
|
|
7
|
+
import { IModelConnection } from "@itwin/core-frontend";
|
|
8
|
+
/**
|
|
9
|
+
* Interface for IModel builder pattern. Used for building IModels to test rulesets.
|
|
10
|
+
*
|
|
11
|
+
* @beta
|
|
12
|
+
*/
|
|
13
|
+
export interface TestIModelBuilder {
|
|
14
|
+
/** Insert a model into the builder's iModel */
|
|
15
|
+
insertModel<TProps extends ModelProps>(props: TProps): Id64String;
|
|
16
|
+
/** Insert an element into the builder's iModel */
|
|
17
|
+
insertElement<TProps extends ElementProps>(props: TProps): Id64String;
|
|
18
|
+
/** Insert an element aspect into the specified element */
|
|
19
|
+
insertAspect<TProps extends ElementAspectProps>(props: TProps): void;
|
|
20
|
+
/**
|
|
21
|
+
* Create code for specified element.
|
|
22
|
+
* Code value has to be unique within its scope (see [Codes documentation page]($docs/bis/guide/fundamentals/codes.md)).
|
|
23
|
+
*/
|
|
24
|
+
createCode(scopeModelId: CodeScopeProps, codeSpecName: BisCodeSpec, codeValue: string): Code;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Function that creates an iModel and returns a connection to it.
|
|
28
|
+
* @param name Name of test IModel
|
|
29
|
+
* @param cb Callback function that receives an [[TestIModelBuilder]] to fill the iModel with data
|
|
30
|
+
*
|
|
31
|
+
* @beta
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildTestIModel(name: string, cb: (builder: TestIModelBuilder) => void): Promise<IModelConnection>;
|
|
34
|
+
/**
|
|
35
|
+
* Default implementation of IModel builder pattern. Used for building IModels to test rulesets.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export declare class IModelBuilder implements TestIModelBuilder {
|
|
40
|
+
private _iModel;
|
|
41
|
+
constructor(iModel: IModelDb);
|
|
42
|
+
insertModel<TProps extends ModelProps>(props: TProps): Id64String;
|
|
43
|
+
insertElement<TProps extends ElementProps>(props: TProps): Id64String;
|
|
44
|
+
insertAspect<TProps extends ElementAspectProps>(props: TProps): void;
|
|
45
|
+
createCode(scopeModelId: CodeScopeProps, codeSpecName: BisCodeSpec, codeValue: string): Code;
|
|
46
|
+
}
|
|
47
47
|
//# sourceMappingURL=IModelUtilities.d.ts.map
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module IModel
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.IModelBuilder = exports.buildTestIModel = void 0;
|
|
14
|
-
const core_backend_1 = require("@itwin/core-backend");
|
|
15
|
-
const core_common_1 = require("@itwin/core-common");
|
|
16
|
-
const core_frontend_1 = require("@itwin/core-frontend");
|
|
17
|
-
const path_1 = __importDefault(require("path"));
|
|
18
|
-
const Helpers_1 = require("./Helpers");
|
|
19
|
-
/**
|
|
20
|
-
* Function that creates an iModel and returns a connection to it.
|
|
21
|
-
* @param name Name of test IModel
|
|
22
|
-
* @param cb Callback function that receives an [[TestIModelBuilder]] to fill the iModel with data
|
|
23
|
-
*
|
|
24
|
-
* @beta
|
|
25
|
-
*/
|
|
26
|
-
async function buildTestIModel(name, cb) {
|
|
27
|
-
const outputFile = setupOutputFileLocation(name);
|
|
28
|
-
const db = core_backend_1.SnapshotDb.createEmpty(outputFile, { rootSubject: { name } });
|
|
29
|
-
const builder = new IModelBuilder(db);
|
|
30
|
-
try {
|
|
31
|
-
cb(builder);
|
|
32
|
-
}
|
|
33
|
-
finally {
|
|
34
|
-
db.saveChanges("Created test IModel");
|
|
35
|
-
db.close();
|
|
36
|
-
}
|
|
37
|
-
return core_frontend_1.SnapshotConnection.openFile(outputFile);
|
|
38
|
-
}
|
|
39
|
-
exports.buildTestIModel = buildTestIModel;
|
|
40
|
-
/**
|
|
41
|
-
* Default implementation of IModel builder pattern. Used for building IModels to test rulesets.
|
|
42
|
-
*
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
class IModelBuilder {
|
|
46
|
-
constructor(iModel) {
|
|
47
|
-
this._iModel = iModel;
|
|
48
|
-
}
|
|
49
|
-
insertModel(props) {
|
|
50
|
-
return this._iModel.models.insertModel(props);
|
|
51
|
-
}
|
|
52
|
-
insertElement(props) {
|
|
53
|
-
return this._iModel.elements.insertElement(props);
|
|
54
|
-
}
|
|
55
|
-
insertAspect(props) {
|
|
56
|
-
this._iModel.elements.insertAspect(props);
|
|
57
|
-
}
|
|
58
|
-
createCode(scopeModelId, codeSpecName, codeValue) {
|
|
59
|
-
const codeSpec = this._iModel.codeSpecs.getByName(codeSpecName);
|
|
60
|
-
return new core_common_1.Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.IModelBuilder = IModelBuilder;
|
|
64
|
-
/**
|
|
65
|
-
* Prepare for an output file by:
|
|
66
|
-
* - Resolving the output file name under the known test output directory
|
|
67
|
-
* - Making directories as necessary
|
|
68
|
-
* - Removing a previous copy of the output file
|
|
69
|
-
* @param fileName Name of output file
|
|
70
|
-
*/
|
|
71
|
-
function setupOutputFileLocation(fileName) {
|
|
72
|
-
const testOutputDir = (0, Helpers_1.getTestOutputDir)();
|
|
73
|
-
!core_backend_1.IModelJsFs.existsSync(testOutputDir) && core_backend_1.IModelJsFs.mkdirSync(testOutputDir);
|
|
74
|
-
const outputFile = path_1.default.join(testOutputDir, `${fileName}.bim`);
|
|
75
|
-
core_backend_1.IModelJsFs.existsSync(outputFile) && core_backend_1.IModelJsFs.unlinkSync(outputFile);
|
|
76
|
-
return outputFile;
|
|
77
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module IModel
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.IModelBuilder = exports.buildTestIModel = void 0;
|
|
14
|
+
const core_backend_1 = require("@itwin/core-backend");
|
|
15
|
+
const core_common_1 = require("@itwin/core-common");
|
|
16
|
+
const core_frontend_1 = require("@itwin/core-frontend");
|
|
17
|
+
const path_1 = __importDefault(require("path"));
|
|
18
|
+
const Helpers_1 = require("./Helpers");
|
|
19
|
+
/**
|
|
20
|
+
* Function that creates an iModel and returns a connection to it.
|
|
21
|
+
* @param name Name of test IModel
|
|
22
|
+
* @param cb Callback function that receives an [[TestIModelBuilder]] to fill the iModel with data
|
|
23
|
+
*
|
|
24
|
+
* @beta
|
|
25
|
+
*/
|
|
26
|
+
async function buildTestIModel(name, cb) {
|
|
27
|
+
const outputFile = setupOutputFileLocation(name);
|
|
28
|
+
const db = core_backend_1.SnapshotDb.createEmpty(outputFile, { rootSubject: { name } });
|
|
29
|
+
const builder = new IModelBuilder(db);
|
|
30
|
+
try {
|
|
31
|
+
cb(builder);
|
|
32
|
+
}
|
|
33
|
+
finally {
|
|
34
|
+
db.saveChanges("Created test IModel");
|
|
35
|
+
db.close();
|
|
36
|
+
}
|
|
37
|
+
return core_frontend_1.SnapshotConnection.openFile(outputFile);
|
|
38
|
+
}
|
|
39
|
+
exports.buildTestIModel = buildTestIModel;
|
|
40
|
+
/**
|
|
41
|
+
* Default implementation of IModel builder pattern. Used for building IModels to test rulesets.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
class IModelBuilder {
|
|
46
|
+
constructor(iModel) {
|
|
47
|
+
this._iModel = iModel;
|
|
48
|
+
}
|
|
49
|
+
insertModel(props) {
|
|
50
|
+
return this._iModel.models.insertModel(props);
|
|
51
|
+
}
|
|
52
|
+
insertElement(props) {
|
|
53
|
+
return this._iModel.elements.insertElement(props);
|
|
54
|
+
}
|
|
55
|
+
insertAspect(props) {
|
|
56
|
+
this._iModel.elements.insertAspect(props);
|
|
57
|
+
}
|
|
58
|
+
createCode(scopeModelId, codeSpecName, codeValue) {
|
|
59
|
+
const codeSpec = this._iModel.codeSpecs.getByName(codeSpecName);
|
|
60
|
+
return new core_common_1.Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.IModelBuilder = IModelBuilder;
|
|
64
|
+
/**
|
|
65
|
+
* Prepare for an output file by:
|
|
66
|
+
* - Resolving the output file name under the known test output directory
|
|
67
|
+
* - Making directories as necessary
|
|
68
|
+
* - Removing a previous copy of the output file
|
|
69
|
+
* @param fileName Name of output file
|
|
70
|
+
*/
|
|
71
|
+
function setupOutputFileLocation(fileName) {
|
|
72
|
+
const testOutputDir = (0, Helpers_1.getTestOutputDir)();
|
|
73
|
+
!core_backend_1.IModelJsFs.existsSync(testOutputDir) && core_backend_1.IModelJsFs.mkdirSync(testOutputDir);
|
|
74
|
+
const outputFile = path_1.default.join(testOutputDir, `${fileName}.bim`);
|
|
75
|
+
core_backend_1.IModelJsFs.existsSync(outputFile) && core_backend_1.IModelJsFs.unlinkSync(outputFile);
|
|
76
|
+
return outputFile;
|
|
77
|
+
}
|
|
78
78
|
//# sourceMappingURL=IModelUtilities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelUtilities.js","sourceRoot":"","sources":["../../../src/presentation-testing/IModelUtilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAAuE;AAEvE,oDAA8I;AAC9I,wDAA4E;AAC5E,gDAAwB;AACxB,uCAA6C;AAqB7C;;;;;;GAMG;AACI,KAAK,UAAU,eAAe,CAAC,IAAY,EAAE,EAAwC;IAC1F,MAAM,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,EAAE,GAAG,yBAAU,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACzE,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;IACtC,IAAI;QACF,EAAE,CAAC,OAAO,CAAC,CAAC;KACb;YAAS;QACR,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACtC,EAAE,CAAC,KAAK,EAAE,CAAC;KACZ;IACD,OAAO,kCAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC;AAXD,0CAWC;AAED;;;;GAIG;AACH,MAAa,aAAa;IAGxB,YAAY,MAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,WAAW,CAA4B,KAAa;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAEM,aAAa,CAA8B,KAAa;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAEM,YAAY,CAAoC,KAAa;QAClE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAEM,UAAU,CAAC,YAA4B,EAAE,YAAyB,EAAE,SAAiB;QAC1F,MAAM,QAAQ,GAAa,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC1E,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAvBD,sCAuBC;AAED;;;;;;GAMG;AACH,SAAS,uBAAuB,CAAC,QAAgB;IAC/C,MAAM,aAAa,GAAG,IAAA,0BAAgB,GAAE,CAAC;IACzC,CAAC,yBAAU,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,yBAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAE7E,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,QAAQ,MAAM,CAAC,CAAC;IAC/D,yBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,yBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"IModelUtilities.js","sourceRoot":"","sources":["../../../src/presentation-testing/IModelUtilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAAuE;AAEvE,oDAA8I;AAC9I,wDAA4E;AAC5E,gDAAwB;AACxB,uCAA6C;AAqB7C;;;;;;GAMG;AACI,KAAK,UAAU,eAAe,CAAC,IAAY,EAAE,EAAwC;IAC1F,MAAM,UAAU,GAAG,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,EAAE,GAAG,yBAAU,CAAC,WAAW,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACzE,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC,CAAC;IACtC,IAAI;QACF,EAAE,CAAC,OAAO,CAAC,CAAC;KACb;YAAS;QACR,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACtC,EAAE,CAAC,KAAK,EAAE,CAAC;KACZ;IACD,OAAO,kCAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACjD,CAAC;AAXD,0CAWC;AAED;;;;GAIG;AACH,MAAa,aAAa;IAGxB,YAAY,MAAgB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,WAAW,CAA4B,KAAa;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAEM,aAAa,CAA8B,KAAa;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC;IAEM,YAAY,CAAoC,KAAa;QAClE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAEM,UAAU,CAAC,YAA4B,EAAE,YAAyB,EAAE,SAAiB;QAC1F,MAAM,QAAQ,GAAa,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC1E,OAAO,IAAI,kBAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAvBD,sCAuBC;AAED;;;;;;GAMG;AACH,SAAS,uBAAuB,CAAC,QAAgB;IAC/C,MAAM,aAAa,GAAG,IAAA,0BAAgB,GAAE,CAAC;IACzC,CAAC,yBAAU,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,yBAAU,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAE7E,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,QAAQ,MAAM,CAAC,CAAC;IAC/D,yBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,yBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACvE,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModel\n */\n\nimport { IModelDb, IModelJsFs, SnapshotDb } from \"@itwin/core-backend\";\nimport { Id64String } from \"@itwin/core-bentley\";\nimport { BisCodeSpec, Code, CodeScopeProps, CodeSpec, ElementAspectProps, ElementProps, LocalFileName, ModelProps } from \"@itwin/core-common\";\nimport { IModelConnection, SnapshotConnection } from \"@itwin/core-frontend\";\nimport path from \"path\";\nimport { getTestOutputDir } from \"./Helpers\";\n\n/**\n * Interface for IModel builder pattern. Used for building IModels to test rulesets.\n *\n * @beta\n */\nexport interface TestIModelBuilder {\n /** Insert a model into the builder's iModel */\n insertModel<TProps extends ModelProps>(props: TProps): Id64String;\n /** Insert an element into the builder's iModel */\n insertElement<TProps extends ElementProps>(props: TProps): Id64String;\n /** Insert an element aspect into the specified element */\n insertAspect<TProps extends ElementAspectProps>(props: TProps): void;\n /**\n * Create code for specified element.\n * Code value has to be unique within its scope (see [Codes documentation page]($docs/bis/guide/fundamentals/codes.md)).\n */\n createCode(scopeModelId: CodeScopeProps, codeSpecName: BisCodeSpec, codeValue: string): Code;\n}\n\n/**\n * Function that creates an iModel and returns a connection to it.\n * @param name Name of test IModel\n * @param cb Callback function that receives an [[TestIModelBuilder]] to fill the iModel with data\n *\n * @beta\n */\nexport async function buildTestIModel(name: string, cb: (builder: TestIModelBuilder) => void): Promise<IModelConnection> {\n const outputFile = setupOutputFileLocation(name);\n const db = SnapshotDb.createEmpty(outputFile, { rootSubject: { name } });\n const builder = new IModelBuilder(db);\n try {\n cb(builder);\n } finally {\n db.saveChanges(\"Created test IModel\");\n db.close();\n }\n return SnapshotConnection.openFile(outputFile);\n}\n\n/**\n * Default implementation of IModel builder pattern. Used for building IModels to test rulesets.\n *\n * @internal\n */\nexport class IModelBuilder implements TestIModelBuilder {\n private _iModel: IModelDb;\n\n constructor(iModel: IModelDb) {\n this._iModel = iModel;\n }\n\n public insertModel<TProps extends ModelProps>(props: TProps): Id64String {\n return this._iModel.models.insertModel(props);\n }\n\n public insertElement<TProps extends ElementProps>(props: TProps): Id64String {\n return this._iModel.elements.insertElement(props);\n }\n\n public insertAspect<TProps extends ElementAspectProps>(props: TProps): void {\n this._iModel.elements.insertAspect(props);\n }\n\n public createCode(scopeModelId: CodeScopeProps, codeSpecName: BisCodeSpec, codeValue: string): Code {\n const codeSpec: CodeSpec = this._iModel.codeSpecs.getByName(codeSpecName);\n return new Code({ spec: codeSpec.id, scope: scopeModelId, value: codeValue });\n }\n}\n\n/**\n * Prepare for an output file by:\n * - Resolving the output file name under the known test output directory\n * - Making directories as necessary\n * - Removing a previous copy of the output file\n * @param fileName Name of output file\n */\nfunction setupOutputFileLocation(fileName: string): LocalFileName {\n const testOutputDir = getTestOutputDir();\n !IModelJsFs.existsSync(testOutputDir) && IModelJsFs.mkdirSync(testOutputDir);\n\n const outputFile = path.join(testOutputDir, `${fileName}.bim`);\n IModelJsFs.existsSync(outputFile) && IModelJsFs.unlinkSync(outputFile);\n return outputFile;\n}\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Hierarchies
|
|
3
|
-
*
|
|
4
|
-
* @docs-group-description Hierarchies
|
|
5
|
-
* Types for testing hierarchies.
|
|
6
|
-
*/
|
|
7
|
-
export * from "./presentation-testing/HierarchyBuilder";
|
|
8
|
-
/**
|
|
9
|
-
* @module Content
|
|
10
|
-
*
|
|
11
|
-
* @docs-group-description Content
|
|
12
|
-
* Types for testing content.
|
|
13
|
-
*/
|
|
14
|
-
export * from "./presentation-testing/ContentBuilder";
|
|
15
|
-
/**
|
|
16
|
-
* @module Helpers
|
|
17
|
-
*
|
|
18
|
-
* @docs-group-description Helpers
|
|
19
|
-
* Various test helpers.
|
|
20
|
-
*/
|
|
21
|
-
export * from "./presentation-testing/Helpers";
|
|
22
|
-
/**
|
|
23
|
-
* @module IModel
|
|
24
|
-
*
|
|
25
|
-
* @docs-group-description IModel
|
|
26
|
-
* Utilities for creating test iModels that can be used to exercise presentation rules.
|
|
27
|
-
*/
|
|
28
|
-
export * from "./presentation-testing/IModelUtilities";
|
|
1
|
+
/**
|
|
2
|
+
* @module Hierarchies
|
|
3
|
+
*
|
|
4
|
+
* @docs-group-description Hierarchies
|
|
5
|
+
* Types for testing hierarchies.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./presentation-testing/HierarchyBuilder";
|
|
8
|
+
/**
|
|
9
|
+
* @module Content
|
|
10
|
+
*
|
|
11
|
+
* @docs-group-description Content
|
|
12
|
+
* Types for testing content.
|
|
13
|
+
*/
|
|
14
|
+
export * from "./presentation-testing/ContentBuilder";
|
|
15
|
+
/**
|
|
16
|
+
* @module Helpers
|
|
17
|
+
*
|
|
18
|
+
* @docs-group-description Helpers
|
|
19
|
+
* Various test helpers.
|
|
20
|
+
*/
|
|
21
|
+
export * from "./presentation-testing/Helpers";
|
|
22
|
+
/**
|
|
23
|
+
* @module IModel
|
|
24
|
+
*
|
|
25
|
+
* @docs-group-description IModel
|
|
26
|
+
* Utilities for creating test iModels that can be used to exercise presentation rules.
|
|
27
|
+
*/
|
|
28
|
+
export * from "./presentation-testing/IModelUtilities";
|
|
29
29
|
//# sourceMappingURL=presentation-testing.d.ts.map
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
/*---------------------------------------------------------------------------------------------
|
|
14
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
15
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
|
-
*--------------------------------------------------------------------------------------------*/
|
|
17
|
-
/**
|
|
18
|
-
* @module Hierarchies
|
|
19
|
-
*
|
|
20
|
-
* @docs-group-description Hierarchies
|
|
21
|
-
* Types for testing hierarchies.
|
|
22
|
-
*/
|
|
23
|
-
__exportStar(require("./presentation-testing/HierarchyBuilder"), exports);
|
|
24
|
-
/**
|
|
25
|
-
* @module Content
|
|
26
|
-
*
|
|
27
|
-
* @docs-group-description Content
|
|
28
|
-
* Types for testing content.
|
|
29
|
-
*/
|
|
30
|
-
__exportStar(require("./presentation-testing/ContentBuilder"), exports);
|
|
31
|
-
/**
|
|
32
|
-
* @module Helpers
|
|
33
|
-
*
|
|
34
|
-
* @docs-group-description Helpers
|
|
35
|
-
* Various test helpers.
|
|
36
|
-
*/
|
|
37
|
-
__exportStar(require("./presentation-testing/Helpers"), exports);
|
|
38
|
-
/**
|
|
39
|
-
* @module IModel
|
|
40
|
-
*
|
|
41
|
-
* @docs-group-description IModel
|
|
42
|
-
* Utilities for creating test iModels that can be used to exercise presentation rules.
|
|
43
|
-
*/
|
|
44
|
-
__exportStar(require("./presentation-testing/IModelUtilities"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
/*---------------------------------------------------------------------------------------------
|
|
14
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
15
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
|
+
*--------------------------------------------------------------------------------------------*/
|
|
17
|
+
/**
|
|
18
|
+
* @module Hierarchies
|
|
19
|
+
*
|
|
20
|
+
* @docs-group-description Hierarchies
|
|
21
|
+
* Types for testing hierarchies.
|
|
22
|
+
*/
|
|
23
|
+
__exportStar(require("./presentation-testing/HierarchyBuilder"), exports);
|
|
24
|
+
/**
|
|
25
|
+
* @module Content
|
|
26
|
+
*
|
|
27
|
+
* @docs-group-description Content
|
|
28
|
+
* Types for testing content.
|
|
29
|
+
*/
|
|
30
|
+
__exportStar(require("./presentation-testing/ContentBuilder"), exports);
|
|
31
|
+
/**
|
|
32
|
+
* @module Helpers
|
|
33
|
+
*
|
|
34
|
+
* @docs-group-description Helpers
|
|
35
|
+
* Various test helpers.
|
|
36
|
+
*/
|
|
37
|
+
__exportStar(require("./presentation-testing/Helpers"), exports);
|
|
38
|
+
/**
|
|
39
|
+
* @module IModel
|
|
40
|
+
*
|
|
41
|
+
* @docs-group-description IModel
|
|
42
|
+
* Utilities for creating test iModels that can be used to exercise presentation rules.
|
|
43
|
+
*/
|
|
44
|
+
__exportStar(require("./presentation-testing/IModelUtilities"), exports);
|
|
45
45
|
//# sourceMappingURL=presentation-testing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-testing.js","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,0EAAwD;AAExD;;;;;GAKG;AACH,wEAAsD;AAEtD;;;;;GAKG;AACH,iEAA+C;AAE/C;;;;;GAKG;AACH,yEAAuD","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"presentation-testing.js","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,0EAAwD;AAExD;;;;;GAKG;AACH,wEAAsD;AAEtD;;;;;GAKG;AACH,iEAA+C;AAE/C;;;;;GAKG;AACH,yEAAuD","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/**\n * @module Hierarchies\n *\n * @docs-group-description Hierarchies\n * Types for testing hierarchies.\n */\nexport * from \"./presentation-testing/HierarchyBuilder\";\n\n/**\n * @module Content\n *\n * @docs-group-description Content\n * Types for testing content.\n */\nexport * from \"./presentation-testing/ContentBuilder\";\n\n/**\n * @module Helpers\n *\n * @docs-group-description Helpers\n * Various test helpers.\n */\nexport * from \"./presentation-testing/Helpers\";\n\n/**\n * @module IModel\n *\n * @docs-group-description IModel\n * Utilities for creating test iModels that can be used to exercise presentation rules.\n */\nexport * from \"./presentation-testing/IModelUtilities\";\n"]}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
2
|
-
import { IModelConnection } from "@itwin/core-frontend";
|
|
3
|
-
import { Content, InstanceKey, KeySet, PageOptions, Ruleset } from "@itwin/presentation-common";
|
|
4
|
-
/**
|
|
5
|
-
* Interface for a data provider, which is used by ContentBuilder.
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export interface IContentBuilderDataProvider {
|
|
9
|
-
/** Keys the data provider is creating content for */
|
|
10
|
-
keys: Readonly<KeySet>;
|
|
11
|
-
/** Get the size of content result set */
|
|
12
|
-
getContentSetSize: () => Promise<number>;
|
|
13
|
-
/** Get the content */
|
|
14
|
-
getContent: (options?: PageOptions) => Promise<Readonly<Content> | undefined>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Property records grouped under a single className
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export interface ContentBuilderResult {
|
|
21
|
-
/** Full name of ECClass whose records are contained in this data structure */
|
|
22
|
-
className: string;
|
|
23
|
-
/** Property records for the ECClass instance */
|
|
24
|
-
records: PropertyRecord[];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Properties for creating a `ContentBuilder` instance.
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export interface ContentBuilderProps {
|
|
31
|
-
/** The iModel to pull data from */
|
|
32
|
-
imodel: IModelConnection;
|
|
33
|
-
/** Custom data provider that allows mocking data ContentBuilder receives */
|
|
34
|
-
dataProvider?: IContentBuilderDataProvider;
|
|
35
|
-
/**
|
|
36
|
-
* Decimal precision or numeric types.
|
|
37
|
-
*
|
|
38
|
-
* Raw numeric values with high precision may slightly differ from platform to platform due to
|
|
39
|
-
* rounding differences on different platforms. This may be a problem when used with snapshot testing,
|
|
40
|
-
* in which case this attribute may be set to supply the maximum precision of raw numeric values.
|
|
41
|
-
*
|
|
42
|
-
* By default no rounding is applied.
|
|
43
|
-
*/
|
|
44
|
-
decimalPrecision?: number;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* A class that constructs content from specified imodel and ruleset.
|
|
48
|
-
* @public
|
|
49
|
-
*/
|
|
50
|
-
export declare class ContentBuilder {
|
|
51
|
-
private readonly _iModel;
|
|
52
|
-
private _dataProvider;
|
|
53
|
-
private _decimalPrecision?;
|
|
54
|
-
/**
|
|
55
|
-
* Constructor
|
|
56
|
-
* @param iModel
|
|
57
|
-
* @param dataProvider
|
|
58
|
-
*/
|
|
59
|
-
constructor(props: ContentBuilderProps);
|
|
60
|
-
private doCreateContent;
|
|
61
|
-
/**
|
|
62
|
-
* Create a list of property records using the supplied presentation ruleset.
|
|
63
|
-
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
64
|
-
* @param instanceKeys Keys of instances that should be queried.
|
|
65
|
-
* @param displayType Type of content container display. For example:
|
|
66
|
-
* "PropertyPane", "Grid", "List" etc.
|
|
67
|
-
*/
|
|
68
|
-
createContent(rulesetOrId: Ruleset | string, instanceKeys: InstanceKey[], displayType?: string): Promise<PropertyRecord[]>;
|
|
69
|
-
private getECClassNames;
|
|
70
|
-
private createContentForClasses;
|
|
71
|
-
/**
|
|
72
|
-
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
73
|
-
* Each group includes all of the class instances.
|
|
74
|
-
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
75
|
-
* @param displayType Type of content container display. For example:
|
|
76
|
-
* "PropertyPane", "Grid", "List" etc.
|
|
77
|
-
*/
|
|
78
|
-
createContentForAllInstances(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
79
|
-
/**
|
|
80
|
-
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
81
|
-
* Each group includes at most one class instance.
|
|
82
|
-
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
83
|
-
* @param displayType Type of content container display. For example:
|
|
84
|
-
* "PropertyPane", "Grid", "List" etc.
|
|
85
|
-
*/
|
|
86
|
-
createContentForInstancePerClass(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
87
|
-
}
|
|
1
|
+
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
2
|
+
import { IModelConnection } from "@itwin/core-frontend";
|
|
3
|
+
import { Content, InstanceKey, KeySet, PageOptions, Ruleset } from "@itwin/presentation-common";
|
|
4
|
+
/**
|
|
5
|
+
* Interface for a data provider, which is used by ContentBuilder.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IContentBuilderDataProvider {
|
|
9
|
+
/** Keys the data provider is creating content for */
|
|
10
|
+
keys: Readonly<KeySet>;
|
|
11
|
+
/** Get the size of content result set */
|
|
12
|
+
getContentSetSize: () => Promise<number>;
|
|
13
|
+
/** Get the content */
|
|
14
|
+
getContent: (options?: PageOptions) => Promise<Readonly<Content> | undefined>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Property records grouped under a single className
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface ContentBuilderResult {
|
|
21
|
+
/** Full name of ECClass whose records are contained in this data structure */
|
|
22
|
+
className: string;
|
|
23
|
+
/** Property records for the ECClass instance */
|
|
24
|
+
records: PropertyRecord[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Properties for creating a `ContentBuilder` instance.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface ContentBuilderProps {
|
|
31
|
+
/** The iModel to pull data from */
|
|
32
|
+
imodel: IModelConnection;
|
|
33
|
+
/** Custom data provider that allows mocking data ContentBuilder receives */
|
|
34
|
+
dataProvider?: IContentBuilderDataProvider;
|
|
35
|
+
/**
|
|
36
|
+
* Decimal precision or numeric types.
|
|
37
|
+
*
|
|
38
|
+
* Raw numeric values with high precision may slightly differ from platform to platform due to
|
|
39
|
+
* rounding differences on different platforms. This may be a problem when used with snapshot testing,
|
|
40
|
+
* in which case this attribute may be set to supply the maximum precision of raw numeric values.
|
|
41
|
+
*
|
|
42
|
+
* By default no rounding is applied.
|
|
43
|
+
*/
|
|
44
|
+
decimalPrecision?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A class that constructs content from specified imodel and ruleset.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export declare class ContentBuilder {
|
|
51
|
+
private readonly _iModel;
|
|
52
|
+
private _dataProvider;
|
|
53
|
+
private _decimalPrecision?;
|
|
54
|
+
/**
|
|
55
|
+
* Constructor
|
|
56
|
+
* @param iModel
|
|
57
|
+
* @param dataProvider
|
|
58
|
+
*/
|
|
59
|
+
constructor(props: ContentBuilderProps);
|
|
60
|
+
private doCreateContent;
|
|
61
|
+
/**
|
|
62
|
+
* Create a list of property records using the supplied presentation ruleset.
|
|
63
|
+
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
64
|
+
* @param instanceKeys Keys of instances that should be queried.
|
|
65
|
+
* @param displayType Type of content container display. For example:
|
|
66
|
+
* "PropertyPane", "Grid", "List" etc.
|
|
67
|
+
*/
|
|
68
|
+
createContent(rulesetOrId: Ruleset | string, instanceKeys: InstanceKey[], displayType?: string): Promise<PropertyRecord[]>;
|
|
69
|
+
private getECClassNames;
|
|
70
|
+
private createContentForClasses;
|
|
71
|
+
/**
|
|
72
|
+
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
73
|
+
* Each group includes all of the class instances.
|
|
74
|
+
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
75
|
+
* @param displayType Type of content container display. For example:
|
|
76
|
+
* "PropertyPane", "Grid", "List" etc.
|
|
77
|
+
*/
|
|
78
|
+
createContentForAllInstances(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
81
|
+
* Each group includes at most one class instance.
|
|
82
|
+
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
83
|
+
* @param displayType Type of content container display. For example:
|
|
84
|
+
* "PropertyPane", "Grid", "List" etc.
|
|
85
|
+
*/
|
|
86
|
+
createContentForInstancePerClass(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
87
|
+
}
|
|
88
88
|
//# sourceMappingURL=ContentBuilder.d.ts.map
|