@itwin/rpcinterface-full-stack-tests 5.0.0-dev.83 → 5.0.0-dev.85
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 +122 -5
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -60092,9 +60092,10 @@ class TextAnnotation {
|
|
|
60092
60092
|
* The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored
|
|
60093
60093
|
* at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.
|
|
60094
60094
|
* The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].
|
|
60095
|
-
* The anchor point will coincide with (0, 0, 0).
|
|
60096
|
-
* @param boundingBox A box fully containing the [[textBlock]].
|
|
60095
|
+
* The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.
|
|
60096
|
+
* @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.
|
|
60097
60097
|
* @see [[computeAnchorPoint]] to compute the transform's anchor point.
|
|
60098
|
+
* @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.
|
|
60098
60099
|
*/
|
|
60099
60100
|
computeTransform(boundingBox) {
|
|
60100
60101
|
const anchorPt = this.computeAnchorPoint(boundingBox);
|
|
@@ -60403,6 +60404,7 @@ class Paragraph extends TextBlockComponent {
|
|
|
60403
60404
|
return this.runs.every((run, index) => run.equals(other.runs[index]));
|
|
60404
60405
|
}
|
|
60405
60406
|
}
|
|
60407
|
+
;
|
|
60406
60408
|
/** Represents a formatted text document consisting of a series of [[Paragraph]]s, each laid out on a separate line and containing their own content in the form of [[Run]]s.
|
|
60407
60409
|
* You can change the content of the document by directly modifying the contents of its [[paragraphs]], or via [[appendParagraph]] and [[appendRun]].
|
|
60408
60410
|
* No word-wrapping is applied to the document unless a [[width]] greater than zero is specified.
|
|
@@ -60417,12 +60419,21 @@ class TextBlock extends TextBlockComponent {
|
|
|
60417
60419
|
width;
|
|
60418
60420
|
/** The alignment of the document's content. */
|
|
60419
60421
|
justification;
|
|
60422
|
+
/** The margins of the document. */
|
|
60423
|
+
margins;
|
|
60420
60424
|
/** The ordered list of paragraphs within the document. */
|
|
60421
60425
|
paragraphs;
|
|
60422
60426
|
constructor(props) {
|
|
60423
60427
|
super(props);
|
|
60424
60428
|
this.width = props.width ?? 0;
|
|
60425
60429
|
this.justification = props.justification ?? "left";
|
|
60430
|
+
// Assign default margins if not provided
|
|
60431
|
+
this.margins = {
|
|
60432
|
+
left: props.margins?.left ?? 0,
|
|
60433
|
+
right: props.margins?.right ?? 0,
|
|
60434
|
+
top: props.margins?.top ?? 0,
|
|
60435
|
+
bottom: props.margins?.bottom ?? 0,
|
|
60436
|
+
};
|
|
60426
60437
|
this.paragraphs = props.paragraphs?.map((x) => Paragraph.create(x)) ?? [];
|
|
60427
60438
|
}
|
|
60428
60439
|
toJSON() {
|
|
@@ -60430,6 +60441,7 @@ class TextBlock extends TextBlockComponent {
|
|
|
60430
60441
|
...super.toJSON(),
|
|
60431
60442
|
width: this.width,
|
|
60432
60443
|
justification: this.justification,
|
|
60444
|
+
margins: this.margins,
|
|
60433
60445
|
paragraphs: this.paragraphs.map((x) => x.toJSON()),
|
|
60434
60446
|
};
|
|
60435
60447
|
}
|
|
@@ -60488,6 +60500,9 @@ class TextBlock extends TextBlockComponent {
|
|
|
60488
60500
|
if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {
|
|
60489
60501
|
return false;
|
|
60490
60502
|
}
|
|
60503
|
+
const marginsAreEqual = Object.entries(this.margins).every(([key, value]) => value === other.margins[key]);
|
|
60504
|
+
if (!marginsAreEqual)
|
|
60505
|
+
return false;
|
|
60491
60506
|
return this.paragraphs.every((paragraph, index) => paragraph.equals(other.paragraphs[index]));
|
|
60492
60507
|
}
|
|
60493
60508
|
}
|
|
@@ -88554,6 +88569,7 @@ class AccuDraw {
|
|
|
88554
88569
|
_tolerance = 0; // computed view based indexing tolerance
|
|
88555
88570
|
_percentChanged = 0; // Compass animation state
|
|
88556
88571
|
_threshold = 0; // Threshold for automatic x/y field focus change.
|
|
88572
|
+
_lastSnapDetail;
|
|
88557
88573
|
/** @internal */
|
|
88558
88574
|
planePt = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(); // same as origin unless non-zero locked z value
|
|
88559
88575
|
_rawDelta = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d(); // used by rect fix point
|
|
@@ -88613,6 +88629,10 @@ class AccuDraw {
|
|
|
88613
88629
|
autoFocusFields = true;
|
|
88614
88630
|
/** 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 */
|
|
88615
88631
|
autoPointPlacement = false;
|
|
88632
|
+
/** When true and axisIndexing is allowed the current point is adjusted to the tangent or binormal vector from the last snap when within a close tolerance
|
|
88633
|
+
* @beta
|
|
88634
|
+
*/
|
|
88635
|
+
snapIndexing = true;
|
|
88616
88636
|
/** Get distance round off settings */
|
|
88617
88637
|
get distanceRoundOff() { return this._distanceRoundOff; }
|
|
88618
88638
|
/** Get angle round off settings */
|
|
@@ -88770,6 +88790,34 @@ class AccuDraw {
|
|
|
88770
88790
|
}
|
|
88771
88791
|
return false;
|
|
88772
88792
|
}
|
|
88793
|
+
updateLastSnapDetail(vp, fromSnap) {
|
|
88794
|
+
if (!this.snapIndexing || !this.axisIndexing || this.flags.indexLocked || LockedStates.NONE_LOCKED !== this.locked) {
|
|
88795
|
+
this._lastSnapDetail = undefined;
|
|
88796
|
+
return;
|
|
88797
|
+
}
|
|
88798
|
+
if (!fromSnap) {
|
|
88799
|
+
if (this._lastSnapDetail?.deselect)
|
|
88800
|
+
this._lastSnapDetail = undefined;
|
|
88801
|
+
else if (this._lastSnapDetail)
|
|
88802
|
+
this._lastSnapDetail.deselect = false; // Allow moving cursor back to previous snap to clear it...
|
|
88803
|
+
return;
|
|
88804
|
+
}
|
|
88805
|
+
const snap = _AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.getCurrentSnap();
|
|
88806
|
+
if (undefined === snap || this.origin.isAlmostEqual(snap.getPoint()))
|
|
88807
|
+
return;
|
|
88808
|
+
if (this._lastSnapDetail && this._lastSnapDetail.sourceId === snap.sourceId && this._lastSnapDetail.point.isAlmostEqual(snap.getPoint())) {
|
|
88809
|
+
if (false === this._lastSnapDetail.deselect)
|
|
88810
|
+
this._lastSnapDetail.deselect = true; // Stop indexing to previous snap...
|
|
88811
|
+
return; // Don't compute rotation if location hasn't changed...
|
|
88812
|
+
}
|
|
88813
|
+
const isTentative = _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.tentativePoint.isSnapped;
|
|
88814
|
+
if (this._lastSnapDetail?.isTentative && !isTentative)
|
|
88815
|
+
return; // Don't update snap from tentative unless it's another tentative to support holding a snap location in a dense drawing...
|
|
88816
|
+
const rotation = AccuDraw.getSnapRotation(snap, vp);
|
|
88817
|
+
if (undefined === rotation)
|
|
88818
|
+
return;
|
|
88819
|
+
this._lastSnapDetail = { point: snap.getPoint().clone(), matrix: rotation, sourceId: snap.sourceId, isTentative };
|
|
88820
|
+
}
|
|
88773
88821
|
/** @internal */
|
|
88774
88822
|
adjustPoint(pointActive, vp, fromSnap) {
|
|
88775
88823
|
if (!this.isEnabled)
|
|
@@ -88788,6 +88836,7 @@ class AccuDraw {
|
|
|
88788
88836
|
this.flags.redrawCompass = true;
|
|
88789
88837
|
}
|
|
88790
88838
|
else if (this.isActive) {
|
|
88839
|
+
this.updateLastSnapDetail(vp, fromSnap);
|
|
88791
88840
|
const lastPt = this.point.clone();
|
|
88792
88841
|
this.fixPoint(pointActive, vp);
|
|
88793
88842
|
pointChanged = !lastPt.isExactEqual(this.point);
|
|
@@ -89947,6 +89996,7 @@ class AccuDraw {
|
|
|
89947
89996
|
}
|
|
89948
89997
|
/** @internal */
|
|
89949
89998
|
onPrimitiveToolInstall() {
|
|
89999
|
+
this._lastSnapDetail = undefined;
|
|
89950
90000
|
if (!this.isEnabled)
|
|
89951
90001
|
return false;
|
|
89952
90002
|
this.onEventCommon();
|
|
@@ -90188,6 +90238,14 @@ class AccuDraw {
|
|
|
90188
90238
|
}
|
|
90189
90239
|
}
|
|
90190
90240
|
}
|
|
90241
|
+
if (undefined !== this._lastSnapDetail && undefined === snap) {
|
|
90242
|
+
if (this._lastSnapDetail.indexed) {
|
|
90243
|
+
graphic.setSymbology(colorIndex, colorIndex, 2, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Code5);
|
|
90244
|
+
graphic.addLineString([this.point, this._lastSnapDetail.point]);
|
|
90245
|
+
}
|
|
90246
|
+
graphic.setSymbology(colorIndex, colorIndex, 8, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid);
|
|
90247
|
+
graphic.addPointString([this._lastSnapDetail.point]);
|
|
90248
|
+
}
|
|
90191
90249
|
}
|
|
90192
90250
|
/** @internal */
|
|
90193
90251
|
testDecorationHit(id) { return id === this._acsPickId; }
|
|
@@ -90814,6 +90872,62 @@ class AccuDraw {
|
|
|
90814
90872
|
this.newFocus = ((Math.abs(this._rawDelta.x) > Math.abs(this._rawDelta.y)) ? ItemField.X_Item : ItemField.Y_Item);
|
|
90815
90873
|
}
|
|
90816
90874
|
}
|
|
90875
|
+
fixPointLastSnapDetail(vp) {
|
|
90876
|
+
if (undefined === this._lastSnapDetail)
|
|
90877
|
+
return;
|
|
90878
|
+
this._lastSnapDetail.indexed = undefined;
|
|
90879
|
+
if (!this.axisIndexing || this.flags.indexLocked || LockedStates.NONE_LOCKED !== this.locked || this.indexed & LockedStates.DIST_BM || _AccuSnap__WEBPACK_IMPORTED_MODULE_3__.TentativeOrAccuSnap.isHot)
|
|
90880
|
+
return; // Don't adjust point if already adjusted or indexing is disabled...
|
|
90881
|
+
const minMag = AccuDraw.getMinPolarMag(this.point);
|
|
90882
|
+
const tmpVec = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.createStartEnd(this.planePt, this.point);
|
|
90883
|
+
if (tmpVec.magnitude() < minMag)
|
|
90884
|
+
return; // Current point is at compass origin...
|
|
90885
|
+
if (!this.hardConstructionPlane(this._rawPointOnPlane, this._lastSnapDetail.point, this.point, this.axes.z, vp, true))
|
|
90886
|
+
return;
|
|
90887
|
+
const snapDelta = this._rawPointOnPlane.vectorTo(this.point);
|
|
90888
|
+
if (snapDelta.magnitude() < minMag)
|
|
90889
|
+
return; // Haven't moved far enough away from snap point...
|
|
90890
|
+
const snapRayX = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Ray3d.createCapture(this._rawPointOnPlane, this._lastSnapDetail.matrix.rowX());
|
|
90891
|
+
const snapRayY = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Ray3d.createCapture(this._rawPointOnPlane, this._lastSnapDetail.matrix.rowY());
|
|
90892
|
+
const snapDeltaX = snapDelta.dotProduct(snapRayX.direction);
|
|
90893
|
+
const snapDeltaY = snapDelta.dotProduct(snapRayY.direction);
|
|
90894
|
+
let rayS;
|
|
90895
|
+
if (snapDeltaX < this._tolerance && snapDeltaX > -this._tolerance)
|
|
90896
|
+
rayS = snapRayY;
|
|
90897
|
+
else if (snapDeltaY < this._tolerance && snapDeltaY > -this._tolerance)
|
|
90898
|
+
rayS = snapRayX;
|
|
90899
|
+
else
|
|
90900
|
+
return;
|
|
90901
|
+
const rayA = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Ray3d.createCapture(this.planePt, tmpVec);
|
|
90902
|
+
const detail = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Ray3d.closestApproachRay3dRay3d(rayA, rayS);
|
|
90903
|
+
if (_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.CurveCurveApproachType.Intersection !== detail.approachType)
|
|
90904
|
+
return;
|
|
90905
|
+
this.planePt.vectorTo(detail.detailA.point, tmpVec);
|
|
90906
|
+
_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(tmpVec.dotProduct(this.axes.x), tmpVec.dotProduct(this.axes.y), this._rawDelta);
|
|
90907
|
+
const xyCorrection = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector2d();
|
|
90908
|
+
if (this.indexed & LockedStates.X_BM) {
|
|
90909
|
+
xyCorrection.x -= this._rawDelta.x;
|
|
90910
|
+
this._rawDelta.x = 0.0;
|
|
90911
|
+
}
|
|
90912
|
+
else if (this.indexed & LockedStates.Y_BM) {
|
|
90913
|
+
xyCorrection.y -= this._rawDelta.y;
|
|
90914
|
+
this._rawDelta.y = 0.0;
|
|
90915
|
+
}
|
|
90916
|
+
if (this._rawDelta.magnitude() < minMag)
|
|
90917
|
+
return; // Don't accept adjustment back to compass origin...
|
|
90918
|
+
detail.detailA.point.plus2Scaled(this.axes.x, xyCorrection.x, this.axes.y, xyCorrection.y, this._rawPointOnPlane);
|
|
90919
|
+
if (this.point.distance(this._rawPointOnPlane) > (1.5 * this._tolerance))
|
|
90920
|
+
return; // Don't accept adjustment if distance is too great such as from nearly parallel vectors...
|
|
90921
|
+
if (CompassMode.Polar === this.compassMode) {
|
|
90922
|
+
this._distance = this.origin.distance(this._rawPointOnPlane);
|
|
90923
|
+
}
|
|
90924
|
+
else {
|
|
90925
|
+
this.delta.x = this._rawDelta.x;
|
|
90926
|
+
this.delta.y = this._rawDelta.y;
|
|
90927
|
+
}
|
|
90928
|
+
this.point.setFrom(this._rawPointOnPlane);
|
|
90929
|
+
this._lastSnapDetail.indexed = true;
|
|
90930
|
+
}
|
|
90817
90931
|
fixPoint(pointActive, vp) {
|
|
90818
90932
|
if (this.isActive && ((vp !== this.currentView) || this.flags.rotationNeedsUpdate)) {
|
|
90819
90933
|
this.currentView = vp;
|
|
@@ -90846,6 +90960,7 @@ class AccuDraw {
|
|
|
90846
90960
|
this.fixPointPolar(vp);
|
|
90847
90961
|
else
|
|
90848
90962
|
this.fixPointRectangular(vp);
|
|
90963
|
+
this.fixPointLastSnapDetail(vp);
|
|
90849
90964
|
pointActive.setFrom(this.point);
|
|
90850
90965
|
}
|
|
90851
90966
|
else if (CompassMode.Rectangular === this.compassMode) {
|
|
@@ -90976,8 +91091,10 @@ class AccuDraw {
|
|
|
90976
91091
|
}
|
|
90977
91092
|
/** @internal */
|
|
90978
91093
|
onPostButtonEvent(ev) {
|
|
90979
|
-
if (_tools_Tool__WEBPACK_IMPORTED_MODULE_8__.BeButton.Data !== ev.button || !ev.isDown || !this.isEnabled)
|
|
91094
|
+
if (_tools_Tool__WEBPACK_IMPORTED_MODULE_8__.BeButton.Data !== ev.button || !ev.isDown || !this.isEnabled) {
|
|
91095
|
+
this._lastSnapDetail = undefined;
|
|
90980
91096
|
return false;
|
|
91097
|
+
}
|
|
90981
91098
|
this.onEventCommon();
|
|
90982
91099
|
if (this.flags.ignoreDataButton) {
|
|
90983
91100
|
// NOTE: Ignore this data point, was used to terminate a viewing command or input collector...
|
|
@@ -314467,7 +314584,7 @@ class TestContext {
|
|
|
314467
314584
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
314468
314585
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
314469
314586
|
await core_frontend_1.NoRenderApp.startup({
|
|
314470
|
-
applicationVersion: "5.0.0-dev.
|
|
314587
|
+
applicationVersion: "5.0.0-dev.85",
|
|
314471
314588
|
applicationId: this.settings.gprid,
|
|
314472
314589
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
314473
314590
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -340543,7 +340660,7 @@ function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
|
340543
340660
|
/***/ ((module) => {
|
|
340544
340661
|
|
|
340545
340662
|
"use strict";
|
|
340546
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
340663
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.85","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:*"},"//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":"^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"}}');
|
|
340547
340664
|
|
|
340548
340665
|
/***/ }),
|
|
340549
340666
|
|