@itwin/presentation-frontend 4.0.0-dev.52 → 4.0.0-dev.55
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-frontend/ConnectivityInformationProvider.d.ts +29 -29
- package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js +47 -47
- package/lib/cjs/presentation-frontend/Diagnostics.d.ts +14 -14
- package/lib/cjs/presentation-frontend/Diagnostics.js +61 -61
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
- package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js +20 -20
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
- package/lib/cjs/presentation-frontend/IpcRequestsHandler.js +41 -41
- package/lib/cjs/presentation-frontend/LocalizationHelper.d.ts +10 -10
- package/lib/cjs/presentation-frontend/LocalizationHelper.js +31 -31
- package/lib/cjs/presentation-frontend/Presentation.d.ts +73 -73
- package/lib/cjs/presentation-frontend/Presentation.js +159 -159
- package/lib/cjs/presentation-frontend/PresentationManager.d.ts +205 -205
- package/lib/cjs/presentation-frontend/PresentationManager.js +438 -438
- package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/RulesetManager.d.ts +63 -63
- package/lib/cjs/presentation-frontend/RulesetManager.js +85 -85
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
- package/lib/cjs/presentation-frontend/RulesetVariablesManager.js +195 -195
- package/lib/cjs/presentation-frontend/StateTracker.d.ts +38 -38
- package/lib/cjs/presentation-frontend/StateTracker.js +128 -128
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +519 -519
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
- package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +290 -290
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
- package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js +97 -97
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
- package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js +9 -9
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
- package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js +33 -33
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
- package/lib/cjs/presentation-frontend/selection/SelectionHandler.js +108 -108
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.d.ts +17 -17
- package/lib/cjs/presentation-frontend/selection/SelectionHelper.js +40 -40
- package/lib/cjs/presentation-frontend/selection/SelectionManager.d.ts +139 -139
- package/lib/cjs/presentation-frontend/selection/SelectionManager.js +414 -414
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
- package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js +91 -91
- package/lib/cjs/presentation-frontend.d.ts +34 -34
- package/lib/cjs/presentation-frontend.js +54 -50
- package/lib/cjs/presentation-frontend.js.map +1 -1
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.d.ts +29 -29
- package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js +43 -43
- package/lib/esm/presentation-frontend/Diagnostics.d.ts +14 -14
- package/lib/esm/presentation-frontend/Diagnostics.js +56 -56
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.d.ts +12 -12
- package/lib/esm/presentation-frontend/FrontendLoggerCategory.js +17 -17
- package/lib/esm/presentation-frontend/IpcRequestsHandler.d.ts +10 -10
- package/lib/esm/presentation-frontend/IpcRequestsHandler.js +37 -37
- package/lib/esm/presentation-frontend/LocalizationHelper.d.ts +10 -10
- package/lib/esm/presentation-frontend/LocalizationHelper.js +27 -27
- package/lib/esm/presentation-frontend/Presentation.d.ts +73 -73
- package/lib/esm/presentation-frontend/Presentation.js +155 -155
- package/lib/esm/presentation-frontend/PresentationManager.d.ts +205 -205
- package/lib/esm/presentation-frontend/PresentationManager.js +433 -433
- package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
- package/lib/esm/presentation-frontend/RulesetManager.d.ts +63 -63
- package/lib/esm/presentation-frontend/RulesetManager.js +81 -81
- package/lib/esm/presentation-frontend/RulesetVariablesManager.d.ts +143 -143
- package/lib/esm/presentation-frontend/RulesetVariablesManager.js +191 -191
- package/lib/esm/presentation-frontend/StateTracker.d.ts +38 -38
- package/lib/esm/presentation-frontend/StateTracker.js +124 -124
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts +132 -132
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.d.ts.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +514 -513
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.d.ts +111 -111
- package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js +282 -282
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.d.ts +52 -52
- package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js +93 -93
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.d.ts +19 -19
- package/lib/esm/presentation-frontend/selection/ISelectionProvider.js +8 -8
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.d.ts +52 -52
- package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js +29 -29
- package/lib/esm/presentation-frontend/selection/SelectionHandler.d.ts +103 -103
- package/lib/esm/presentation-frontend/selection/SelectionHandler.js +104 -104
- package/lib/esm/presentation-frontend/selection/SelectionHelper.d.ts +17 -17
- package/lib/esm/presentation-frontend/selection/SelectionHelper.js +36 -36
- package/lib/esm/presentation-frontend/selection/SelectionManager.d.ts +139 -139
- package/lib/esm/presentation-frontend/selection/SelectionManager.js +409 -409
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.d.ts +59 -59
- package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js +85 -85
- package/lib/esm/presentation-frontend.d.ts +34 -34
- package/lib/esm/presentation-frontend.js +38 -38
- package/package.json +15 -15
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module UnifiedSelection
|
|
3
|
-
*/
|
|
4
|
-
import { Id64Arg } from "@itwin/core-bentley";
|
|
5
|
-
import { IModelConnection } from "@itwin/core-frontend";
|
|
6
|
-
import { KeySet, RpcRequestsHandler, SelectionScope, SelectionScopeProps } from "@itwin/presentation-common";
|
|
7
|
-
/**
|
|
8
|
-
* Properties for creating [[SelectionScopesManager]].
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export interface SelectionScopesManagerProps {
|
|
12
|
-
/** RPC handler to use for requesting selection scopes */
|
|
13
|
-
rpcRequestsHandler: RpcRequestsHandler;
|
|
14
|
-
/** Provider of active locale to use for localizing scopes */
|
|
15
|
-
localeProvider?: () => string | undefined;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)
|
|
19
|
-
* and can compute logical selection based on element IDs and selection scope.
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export declare class SelectionScopesManager {
|
|
24
|
-
private _rpcRequestsHandler;
|
|
25
|
-
private _getLocale;
|
|
26
|
-
private _activeScope;
|
|
27
|
-
constructor(props: SelectionScopesManagerProps);
|
|
28
|
-
/** Get active locale */
|
|
29
|
-
get activeLocale(): string | undefined;
|
|
30
|
-
/** The active selection scope or its id */
|
|
31
|
-
get activeScope(): SelectionScopeProps | SelectionScope | string | undefined;
|
|
32
|
-
set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined);
|
|
33
|
-
/**
|
|
34
|
-
* Get available selection scopes.
|
|
35
|
-
* @param imodel The iModel to get selection scopes for
|
|
36
|
-
* @param locale Optional locale to use when localizing scopes' label and description
|
|
37
|
-
*/
|
|
38
|
-
getSelectionScopes(imodel: IModelConnection, locale?: string): Promise<SelectionScope[]>;
|
|
39
|
-
/**
|
|
40
|
-
* Computes keys that need to be added to logical selection based on provided selection scope.
|
|
41
|
-
* @param ids Element IDs to compute selection for
|
|
42
|
-
* @param scope Selection scope to apply
|
|
43
|
-
*/
|
|
44
|
-
computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise<KeySet>;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for
|
|
48
|
-
* calculating selection with scope.
|
|
49
|
-
*
|
|
50
|
-
* @public
|
|
51
|
-
*/
|
|
52
|
-
export declare function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps;
|
|
53
|
-
/**
|
|
54
|
-
* Determines the scope id
|
|
55
|
-
* @param scope Selection scope
|
|
56
|
-
* @public
|
|
57
|
-
* @deprecated in 3.x. This is an internal utility that should've never become public.
|
|
58
|
-
*/
|
|
59
|
-
export declare function getScopeId(scope: SelectionScope | string | undefined): string;
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module UnifiedSelection
|
|
3
|
+
*/
|
|
4
|
+
import { Id64Arg } from "@itwin/core-bentley";
|
|
5
|
+
import { IModelConnection } from "@itwin/core-frontend";
|
|
6
|
+
import { KeySet, RpcRequestsHandler, SelectionScope, SelectionScopeProps } from "@itwin/presentation-common";
|
|
7
|
+
/**
|
|
8
|
+
* Properties for creating [[SelectionScopesManager]].
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export interface SelectionScopesManagerProps {
|
|
12
|
+
/** RPC handler to use for requesting selection scopes */
|
|
13
|
+
rpcRequestsHandler: RpcRequestsHandler;
|
|
14
|
+
/** Provider of active locale to use for localizing scopes */
|
|
15
|
+
localeProvider?: () => string | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)
|
|
19
|
+
* and can compute logical selection based on element IDs and selection scope.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare class SelectionScopesManager {
|
|
24
|
+
private _rpcRequestsHandler;
|
|
25
|
+
private _getLocale;
|
|
26
|
+
private _activeScope;
|
|
27
|
+
constructor(props: SelectionScopesManagerProps);
|
|
28
|
+
/** Get active locale */
|
|
29
|
+
get activeLocale(): string | undefined;
|
|
30
|
+
/** The active selection scope or its id */
|
|
31
|
+
get activeScope(): SelectionScopeProps | SelectionScope | string | undefined;
|
|
32
|
+
set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined);
|
|
33
|
+
/**
|
|
34
|
+
* Get available selection scopes.
|
|
35
|
+
* @param imodel The iModel to get selection scopes for
|
|
36
|
+
* @param locale Optional locale to use when localizing scopes' label and description
|
|
37
|
+
*/
|
|
38
|
+
getSelectionScopes(imodel: IModelConnection, locale?: string): Promise<SelectionScope[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Computes keys that need to be added to logical selection based on provided selection scope.
|
|
41
|
+
* @param ids Element IDs to compute selection for
|
|
42
|
+
* @param scope Selection scope to apply
|
|
43
|
+
*/
|
|
44
|
+
computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise<KeySet>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for
|
|
48
|
+
* calculating selection with scope.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export declare function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps;
|
|
53
|
+
/**
|
|
54
|
+
* Determines the scope id
|
|
55
|
+
* @param scope Selection scope
|
|
56
|
+
* @public
|
|
57
|
+
* @deprecated in 3.x. This is an internal utility that should've never become public.
|
|
58
|
+
*/
|
|
59
|
+
export declare function getScopeId(scope: SelectionScope | string | undefined): string;
|
|
60
60
|
//# sourceMappingURL=SelectionScopesManager.d.ts.map
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module UnifiedSelection
|
|
7
|
-
*/
|
|
8
|
-
import { DEFAULT_KEYS_BATCH_SIZE, KeySet } from "@itwin/presentation-common";
|
|
9
|
-
/**
|
|
10
|
-
* A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)
|
|
11
|
-
* and can compute logical selection based on element IDs and selection scope.
|
|
12
|
-
*
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export class SelectionScopesManager {
|
|
16
|
-
constructor(props) {
|
|
17
|
-
this._rpcRequestsHandler = props.rpcRequestsHandler;
|
|
18
|
-
this._getLocale = props.localeProvider ? props.localeProvider : (() => undefined);
|
|
19
|
-
}
|
|
20
|
-
/** Get active locale */
|
|
21
|
-
get activeLocale() { return this._getLocale(); }
|
|
22
|
-
/** The active selection scope or its id */
|
|
23
|
-
get activeScope() { return this._activeScope; }
|
|
24
|
-
set activeScope(scope) { this._activeScope = scope; }
|
|
25
|
-
/**
|
|
26
|
-
* Get available selection scopes.
|
|
27
|
-
* @param imodel The iModel to get selection scopes for
|
|
28
|
-
* @param locale Optional locale to use when localizing scopes' label and description
|
|
29
|
-
*/
|
|
30
|
-
async getSelectionScopes(imodel, locale) {
|
|
31
|
-
if (!locale)
|
|
32
|
-
locale = this._getLocale();
|
|
33
|
-
return this._rpcRequestsHandler.getSelectionScopes({ imodel: imodel.getRpcProps(), locale });
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Computes keys that need to be added to logical selection based on provided selection scope.
|
|
37
|
-
* @param ids Element IDs to compute selection for
|
|
38
|
-
* @param scope Selection scope to apply
|
|
39
|
-
*/
|
|
40
|
-
async computeSelection(imodel, ids, scope) {
|
|
41
|
-
const scopeProps = createSelectionScopeProps(scope);
|
|
42
|
-
// convert ids input to array
|
|
43
|
-
if (typeof ids === "string")
|
|
44
|
-
ids = [ids];
|
|
45
|
-
else if (ids instanceof Set)
|
|
46
|
-
ids = [...ids];
|
|
47
|
-
// compute selection in batches to avoid HTTP 413
|
|
48
|
-
const keys = new KeySet();
|
|
49
|
-
const batchSize = DEFAULT_KEYS_BATCH_SIZE;
|
|
50
|
-
const batchesCount = Math.ceil(ids.length / batchSize);
|
|
51
|
-
const batchKeyPromises = [];
|
|
52
|
-
for (let batchIndex = 0; batchIndex < batchesCount; ++batchIndex) {
|
|
53
|
-
const batchStart = batchSize * batchIndex;
|
|
54
|
-
const batchEnd = (batchStart + batchSize > ids.length) ? ids.length : (batchStart + batchSize);
|
|
55
|
-
const batchIds = (0 === batchIndex && ids.length <= batchEnd) ? ids : ids.slice(batchStart, batchEnd);
|
|
56
|
-
batchKeyPromises.push(this._rpcRequestsHandler.computeSelection({ imodel: imodel.getRpcProps(), elementIds: batchIds, scope: scopeProps }));
|
|
57
|
-
}
|
|
58
|
-
const batchKeys = (await Promise.all(batchKeyPromises)).map(KeySet.fromJSON);
|
|
59
|
-
batchKeys.forEach((bk) => keys.add(bk));
|
|
60
|
-
return keys;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for
|
|
65
|
-
* calculating selection with scope.
|
|
66
|
-
*
|
|
67
|
-
* @public
|
|
68
|
-
*/
|
|
69
|
-
export function createSelectionScopeProps(scope) {
|
|
70
|
-
if (!scope)
|
|
71
|
-
return { id: "element" };
|
|
72
|
-
if (typeof scope === "string")
|
|
73
|
-
return { id: scope };
|
|
74
|
-
return scope;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Determines the scope id
|
|
78
|
-
* @param scope Selection scope
|
|
79
|
-
* @public
|
|
80
|
-
* @deprecated in 3.x. This is an internal utility that should've never become public.
|
|
81
|
-
*/
|
|
82
|
-
// istanbul ignore next
|
|
83
|
-
export function getScopeId(scope) {
|
|
84
|
-
return createSelectionScopeProps(scope).id;
|
|
85
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module UnifiedSelection
|
|
7
|
+
*/
|
|
8
|
+
import { DEFAULT_KEYS_BATCH_SIZE, KeySet } from "@itwin/presentation-common";
|
|
9
|
+
/**
|
|
10
|
+
* A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)
|
|
11
|
+
* and can compute logical selection based on element IDs and selection scope.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export class SelectionScopesManager {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
this._rpcRequestsHandler = props.rpcRequestsHandler;
|
|
18
|
+
this._getLocale = props.localeProvider ? props.localeProvider : (() => undefined);
|
|
19
|
+
}
|
|
20
|
+
/** Get active locale */
|
|
21
|
+
get activeLocale() { return this._getLocale(); }
|
|
22
|
+
/** The active selection scope or its id */
|
|
23
|
+
get activeScope() { return this._activeScope; }
|
|
24
|
+
set activeScope(scope) { this._activeScope = scope; }
|
|
25
|
+
/**
|
|
26
|
+
* Get available selection scopes.
|
|
27
|
+
* @param imodel The iModel to get selection scopes for
|
|
28
|
+
* @param locale Optional locale to use when localizing scopes' label and description
|
|
29
|
+
*/
|
|
30
|
+
async getSelectionScopes(imodel, locale) {
|
|
31
|
+
if (!locale)
|
|
32
|
+
locale = this._getLocale();
|
|
33
|
+
return this._rpcRequestsHandler.getSelectionScopes({ imodel: imodel.getRpcProps(), locale });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Computes keys that need to be added to logical selection based on provided selection scope.
|
|
37
|
+
* @param ids Element IDs to compute selection for
|
|
38
|
+
* @param scope Selection scope to apply
|
|
39
|
+
*/
|
|
40
|
+
async computeSelection(imodel, ids, scope) {
|
|
41
|
+
const scopeProps = createSelectionScopeProps(scope);
|
|
42
|
+
// convert ids input to array
|
|
43
|
+
if (typeof ids === "string")
|
|
44
|
+
ids = [ids];
|
|
45
|
+
else if (ids instanceof Set)
|
|
46
|
+
ids = [...ids];
|
|
47
|
+
// compute selection in batches to avoid HTTP 413
|
|
48
|
+
const keys = new KeySet();
|
|
49
|
+
const batchSize = DEFAULT_KEYS_BATCH_SIZE;
|
|
50
|
+
const batchesCount = Math.ceil(ids.length / batchSize);
|
|
51
|
+
const batchKeyPromises = [];
|
|
52
|
+
for (let batchIndex = 0; batchIndex < batchesCount; ++batchIndex) {
|
|
53
|
+
const batchStart = batchSize * batchIndex;
|
|
54
|
+
const batchEnd = (batchStart + batchSize > ids.length) ? ids.length : (batchStart + batchSize);
|
|
55
|
+
const batchIds = (0 === batchIndex && ids.length <= batchEnd) ? ids : ids.slice(batchStart, batchEnd);
|
|
56
|
+
batchKeyPromises.push(this._rpcRequestsHandler.computeSelection({ imodel: imodel.getRpcProps(), elementIds: batchIds, scope: scopeProps }));
|
|
57
|
+
}
|
|
58
|
+
const batchKeys = (await Promise.all(batchKeyPromises)).map(KeySet.fromJSON);
|
|
59
|
+
batchKeys.forEach((bk) => keys.add(bk));
|
|
60
|
+
return keys;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for
|
|
65
|
+
* calculating selection with scope.
|
|
66
|
+
*
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
export function createSelectionScopeProps(scope) {
|
|
70
|
+
if (!scope)
|
|
71
|
+
return { id: "element" };
|
|
72
|
+
if (typeof scope === "string")
|
|
73
|
+
return { id: scope };
|
|
74
|
+
return scope;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Determines the scope id
|
|
78
|
+
* @param scope Selection scope
|
|
79
|
+
* @public
|
|
80
|
+
* @deprecated in 3.x. This is an internal utility that should've never become public.
|
|
81
|
+
*/
|
|
82
|
+
// istanbul ignore next
|
|
83
|
+
export function getScopeId(scope) {
|
|
84
|
+
return createSelectionScopeProps(scope).id;
|
|
85
|
+
}
|
|
86
86
|
//# sourceMappingURL=SelectionScopesManager.js.map
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Core
|
|
3
|
-
*
|
|
4
|
-
* @docs-group-description Core
|
|
5
|
-
* Common types used for retrieving presentation data from iModels.
|
|
6
|
-
*/
|
|
7
|
-
export * from "./presentation-frontend/Presentation";
|
|
8
|
-
export * from "./presentation-frontend/PresentationManager";
|
|
9
|
-
export * from "./presentation-frontend/RulesetManager";
|
|
10
|
-
export * from "./presentation-frontend/RulesetVariablesManager";
|
|
11
|
-
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesManager";
|
|
12
|
-
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesStorage";
|
|
13
|
-
export * from "./presentation-frontend/StateTracker";
|
|
14
|
-
export * from "./presentation-frontend/Diagnostics";
|
|
15
|
-
/**
|
|
16
|
-
* @module Logging
|
|
17
|
-
*
|
|
18
|
-
* @docs-group-description Logging
|
|
19
|
-
* Types related to logging in this package.
|
|
20
|
-
*/
|
|
21
|
-
export * from "./presentation-frontend/FrontendLoggerCategory";
|
|
22
|
-
/**
|
|
23
|
-
* @module UnifiedSelection
|
|
24
|
-
*
|
|
25
|
-
* @docs-group-description UnifiedSelection
|
|
26
|
-
* Types related to [unified selection]($docs/presentation/unified-selection/index.md).
|
|
27
|
-
*/
|
|
28
|
-
export * from "./presentation-frontend/selection/SelectionChangeEvent";
|
|
29
|
-
export * from "./presentation-frontend/selection/ISelectionProvider";
|
|
30
|
-
export * from "./presentation-frontend/selection/SelectionManager";
|
|
31
|
-
export * from "./presentation-frontend/selection/SelectionScopesManager";
|
|
32
|
-
export * from "./presentation-frontend/selection/SelectionHandler";
|
|
33
|
-
export * from "./presentation-frontend/selection/HiliteSetProvider";
|
|
34
|
-
export * from "./presentation-frontend/selection/SelectionHelper";
|
|
1
|
+
/**
|
|
2
|
+
* @module Core
|
|
3
|
+
*
|
|
4
|
+
* @docs-group-description Core
|
|
5
|
+
* Common types used for retrieving presentation data from iModels.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./presentation-frontend/Presentation";
|
|
8
|
+
export * from "./presentation-frontend/PresentationManager";
|
|
9
|
+
export * from "./presentation-frontend/RulesetManager";
|
|
10
|
+
export * from "./presentation-frontend/RulesetVariablesManager";
|
|
11
|
+
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesManager";
|
|
12
|
+
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesStorage";
|
|
13
|
+
export * from "./presentation-frontend/StateTracker";
|
|
14
|
+
export * from "./presentation-frontend/Diagnostics";
|
|
15
|
+
/**
|
|
16
|
+
* @module Logging
|
|
17
|
+
*
|
|
18
|
+
* @docs-group-description Logging
|
|
19
|
+
* Types related to logging in this package.
|
|
20
|
+
*/
|
|
21
|
+
export * from "./presentation-frontend/FrontendLoggerCategory";
|
|
22
|
+
/**
|
|
23
|
+
* @module UnifiedSelection
|
|
24
|
+
*
|
|
25
|
+
* @docs-group-description UnifiedSelection
|
|
26
|
+
* Types related to [unified selection]($docs/presentation/unified-selection/index.md).
|
|
27
|
+
*/
|
|
28
|
+
export * from "./presentation-frontend/selection/SelectionChangeEvent";
|
|
29
|
+
export * from "./presentation-frontend/selection/ISelectionProvider";
|
|
30
|
+
export * from "./presentation-frontend/selection/SelectionManager";
|
|
31
|
+
export * from "./presentation-frontend/selection/SelectionScopesManager";
|
|
32
|
+
export * from "./presentation-frontend/selection/SelectionHandler";
|
|
33
|
+
export * from "./presentation-frontend/selection/HiliteSetProvider";
|
|
34
|
+
export * from "./presentation-frontend/selection/SelectionHelper";
|
|
35
35
|
//# sourceMappingURL=presentation-frontend.d.ts.map
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @module Core
|
|
7
|
-
*
|
|
8
|
-
* @docs-group-description Core
|
|
9
|
-
* Common types used for retrieving presentation data from iModels.
|
|
10
|
-
*/
|
|
11
|
-
export * from "./presentation-frontend/Presentation";
|
|
12
|
-
export * from "./presentation-frontend/PresentationManager";
|
|
13
|
-
export * from "./presentation-frontend/RulesetManager";
|
|
14
|
-
export * from "./presentation-frontend/RulesetVariablesManager";
|
|
15
|
-
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesManager";
|
|
16
|
-
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesStorage";
|
|
17
|
-
export * from "./presentation-frontend/StateTracker";
|
|
18
|
-
export * from "./presentation-frontend/Diagnostics";
|
|
19
|
-
/**
|
|
20
|
-
* @module Logging
|
|
21
|
-
*
|
|
22
|
-
* @docs-group-description Logging
|
|
23
|
-
* Types related to logging in this package.
|
|
24
|
-
*/
|
|
25
|
-
export * from "./presentation-frontend/FrontendLoggerCategory";
|
|
26
|
-
/**
|
|
27
|
-
* @module UnifiedSelection
|
|
28
|
-
*
|
|
29
|
-
* @docs-group-description UnifiedSelection
|
|
30
|
-
* Types related to [unified selection]($docs/presentation/unified-selection/index.md).
|
|
31
|
-
*/
|
|
32
|
-
export * from "./presentation-frontend/selection/SelectionChangeEvent";
|
|
33
|
-
export * from "./presentation-frontend/selection/ISelectionProvider";
|
|
34
|
-
export * from "./presentation-frontend/selection/SelectionManager";
|
|
35
|
-
export * from "./presentation-frontend/selection/SelectionScopesManager";
|
|
36
|
-
export * from "./presentation-frontend/selection/SelectionHandler";
|
|
37
|
-
export * from "./presentation-frontend/selection/HiliteSetProvider";
|
|
38
|
-
export * from "./presentation-frontend/selection/SelectionHelper";
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/**
|
|
6
|
+
* @module Core
|
|
7
|
+
*
|
|
8
|
+
* @docs-group-description Core
|
|
9
|
+
* Common types used for retrieving presentation data from iModels.
|
|
10
|
+
*/
|
|
11
|
+
export * from "./presentation-frontend/Presentation";
|
|
12
|
+
export * from "./presentation-frontend/PresentationManager";
|
|
13
|
+
export * from "./presentation-frontend/RulesetManager";
|
|
14
|
+
export * from "./presentation-frontend/RulesetVariablesManager";
|
|
15
|
+
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesManager";
|
|
16
|
+
export * from "./presentation-frontend/favorite-properties/FavoritePropertiesStorage";
|
|
17
|
+
export * from "./presentation-frontend/StateTracker";
|
|
18
|
+
export * from "./presentation-frontend/Diagnostics";
|
|
19
|
+
/**
|
|
20
|
+
* @module Logging
|
|
21
|
+
*
|
|
22
|
+
* @docs-group-description Logging
|
|
23
|
+
* Types related to logging in this package.
|
|
24
|
+
*/
|
|
25
|
+
export * from "./presentation-frontend/FrontendLoggerCategory";
|
|
26
|
+
/**
|
|
27
|
+
* @module UnifiedSelection
|
|
28
|
+
*
|
|
29
|
+
* @docs-group-description UnifiedSelection
|
|
30
|
+
* Types related to [unified selection]($docs/presentation/unified-selection/index.md).
|
|
31
|
+
*/
|
|
32
|
+
export * from "./presentation-frontend/selection/SelectionChangeEvent";
|
|
33
|
+
export * from "./presentation-frontend/selection/ISelectionProvider";
|
|
34
|
+
export * from "./presentation-frontend/selection/SelectionManager";
|
|
35
|
+
export * from "./presentation-frontend/selection/SelectionScopesManager";
|
|
36
|
+
export * from "./presentation-frontend/selection/SelectionHandler";
|
|
37
|
+
export * from "./presentation-frontend/selection/HiliteSetProvider";
|
|
38
|
+
export * from "./presentation-frontend/selection/SelectionHelper";
|
|
39
39
|
//# sourceMappingURL=presentation-frontend.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/presentation-frontend",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.55",
|
|
4
4
|
"description": "Frontend of iModel.js Presentation library",
|
|
5
5
|
"main": "lib/cjs/presentation-frontend.js",
|
|
6
6
|
"module": "lib/esm/presentation-frontend.js",
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
"url": "http://www.bentley.com"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@itwin/core-bentley": "^4.0.0-dev.
|
|
26
|
-
"@itwin/core-common": "^4.0.0-dev.
|
|
27
|
-
"@itwin/core-frontend": "^4.0.0-dev.
|
|
28
|
-
"@itwin/core-quantity": "^4.0.0-dev.
|
|
29
|
-
"@itwin/presentation-common": "^4.0.0-dev.
|
|
25
|
+
"@itwin/core-bentley": "^4.0.0-dev.55",
|
|
26
|
+
"@itwin/core-common": "^4.0.0-dev.55",
|
|
27
|
+
"@itwin/core-frontend": "^4.0.0-dev.55",
|
|
28
|
+
"@itwin/core-quantity": "^4.0.0-dev.55",
|
|
29
|
+
"@itwin/presentation-common": "^4.0.0-dev.55"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@itwin/build-tools": "4.0.0-dev.
|
|
33
|
-
"@itwin/core-bentley": "4.0.0-dev.
|
|
34
|
-
"@itwin/core-common": "4.0.0-dev.
|
|
35
|
-
"@itwin/core-frontend": "4.0.0-dev.
|
|
36
|
-
"@itwin/core-i18n": "4.0.0-dev.
|
|
37
|
-
"@itwin/core-quantity": "4.0.0-dev.
|
|
38
|
-
"@itwin/eslint-plugin": "
|
|
39
|
-
"@itwin/presentation-common": "4.0.0-dev.
|
|
32
|
+
"@itwin/build-tools": "4.0.0-dev.55",
|
|
33
|
+
"@itwin/core-bentley": "4.0.0-dev.55",
|
|
34
|
+
"@itwin/core-common": "4.0.0-dev.55",
|
|
35
|
+
"@itwin/core-frontend": "4.0.0-dev.55",
|
|
36
|
+
"@itwin/core-i18n": "4.0.0-dev.55",
|
|
37
|
+
"@itwin/core-quantity": "4.0.0-dev.55",
|
|
38
|
+
"@itwin/eslint-plugin": "^4.0.0-dev.32",
|
|
39
|
+
"@itwin/presentation-common": "4.0.0-dev.55",
|
|
40
40
|
"@types/chai": "4.3.1",
|
|
41
41
|
"@types/chai-as-promised": "^7",
|
|
42
42
|
"@types/chai-jest-snapshot": "^1.3.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"sinon-chai": "^3.2.0",
|
|
64
64
|
"source-map-support": "^0.5.6",
|
|
65
65
|
"typemoq": "^2.1.0",
|
|
66
|
-
"typescript": "~
|
|
66
|
+
"typescript": "~5.0.2"
|
|
67
67
|
},
|
|
68
68
|
"nyc": {
|
|
69
69
|
"extends": "./node_modules/@itwin/build-tools/.nycrc"
|