@itwin/unified-selection
Advanced tools
Comparing version 1.1.0 to 1.1.1
# @itwin/unified-selection | ||
## 1.1.1 | ||
### Patch Changes | ||
- [#765](https://github.com/iTwin/presentation/pull/765): Fixed transient element keys handling in unified selection storage. | ||
## 1.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
export * from "./unified-selection/Selectable.js"; | ||
export { TRANSIENT_ELEMENT_CLASSNAME, CustomSelectable, Selectable, SelectableIdentifier, SelectableInstanceKey, Selectables, } from "./unified-selection/Selectable.js"; | ||
export { SelectionStorage, createStorage } from "./unified-selection/SelectionStorage.js"; | ||
@@ -3,0 +3,0 @@ export { createHiliteSetProvider, HiliteSet, HiliteSetProvider } from "./unified-selection/HiliteSetProvider.js"; |
@@ -6,19 +6,8 @@ "use strict"; | ||
*--------------------------------------------------------------------------------------------*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.enableUnifiedSelectionSyncWithIModel = exports.computeSelection = exports.createCachingHiliteSetProvider = exports.createHiliteSetProvider = exports.createStorage = void 0; | ||
__exportStar(require("./unified-selection/Selectable.js"), exports); | ||
exports.enableUnifiedSelectionSyncWithIModel = exports.computeSelection = exports.createCachingHiliteSetProvider = exports.createHiliteSetProvider = exports.createStorage = exports.Selectables = exports.Selectable = exports.TRANSIENT_ELEMENT_CLASSNAME = void 0; | ||
var Selectable_js_1 = require("./unified-selection/Selectable.js"); | ||
Object.defineProperty(exports, "TRANSIENT_ELEMENT_CLASSNAME", { enumerable: true, get: function () { return Selectable_js_1.TRANSIENT_ELEMENT_CLASSNAME; } }); | ||
Object.defineProperty(exports, "Selectable", { enumerable: true, get: function () { return Selectable_js_1.Selectable; } }); | ||
Object.defineProperty(exports, "Selectables", { enumerable: true, get: function () { return Selectable_js_1.Selectables; } }); | ||
var SelectionStorage_js_1 = require("./unified-selection/SelectionStorage.js"); | ||
@@ -25,0 +14,0 @@ Object.defineProperty(exports, "createStorage", { enumerable: true, get: function () { return SelectionStorage_js_1.createStorage; } }); |
@@ -62,2 +62,7 @@ import { Id64String } from "@itwin/core-bentley"; | ||
} | ||
/** | ||
* Class name used to create `SelectableInstanceKey` for transient elements. | ||
* @public | ||
*/ | ||
export declare const TRANSIENT_ELEMENT_CLASSNAME = "/TRANSIENT"; | ||
/** @public */ | ||
@@ -64,0 +69,0 @@ export declare namespace Selectables { |
@@ -7,3 +7,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Selectables = exports.Selectable = void 0; | ||
exports.Selectables = exports.TRANSIENT_ELEMENT_CLASSNAME = exports.Selectable = void 0; | ||
const presentation_shared_1 = require("@itwin/presentation-shared"); | ||
@@ -26,2 +26,7 @@ /** @public */ | ||
})(Selectable || (exports.Selectable = Selectable = {})); | ||
/** | ||
* Class name used to create `SelectableInstanceKey` for transient elements. | ||
* @public | ||
*/ | ||
exports.TRANSIENT_ELEMENT_CLASSNAME = "/TRANSIENT"; | ||
/** @public */ | ||
@@ -72,3 +77,3 @@ var Selectables; | ||
if (Selectable.isInstanceKey(value)) { | ||
const normalizedClassName = (0, presentation_shared_1.normalizeFullClassName)(value.className); | ||
const normalizedClassName = normalizeClassName(value.className); | ||
const set = selectables.instanceKeys.get(normalizedClassName); | ||
@@ -123,3 +128,3 @@ return !!(set && set.has(value.id)); | ||
if (Selectable.isInstanceKey(selectable)) { | ||
const normalizedClassName = (0, presentation_shared_1.normalizeFullClassName)(selectable.className); | ||
const normalizedClassName = normalizeClassName(selectable.className); | ||
let set = selectables.instanceKeys.get(normalizedClassName); | ||
@@ -153,3 +158,3 @@ if (!set) { | ||
if (Selectable.isInstanceKey(selectable)) { | ||
const normalizedClassName = (0, presentation_shared_1.normalizeFullClassName)(selectable.className); | ||
const normalizedClassName = normalizeClassName(selectable.className); | ||
const set = selectables.instanceKeys.get(normalizedClassName); | ||
@@ -223,2 +228,5 @@ if (set && set.has(selectable.id)) { | ||
})(Selectables || (exports.Selectables = Selectables = {})); | ||
function normalizeClassName(fullClassName) { | ||
return fullClassName === exports.TRANSIENT_ELEMENT_CLASSNAME ? fullClassName : (0, presentation_shared_1.normalizeFullClassName)(fullClassName); | ||
} | ||
//# sourceMappingURL=Selectable.js.map |
@@ -1,2 +0,2 @@ | ||
export * from "./unified-selection/Selectable.js"; | ||
export { TRANSIENT_ELEMENT_CLASSNAME, CustomSelectable, Selectable, SelectableIdentifier, SelectableInstanceKey, Selectables, } from "./unified-selection/Selectable.js"; | ||
export { SelectionStorage, createStorage } from "./unified-selection/SelectionStorage.js"; | ||
@@ -3,0 +3,0 @@ export { createHiliteSetProvider, HiliteSet, HiliteSetProvider } from "./unified-selection/HiliteSetProvider.js"; |
@@ -5,3 +5,3 @@ /*--------------------------------------------------------------------------------------------- | ||
*--------------------------------------------------------------------------------------------*/ | ||
export * from "./unified-selection/Selectable.js"; | ||
export { TRANSIENT_ELEMENT_CLASSNAME, Selectable, Selectables, } from "./unified-selection/Selectable.js"; | ||
export { createStorage } from "./unified-selection/SelectionStorage.js"; | ||
@@ -8,0 +8,0 @@ export { createHiliteSetProvider } from "./unified-selection/HiliteSetProvider.js"; |
@@ -62,2 +62,7 @@ import { Id64String } from "@itwin/core-bentley"; | ||
} | ||
/** | ||
* Class name used to create `SelectableInstanceKey` for transient elements. | ||
* @public | ||
*/ | ||
export declare const TRANSIENT_ELEMENT_CLASSNAME = "/TRANSIENT"; | ||
/** @public */ | ||
@@ -64,0 +69,0 @@ export declare namespace Selectables { |
@@ -22,2 +22,7 @@ /*--------------------------------------------------------------------------------------------- | ||
})(Selectable || (Selectable = {})); | ||
/** | ||
* Class name used to create `SelectableInstanceKey` for transient elements. | ||
* @public | ||
*/ | ||
export const TRANSIENT_ELEMENT_CLASSNAME = "/TRANSIENT"; | ||
/** @public */ | ||
@@ -68,3 +73,3 @@ export var Selectables; | ||
if (Selectable.isInstanceKey(value)) { | ||
const normalizedClassName = normalizeFullClassName(value.className); | ||
const normalizedClassName = normalizeClassName(value.className); | ||
const set = selectables.instanceKeys.get(normalizedClassName); | ||
@@ -119,3 +124,3 @@ return !!(set && set.has(value.id)); | ||
if (Selectable.isInstanceKey(selectable)) { | ||
const normalizedClassName = normalizeFullClassName(selectable.className); | ||
const normalizedClassName = normalizeClassName(selectable.className); | ||
let set = selectables.instanceKeys.get(normalizedClassName); | ||
@@ -149,3 +154,3 @@ if (!set) { | ||
if (Selectable.isInstanceKey(selectable)) { | ||
const normalizedClassName = normalizeFullClassName(selectable.className); | ||
const normalizedClassName = normalizeClassName(selectable.className); | ||
const set = selectables.instanceKeys.get(normalizedClassName); | ||
@@ -219,2 +224,5 @@ if (set && set.has(selectable.id)) { | ||
})(Selectables || (Selectables = {})); | ||
function normalizeClassName(fullClassName) { | ||
return fullClassName === TRANSIENT_ELEMENT_CLASSNAME ? fullClassName : normalizeFullClassName(fullClassName); | ||
} | ||
//# sourceMappingURL=Selectable.js.map |
{ | ||
"name": "@itwin/unified-selection", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Package for managing unified selection in iTwin.js applications.", | ||
@@ -64,4 +64,4 @@ "license": "MIT", | ||
"typescript": "~5.6.3", | ||
"presentation-build-tools": "^0.0.0", | ||
"presentation-test-utilities": "^0.0.0" | ||
"presentation-test-utilities": "^0.0.0", | ||
"presentation-build-tools": "^0.0.0" | ||
}, | ||
@@ -68,0 +68,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
421773
3727