@itwin/presentation-frontend 4.5.0-dev.8 → 4.5.0-dev.9

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.
Files changed (44) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/lib/cjs/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  3. package/lib/cjs/presentation-frontend/Diagnostics.js.map +1 -1
  4. package/lib/cjs/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  5. package/lib/cjs/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  6. package/lib/cjs/presentation-frontend/LocalizationHelper.js.map +1 -1
  7. package/lib/cjs/presentation-frontend/Presentation.js.map +1 -1
  8. package/lib/cjs/presentation-frontend/PresentationManager.js.map +1 -1
  9. package/lib/cjs/presentation-frontend/RulesetManager.js.map +1 -1
  10. package/lib/cjs/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  11. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +7 -7
  12. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  13. package/lib/cjs/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  14. package/lib/cjs/presentation-frontend/selection/HiliteRules.json +172 -172
  15. package/lib/cjs/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  16. package/lib/cjs/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  17. package/lib/cjs/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  18. package/lib/cjs/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  19. package/lib/cjs/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  20. package/lib/cjs/presentation-frontend/selection/SelectionManager.js.map +1 -1
  21. package/lib/cjs/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  22. package/lib/cjs/presentation-frontend.js.map +1 -1
  23. package/lib/esm/presentation-frontend/ConnectivityInformationProvider.js.map +1 -1
  24. package/lib/esm/presentation-frontend/Diagnostics.js.map +1 -1
  25. package/lib/esm/presentation-frontend/FrontendLoggerCategory.js.map +1 -1
  26. package/lib/esm/presentation-frontend/IpcRequestsHandler.js.map +1 -1
  27. package/lib/esm/presentation-frontend/LocalizationHelper.js.map +1 -1
  28. package/lib/esm/presentation-frontend/Presentation.js.map +1 -1
  29. package/lib/esm/presentation-frontend/PresentationManager.js.map +1 -1
  30. package/lib/esm/presentation-frontend/RulesetManager.js.map +1 -1
  31. package/lib/esm/presentation-frontend/RulesetVariablesManager.js.map +1 -1
  32. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js +7 -7
  33. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesManager.js.map +1 -1
  34. package/lib/esm/presentation-frontend/favorite-properties/FavoritePropertiesStorage.js.map +1 -1
  35. package/lib/esm/presentation-frontend/selection/HiliteRules.json +172 -172
  36. package/lib/esm/presentation-frontend/selection/HiliteSetProvider.js.map +1 -1
  37. package/lib/esm/presentation-frontend/selection/ISelectionProvider.js.map +1 -1
  38. package/lib/esm/presentation-frontend/selection/SelectionChangeEvent.js.map +1 -1
  39. package/lib/esm/presentation-frontend/selection/SelectionHandler.js.map +1 -1
  40. package/lib/esm/presentation-frontend/selection/SelectionHelper.js.map +1 -1
  41. package/lib/esm/presentation-frontend/selection/SelectionManager.js.map +1 -1
  42. package/lib/esm/presentation-frontend/selection/SelectionScopesManager.js.map +1 -1
  43. package/lib/esm/presentation-frontend.js.map +1 -1
  44. package/package.json +15 -15
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionManager.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAmC,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAqB,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,iBA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C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC;CACF","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 UnifiedSelection\n */\n\nimport { Id64, Id64Arg, Id64Array, IDisposable, using } from \"@itwin/core-bentley\";\nimport { IModelConnection, SelectionSetEvent, SelectionSetEventType } from \"@itwin/core-frontend\";\nimport { AsyncTasksTracker, Keys, KeySet, SelectionScope, SelectionScopeProps } from \"@itwin/presentation-common\";\nimport { HiliteSet, HiliteSetProvider } from \"./HiliteSetProvider\";\nimport { ISelectionProvider } from \"./ISelectionProvider\";\nimport { SelectionChangeEvent, SelectionChangeEventArgs, SelectionChangeType } from \"./SelectionChangeEvent\";\nimport { createSelectionScopeProps, SelectionScopesManager } from \"./SelectionScopesManager\";\n\n/**\n * Properties for creating [[SelectionManager]].\n * @public\n */\nexport interface SelectionManagerProps {\n /** A manager for [selection scopes]($docs/presentation/unified-selection/index#selection-scopes) */\n scopes: SelectionScopesManager;\n}\n\n/**\n * The selection manager which stores the overall selection.\n * @public\n */\nexport class SelectionManager implements ISelectionProvider {\n private _selectionContainerMap = new Map<IModelConnection, SelectionContainer>();\n private _imodelToolSelectionSyncHandlers = new Map<IModelConnection, { requestorsCount: number, handler: ToolSelectionSyncHandler }>();\n private _hiliteSetProviders = new Map<IModelConnection, HiliteSetProvider>();\n\n /** An event which gets broadcasted on selection changes */\n public readonly selectionChange: SelectionChangeEvent;\n\n /** Manager for [selection scopes]($docs/presentation/unified-selection/index#selection-scopes) */\n public readonly scopes: SelectionScopesManager;\n\n /**\n * Creates an instance of SelectionManager.\n */\n constructor(props: SelectionManagerProps) {\n this.selectionChange = new SelectionChangeEvent();\n this.scopes = props.scopes;\n IModelConnection.onClose.addListener((imodel: IModelConnection) => {\n this.onConnectionClose(imodel);\n });\n }\n\n private onConnectionClose(imodel: IModelConnection): void {\n this.clearSelection(\"Connection Close Event\", imodel);\n this._selectionContainerMap.delete(imodel);\n this._hiliteSetProviders.delete(imodel);\n }\n\n private getContainer(imodel: IModelConnection): SelectionContainer {\n let selectionContainer = this._selectionContainerMap.get(imodel);\n if (!selectionContainer) {\n selectionContainer = new SelectionContainer();\n this._selectionContainerMap.set(imodel, selectionContainer);\n }\n return selectionContainer;\n }\n\n /** @internal */\n // istanbul ignore next\n public getToolSelectionSyncHandler(imodel: IModelConnection) { return this._imodelToolSelectionSyncHandlers.get(imodel)?.handler; }\n\n /**\n * Request the manager to sync with imodel's tool selection (see `IModelConnection.selectionSet`).\n */\n public setSyncWithIModelToolSelection(imodel: IModelConnection, sync = true) {\n const registration = this._imodelToolSelectionSyncHandlers.get(imodel);\n if (sync) {\n if (!registration || registration.requestorsCount === 0) {\n this._imodelToolSelectionSyncHandlers.set(imodel, { requestorsCount: 1, handler: new ToolSelectionSyncHandler(imodel, this) });\n } else {\n this._imodelToolSelectionSyncHandlers.set(imodel, { ...registration, requestorsCount: registration.requestorsCount + 1 });\n }\n } else {\n if (registration && registration.requestorsCount > 0) {\n const requestorsCount = registration.requestorsCount - 1;\n if (requestorsCount > 0) {\n this._imodelToolSelectionSyncHandlers.set(imodel, { ...registration, requestorsCount });\n } else {\n this._imodelToolSelectionSyncHandlers.delete(imodel);\n registration.handler.dispose();\n }\n }\n }\n }\n\n /**\n * Temporarily suspends tool selection synchronization until the returned `IDisposable`\n * is disposed.\n */\n public suspendIModelToolSelectionSync(imodel: IModelConnection): IDisposable {\n const registration = this._imodelToolSelectionSyncHandlers.get(imodel);\n if (!registration)\n return { dispose: () => { } };\n\n const wasSuspended = registration.handler.isSuspended;\n registration.handler.isSuspended = true;\n return { dispose: () => (registration.handler.isSuspended = wasSuspended) };\n }\n\n /** Get the selection levels currently stored in this manager for the specified imodel */\n public getSelectionLevels(imodel: IModelConnection): number[] {\n return this.getContainer(imodel).getSelectionLevels();\n }\n\n /** Get the selection currently stored in this manager */\n public getSelection(imodel: IModelConnection, level: number = 0): Readonly<KeySet> {\n return this.getContainer(imodel).getSelection(level);\n }\n\n private handleEvent(evt: SelectionChangeEventArgs): void {\n const container = this.getContainer(evt.imodel);\n const selectedItemsSet = container.getSelection(evt.level);\n const guidBefore = selectedItemsSet.guid;\n switch (evt.changeType) {\n case SelectionChangeType.Add:\n selectedItemsSet.add(evt.keys);\n break;\n case SelectionChangeType.Remove:\n selectedItemsSet.delete(evt.keys);\n break;\n case SelectionChangeType.Replace:\n if (selectedItemsSet.size !== evt.keys.size || !selectedItemsSet.hasAll(evt.keys)) {\n // note: the above check is only needed to avoid changing\n // guid of the keyset if we're replacing keyset with the same keys\n selectedItemsSet.clear().add(evt.keys);\n }\n break;\n case SelectionChangeType.Clear:\n selectedItemsSet.clear();\n break;\n }\n\n if (selectedItemsSet.guid === guidBefore)\n return;\n\n container.clear(evt.level + 1);\n this.selectionChange.raiseEvent(evt, this);\n }\n\n /**\n * Add keys to the selection\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param keys Keys to add\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public addToSelection(source: string, imodel: IModelConnection, keys: Keys, level: number = 0, rulesetId?: string): void {\n const evt: SelectionChangeEventArgs = {\n source,\n level,\n imodel,\n changeType: SelectionChangeType.Add,\n keys: new KeySet(keys),\n timestamp: new Date(),\n rulesetId,\n };\n this.handleEvent(evt);\n }\n\n /**\n * Remove keys from current selection\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param keys Keys to remove\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public removeFromSelection(source: string, imodel: IModelConnection, keys: Keys, level: number = 0, rulesetId?: string): void {\n const evt: SelectionChangeEventArgs = {\n source,\n level,\n imodel,\n changeType: SelectionChangeType.Remove,\n keys: new KeySet(keys),\n timestamp: new Date(),\n rulesetId,\n };\n this.handleEvent(evt);\n }\n\n /**\n * Replace current selection\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param keys Keys to add\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public replaceSelection(source: string, imodel: IModelConnection, keys: Keys, level: number = 0, rulesetId?: string): void {\n const evt: SelectionChangeEventArgs = {\n source,\n level,\n imodel,\n changeType: SelectionChangeType.Replace,\n keys: new KeySet(keys),\n timestamp: new Date(),\n rulesetId,\n };\n this.handleEvent(evt);\n }\n\n /**\n * Clear current selection\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public clearSelection(source: string, imodel: IModelConnection, level: number = 0, rulesetId?: string): void {\n const evt: SelectionChangeEventArgs = {\n source,\n level,\n imodel,\n changeType: SelectionChangeType.Clear,\n keys: new KeySet(),\n timestamp: new Date(),\n rulesetId,\n };\n this.handleEvent(evt);\n }\n\n /**\n * Add keys to selection after applying [selection scope]($docs/presentation/unified-selection/index#selection-scopes) on them.\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param ids Element IDs to add\n * @param scope Selection scope to apply\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public async addToSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string, level: number = 0, rulesetId?: string): Promise<void> {\n const scopedKeys = await this.scopes.computeSelection(imodel, ids, scope);\n this.addToSelection(source, imodel, scopedKeys, level, rulesetId);\n }\n\n /**\n * Remove keys from current selection after applying [selection scope]($docs/presentation/unified-selection/index#selection-scopes) on them.\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param ids Element IDs to remove\n * @param scope Selection scope to apply\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public async removeFromSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string, level: number = 0, rulesetId?: string): Promise<void> {\n const scopedKeys = await this.scopes.computeSelection(imodel, ids, scope);\n this.removeFromSelection(source, imodel, scopedKeys, level, rulesetId);\n }\n\n /**\n * Replace current selection with keys after applying [selection scope]($docs/presentation/unified-selection/index#selection-scopes) on them.\n * @param source Name of the selection source\n * @param imodel iModel associated with the selection\n * @param ids Element IDs to replace with\n * @param scope Selection scope to apply\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\n */\n public async replaceSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string, level: number = 0, rulesetId?: string): Promise<void> {\n const scopedKeys = await this.scopes.computeSelection(imodel, ids, scope);\n this.replaceSelection(source, imodel, scopedKeys, level, rulesetId);\n }\n\n /**\n * Get the current hilite set for the specified imodel\n * @public\n */\n public async getHiliteSet(imodel: IModelConnection): Promise<HiliteSet> {\n return this.getHiliteSetProvider(imodel).getHiliteSet(this.getSelection(imodel));\n }\n\n /**\n * Get the current hilite set iterator for the specified imodel.\n * @public\n */\n public getHiliteSetIterator(imodel: IModelConnection) {\n return this.getHiliteSetProvider(imodel).getHiliteSetIterator(this.getSelection(imodel));\n }\n\n private getHiliteSetProvider(imodel: IModelConnection) {\n let provider = this._hiliteSetProviders.get(imodel);\n if (!provider) {\n provider = HiliteSetProvider.create({ imodel });\n this._hiliteSetProviders.set(imodel, provider);\n }\n return provider;\n }\n}\n\n/** @internal */\nclass SelectionContainer {\n private readonly _selectedItemsSetMap: Map<number, KeySet>;\n\n constructor() {\n this._selectedItemsSetMap = new Map<number, KeySet>();\n }\n\n public getSelection(level: number): KeySet {\n let selectedItemsSet = this._selectedItemsSetMap.get(level);\n if (!selectedItemsSet) {\n selectedItemsSet = new KeySet();\n this._selectedItemsSetMap.set(level, selectedItemsSet);\n }\n return selectedItemsSet;\n }\n\n public getSelectionLevels(): number[] {\n const levels = new Array<number>();\n for (const entry of this._selectedItemsSetMap.entries()) {\n if (!entry[1].isEmpty)\n levels.push(entry[0]);\n }\n return levels.sort();\n }\n\n public clear(level: number) {\n const keys = this._selectedItemsSetMap.keys();\n for (const key of keys) {\n if (key >= level) {\n const selectedItemsSet = this._selectedItemsSetMap.get(key)!;\n selectedItemsSet.clear();\n }\n }\n }\n}\n\n/** @internal */\nexport const TRANSIENT_ELEMENT_CLASSNAME = \"/TRANSIENT\";\n\n/** @internal */\nexport class ToolSelectionSyncHandler implements IDisposable {\n\n private _selectionSourceName = \"Tool\";\n private _logicalSelection: SelectionManager;\n private _imodel: IModelConnection;\n private _imodelToolSelectionListenerDisposeFunc: () => void;\n private _asyncsTracker = new AsyncTasksTracker();\n public isSuspended?: boolean;\n\n public constructor(imodel: IModelConnection, logicalSelection: SelectionManager) {\n this._imodel = imodel;\n this._logicalSelection = logicalSelection;\n this._imodelToolSelectionListenerDisposeFunc = imodel.selectionSet.onChanged.addListener(this.onToolSelectionChanged);\n }\n\n public dispose() {\n this._imodelToolSelectionListenerDisposeFunc();\n }\n\n /** note: used only it tests */\n public get pendingAsyncs() { return this._asyncsTracker.pendingAsyncs; }\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n private onToolSelectionChanged = async (ev: SelectionSetEvent): Promise<void> => {\n // ignore selection change event if the handler is suspended\n if (this.isSuspended)\n return;\n\n // this component only cares about its own imodel\n const imodel = ev.set.iModel;\n if (imodel !== this._imodel)\n return;\n\n // determine the level of selection changes\n // wip: may want to allow selecting at different levels?\n const selectionLevel = 0;\n\n let ids: Id64Arg;\n switch (ev.type) {\n case SelectionSetEventType.Add:\n ids = ev.added;\n break;\n case SelectionSetEventType.Replace:\n ids = ev.set.elements;\n break;\n default:\n ids = ev.removed;\n break;\n }\n\n // we're always using scoped selection changer even if the scope is set to \"element\" - that\n // makes sure we're adding to selection keys with concrete classes and not \"BisCore:Element\", which\n // we can't because otherwise our keys compare fails (presentation components load data with\n // concrete classes)\n const changer = new ScopedSelectionChanger(this._selectionSourceName, this._imodel, this._logicalSelection, createSelectionScopeProps(this._logicalSelection.scopes.activeScope));\n\n // we know what to do immediately on `clear` events\n if (SelectionSetEventType.Clear === ev.type) {\n await changer.clear(selectionLevel);\n return;\n }\n\n const parsedIds = parseIds(ids);\n await using(this._asyncsTracker.trackAsyncTask(), async (_r) => {\n switch (ev.type) {\n case SelectionSetEventType.Add:\n await changer.add(parsedIds.transient, parsedIds.persistent, selectionLevel);\n break;\n case SelectionSetEventType.Replace:\n await changer.replace(parsedIds.transient, parsedIds.persistent, selectionLevel);\n break;\n case SelectionSetEventType.Remove:\n await changer.remove(parsedIds.transient, parsedIds.persistent, selectionLevel);\n break;\n }\n });\n };\n}\n\nconst parseIds = (ids: Id64Arg): { persistent: Id64Arg, transient: Id64Arg } => {\n let allPersistent = true;\n let allTransient = true;\n for (const id of Id64.iterable(ids)) {\n if (Id64.isTransient(id))\n allPersistent = false;\n else\n allTransient = false;\n\n if (!allPersistent && !allTransient)\n break;\n }\n\n // avoid making a copy if ids are only persistent or only transient\n if (allPersistent) {\n return { persistent: ids, transient: [] };\n } else if (allTransient) {\n return { persistent: [], transient: ids };\n }\n\n // if `ids` contain mixed ids, we have to copy.. use Array instead of\n // a Set for performance\n const persistentElementIds: Id64Array = [];\n const transientElementIds: Id64Array = [];\n for (const id of Id64.iterable(ids)) {\n if (Id64.isTransient(id))\n transientElementIds.push(id);\n else\n persistentElementIds.push(id);\n }\n\n return { persistent: persistentElementIds, transient: transientElementIds };\n};\n\nfunction addTransientKeys(transientIds: Id64Arg, keys: KeySet): void {\n for (const id of Id64.iterable(transientIds))\n keys.add({ className: TRANSIENT_ELEMENT_CLASSNAME, id });\n}\n\n/** @internal */\nclass ScopedSelectionChanger {\n public readonly name: string;\n public readonly imodel: IModelConnection;\n public readonly manager: SelectionManager;\n public readonly scope: SelectionScopeProps | SelectionScope | string;\n public constructor(name: string, imodel: IModelConnection, manager: SelectionManager, scope: SelectionScopeProps | SelectionScope | string) {\n this.name = name;\n this.imodel = imodel;\n this.manager = manager;\n this.scope = scope;\n }\n public async clear(level: number): Promise<void> {\n this.manager.clearSelection(this.name, this.imodel, level);\n }\n public async add(transientIds: Id64Arg, persistentIds: Id64Arg, level: number): Promise<void> {\n const keys = await this.manager.scopes.computeSelection(this.imodel, persistentIds, this.scope);\n addTransientKeys(transientIds, keys);\n this.manager.addToSelection(this.name, this.imodel, keys, level);\n }\n public async remove(transientIds: Id64Arg, persistentIds: Id64Arg, level: number): Promise<void> {\n const keys = await this.manager.scopes.computeSelection(this.imodel, persistentIds, this.scope);\n addTransientKeys(transientIds, keys);\n this.manager.removeFromSelection(this.name, this.imodel, keys, level);\n }\n public async replace(transientIds: Id64Arg, persistentIds: Id64Arg, level: number): Promise<void> {\n const keys = await this.manager.scopes.computeSelection(this.imodel, persistentIds, this.scope);\n addTransientKeys(transientIds, keys);\n this.manager.replaceSelection(this.name, this.imodel, keys, level);\n }\n}\n"]}
1
+ {"version":3,"file":"SelectionManager.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAmC,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAqB,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAQ,MAAM,EAAuC,MAAM,4BAA4B,CAAC;AAClH,OAAO,EAAa,iBAAiB,EAAE,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C;CACF","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 UnifiedSelection\r\n */\r\n\r\nimport { Id64, Id64Arg, Id64Array, IDisposable, using } from \"@itwin/core-bentley\";\r\nimport { IModelConnection, SelectionSetEvent, SelectionSetEventType } from \"@itwin/core-frontend\";\r\nimport { AsyncTasksTracker, Keys, KeySet, SelectionScope, SelectionScopeProps } from \"@itwin/presentation-common\";\r\nimport { HiliteSet, HiliteSetProvider } from \"./HiliteSetProvider\";\r\nimport { ISelectionProvider } from \"./ISelectionProvider\";\r\nimport { SelectionChangeEvent, SelectionChangeEventArgs, SelectionChangeType } from \"./SelectionChangeEvent\";\r\nimport { createSelectionScopeProps, SelectionScopesManager } from \"./SelectionScopesManager\";\r\n\r\n/**\r\n * Properties for creating [[SelectionManager]].\r\n * @public\r\n */\r\nexport interface SelectionManagerProps {\r\n /** A manager for [selection scopes]($docs/presentation/unified-selection/index#selection-scopes) */\r\n scopes: SelectionScopesManager;\r\n}\r\n\r\n/**\r\n * The selection manager which stores the overall selection.\r\n * @public\r\n */\r\nexport class SelectionManager implements ISelectionProvider {\r\n private _selectionContainerMap = new Map<IModelConnection, SelectionContainer>();\r\n private _imodelToolSelectionSyncHandlers = new Map<IModelConnection, { requestorsCount: number, handler: ToolSelectionSyncHandler }>();\r\n private _hiliteSetProviders = new Map<IModelConnection, HiliteSetProvider>();\r\n\r\n /** An event which gets broadcasted on selection changes */\r\n public readonly selectionChange: SelectionChangeEvent;\r\n\r\n /** Manager for [selection scopes]($docs/presentation/unified-selection/index#selection-scopes) */\r\n public readonly scopes: SelectionScopesManager;\r\n\r\n /**\r\n * Creates an instance of SelectionManager.\r\n */\r\n constructor(props: SelectionManagerProps) {\r\n this.selectionChange = new SelectionChangeEvent();\r\n this.scopes = props.scopes;\r\n IModelConnection.onClose.addListener((imodel: IModelConnection) => {\r\n this.onConnectionClose(imodel);\r\n });\r\n }\r\n\r\n private onConnectionClose(imodel: IModelConnection): void {\r\n this.clearSelection(\"Connection Close Event\", imodel);\r\n this._selectionContainerMap.delete(imodel);\r\n this._hiliteSetProviders.delete(imodel);\r\n }\r\n\r\n private getContainer(imodel: IModelConnection): SelectionContainer {\r\n let selectionContainer = this._selectionContainerMap.get(imodel);\r\n if (!selectionContainer) {\r\n selectionContainer = new SelectionContainer();\r\n this._selectionContainerMap.set(imodel, selectionContainer);\r\n }\r\n return selectionContainer;\r\n }\r\n\r\n /** @internal */\r\n // istanbul ignore next\r\n public getToolSelectionSyncHandler(imodel: IModelConnection) { return this._imodelToolSelectionSyncHandlers.get(imodel)?.handler; }\r\n\r\n /**\r\n * Request the manager to sync with imodel's tool selection (see `IModelConnection.selectionSet`).\r\n */\r\n public setSyncWithIModelToolSelection(imodel: IModelConnection, sync = true) {\r\n const registration = this._imodelToolSelectionSyncHandlers.get(imodel);\r\n if (sync) {\r\n if (!registration || registration.requestorsCount === 0) {\r\n this._imodelToolSelectionSyncHandlers.set(imodel, { requestorsCount: 1, handler: new ToolSelectionSyncHandler(imodel, this) });\r\n } else {\r\n this._imodelToolSelectionSyncHandlers.set(imodel, { ...registration, requestorsCount: registration.requestorsCount + 1 });\r\n }\r\n } else {\r\n if (registration && registration.requestorsCount > 0) {\r\n const requestorsCount = registration.requestorsCount - 1;\r\n if (requestorsCount > 0) {\r\n this._imodelToolSelectionSyncHandlers.set(imodel, { ...registration, requestorsCount });\r\n } else {\r\n this._imodelToolSelectionSyncHandlers.delete(imodel);\r\n registration.handler.dispose();\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Temporarily suspends tool selection synchronization until the returned `IDisposable`\r\n * is disposed.\r\n */\r\n public suspendIModelToolSelectionSync(imodel: IModelConnection): IDisposable {\r\n const registration = this._imodelToolSelectionSyncHandlers.get(imodel);\r\n if (!registration)\r\n return { dispose: () => { } };\r\n\r\n const wasSuspended = registration.handler.isSuspended;\r\n registration.handler.isSuspended = true;\r\n return { dispose: () => (registration.handler.isSuspended = wasSuspended) };\r\n }\r\n\r\n /** Get the selection levels currently stored in this manager for the specified imodel */\r\n public getSelectionLevels(imodel: IModelConnection): number[] {\r\n return this.getContainer(imodel).getSelectionLevels();\r\n }\r\n\r\n /** Get the selection currently stored in this manager */\r\n public getSelection(imodel: IModelConnection, level: number = 0): Readonly<KeySet> {\r\n return this.getContainer(imodel).getSelection(level);\r\n }\r\n\r\n private handleEvent(evt: SelectionChangeEventArgs): void {\r\n const container = this.getContainer(evt.imodel);\r\n const selectedItemsSet = container.getSelection(evt.level);\r\n const guidBefore = selectedItemsSet.guid;\r\n switch (evt.changeType) {\r\n case SelectionChangeType.Add:\r\n selectedItemsSet.add(evt.keys);\r\n break;\r\n case SelectionChangeType.Remove:\r\n selectedItemsSet.delete(evt.keys);\r\n break;\r\n case SelectionChangeType.Replace:\r\n if (selectedItemsSet.size !== evt.keys.size || !selectedItemsSet.hasAll(evt.keys)) {\r\n // note: the above check is only needed to avoid changing\r\n // guid of the keyset if we're replacing keyset with the same keys\r\n selectedItemsSet.clear().add(evt.keys);\r\n }\r\n break;\r\n case SelectionChangeType.Clear:\r\n selectedItemsSet.clear();\r\n break;\r\n }\r\n\r\n if (selectedItemsSet.guid === guidBefore)\r\n return;\r\n\r\n container.clear(evt.level + 1);\r\n this.selectionChange.raiseEvent(evt, this);\r\n }\r\n\r\n /**\r\n * Add keys to the selection\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param keys Keys to add\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public addToSelection(source: string, imodel: IModelConnection, keys: Keys, level: number = 0, rulesetId?: string): void {\r\n const evt: SelectionChangeEventArgs = {\r\n source,\r\n level,\r\n imodel,\r\n changeType: SelectionChangeType.Add,\r\n keys: new KeySet(keys),\r\n timestamp: new Date(),\r\n rulesetId,\r\n };\r\n this.handleEvent(evt);\r\n }\r\n\r\n /**\r\n * Remove keys from current selection\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param keys Keys to remove\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public removeFromSelection(source: string, imodel: IModelConnection, keys: Keys, level: number = 0, rulesetId?: string): void {\r\n const evt: SelectionChangeEventArgs = {\r\n source,\r\n level,\r\n imodel,\r\n changeType: SelectionChangeType.Remove,\r\n keys: new KeySet(keys),\r\n timestamp: new Date(),\r\n rulesetId,\r\n };\r\n this.handleEvent(evt);\r\n }\r\n\r\n /**\r\n * Replace current selection\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param keys Keys to add\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public replaceSelection(source: string, imodel: IModelConnection, keys: Keys, level: number = 0, rulesetId?: string): void {\r\n const evt: SelectionChangeEventArgs = {\r\n source,\r\n level,\r\n imodel,\r\n changeType: SelectionChangeType.Replace,\r\n keys: new KeySet(keys),\r\n timestamp: new Date(),\r\n rulesetId,\r\n };\r\n this.handleEvent(evt);\r\n }\r\n\r\n /**\r\n * Clear current selection\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public clearSelection(source: string, imodel: IModelConnection, level: number = 0, rulesetId?: string): void {\r\n const evt: SelectionChangeEventArgs = {\r\n source,\r\n level,\r\n imodel,\r\n changeType: SelectionChangeType.Clear,\r\n keys: new KeySet(),\r\n timestamp: new Date(),\r\n rulesetId,\r\n };\r\n this.handleEvent(evt);\r\n }\r\n\r\n /**\r\n * Add keys to selection after applying [selection scope]($docs/presentation/unified-selection/index#selection-scopes) on them.\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param ids Element IDs to add\r\n * @param scope Selection scope to apply\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public async addToSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string, level: number = 0, rulesetId?: string): Promise<void> {\r\n const scopedKeys = await this.scopes.computeSelection(imodel, ids, scope);\r\n this.addToSelection(source, imodel, scopedKeys, level, rulesetId);\r\n }\r\n\r\n /**\r\n * Remove keys from current selection after applying [selection scope]($docs/presentation/unified-selection/index#selection-scopes) on them.\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param ids Element IDs to remove\r\n * @param scope Selection scope to apply\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public async removeFromSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string, level: number = 0, rulesetId?: string): Promise<void> {\r\n const scopedKeys = await this.scopes.computeSelection(imodel, ids, scope);\r\n this.removeFromSelection(source, imodel, scopedKeys, level, rulesetId);\r\n }\r\n\r\n /**\r\n * Replace current selection with keys after applying [selection scope]($docs/presentation/unified-selection/index#selection-scopes) on them.\r\n * @param source Name of the selection source\r\n * @param imodel iModel associated with the selection\r\n * @param ids Element IDs to replace with\r\n * @param scope Selection scope to apply\r\n * @param level Selection level (see [selection levels documentation section]($docs/presentation/unified-selection/index#selection-levels))\r\n * @param rulesetId ID of the ruleset in case the selection was changed from a rules-driven control\r\n */\r\n public async replaceSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string, level: number = 0, rulesetId?: string): Promise<void> {\r\n const scopedKeys = await this.scopes.computeSelection(imodel, ids, scope);\r\n this.replaceSelection(source, imodel, scopedKeys, level, rulesetId);\r\n }\r\n\r\n /**\r\n * Get the current hilite set for the specified imodel\r\n * @public\r\n */\r\n public async getHiliteSet(imodel: IModelConnection): Promise<HiliteSet> {\r\n return this.getHiliteSetProvider(imodel).getHiliteSet(this.getSelection(imodel));\r\n }\r\n\r\n /**\r\n * Get the current hilite set iterator for the specified imodel.\r\n * @public\r\n */\r\n public getHiliteSetIterator(imodel: IModelConnection) {\r\n return this.getHiliteSetProvider(imodel).getHiliteSetIterator(this.getSelection(imodel));\r\n }\r\n\r\n private getHiliteSetProvider(imodel: IModelConnection) {\r\n let provider = this._hiliteSetProviders.get(imodel);\r\n if (!provider) {\r\n provider = HiliteSetProvider.create({ imodel });\r\n this._hiliteSetProviders.set(imodel, provider);\r\n }\r\n return provider;\r\n }\r\n}\r\n\r\n/** @internal */\r\nclass SelectionContainer {\r\n private readonly _selectedItemsSetMap: Map<number, KeySet>;\r\n\r\n constructor() {\r\n this._selectedItemsSetMap = new Map<number, KeySet>();\r\n }\r\n\r\n public getSelection(level: number): KeySet {\r\n let selectedItemsSet = this._selectedItemsSetMap.get(level);\r\n if (!selectedItemsSet) {\r\n selectedItemsSet = new KeySet();\r\n this._selectedItemsSetMap.set(level, selectedItemsSet);\r\n }\r\n return selectedItemsSet;\r\n }\r\n\r\n public getSelectionLevels(): number[] {\r\n const levels = new Array<number>();\r\n for (const entry of this._selectedItemsSetMap.entries()) {\r\n if (!entry[1].isEmpty)\r\n levels.push(entry[0]);\r\n }\r\n return levels.sort();\r\n }\r\n\r\n public clear(level: number) {\r\n const keys = this._selectedItemsSetMap.keys();\r\n for (const key of keys) {\r\n if (key >= level) {\r\n const selectedItemsSet = this._selectedItemsSetMap.get(key)!;\r\n selectedItemsSet.clear();\r\n }\r\n }\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport const TRANSIENT_ELEMENT_CLASSNAME = \"/TRANSIENT\";\r\n\r\n/** @internal */\r\nexport class ToolSelectionSyncHandler implements IDisposable {\r\n\r\n private _selectionSourceName = \"Tool\";\r\n private _logicalSelection: SelectionManager;\r\n private _imodel: IModelConnection;\r\n private _imodelToolSelectionListenerDisposeFunc: () => void;\r\n private _asyncsTracker = new AsyncTasksTracker();\r\n public isSuspended?: boolean;\r\n\r\n public constructor(imodel: IModelConnection, logicalSelection: SelectionManager) {\r\n this._imodel = imodel;\r\n this._logicalSelection = logicalSelection;\r\n this._imodelToolSelectionListenerDisposeFunc = imodel.selectionSet.onChanged.addListener(this.onToolSelectionChanged);\r\n }\r\n\r\n public dispose() {\r\n this._imodelToolSelectionListenerDisposeFunc();\r\n }\r\n\r\n /** note: used only it tests */\r\n public get pendingAsyncs() { return this._asyncsTracker.pendingAsyncs; }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private onToolSelectionChanged = async (ev: SelectionSetEvent): Promise<void> => {\r\n // ignore selection change event if the handler is suspended\r\n if (this.isSuspended)\r\n return;\r\n\r\n // this component only cares about its own imodel\r\n const imodel = ev.set.iModel;\r\n if (imodel !== this._imodel)\r\n return;\r\n\r\n // determine the level of selection changes\r\n // wip: may want to allow selecting at different levels?\r\n const selectionLevel = 0;\r\n\r\n let ids: Id64Arg;\r\n switch (ev.type) {\r\n case SelectionSetEventType.Add:\r\n ids = ev.added;\r\n break;\r\n case SelectionSetEventType.Replace:\r\n ids = ev.set.elements;\r\n break;\r\n default:\r\n ids = ev.removed;\r\n break;\r\n }\r\n\r\n // we're always using scoped selection changer even if the scope is set to \"element\" - that\r\n // makes sure we're adding to selection keys with concrete classes and not \"BisCore:Element\", which\r\n // we can't because otherwise our keys compare fails (presentation components load data with\r\n // concrete classes)\r\n const changer = new ScopedSelectionChanger(this._selectionSourceName, this._imodel, this._logicalSelection, createSelectionScopeProps(this._logicalSelection.scopes.activeScope));\r\n\r\n // we know what to do immediately on `clear` events\r\n if (SelectionSetEventType.Clear === ev.type) {\r\n await changer.clear(selectionLevel);\r\n return;\r\n }\r\n\r\n const parsedIds = parseIds(ids);\r\n await using(this._asyncsTracker.trackAsyncTask(), async (_r) => {\r\n switch (ev.type) {\r\n case SelectionSetEventType.Add:\r\n await changer.add(parsedIds.transient, parsedIds.persistent, selectionLevel);\r\n break;\r\n case SelectionSetEventType.Replace:\r\n await changer.replace(parsedIds.transient, parsedIds.persistent, selectionLevel);\r\n break;\r\n case SelectionSetEventType.Remove:\r\n await changer.remove(parsedIds.transient, parsedIds.persistent, selectionLevel);\r\n break;\r\n }\r\n });\r\n };\r\n}\r\n\r\nconst parseIds = (ids: Id64Arg): { persistent: Id64Arg, transient: Id64Arg } => {\r\n let allPersistent = true;\r\n let allTransient = true;\r\n for (const id of Id64.iterable(ids)) {\r\n if (Id64.isTransient(id))\r\n allPersistent = false;\r\n else\r\n allTransient = false;\r\n\r\n if (!allPersistent && !allTransient)\r\n break;\r\n }\r\n\r\n // avoid making a copy if ids are only persistent or only transient\r\n if (allPersistent) {\r\n return { persistent: ids, transient: [] };\r\n } else if (allTransient) {\r\n return { persistent: [], transient: ids };\r\n }\r\n\r\n // if `ids` contain mixed ids, we have to copy.. use Array instead of\r\n // a Set for performance\r\n const persistentElementIds: Id64Array = [];\r\n const transientElementIds: Id64Array = [];\r\n for (const id of Id64.iterable(ids)) {\r\n if (Id64.isTransient(id))\r\n transientElementIds.push(id);\r\n else\r\n persistentElementIds.push(id);\r\n }\r\n\r\n return { persistent: persistentElementIds, transient: transientElementIds };\r\n};\r\n\r\nfunction addTransientKeys(transientIds: Id64Arg, keys: KeySet): void {\r\n for (const id of Id64.iterable(transientIds))\r\n keys.add({ className: TRANSIENT_ELEMENT_CLASSNAME, id });\r\n}\r\n\r\n/** @internal */\r\nclass ScopedSelectionChanger {\r\n public readonly name: string;\r\n public readonly imodel: IModelConnection;\r\n public readonly manager: SelectionManager;\r\n public readonly scope: SelectionScopeProps | SelectionScope | string;\r\n public constructor(name: string, imodel: IModelConnection, manager: SelectionManager, scope: SelectionScopeProps | SelectionScope | string) {\r\n this.name = name;\r\n this.imodel = imodel;\r\n this.manager = manager;\r\n this.scope = scope;\r\n }\r\n public async clear(level: number): Promise<void> {\r\n this.manager.clearSelection(this.name, this.imodel, level);\r\n }\r\n public async add(transientIds: Id64Arg, persistentIds: Id64Arg, level: number): Promise<void> {\r\n const keys = await this.manager.scopes.computeSelection(this.imodel, persistentIds, this.scope);\r\n addTransientKeys(transientIds, keys);\r\n this.manager.addToSelection(this.name, this.imodel, keys, level);\r\n }\r\n public async remove(transientIds: Id64Arg, persistentIds: Id64Arg, level: number): Promise<void> {\r\n const keys = await this.manager.scopes.computeSelection(this.imodel, persistentIds, this.scope);\r\n addTransientKeys(transientIds, keys);\r\n this.manager.removeFromSelection(this.name, this.imodel, keys, level);\r\n }\r\n public async replace(transientIds: Id64Arg, persistentIds: Id64Arg, level: number): Promise<void> {\r\n const keys = await this.manager.scopes.computeSelection(this.imodel, persistentIds, this.scope);\r\n addTransientKeys(transientIds, keys);\r\n this.manager.replaceSelection(this.name, this.imodel, keys, level);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionScopesManager.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionScopesManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAA2D,MAAM,4BAA4B,CAAC;AActI;;;;;GAKG;AACH,MAAM,OAAO,sBAAsB;IAMjC,YAAmB,KAAkC;QACnD,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,kBAAkB,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACpF,CAAC;I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7C,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 UnifiedSelection\n */\n\nimport { Id64Arg } from \"@itwin/core-bentley\";\nimport { IModelConnection } from \"@itwin/core-frontend\";\nimport { DEFAULT_KEYS_BATCH_SIZE, KeySet, RpcRequestsHandler, SelectionScope, SelectionScopeProps } from \"@itwin/presentation-common\";\n\n/**\n * Properties for creating [[SelectionScopesManager]].\n * @public\n */\nexport interface SelectionScopesManagerProps {\n /** RPC handler to use for requesting selection scopes */\n rpcRequestsHandler: RpcRequestsHandler;\n\n /** Provider of active locale to use for localizing scopes */\n localeProvider?: () => string | undefined;\n}\n\n/**\n * A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)\n * and can compute logical selection based on element IDs and selection scope.\n *\n * @public\n */\nexport class SelectionScopesManager {\n\n private _rpcRequestsHandler: RpcRequestsHandler;\n private _getLocale: () => string | undefined;\n private _activeScope: SelectionScopeProps | SelectionScope | string | undefined;\n\n public constructor(props: SelectionScopesManagerProps) {\n this._rpcRequestsHandler = props.rpcRequestsHandler;\n this._getLocale = props.localeProvider ? props.localeProvider : (() => undefined);\n }\n\n /** Get active locale */\n public get activeLocale() { return this._getLocale(); }\n\n /** The active selection scope or its id */\n public get activeScope() { return this._activeScope; }\n public set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined) { this._activeScope = scope; }\n\n /**\n * Get available selection scopes.\n * @param imodel The iModel to get selection scopes for\n * @param locale Optional locale to use when localizing scopes' label and description\n */\n public async getSelectionScopes(imodel: IModelConnection, locale?: string): Promise<SelectionScope[]> {\n if (!locale)\n locale = this._getLocale();\n return this._rpcRequestsHandler.getSelectionScopes({ imodel: imodel.getRpcProps(), locale });\n }\n\n /**\n * Computes keys that need to be added to logical selection based on provided selection scope.\n * @param ids Element IDs to compute selection for\n * @param scope Selection scope to apply\n */\n public async computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise<KeySet> {\n const scopeProps = createSelectionScopeProps(scope);\n\n // convert ids input to array\n if (typeof ids === \"string\")\n ids = [ids];\n else if (ids instanceof Set)\n ids = [...ids];\n\n // compute selection in batches to avoid HTTP 413\n const keys = new KeySet();\n const batchSize = DEFAULT_KEYS_BATCH_SIZE;\n const batchesCount = Math.ceil(ids.length / batchSize);\n const batchKeyPromises = [];\n for (let batchIndex = 0; batchIndex < batchesCount; ++batchIndex) {\n const batchStart = batchSize * batchIndex;\n const batchEnd = (batchStart + batchSize > ids.length) ? ids.length : (batchStart + batchSize);\n const batchIds = (0 === batchIndex && ids.length <= batchEnd) ? ids : ids.slice(batchStart, batchEnd);\n batchKeyPromises.push(this._rpcRequestsHandler.computeSelection({ imodel: imodel.getRpcProps(), elementIds: batchIds, scope: scopeProps }));\n }\n const batchKeys = (await Promise.all(batchKeyPromises)).map((json) => KeySet.fromJSON(json));\n batchKeys.forEach((bk) => keys.add(bk));\n return keys;\n }\n}\n\n/**\n * Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for\n * calculating selection with scope.\n *\n * @public\n */\nexport function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps {\n if (!scope)\n return { id: \"element\" };\n if (typeof scope === \"string\")\n return { id: scope };\n return scope;\n}\n\n/**\n * Determines the scope id\n * @param scope Selection scope\n * @public\n * @deprecated in 3.x. This is an internal utility that should've never become public.\n */\n// istanbul ignore next\nexport function getScopeId(scope: SelectionScope | string | undefined): string {\n return createSelectionScopeProps(scope).id;\n}\n"]}
1
+ {"version":3,"file":"SelectionScopesManager.js","sourceRoot":"","sources":["../../../../src/presentation-frontend/selection/SelectionScopesManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,EAA2D,MAAM,4BAA4B,CA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AE,EAAE,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC3B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,uBAAuB;AACvB,MAAM,UAAU,UAAU,CAAC,KAA0C;IACnE,OAAO,yBAAyB,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AAC7C,CAAC","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 UnifiedSelection\r\n */\r\n\r\nimport { Id64Arg } from \"@itwin/core-bentley\";\r\nimport { IModelConnection } from \"@itwin/core-frontend\";\r\nimport { DEFAULT_KEYS_BATCH_SIZE, KeySet, RpcRequestsHandler, SelectionScope, SelectionScopeProps } from \"@itwin/presentation-common\";\r\n\r\n/**\r\n * Properties for creating [[SelectionScopesManager]].\r\n * @public\r\n */\r\nexport interface SelectionScopesManagerProps {\r\n /** RPC handler to use for requesting selection scopes */\r\n rpcRequestsHandler: RpcRequestsHandler;\r\n\r\n /** Provider of active locale to use for localizing scopes */\r\n localeProvider?: () => string | undefined;\r\n}\r\n\r\n/**\r\n * A manager that knows available [selection scopes]($docs/presentation/unified-selection/index#selection-scopes)\r\n * and can compute logical selection based on element IDs and selection scope.\r\n *\r\n * @public\r\n */\r\nexport class SelectionScopesManager {\r\n\r\n private _rpcRequestsHandler: RpcRequestsHandler;\r\n private _getLocale: () => string | undefined;\r\n private _activeScope: SelectionScopeProps | SelectionScope | string | undefined;\r\n\r\n public constructor(props: SelectionScopesManagerProps) {\r\n this._rpcRequestsHandler = props.rpcRequestsHandler;\r\n this._getLocale = props.localeProvider ? props.localeProvider : (() => undefined);\r\n }\r\n\r\n /** Get active locale */\r\n public get activeLocale() { return this._getLocale(); }\r\n\r\n /** The active selection scope or its id */\r\n public get activeScope() { return this._activeScope; }\r\n public set activeScope(scope: SelectionScopeProps | SelectionScope | string | undefined) { this._activeScope = scope; }\r\n\r\n /**\r\n * Get available selection scopes.\r\n * @param imodel The iModel to get selection scopes for\r\n * @param locale Optional locale to use when localizing scopes' label and description\r\n */\r\n public async getSelectionScopes(imodel: IModelConnection, locale?: string): Promise<SelectionScope[]> {\r\n if (!locale)\r\n locale = this._getLocale();\r\n return this._rpcRequestsHandler.getSelectionScopes({ imodel: imodel.getRpcProps(), locale });\r\n }\r\n\r\n /**\r\n * Computes keys that need to be added to logical selection based on provided selection scope.\r\n * @param ids Element IDs to compute selection for\r\n * @param scope Selection scope to apply\r\n */\r\n public async computeSelection(imodel: IModelConnection, ids: Id64Arg, scope: SelectionScopeProps | SelectionScope | string): Promise<KeySet> {\r\n const scopeProps = createSelectionScopeProps(scope);\r\n\r\n // convert ids input to array\r\n if (typeof ids === \"string\")\r\n ids = [ids];\r\n else if (ids instanceof Set)\r\n ids = [...ids];\r\n\r\n // compute selection in batches to avoid HTTP 413\r\n const keys = new KeySet();\r\n const batchSize = DEFAULT_KEYS_BATCH_SIZE;\r\n const batchesCount = Math.ceil(ids.length / batchSize);\r\n const batchKeyPromises = [];\r\n for (let batchIndex = 0; batchIndex < batchesCount; ++batchIndex) {\r\n const batchStart = batchSize * batchIndex;\r\n const batchEnd = (batchStart + batchSize > ids.length) ? ids.length : (batchStart + batchSize);\r\n const batchIds = (0 === batchIndex && ids.length <= batchEnd) ? ids : ids.slice(batchStart, batchEnd);\r\n batchKeyPromises.push(this._rpcRequestsHandler.computeSelection({ imodel: imodel.getRpcProps(), elementIds: batchIds, scope: scopeProps }));\r\n }\r\n const batchKeys = (await Promise.all(batchKeyPromises)).map((json) => KeySet.fromJSON(json));\r\n batchKeys.forEach((bk) => keys.add(bk));\r\n return keys;\r\n }\r\n}\r\n\r\n/**\r\n * Normalizes given scope options and returns [[SelectionScopeProps]] that can be used for\r\n * calculating selection with scope.\r\n *\r\n * @public\r\n */\r\nexport function createSelectionScopeProps(scope: SelectionScopeProps | SelectionScope | string | undefined): SelectionScopeProps {\r\n if (!scope)\r\n return { id: \"element\" };\r\n if (typeof scope === \"string\")\r\n return { id: scope };\r\n return scope;\r\n}\r\n\r\n/**\r\n * Determines the scope id\r\n * @param scope Selection scope\r\n * @public\r\n * @deprecated in 3.x. This is an internal utility that should've never become public.\r\n */\r\n// istanbul ignore next\r\nexport function getScopeId(scope: SelectionScope | string | undefined): string {\r\n return createSelectionScopeProps(scope).id;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"presentation-frontend.js","sourceRoot":"","sources":["../../src/presentation-frontend.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,uEAAuE,CAAC;AACtF,cAAc,uEAAuE,CAAC;AACtF,cAAc,qCAAqC,CAAC;AAEpD;;;;;GAKG;AACH,cAAc,gDAAgD,CAAC;AAE/D;;;;;GAKG;AACH,cAAc,wDAAwD,CAAC;AACvE,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,0DAA0D,CAAC;AACzE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,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/**\n * @module Core\n *\n * @docs-group-description Core\n * Common types used for retrieving presentation data from iModels.\n */\nexport * from \"./presentation-frontend/Presentation\";\nexport * from \"./presentation-frontend/PresentationManager\";\nexport * from \"./presentation-frontend/RulesetManager\";\nexport * from \"./presentation-frontend/RulesetVariablesManager\";\nexport * from \"./presentation-frontend/favorite-properties/FavoritePropertiesManager\";\nexport * from \"./presentation-frontend/favorite-properties/FavoritePropertiesStorage\";\nexport * from \"./presentation-frontend/Diagnostics\";\n\n/**\n * @module Logging\n *\n * @docs-group-description Logging\n * Types related to logging in this package.\n */\nexport * from \"./presentation-frontend/FrontendLoggerCategory\";\n\n/**\n * @module UnifiedSelection\n *\n * @docs-group-description UnifiedSelection\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\n */\nexport * from \"./presentation-frontend/selection/SelectionChangeEvent\";\nexport * from \"./presentation-frontend/selection/ISelectionProvider\";\nexport * from \"./presentation-frontend/selection/SelectionManager\";\nexport * from \"./presentation-frontend/selection/SelectionScopesManager\";\nexport * from \"./presentation-frontend/selection/SelectionHandler\";\nexport * from \"./presentation-frontend/selection/HiliteSetProvider\";\nexport * from \"./presentation-frontend/selection/SelectionHelper\";\n"]}
1
+ {"version":3,"file":"presentation-frontend.js","sourceRoot":"","sources":["../../src/presentation-frontend.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,uEAAuE,CAAC;AACtF,cAAc,uEAAuE,CAAC;AACtF,cAAc,qCAAqC,CAAC;AAEpD;;;;;GAKG;AACH,cAAc,gDAAgD,CAAC;AAE/D;;;;;GAKG;AACH,cAAc,wDAAwD,CAAC;AACvE,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AACnE,cAAc,0DAA0D,CAAC;AACzE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,mDAAmD,CAAC","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/**\r\n * @module Core\r\n *\r\n * @docs-group-description Core\r\n * Common types used for retrieving presentation data from iModels.\r\n */\r\nexport * from \"./presentation-frontend/Presentation\";\r\nexport * from \"./presentation-frontend/PresentationManager\";\r\nexport * from \"./presentation-frontend/RulesetManager\";\r\nexport * from \"./presentation-frontend/RulesetVariablesManager\";\r\nexport * from \"./presentation-frontend/favorite-properties/FavoritePropertiesManager\";\r\nexport * from \"./presentation-frontend/favorite-properties/FavoritePropertiesStorage\";\r\nexport * from \"./presentation-frontend/Diagnostics\";\r\n\r\n/**\r\n * @module Logging\r\n *\r\n * @docs-group-description Logging\r\n * Types related to logging in this package.\r\n */\r\nexport * from \"./presentation-frontend/FrontendLoggerCategory\";\r\n\r\n/**\r\n * @module UnifiedSelection\r\n *\r\n * @docs-group-description UnifiedSelection\r\n * Types related to [unified selection]($docs/presentation/unified-selection/index.md).\r\n */\r\nexport * from \"./presentation-frontend/selection/SelectionChangeEvent\";\r\nexport * from \"./presentation-frontend/selection/ISelectionProvider\";\r\nexport * from \"./presentation-frontend/selection/SelectionManager\";\r\nexport * from \"./presentation-frontend/selection/SelectionScopesManager\";\r\nexport * from \"./presentation-frontend/selection/SelectionHandler\";\r\nexport * from \"./presentation-frontend/selection/HiliteSetProvider\";\r\nexport * from \"./presentation-frontend/selection/SelectionHelper\";\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/presentation-frontend",
3
- "version": "4.5.0-dev.8",
3
+ "version": "4.5.0-dev.9",
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",
@@ -27,12 +27,12 @@
27
27
  "rxjs-for-await": "^1.0.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "@itwin/core-bentley": "^4.5.0-dev.8",
31
- "@itwin/core-common": "^4.5.0-dev.8",
32
- "@itwin/core-frontend": "^4.5.0-dev.8",
33
- "@itwin/core-quantity": "^4.5.0-dev.8",
34
- "@itwin/ecschema-metadata": "^4.5.0-dev.8",
35
- "@itwin/presentation-common": "^4.5.0-dev.8"
30
+ "@itwin/core-bentley": "^4.5.0-dev.9",
31
+ "@itwin/core-common": "^4.5.0-dev.9",
32
+ "@itwin/core-frontend": "^4.5.0-dev.9",
33
+ "@itwin/core-quantity": "^4.5.0-dev.9",
34
+ "@itwin/ecschema-metadata": "^4.5.0-dev.9",
35
+ "@itwin/presentation-common": "^4.5.0-dev.9"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@itwin/eslint-plugin": "4.0.0-dev.44",
@@ -62,14 +62,14 @@
62
62
  "source-map-support": "^0.5.6",
63
63
  "typemoq": "^2.1.0",
64
64
  "typescript": "~5.0.2",
65
- "@itwin/core-i18n": "4.5.0-dev.8",
66
- "@itwin/core-bentley": "4.5.0-dev.8",
67
- "@itwin/build-tools": "4.5.0-dev.8",
68
- "@itwin/core-quantity": "4.5.0-dev.8",
69
- "@itwin/core-common": "4.5.0-dev.8",
70
- "@itwin/core-frontend": "4.5.0-dev.8",
71
- "@itwin/ecschema-metadata": "4.5.0-dev.8",
72
- "@itwin/presentation-common": "4.5.0-dev.8"
65
+ "@itwin/build-tools": "4.5.0-dev.9",
66
+ "@itwin/core-bentley": "4.5.0-dev.9",
67
+ "@itwin/core-frontend": "4.5.0-dev.9",
68
+ "@itwin/core-common": "4.5.0-dev.9",
69
+ "@itwin/core-i18n": "4.5.0-dev.9",
70
+ "@itwin/core-quantity": "4.5.0-dev.9",
71
+ "@itwin/ecschema-metadata": "4.5.0-dev.9",
72
+ "@itwin/presentation-common": "4.5.0-dev.9"
73
73
  },
74
74
  "nyc": {
75
75
  "extends": "./node_modules/@itwin/build-tools/.nycrc"