@itwin/rpcinterface-full-stack-tests 5.0.0-dev.24 → 5.0.0-dev.25
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 +88 -8
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -85112,8 +85112,10 @@ class ThreeAxes {
|
|
|
85112
85112
|
class AccuDraw {
|
|
85113
85113
|
constructor() {
|
|
85114
85114
|
this._currentState = CurrentState.NotEnabled;
|
|
85115
|
-
|
|
85116
|
-
this.
|
|
85115
|
+
/** The current compass mode */
|
|
85116
|
+
this.compassMode = CompassMode.Rectangular;
|
|
85117
|
+
/** The current compass rotation */
|
|
85118
|
+
this.rotationMode = RotationMode.View;
|
|
85117
85119
|
/** @internal */
|
|
85118
85120
|
this.published = new AccudrawData(); // Staging area for hints
|
|
85119
85121
|
/** @internal */
|
|
@@ -85186,15 +85188,23 @@ class AccuDraw {
|
|
|
85186
85188
|
this._frameColorNoFocus = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.create(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorByName.darkGrey);
|
|
85187
85189
|
/** @internal */
|
|
85188
85190
|
this._fillColorNoFocus = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.create(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorByName.lightGrey);
|
|
85189
|
-
|
|
85191
|
+
/** When true improve behavior for +/- input when cursor switches side and try to automatically manage focus */
|
|
85190
85192
|
this.smartKeyin = true;
|
|
85193
|
+
/** When true the compass follows the origin hint as opposed to remaining at a fixed location */
|
|
85191
85194
|
this.floatingOrigin = true;
|
|
85195
|
+
/** When true the z input field will remain locked with it's current value after a data button */
|
|
85192
85196
|
this.stickyZLock = false;
|
|
85197
|
+
/** When true the compass is always active and on screen instead of following the current tools request to activate */
|
|
85193
85198
|
this.alwaysShowCompass = false;
|
|
85199
|
+
/** When true all tool hints are applied as opposed to only selected hints */
|
|
85194
85200
|
this.contextSensitive = true;
|
|
85201
|
+
/** When true the current point is adjusted to the x and y axes when within a close tolerance */
|
|
85195
85202
|
this.axisIndexing = true;
|
|
85203
|
+
/** When true the current point is adjusted to the last locked distance value when within a close tolerance */
|
|
85196
85204
|
this.distanceIndexing = true;
|
|
85205
|
+
/** When true locking the angle also moves focus to the angle input field */
|
|
85197
85206
|
this.autoFocusFields = true;
|
|
85207
|
+
/** When true fully specifying a point by entering both distance and angle in polar mode or XY[Z] in rectangular mode, the point is automatically accepted */
|
|
85198
85208
|
this.autoPointPlacement = false;
|
|
85199
85209
|
}
|
|
85200
85210
|
/** Current AccuDraw state */
|
|
@@ -85216,9 +85226,13 @@ class AccuDraw {
|
|
|
85216
85226
|
_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRows(this.axes.x, this.axes.y, this.axes.z, rMatrix);
|
|
85217
85227
|
return rMatrix;
|
|
85218
85228
|
}
|
|
85219
|
-
|
|
85229
|
+
/** When true AccuDraw is enabled by the application and can be used by interactive tools */
|
|
85220
85230
|
get isEnabled() { return (this.currentState > CurrentState.NotEnabled); }
|
|
85231
|
+
/** When true the compass is displayed and adjusting input points for the current interactive tool */
|
|
85232
|
+
get isActive() { return CurrentState.Active === this.currentState; }
|
|
85233
|
+
/** When true the compass is not displayed or adjusting points, but it can be automatically activated by the current interactive tool or via shortcuts */
|
|
85221
85234
|
get isInactive() { return (CurrentState.Inactive === this.currentState); }
|
|
85235
|
+
/** When true the compass is not displayed or adjusting points, the current interactive tool has disabled automatic activation, but can still be enabled via shortcuts */
|
|
85222
85236
|
get isDeactivated() { return (CurrentState.Deactivated === this.currentState); }
|
|
85223
85237
|
/** Get the current lock state for the supplied input field */
|
|
85224
85238
|
getFieldLock(index) { return this._fieldLocked[index]; }
|
|
@@ -85784,25 +85798,64 @@ class AccuDraw {
|
|
|
85784
85798
|
getLengthParser() {
|
|
85785
85799
|
return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.findParserSpecByQuantityType(_quantity_formatting_QuantityFormatter__WEBPACK_IMPORTED_MODULE_12__.QuantityType.Length);
|
|
85786
85800
|
}
|
|
85801
|
+
/** Allow the AccuDraw user interface to supply the distance parser */
|
|
85802
|
+
getLengthFormatter() {
|
|
85803
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.findFormatterSpecByQuantityType(_quantity_formatting_QuantityFormatter__WEBPACK_IMPORTED_MODULE_12__.QuantityType.Length);
|
|
85804
|
+
}
|
|
85787
85805
|
stringToDistance(str) {
|
|
85788
85806
|
const parserSpec = this.getLengthParser();
|
|
85789
85807
|
if (parserSpec)
|
|
85790
85808
|
return parserSpec.parseToQuantityValue(str);
|
|
85791
85809
|
return { ok: false, error: _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_13__.ParseError.InvalidParserSpec };
|
|
85792
85810
|
}
|
|
85811
|
+
stringFromDistance(distance) {
|
|
85812
|
+
const formatterSpec = this.getLengthFormatter();
|
|
85813
|
+
let formattedValue = distance.toString();
|
|
85814
|
+
if (formatterSpec)
|
|
85815
|
+
formattedValue = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(distance, formatterSpec);
|
|
85816
|
+
return formattedValue;
|
|
85817
|
+
}
|
|
85793
85818
|
/** Allow the AccuDraw user interface to specify bearing */
|
|
85794
|
-
get isBearingMode() { return
|
|
85819
|
+
get isBearingMode() { return this.getAngleParser()?.format.type === _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_13__.FormatType.Bearing; }
|
|
85820
|
+
/** Allow the AccuDraw user interface to specify bearing directions are always in xy plane */
|
|
85821
|
+
get bearingFixedToPlane2d() { return this.flags.bearingFixToPlane2D; }
|
|
85822
|
+
set bearingFixedToPlane2d(enable) { this.flags.bearingFixToPlane2D = enable; }
|
|
85795
85823
|
/** Allow the AccuDraw user interface to supply the angle/direction parser */
|
|
85796
85824
|
getAngleParser() {
|
|
85797
|
-
// TODO: Use QuantityType.Angle when isBearingMode=false and "Bearing" for isBearingMode=true.
|
|
85798
85825
|
return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.findParserSpecByQuantityType(_quantity_formatting_QuantityFormatter__WEBPACK_IMPORTED_MODULE_12__.QuantityType.Angle);
|
|
85799
85826
|
}
|
|
85827
|
+
/** Allow the AccuDraw user interface to supply the angle/direction formatter */
|
|
85828
|
+
getAngleFormatter() {
|
|
85829
|
+
return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.findFormatterSpecByQuantityType(_quantity_formatting_QuantityFormatter__WEBPACK_IMPORTED_MODULE_12__.QuantityType.Angle);
|
|
85830
|
+
}
|
|
85800
85831
|
stringToAngle(inString) {
|
|
85801
85832
|
const parserSpec = this.getAngleParser();
|
|
85802
85833
|
if (parserSpec)
|
|
85803
85834
|
return parserSpec.parseToQuantityValue(inString);
|
|
85804
85835
|
return { ok: false, error: _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_13__.ParseError.InvalidParserSpec };
|
|
85805
85836
|
}
|
|
85837
|
+
stringFromAngle(angle) {
|
|
85838
|
+
if (this.isBearingMode && this.flags.bearingFixToPlane2D) {
|
|
85839
|
+
const point = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create(this.axes.x.x, this.axes.x.y, 0.0);
|
|
85840
|
+
point.normalizeInPlace();
|
|
85841
|
+
let adjustment = Math.acos(point.x);
|
|
85842
|
+
if (point.y < 0.0)
|
|
85843
|
+
adjustment = -adjustment;
|
|
85844
|
+
angle += adjustment;
|
|
85845
|
+
}
|
|
85846
|
+
const formatterSpec = this.getAngleFormatter();
|
|
85847
|
+
let formattedValue = angle.toString();
|
|
85848
|
+
if (formatterSpec)
|
|
85849
|
+
formattedValue = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.quantityFormatter.formatQuantity(angle, formatterSpec);
|
|
85850
|
+
return formattedValue;
|
|
85851
|
+
}
|
|
85852
|
+
/** Can be called by sub-classes to get a formatted value to display for an AccuDraw input field */
|
|
85853
|
+
getFormattedValueByIndex(index) {
|
|
85854
|
+
const value = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.getValueByIndex(index);
|
|
85855
|
+
if (ItemField.ANGLE_Item === index)
|
|
85856
|
+
return this.stringFromAngle(value);
|
|
85857
|
+
return this.stringFromDistance(value);
|
|
85858
|
+
}
|
|
85806
85859
|
updateFieldValue(index, input) {
|
|
85807
85860
|
if (input.length === 0)
|
|
85808
85861
|
return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR;
|
|
@@ -87311,9 +87364,35 @@ class AccuDraw {
|
|
|
87311
87364
|
onBeginDynamics() { return this.upgradeToActiveState(); }
|
|
87312
87365
|
/** @internal */
|
|
87313
87366
|
onEndDynamics() { return this.downgradeInactiveState(); }
|
|
87367
|
+
/** Can be called by sub-classes as the default implementation of onMotion.
|
|
87368
|
+
* @see [[onMotion]]
|
|
87369
|
+
* @note Input fields are expected to call [[AccuDrawShortcuts.itemFieldNewInput]] when the user enters a value that is not a shortcut
|
|
87370
|
+
* and call [[AccuDrawShortcuts.itemFieldCompletedInput]] when a value is accepted, such as when focusing out of the field. This is
|
|
87371
|
+
* required for processMotion to correctly handle updating dynamic field values to reflect the current cursor location.
|
|
87372
|
+
*/
|
|
87373
|
+
processMotion() {
|
|
87374
|
+
if (this.flags.dialogNeedsUpdate || !this.isActive) {
|
|
87375
|
+
if (this.isActive && this.smartKeyin) {
|
|
87376
|
+
// NOTE: fixPointRectangular sets newFocus to either x or y based on which axis is closer to the input point...
|
|
87377
|
+
if (CompassMode.Rectangular === this.compassMode && !this.dontMoveFocus && !this.getFieldLock(this.newFocus))
|
|
87378
|
+
this.setFocusItem(this.newFocus);
|
|
87379
|
+
}
|
|
87380
|
+
const sendDynamicFieldValueChange = (item) => {
|
|
87381
|
+
if (KeyinStatus.Dynamic === this.getKeyinStatus(item))
|
|
87382
|
+
this.onFieldValueChange(item);
|
|
87383
|
+
};
|
|
87384
|
+
// NOTE: Shows the current deltas for rectangular mode when active and current coordinate when not active...
|
|
87385
|
+
sendDynamicFieldValueChange(ItemField.X_Item);
|
|
87386
|
+
sendDynamicFieldValueChange(ItemField.Y_Item);
|
|
87387
|
+
sendDynamicFieldValueChange(ItemField.Z_Item);
|
|
87388
|
+
sendDynamicFieldValueChange(ItemField.ANGLE_Item);
|
|
87389
|
+
sendDynamicFieldValueChange(ItemField.DIST_Item);
|
|
87390
|
+
}
|
|
87391
|
+
}
|
|
87314
87392
|
/** Implemented by sub-classes to update ui fields to show current deltas or coordinates when inactive.
|
|
87315
87393
|
* Should also choose active x or y input field in rectangular mode based on cursor position when
|
|
87316
87394
|
* axis isn't locked to support "smart lock".
|
|
87395
|
+
* @see [[processMotion]]
|
|
87317
87396
|
*/
|
|
87318
87397
|
onMotion(_ev) { }
|
|
87319
87398
|
/** @internal */
|
|
@@ -175880,6 +175959,7 @@ class AccuDrawShortcuts {
|
|
|
175880
175959
|
accudraw.dontMoveFocus = true;
|
|
175881
175960
|
}
|
|
175882
175961
|
static itemFieldNewInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Partial); }
|
|
175962
|
+
static itemFieldCompletedInput(index) { _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.setKeyinStatus(index, _AccuDraw__WEBPACK_IMPORTED_MODULE_2__.KeyinStatus.Dynamic); }
|
|
175883
175963
|
static async itemFieldAcceptInput(index, str) {
|
|
175884
175964
|
const accudraw = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw;
|
|
175885
175965
|
await accudraw.processFieldInput(index, str, true);
|
|
@@ -304919,7 +304999,7 @@ class TestContext {
|
|
|
304919
304999
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
304920
305000
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
304921
305001
|
await core_frontend_1.NoRenderApp.startup({
|
|
304922
|
-
applicationVersion: "5.0.0-dev.
|
|
305002
|
+
applicationVersion: "5.0.0-dev.25",
|
|
304923
305003
|
applicationId: this.settings.gprid,
|
|
304924
305004
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
304925
305005
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -332509,7 +332589,7 @@ function __disposeResources(env) {
|
|
|
332509
332589
|
/***/ ((module) => {
|
|
332510
332590
|
|
|
332511
332591
|
"use strict";
|
|
332512
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
332592
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.25","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 ES2020 --outDir lib/esm","clean":"rimraf 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 --coverage","test:debug":"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:*"},"//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/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","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.2.5","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"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"}}');
|
|
332513
332593
|
|
|
332514
332594
|
/***/ }),
|
|
332515
332595
|
|