@itwin/ecschema-rpcinterface-tests 5.1.0-dev.5 → 5.1.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.
- package/lib/dist/bundled-tests.js +63 -38
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -72027,20 +72027,16 @@ class ECSchemaRpcLocater {
|
|
|
72027
72027
|
return undefined;
|
|
72028
72028
|
}
|
|
72029
72029
|
/**
|
|
72030
|
-
*
|
|
72031
|
-
*
|
|
72032
|
-
* @param
|
|
72033
|
-
* @param
|
|
72030
|
+
* This method is not supported for locating schemas over RPC/HTTP.
|
|
72031
|
+
* Use the asynchronous `getSchema` method instead.
|
|
72032
|
+
* @param _schemaKey Key to look up
|
|
72033
|
+
* @param _matchType How to match key against candidate schemas
|
|
72034
|
+
* @param _context The SchemaContext that will control the lifetime of the schema and holds the schema's references, if they exist.
|
|
72035
|
+
* @throws Error Always throws an error indicating this method is not supported.
|
|
72036
|
+
* @deprecated in 5.0 Use the asynchronous `getSchema` method for schema retrieval.
|
|
72034
72037
|
*/
|
|
72035
|
-
getSchemaSync(
|
|
72036
|
-
|
|
72037
|
-
return props;
|
|
72038
|
-
});
|
|
72039
|
-
const schema = _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__.Schema.fromJsonSync(schemaJson, context || new _itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_0__.SchemaContext());
|
|
72040
|
-
if (schema !== undefined && schema.schemaKey.matches(schemaKey, matchType)) {
|
|
72041
|
-
return schema;
|
|
72042
|
-
}
|
|
72043
|
-
return undefined;
|
|
72038
|
+
getSchemaSync(_schemaKey, _matchType, _context) {
|
|
72039
|
+
throw new Error("getSchemaSync is not supported. Use the asynchronous getSchema method instead.");
|
|
72044
72040
|
}
|
|
72045
72041
|
}
|
|
72046
72042
|
|
|
@@ -74255,6 +74251,8 @@ class AccuDraw {
|
|
|
74255
74251
|
onFieldKeyinStatusChange(_index) { }
|
|
74256
74252
|
/** Called to request focus change to the specified input field */
|
|
74257
74253
|
setFocusItem(_index) { }
|
|
74254
|
+
/** Called to get the item field that currently has input focus */
|
|
74255
|
+
getFocusItem() { return undefined; }
|
|
74258
74256
|
static getMinPolarMag(origin) {
|
|
74259
74257
|
return (1.0e-12 * (1.0 + origin.magnitude()));
|
|
74260
74258
|
}
|
|
@@ -91642,16 +91640,21 @@ class RenderContext {
|
|
|
91642
91640
|
* @public
|
|
91643
91641
|
*/
|
|
91644
91642
|
class DynamicsContext extends RenderContext {
|
|
91645
|
-
|
|
91643
|
+
_foreground;
|
|
91644
|
+
_overlay;
|
|
91646
91645
|
/** Add a graphic to the list of dynamic graphics to be drawn in this context's [[Viewport]]. */
|
|
91647
91646
|
addGraphic(graphic) {
|
|
91648
|
-
|
|
91649
|
-
|
|
91650
|
-
|
|
91647
|
+
this.add(graphic, false);
|
|
91648
|
+
}
|
|
91649
|
+
/** @internal */
|
|
91650
|
+
add(graphic, isOverlay) {
|
|
91651
|
+
const key = isOverlay ? "_overlay" : "_foreground";
|
|
91652
|
+
const list = this[key] ?? (this[key] = []);
|
|
91653
|
+
list.push(graphic);
|
|
91651
91654
|
}
|
|
91652
91655
|
/** @internal */
|
|
91653
91656
|
changeDynamics() {
|
|
91654
|
-
this.viewport.changeDynamics(this.
|
|
91657
|
+
this.viewport.changeDynamics(this._foreground, this._overlay);
|
|
91655
91658
|
}
|
|
91656
91659
|
/** Create a builder for producing a [[RenderGraphic]] appropriate for rendering within this context's [[Viewport]].
|
|
91657
91660
|
* @param options Options describing how to create the builder.
|
|
@@ -92755,10 +92758,10 @@ class ViewManager {
|
|
|
92755
92758
|
this.inDynamicsMode = false;
|
|
92756
92759
|
const cursorVp = _IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.toolAdmin.cursorView;
|
|
92757
92760
|
if (cursorVp)
|
|
92758
|
-
cursorVp.changeDynamics(undefined);
|
|
92761
|
+
cursorVp.changeDynamics(undefined, undefined);
|
|
92759
92762
|
for (const vp of this._viewports) {
|
|
92760
92763
|
if (vp !== cursorVp)
|
|
92761
|
-
vp.changeDynamics(undefined);
|
|
92764
|
+
vp.changeDynamics(undefined, undefined);
|
|
92762
92765
|
}
|
|
92763
92766
|
}
|
|
92764
92767
|
/** @internal */
|
|
@@ -97056,8 +97059,8 @@ class Viewport {
|
|
|
97056
97059
|
return this.view.is3d() && this.view.isCameraOn;
|
|
97057
97060
|
}
|
|
97058
97061
|
/** @internal */
|
|
97059
|
-
changeDynamics(dynamics) {
|
|
97060
|
-
this.target.changeDynamics(dynamics);
|
|
97062
|
+
changeDynamics(dynamics, overlay) {
|
|
97063
|
+
this.target.changeDynamics(dynamics, overlay);
|
|
97061
97064
|
this.invalidateDecorations();
|
|
97062
97065
|
}
|
|
97063
97066
|
_assigningFlashedId = false;
|
|
@@ -108647,7 +108650,7 @@ var MockRender;
|
|
|
108647
108650
|
get analysisFraction() { return 0; }
|
|
108648
108651
|
set analysisFraction(_fraction) { }
|
|
108649
108652
|
changeScene(_scene) { }
|
|
108650
|
-
changeDynamics(
|
|
108653
|
+
changeDynamics(_foreground, _overlay) { }
|
|
108651
108654
|
changeDecorations(_decs) { }
|
|
108652
108655
|
changeRenderPlan(_plan) { }
|
|
108653
108656
|
drawFrame(_sceneTime) { }
|
|
@@ -120737,9 +120740,8 @@ class RenderCommands {
|
|
|
120737
120740
|
this.addGraphics(gfx.foreground);
|
|
120738
120741
|
this.addBackgroundMapGraphics(gfx.background);
|
|
120739
120742
|
this.addOverlayGraphics(gfx.overlays);
|
|
120740
|
-
|
|
120741
|
-
|
|
120742
|
-
this.addDecorations(dynamics);
|
|
120743
|
+
this.addGraphics(gfx.foregroundDynamics);
|
|
120744
|
+
this.addOverlayGraphics(gfx.overlayDynamics);
|
|
120743
120745
|
const dec = gfx.decorations;
|
|
120744
120746
|
if (undefined !== dec) {
|
|
120745
120747
|
this.addBackground(dec.viewBackground);
|
|
@@ -127697,8 +127699,8 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
|
|
|
127697
127699
|
this.changeDrapesOrClassifiers(this._planarClassifiers, planarClassifiers);
|
|
127698
127700
|
this._planarClassifiers = planarClassifiers;
|
|
127699
127701
|
}
|
|
127700
|
-
changeDynamics(
|
|
127701
|
-
this.graphics.
|
|
127702
|
+
changeDynamics(foreground, overlay) {
|
|
127703
|
+
this.graphics.changeDynamics(foreground, overlay);
|
|
127702
127704
|
}
|
|
127703
127705
|
overrideFeatureSymbology(ovr) {
|
|
127704
127706
|
this.uniforms.branch.overrideFeatureSymbology(ovr);
|
|
@@ -128579,26 +128581,29 @@ class TargetGraphics {
|
|
|
128579
128581
|
foreground = [];
|
|
128580
128582
|
background = [];
|
|
128581
128583
|
overlays = [];
|
|
128582
|
-
|
|
128584
|
+
foregroundDynamics = [];
|
|
128585
|
+
overlayDynamics = [];
|
|
128583
128586
|
_decorations;
|
|
128584
128587
|
[Symbol.dispose]() {
|
|
128585
128588
|
this.foreground.length = this.background.length = this.overlays.length = 0;
|
|
128586
|
-
|
|
128589
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.foregroundDynamics);
|
|
128590
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.overlayDynamics);
|
|
128587
128591
|
this._decorations = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._decorations);
|
|
128588
128592
|
}
|
|
128589
128593
|
get isDisposed() {
|
|
128590
128594
|
return 0 === this.foreground.length && 0 === this.background.length && 0 === this.overlays.length
|
|
128591
|
-
&&
|
|
128595
|
+
&& 0 === this.foregroundDynamics.length && 0 === this.overlayDynamics.length && !this._decorations;
|
|
128592
128596
|
}
|
|
128593
128597
|
changeScene(scene) {
|
|
128594
128598
|
this.foreground = scene.foreground;
|
|
128595
128599
|
this.background = scene.background;
|
|
128596
128600
|
this.overlays = scene.overlay;
|
|
128597
128601
|
}
|
|
128598
|
-
|
|
128599
|
-
|
|
128600
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.
|
|
128601
|
-
this.
|
|
128602
|
+
changeDynamics(foreground, overlay) {
|
|
128603
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.foregroundDynamics);
|
|
128604
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.disposeArray)(this.overlayDynamics);
|
|
128605
|
+
this.foregroundDynamics = foreground ?? [];
|
|
128606
|
+
this.overlayDynamics = overlay ?? [];
|
|
128602
128607
|
}
|
|
128603
128608
|
get decorations() { return this._decorations; }
|
|
128604
128609
|
set decorations(decorations) {
|
|
@@ -168036,6 +168041,7 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
168036
168041
|
this._controls.overlay.remove();
|
|
168037
168042
|
this._controls = undefined;
|
|
168038
168043
|
this.unsuspendToolTips();
|
|
168044
|
+
this.removedControlRect();
|
|
168039
168045
|
}
|
|
168040
168046
|
createControlDiv() {
|
|
168041
168047
|
const div = document.createElement("div");
|
|
@@ -168123,6 +168129,10 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
168123
168129
|
style.outlineWidth = button.outlineWidth;
|
|
168124
168130
|
return itemLock;
|
|
168125
168131
|
}
|
|
168132
|
+
/** Called after the controls have been removed from the view. */
|
|
168133
|
+
removedControlRect() { }
|
|
168134
|
+
/** Called after the position of the controls in the supplied view is updated. */
|
|
168135
|
+
changedControlRect(_rect, _vp) { }
|
|
168126
168136
|
/** Use to override the position of the controls in the supplied view. */
|
|
168127
168137
|
modifyControlRect(_rect, _vp) { }
|
|
168128
168138
|
/** Return the ViewRect currently occupied by the controls in the supplied view. */
|
|
@@ -168219,6 +168229,8 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
168219
168229
|
return; // Keep showing at last valid location...
|
|
168220
168230
|
this._controls.div.style.left = `${controlRect.left}px`;
|
|
168221
168231
|
this._controls.div.style.top = `${controlRect.top}px`;
|
|
168232
|
+
this.changedControlRect(controlRect, vp);
|
|
168233
|
+
return;
|
|
168222
168234
|
}
|
|
168223
168235
|
get _isFocusHome() {
|
|
168224
168236
|
return (document.body === document.activeElement);
|
|
@@ -168241,6 +168253,13 @@ class AccuDrawViewportUI extends _AccuDraw__WEBPACK_IMPORTED_MODULE_1__.AccuDraw
|
|
|
168241
168253
|
// Indicate when keyboard shortcuts can't be used (i.e. focus not at AccuDraw or Home) by changing compass to monochrome...
|
|
168242
168254
|
return (this._isFocusHome || this._isFocusAccuDraw);
|
|
168243
168255
|
}
|
|
168256
|
+
/** Get the item field that currently has input focus.
|
|
168257
|
+
*/
|
|
168258
|
+
getFocusItem() {
|
|
168259
|
+
if (!this._isFocusAccuDraw)
|
|
168260
|
+
return undefined;
|
|
168261
|
+
return this._focusItem;
|
|
168262
|
+
}
|
|
168244
168263
|
/** Request to set focus to the specified AccuDraw input field to start entering values.
|
|
168245
168264
|
* The focused input field will be indicated by the background color.
|
|
168246
168265
|
*/
|
|
@@ -175073,6 +175092,7 @@ class CurrentInputState {
|
|
|
175073
175092
|
lastButton = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data;
|
|
175074
175093
|
inputSource = _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Unknown;
|
|
175075
175094
|
lastMotion = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d();
|
|
175095
|
+
lastMotionEvent;
|
|
175076
175096
|
lastWheelEvent;
|
|
175077
175097
|
lastTouchStart;
|
|
175078
175098
|
touchTapTimer;
|
|
@@ -175090,7 +175110,7 @@ class CurrentInputState {
|
|
|
175090
175110
|
onStartDrag(button) { this.button[button].isDragging = true; }
|
|
175091
175111
|
onInstallTool() {
|
|
175092
175112
|
this.clearKeyQualifiers();
|
|
175093
|
-
this.lastWheelEvent = undefined;
|
|
175113
|
+
this.lastWheelEvent = this.lastMotionEvent = undefined;
|
|
175094
175114
|
this.lastTouchStart = this.touchTapTimer = this.touchTapCount = undefined;
|
|
175095
175115
|
}
|
|
175096
175116
|
clearKeyQualifiers() { this.qualifiers = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeModifierKeys.None; }
|
|
@@ -175365,6 +175385,9 @@ class ToolAdmin {
|
|
|
175365
175385
|
this.clearMotionPromises();
|
|
175366
175386
|
// make sure tools don't think the cursor is still in this viewport.
|
|
175367
175387
|
this.onMouseLeave(vp);
|
|
175388
|
+
// Invalidate last motion if for this viewport...
|
|
175389
|
+
if (this.currentInputState.lastMotionEvent?.viewport === vp)
|
|
175390
|
+
this.currentInputState.lastMotionEvent = undefined;
|
|
175368
175391
|
// Remove any events associated with this viewport.
|
|
175369
175392
|
ToolAdmin._toolEvents = ToolAdmin._toolEvents.filter((ev) => ev.vp !== vp);
|
|
175370
175393
|
}
|
|
@@ -175728,6 +175751,7 @@ class ToolAdmin {
|
|
|
175728
175751
|
toolPromise.then(() => {
|
|
175729
175752
|
if (undefined === this._toolMotionPromise)
|
|
175730
175753
|
return; // Only early return if canceled, result from a previous motion is preferable to showing nothing...
|
|
175754
|
+
this.currentInputState.lastMotionEvent = motion; // Save to use for simulation motion...
|
|
175731
175755
|
// Update decorations when dynamics are inactive...
|
|
175732
175756
|
if (!_IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.inDynamicsMode) {
|
|
175733
175757
|
vp.invalidateDecorations();
|
|
@@ -176469,7 +176493,8 @@ class ToolAdmin {
|
|
|
176469
176493
|
}
|
|
176470
176494
|
/** Can be called by tools to invoke their [[InteractiveTool.onDynamicFrame]] method without requiring a motion event. */
|
|
176471
176495
|
simulateMotionEvent() {
|
|
176472
|
-
|
|
176496
|
+
// NOTE: Prefer last resolved motion over current cursor location which could be out of the view, or moved from last AccuSnap etc.
|
|
176497
|
+
this.updateDynamics(this.currentInputState.lastMotionEvent, undefined, true);
|
|
176473
176498
|
}
|
|
176474
176499
|
/** @internal */
|
|
176475
176500
|
setIncompatibleViewportCursor(restore) {
|
|
@@ -312415,7 +312440,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
312415
312440
|
/***/ ((module) => {
|
|
312416
312441
|
|
|
312417
312442
|
"use strict";
|
|
312418
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.
|
|
312443
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.9","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
312419
312444
|
|
|
312420
312445
|
/***/ })
|
|
312421
312446
|
|