@itwin/presentation-backend 4.0.0-dev.51 → 4.0.0-dev.54
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-backend/BackendLoggerCategory.d.ts +41 -41
- package/lib/cjs/presentation-backend/BackendLoggerCategory.js +50 -50
- package/lib/cjs/presentation-backend/Constants.d.ts +8 -8
- package/lib/cjs/presentation-backend/Constants.js +40 -36
- package/lib/cjs/presentation-backend/Constants.js.map +1 -1
- package/lib/cjs/presentation-backend/ElementPropertiesHelper.d.ts +11 -11
- package/lib/cjs/presentation-backend/ElementPropertiesHelper.js +260 -260
- package/lib/cjs/presentation-backend/NativePlatform.d.ts +87 -87
- package/lib/cjs/presentation-backend/NativePlatform.js +140 -140
- package/lib/cjs/presentation-backend/NativePlatform.js.map +1 -1
- package/lib/cjs/presentation-backend/Presentation.d.ts +106 -106
- package/lib/cjs/presentation-backend/Presentation.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/Presentation.js +148 -148
- package/lib/cjs/presentation-backend/Presentation.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationIpcHandler.d.ts +12 -12
- package/lib/cjs/presentation-backend/PresentationIpcHandler.js +41 -41
- package/lib/cjs/presentation-backend/PresentationManager.d.ts +456 -456
- package/lib/cjs/presentation-backend/PresentationManager.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/PresentationManager.js +309 -309
- package/lib/cjs/presentation-backend/PresentationManagerDetail.d.ts +61 -61
- package/lib/cjs/presentation-backend/PresentationManagerDetail.js +430 -426
- package/lib/cjs/presentation-backend/PresentationManagerDetail.js.map +1 -1
- package/lib/cjs/presentation-backend/PresentationRpcImpl.d.ts +62 -62
- package/lib/cjs/presentation-backend/PresentationRpcImpl.js +388 -388
- package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts +102 -102
- package/lib/cjs/presentation-backend/RulesetEmbedder.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/RulesetEmbedder.js +283 -278
- package/lib/cjs/presentation-backend/RulesetEmbedder.js.map +1 -1
- package/lib/cjs/presentation-backend/RulesetManager.d.ts +53 -53
- package/lib/cjs/presentation-backend/RulesetManager.js +73 -73
- package/lib/cjs/presentation-backend/RulesetVariablesManager.d.ts +140 -140
- package/lib/cjs/presentation-backend/RulesetVariablesManager.js +129 -129
- package/lib/cjs/presentation-backend/SelectionScopesHelper.d.ts +28 -28
- package/lib/cjs/presentation-backend/SelectionScopesHelper.js +210 -210
- package/lib/cjs/presentation-backend/TemporaryStorage.d.ts +123 -123
- package/lib/cjs/presentation-backend/TemporaryStorage.js +151 -151
- package/lib/cjs/presentation-backend/UpdatesTracker.d.ts +27 -27
- package/lib/cjs/presentation-backend/UpdatesTracker.js +54 -54
- package/lib/cjs/presentation-backend/Utils.d.ts +49 -49
- package/lib/cjs/presentation-backend/Utils.d.ts.map +1 -1
- package/lib/cjs/presentation-backend/Utils.js +107 -107
- package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.d.ts +16 -16
- package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js +55 -51
- package/lib/cjs/presentation-backend/domain/PresentationRulesDomain.js.map +1 -1
- package/lib/cjs/presentation-backend/domain/RulesetElements.d.ts +21 -21
- package/lib/cjs/presentation-backend/domain/RulesetElements.js +38 -38
- package/lib/cjs/presentation-backend.d.ts +19 -19
- package/lib/cjs/presentation-backend.js +39 -35
- package/lib/cjs/presentation-backend.js.map +1 -1
- package/package.json +14 -14
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Core
|
|
3
|
-
*/
|
|
4
|
-
import { Entity, IModelDb } from "@itwin/core-backend";
|
|
5
|
-
import { Id64String } from "@itwin/core-bentley";
|
|
6
|
-
import { Ruleset } from "@itwin/presentation-common";
|
|
7
|
-
/**
|
|
8
|
-
* Interface for callbacks which will be called before and after Element/Model updates
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
interface UpdateCallbacks {
|
|
12
|
-
onBeforeUpdate: (props: Entity) => Promise<void>;
|
|
13
|
-
onAfterUpdate: (props: Entity) => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Interface for callbacks which will be called before and after Element/Model is inserted
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
interface InsertCallbacks {
|
|
20
|
-
onBeforeInsert: (props: Entity) => Promise<void>;
|
|
21
|
-
onAfterInsert: (props: Entity) => Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Options for [[RulesetEmbedder.insertRuleset]] operation.
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export interface RulesetInsertOptions {
|
|
28
|
-
/**
|
|
29
|
-
* When should insertion be skipped:
|
|
30
|
-
* - `same-id` - if iModel already contains a ruleset with the same id and **any** version
|
|
31
|
-
* - `same-id-and-version-eq` - if iModel already contains a ruleset with same id and version
|
|
32
|
-
* - `same-id-and-version-gte` - if iModel already contains a ruleset with same id and
|
|
33
|
-
* version greater or equal to version of the inserted ruleset.
|
|
34
|
-
*
|
|
35
|
-
* Defaults to `same-id-and-version-eq`.
|
|
36
|
-
*/
|
|
37
|
-
skip?: "never" | "same-id" | "same-id-and-version-eq" | "same-id-and-version-gte";
|
|
38
|
-
/**
|
|
39
|
-
* Which existing versions of rulesets with same id should be replaced when we insert a new one:
|
|
40
|
-
* - `all` - replace all rulesets with same id.
|
|
41
|
-
* - `all-lower` - replace rulesets with same id and version lower than the version of inserted ruleset.
|
|
42
|
-
* - `exact` - replace only the ruleset whose id and version matches the inserted ruleset.
|
|
43
|
-
*
|
|
44
|
-
* Defaults to `exact`.
|
|
45
|
-
*/
|
|
46
|
-
replaceVersions?: "all" | "all-lower" | "exact";
|
|
47
|
-
/**
|
|
48
|
-
* Callbacks that will be called before and after `Entity` updates
|
|
49
|
-
*/
|
|
50
|
-
onEntityUpdate?: UpdateCallbacks;
|
|
51
|
-
/**
|
|
52
|
-
* Callbacks that will be called before and after `Entity` is inserted
|
|
53
|
-
*/
|
|
54
|
-
onEntityInsert?: InsertCallbacks;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Properties for creating a `RulesetEmbedder` instance.
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
60
|
-
export interface RulesetEmbedderProps {
|
|
61
|
-
/** iModel to embed rulesets to */
|
|
62
|
-
imodel: IModelDb;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* An API for embedding presentation rulesets into iModels.
|
|
66
|
-
* @public
|
|
67
|
-
*/
|
|
68
|
-
export declare class RulesetEmbedder {
|
|
69
|
-
private _imodel;
|
|
70
|
-
private readonly _schemaPath;
|
|
71
|
-
private readonly _rulesetModelName;
|
|
72
|
-
private readonly _rulesetSubjectName;
|
|
73
|
-
/**
|
|
74
|
-
* Constructs RulesetEmbedder
|
|
75
|
-
*/
|
|
76
|
-
constructor(props: RulesetEmbedderProps);
|
|
77
|
-
/**
|
|
78
|
-
* Inserts a ruleset into iModel.
|
|
79
|
-
* @param ruleset Ruleset to insert.
|
|
80
|
-
* @param options Options for inserting a ruleset.
|
|
81
|
-
* @returns ID of inserted ruleset element or, if insertion was skipped, ID of existing ruleset with the same ID and highest version.
|
|
82
|
-
*/
|
|
83
|
-
insertRuleset(ruleset: Ruleset, options?: RulesetInsertOptions): Promise<Id64String>;
|
|
84
|
-
private updateRuleset;
|
|
85
|
-
private insertNewRuleset;
|
|
86
|
-
/**
|
|
87
|
-
* Get all rulesets embedded in the iModel.
|
|
88
|
-
*/
|
|
89
|
-
getRulesets(): Promise<Ruleset[]>;
|
|
90
|
-
private getOrCreateRulesetModel;
|
|
91
|
-
private queryRulesetModel;
|
|
92
|
-
private queryDefinitionPartition;
|
|
93
|
-
private querySubject;
|
|
94
|
-
private insertDefinitionModel;
|
|
95
|
-
private insertDefinitionPartition;
|
|
96
|
-
private insertSubject;
|
|
97
|
-
private handleElementOperationPrerequisites;
|
|
98
|
-
private insertElement;
|
|
99
|
-
private insertModel;
|
|
100
|
-
private updateElement;
|
|
101
|
-
}
|
|
102
|
-
export {};
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Core
|
|
3
|
+
*/
|
|
4
|
+
import { Entity, IModelDb } from "@itwin/core-backend";
|
|
5
|
+
import { Id64String } from "@itwin/core-bentley";
|
|
6
|
+
import { Ruleset } from "@itwin/presentation-common";
|
|
7
|
+
/**
|
|
8
|
+
* Interface for callbacks which will be called before and after Element/Model updates
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
interface UpdateCallbacks {
|
|
12
|
+
onBeforeUpdate: (props: Entity) => Promise<void>;
|
|
13
|
+
onAfterUpdate: (props: Entity) => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Interface for callbacks which will be called before and after Element/Model is inserted
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
interface InsertCallbacks {
|
|
20
|
+
onBeforeInsert: (props: Entity) => Promise<void>;
|
|
21
|
+
onAfterInsert: (props: Entity) => Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Options for [[RulesetEmbedder.insertRuleset]] operation.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export interface RulesetInsertOptions {
|
|
28
|
+
/**
|
|
29
|
+
* When should insertion be skipped:
|
|
30
|
+
* - `same-id` - if iModel already contains a ruleset with the same id and **any** version
|
|
31
|
+
* - `same-id-and-version-eq` - if iModel already contains a ruleset with same id and version
|
|
32
|
+
* - `same-id-and-version-gte` - if iModel already contains a ruleset with same id and
|
|
33
|
+
* version greater or equal to version of the inserted ruleset.
|
|
34
|
+
*
|
|
35
|
+
* Defaults to `same-id-and-version-eq`.
|
|
36
|
+
*/
|
|
37
|
+
skip?: "never" | "same-id" | "same-id-and-version-eq" | "same-id-and-version-gte";
|
|
38
|
+
/**
|
|
39
|
+
* Which existing versions of rulesets with same id should be replaced when we insert a new one:
|
|
40
|
+
* - `all` - replace all rulesets with same id.
|
|
41
|
+
* - `all-lower` - replace rulesets with same id and version lower than the version of inserted ruleset.
|
|
42
|
+
* - `exact` - replace only the ruleset whose id and version matches the inserted ruleset.
|
|
43
|
+
*
|
|
44
|
+
* Defaults to `exact`.
|
|
45
|
+
*/
|
|
46
|
+
replaceVersions?: "all" | "all-lower" | "exact";
|
|
47
|
+
/**
|
|
48
|
+
* Callbacks that will be called before and after `Entity` updates
|
|
49
|
+
*/
|
|
50
|
+
onEntityUpdate?: UpdateCallbacks;
|
|
51
|
+
/**
|
|
52
|
+
* Callbacks that will be called before and after `Entity` is inserted
|
|
53
|
+
*/
|
|
54
|
+
onEntityInsert?: InsertCallbacks;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Properties for creating a `RulesetEmbedder` instance.
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
export interface RulesetEmbedderProps {
|
|
61
|
+
/** iModel to embed rulesets to */
|
|
62
|
+
imodel: IModelDb;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* An API for embedding presentation rulesets into iModels.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export declare class RulesetEmbedder {
|
|
69
|
+
private _imodel;
|
|
70
|
+
private readonly _schemaPath;
|
|
71
|
+
private readonly _rulesetModelName;
|
|
72
|
+
private readonly _rulesetSubjectName;
|
|
73
|
+
/**
|
|
74
|
+
* Constructs RulesetEmbedder
|
|
75
|
+
*/
|
|
76
|
+
constructor(props: RulesetEmbedderProps);
|
|
77
|
+
/**
|
|
78
|
+
* Inserts a ruleset into iModel.
|
|
79
|
+
* @param ruleset Ruleset to insert.
|
|
80
|
+
* @param options Options for inserting a ruleset.
|
|
81
|
+
* @returns ID of inserted ruleset element or, if insertion was skipped, ID of existing ruleset with the same ID and highest version.
|
|
82
|
+
*/
|
|
83
|
+
insertRuleset(ruleset: Ruleset, options?: RulesetInsertOptions): Promise<Id64String>;
|
|
84
|
+
private updateRuleset;
|
|
85
|
+
private insertNewRuleset;
|
|
86
|
+
/**
|
|
87
|
+
* Get all rulesets embedded in the iModel.
|
|
88
|
+
*/
|
|
89
|
+
getRulesets(): Promise<Ruleset[]>;
|
|
90
|
+
private getOrCreateRulesetModel;
|
|
91
|
+
private queryRulesetModel;
|
|
92
|
+
private queryDefinitionPartition;
|
|
93
|
+
private querySubject;
|
|
94
|
+
private insertDefinitionModel;
|
|
95
|
+
private insertDefinitionPartition;
|
|
96
|
+
private insertSubject;
|
|
97
|
+
private handleElementOperationPrerequisites;
|
|
98
|
+
private insertElement;
|
|
99
|
+
private insertModel;
|
|
100
|
+
private updateElement;
|
|
101
|
+
}
|
|
102
|
+
export {};
|
|
103
103
|
//# sourceMappingURL=RulesetEmbedder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesetEmbedder.d.ts","sourceRoot":"","sources":["../../../src/presentation-backend/RulesetEmbedder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAC6E,MAAM,EAAE,QAAQ,EACnG,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAoB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKnE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAKrD;;;GAGG;AACH,UAAU,eAAe;IACvB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;;GAGG;AACH,UAAU,eAAe;IACvB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC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