@itwin/rpcinterface-full-stack-tests 5.1.0-dev.55 → 5.1.0-dev.56
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 +349 -15
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -68072,6 +68072,10 @@ var RenderSchedule;
|
|
|
68072
68072
|
cuttingPlane;
|
|
68073
68073
|
/** The total time period represented by this timeline. */
|
|
68074
68074
|
duration;
|
|
68075
|
+
/** Indicates whether the schedule editing session has been finalized and is no longer active.
|
|
68076
|
+
* @internal
|
|
68077
|
+
*/
|
|
68078
|
+
isEditingCommitted = false;
|
|
68075
68079
|
constructor(props) {
|
|
68076
68080
|
this.duration = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull();
|
|
68077
68081
|
if (props.visibilityTimeline) {
|
|
@@ -99678,6 +99682,20 @@ class SchemaFormatsProvider {
|
|
|
99678
99682
|
this._formatsRetrieved.clear();
|
|
99679
99683
|
this.onFormatsChanged.raiseEvent({ formatsChanged });
|
|
99680
99684
|
}
|
|
99685
|
+
/** When using a presentation unit from a KindOfQuantity, the label and description should come from the KindOfQuantity */
|
|
99686
|
+
convertToFormatDefinition(format, kindOfQuantity) {
|
|
99687
|
+
// Destructure all properties except 'rest'
|
|
99688
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
99689
|
+
const { name, label, description, $schema, schema, schemaVersion, schemaItemType,
|
|
99690
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
99691
|
+
customAttributes, originalECSpecMajorVersion, originalECSpecMinorVersion, ...rest } = format;
|
|
99692
|
+
return {
|
|
99693
|
+
...rest,
|
|
99694
|
+
name: kindOfQuantity.fullName,
|
|
99695
|
+
label: kindOfQuantity.label ?? format.label,
|
|
99696
|
+
description: kindOfQuantity.description ?? format.description,
|
|
99697
|
+
};
|
|
99698
|
+
}
|
|
99681
99699
|
async getKindOfQuantityFormatFromSchema(itemKey) {
|
|
99682
99700
|
let kindOfQuantity;
|
|
99683
99701
|
try {
|
|
@@ -99703,7 +99721,8 @@ class SchemaFormatsProvider {
|
|
|
99703
99721
|
const currentUnitSystem = await unit.unitSystem;
|
|
99704
99722
|
if (currentUnitSystem && matcher(currentUnitSystem)) {
|
|
99705
99723
|
this._formatsRetrieved.add(itemKey.fullName);
|
|
99706
|
-
|
|
99724
|
+
const props = (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(format);
|
|
99725
|
+
return this.convertToFormatDefinition(props, kindOfQuantity);
|
|
99707
99726
|
}
|
|
99708
99727
|
}
|
|
99709
99728
|
}
|
|
@@ -99712,14 +99731,16 @@ class SchemaFormatsProvider {
|
|
|
99712
99731
|
const persistenceUnitSystem = await persistenceUnit?.unitSystem;
|
|
99713
99732
|
if (persistenceUnitSystem && unitSystemMatchers.some((matcher) => matcher(persistenceUnitSystem))) {
|
|
99714
99733
|
this._formatsRetrieved.add(itemKey.fullName);
|
|
99715
|
-
|
|
99734
|
+
const props = getPersistenceUnitFormatProps(persistenceUnit);
|
|
99735
|
+
return this.convertToFormatDefinition(props, kindOfQuantity);
|
|
99716
99736
|
}
|
|
99717
99737
|
const defaultFormat = kindOfQuantity.defaultPresentationFormat;
|
|
99718
99738
|
if (!defaultFormat) {
|
|
99719
99739
|
return undefined;
|
|
99720
99740
|
}
|
|
99721
99741
|
this._formatsRetrieved.add(itemKey.fullName);
|
|
99722
|
-
|
|
99742
|
+
const defaultProps = (0,_Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_6__.getFormatProps)(await defaultFormat);
|
|
99743
|
+
return this.convertToFormatDefinition(defaultProps, kindOfQuantity);
|
|
99723
99744
|
}
|
|
99724
99745
|
/**
|
|
99725
99746
|
* Retrieves a Format from a SchemaContext. If the format is part of a KindOfQuantity, the first presentation format in the KindOfQuantity that matches the current unit system will be retrieved.
|
|
@@ -108828,6 +108849,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
108828
108849
|
/* harmony import */ var _PlanarClipMaskState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PlanarClipMaskState */ "../../core/frontend/lib/esm/PlanarClipMaskState.js");
|
|
108829
108850
|
/* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
108830
108851
|
/* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
108852
|
+
/* harmony import */ var _internal_ScriptUtils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./internal/ScriptUtils */ "../../core/frontend/lib/esm/internal/ScriptUtils.js");
|
|
108831
108853
|
/*---------------------------------------------------------------------------------------------
|
|
108832
108854
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
108833
108855
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -108846,6 +108868,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
108846
108868
|
|
|
108847
108869
|
|
|
108848
108870
|
|
|
108871
|
+
|
|
108849
108872
|
/** @internal */
|
|
108850
108873
|
class TerrainDisplayOverrides {
|
|
108851
108874
|
wantSkirts;
|
|
@@ -108868,6 +108891,14 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
108868
108891
|
*/
|
|
108869
108892
|
[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_10__._onScheduleScriptReferenceChanged] = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
108870
108893
|
_scriptReference;
|
|
108894
|
+
/** Event raised when schedule script edits are made, providing changed element IDs and the editing scope.
|
|
108895
|
+
* @beta
|
|
108896
|
+
*/
|
|
108897
|
+
onScheduleEditingChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
108898
|
+
/** Event raised when schedule script edits are committed (finalized).
|
|
108899
|
+
* @beta
|
|
108900
|
+
*/
|
|
108901
|
+
onScheduleEditingCommitted = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
108871
108902
|
/** Event raised just before the [[scheduleScript]] property is changed. */
|
|
108872
108903
|
onScheduleScriptChanged = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
108873
108904
|
/** Event raised just after [[setOSMBuildingDisplay]] changes the enabled state of the OSM buildings. */
|
|
@@ -109070,6 +109101,62 @@ class DisplayStyleState extends _EntityState__WEBPACK_IMPORTED_MODULE_6__.Elemen
|
|
|
109070
109101
|
if (this._queryRenderTimelinePropsPromise)
|
|
109071
109102
|
await this._queryRenderTimelinePropsPromise;
|
|
109072
109103
|
}
|
|
109104
|
+
/**
|
|
109105
|
+
* Begins or updates a schedule script editing session for the current display style.
|
|
109106
|
+
* During an editing session, changes to the schedule script are applied incrementally
|
|
109107
|
+
* using temporary dynamic tiles, allowing for interactive preview of visual changes like color,
|
|
109108
|
+
* transforms, visibility, and cutting planes — without requiring a full tile tree reload.
|
|
109109
|
+
*
|
|
109110
|
+
* Calling this method multiple times will update the current editing session with new script changes.
|
|
109111
|
+
* When all edits are complete, you must invoke [[commitScheduleEditing]] to finalize the session and
|
|
109112
|
+
* trigger a full tile tree refresh with the committed script.
|
|
109113
|
+
*
|
|
109114
|
+
* @note You cannot use schedule script editing while a @see [[GraphicalEditingScope]] is active.
|
|
109115
|
+
*
|
|
109116
|
+
* Example:
|
|
109117
|
+
* ```ts
|
|
109118
|
+
* [[include:ScheduleScript_editingMode]]
|
|
109119
|
+
* ```
|
|
109120
|
+
*
|
|
109121
|
+
* @beta
|
|
109122
|
+
*/
|
|
109123
|
+
setScheduleEditing(newScript) {
|
|
109124
|
+
const prevScript = this.scheduleScript;
|
|
109125
|
+
const changes = [];
|
|
109126
|
+
const globalDelta = (0,_internal_ScriptUtils__WEBPACK_IMPORTED_MODULE_11__.getScriptDelta)(prevScript, newScript);
|
|
109127
|
+
for (const timeline of newScript.modelTimelines) {
|
|
109128
|
+
const ids = new Set();
|
|
109129
|
+
for (const et of timeline.elementTimelines) {
|
|
109130
|
+
for (const id of et.elementIds) {
|
|
109131
|
+
if (globalDelta.has(id))
|
|
109132
|
+
ids.add(id);
|
|
109133
|
+
}
|
|
109134
|
+
}
|
|
109135
|
+
if (ids.size > 0)
|
|
109136
|
+
changes.push({ timeline, elements: ids });
|
|
109137
|
+
}
|
|
109138
|
+
this.scheduleScript = newScript;
|
|
109139
|
+
this.onScheduleEditingChanged.raiseEvent(changes);
|
|
109140
|
+
for (const modelTimeline of this.scheduleScript.modelTimelines) {
|
|
109141
|
+
modelTimeline.isEditingCommitted = false;
|
|
109142
|
+
}
|
|
109143
|
+
}
|
|
109144
|
+
/**
|
|
109145
|
+
* Finalizes a script editing session previously started with [[setScheduleEditing]].
|
|
109146
|
+
* This applies all pending script changes and triggers a full tile tree reload to reflect them in the viewport.
|
|
109147
|
+
* After this call, the schedule script is considered committed and editing mode ends.
|
|
109148
|
+
*
|
|
109149
|
+
* @see [[setScheduleEditing]] to begin a schedule script editing session.
|
|
109150
|
+
* @beta
|
|
109151
|
+
*/
|
|
109152
|
+
commitScheduleEditing() {
|
|
109153
|
+
this.onScheduleEditingCommitted.raiseEvent();
|
|
109154
|
+
if (!this.scheduleScript)
|
|
109155
|
+
return;
|
|
109156
|
+
for (const modelTimeline of this.scheduleScript.modelTimelines) {
|
|
109157
|
+
modelTimeline.isEditingCommitted = true;
|
|
109158
|
+
}
|
|
109159
|
+
}
|
|
109073
109160
|
/** The [RenderSchedule.Script]($common) that animates the contents of the view, if any.
|
|
109074
109161
|
* @see [[changeRenderTimeline]] to change the script.
|
|
109075
109162
|
*/
|
|
@@ -126642,6 +126729,22 @@ class Viewport {
|
|
|
126642
126729
|
};
|
|
126643
126730
|
removals.push(settings.onTimePointChanged.addListener(scheduleChanged));
|
|
126644
126731
|
removals.push(style.onScheduleScriptChanged.addListener(scriptChanged));
|
|
126732
|
+
const scheduleEditingChanged = async (changes) => {
|
|
126733
|
+
for (const ref of this.getTileTreeRefs()) {
|
|
126734
|
+
const tree = ref.treeOwner.tileTree;
|
|
126735
|
+
await tree?.onScheduleEditingChanged(changes);
|
|
126736
|
+
}
|
|
126737
|
+
};
|
|
126738
|
+
const scheduleEditingCommitted = () => {
|
|
126739
|
+
for (const ref of this.getTileTreeRefs()) {
|
|
126740
|
+
const tree = ref.treeOwner.tileTree;
|
|
126741
|
+
tree?.onScheduleEditingCommitted();
|
|
126742
|
+
}
|
|
126743
|
+
};
|
|
126744
|
+
removals.push(style.onScheduleEditingChanged.addListener((changes) => {
|
|
126745
|
+
void scheduleEditingChanged(changes);
|
|
126746
|
+
}));
|
|
126747
|
+
removals.push(style.onScheduleEditingCommitted.addListener(scheduleEditingCommitted));
|
|
126645
126748
|
removals.push(settings.onViewFlagsChanged.addListener((vf) => {
|
|
126646
126749
|
if (vf.backgroundMap !== this.viewFlags.backgroundMap)
|
|
126647
126750
|
this.invalidateController();
|
|
@@ -137613,7 +137716,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
137613
137716
|
/**
|
|
137614
137717
|
* @docs-group-description TileStorage
|
|
137615
137718
|
* Class for working with cloud storage using iTwin/object-storage cloud providers
|
|
137616
|
-
*/
|
|
137719
|
+
*/
|
|
137617
137720
|
|
|
137618
137721
|
|
|
137619
137722
|
/***/ }),
|
|
@@ -138600,6 +138703,137 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
138600
138703
|
}
|
|
138601
138704
|
|
|
138602
138705
|
|
|
138706
|
+
/***/ }),
|
|
138707
|
+
|
|
138708
|
+
/***/ "../../core/frontend/lib/esm/internal/ScriptUtils.js":
|
|
138709
|
+
/*!***********************************************************!*\
|
|
138710
|
+
!*** ../../core/frontend/lib/esm/internal/ScriptUtils.js ***!
|
|
138711
|
+
\***********************************************************/
|
|
138712
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
138713
|
+
|
|
138714
|
+
"use strict";
|
|
138715
|
+
__webpack_require__.r(__webpack_exports__);
|
|
138716
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
138717
|
+
/* harmony export */ getScriptDelta: () => (/* binding */ getScriptDelta)
|
|
138718
|
+
/* harmony export */ });
|
|
138719
|
+
/** @internal */
|
|
138720
|
+
function getScriptDelta(prev, next) {
|
|
138721
|
+
if (!prev || !prev.modelTimelines || prev.modelTimelines.length === 0) {
|
|
138722
|
+
return getAllElementIdsFromScript(next);
|
|
138723
|
+
}
|
|
138724
|
+
const changed = new Set();
|
|
138725
|
+
const prevModels = new Map(prev.modelTimelines.map(m => [m.modelId, m]));
|
|
138726
|
+
const nextModels = new Map(next.modelTimelines.map(m => [m.modelId, m]));
|
|
138727
|
+
for (const modelId of new Set([...prevModels.keys(), ...nextModels.keys()])) {
|
|
138728
|
+
const prevModel = prevModels.get(modelId);
|
|
138729
|
+
const nextModel = nextModels.get(modelId);
|
|
138730
|
+
if (!prevModel || !nextModel) {
|
|
138731
|
+
const timelines = (prevModel ?? nextModel)?.elementTimelines ?? [];
|
|
138732
|
+
for (const timeline of timelines)
|
|
138733
|
+
for (const id of timeline.elementIds)
|
|
138734
|
+
changed.add(id);
|
|
138735
|
+
continue;
|
|
138736
|
+
}
|
|
138737
|
+
const prevTimelineMap = new Map(prevModel.elementTimelines.map(et => [et.batchId, et]));
|
|
138738
|
+
const nextTimelineMap = new Map(nextModel.elementTimelines.map(et => [et.batchId, et]));
|
|
138739
|
+
const allBatchIds = new Set([...prevTimelineMap.keys(), ...nextTimelineMap.keys()]);
|
|
138740
|
+
for (const batchId of allBatchIds) {
|
|
138741
|
+
const prevTimeline = prevTimelineMap.get(batchId);
|
|
138742
|
+
const nextTimeline = nextTimelineMap.get(batchId);
|
|
138743
|
+
if (!prevTimeline || !nextTimeline) {
|
|
138744
|
+
const ids = (prevTimeline ?? nextTimeline)?.elementIds ?? [];
|
|
138745
|
+
for (const id of ids)
|
|
138746
|
+
changed.add(id);
|
|
138747
|
+
continue;
|
|
138748
|
+
}
|
|
138749
|
+
if (!isTimelineEntryEqual(prevTimeline, nextTimeline)) {
|
|
138750
|
+
for (const id of nextTimeline.elementIds)
|
|
138751
|
+
changed.add(id);
|
|
138752
|
+
}
|
|
138753
|
+
}
|
|
138754
|
+
}
|
|
138755
|
+
return changed;
|
|
138756
|
+
}
|
|
138757
|
+
function collectTimelineEntryTimes(timeline) {
|
|
138758
|
+
const result = new Set();
|
|
138759
|
+
if (timeline.cuttingPlane) {
|
|
138760
|
+
for (const entry of timeline.cuttingPlane) {
|
|
138761
|
+
result.add(entry.time);
|
|
138762
|
+
}
|
|
138763
|
+
}
|
|
138764
|
+
if (timeline.visibility) {
|
|
138765
|
+
for (const entry of timeline.visibility) {
|
|
138766
|
+
result.add(entry.time);
|
|
138767
|
+
}
|
|
138768
|
+
}
|
|
138769
|
+
if (timeline.transform) {
|
|
138770
|
+
for (const entry of timeline.transform) {
|
|
138771
|
+
result.add(entry.time);
|
|
138772
|
+
}
|
|
138773
|
+
}
|
|
138774
|
+
if (timeline.color) {
|
|
138775
|
+
for (const entry of timeline.color) {
|
|
138776
|
+
result.add(entry.time);
|
|
138777
|
+
}
|
|
138778
|
+
}
|
|
138779
|
+
return Array.from(result);
|
|
138780
|
+
}
|
|
138781
|
+
function isTimelineEntryEqual(a, b) {
|
|
138782
|
+
const timesSet = new Set([
|
|
138783
|
+
...collectTimelineEntryTimes(a),
|
|
138784
|
+
...collectTimelineEntryTimes(b),
|
|
138785
|
+
]);
|
|
138786
|
+
let times = Array.from(timesSet).sort((x, y) => x - y);
|
|
138787
|
+
if (times.length === 0) {
|
|
138788
|
+
times = [0, 0.25, 0.5, 0.75, 1];
|
|
138789
|
+
}
|
|
138790
|
+
for (const [] of a.elementIds) {
|
|
138791
|
+
for (const t of times) {
|
|
138792
|
+
// Check visibility
|
|
138793
|
+
const v1 = a.getVisibility(t);
|
|
138794
|
+
const v2 = b.getVisibility(t);
|
|
138795
|
+
if (Math.abs(v1 - v2) > 0.01)
|
|
138796
|
+
return false;
|
|
138797
|
+
// Check Transform
|
|
138798
|
+
const tf1 = a.getAnimationTransform(t);
|
|
138799
|
+
const tf2 = b.getAnimationTransform(t);
|
|
138800
|
+
if (!tf1.isAlmostEqual(tf2))
|
|
138801
|
+
return false;
|
|
138802
|
+
// Check Color
|
|
138803
|
+
const c1 = a.getColor(t);
|
|
138804
|
+
const c2 = b.getColor(t);
|
|
138805
|
+
if ((c1 === undefined) !== (c2 === undefined))
|
|
138806
|
+
return false;
|
|
138807
|
+
if (c1 !== undefined && !c1.equals(c2))
|
|
138808
|
+
return false;
|
|
138809
|
+
// Cutting Plane (CLIPPING)
|
|
138810
|
+
const clip1 = a.getCuttingPlane?.(t);
|
|
138811
|
+
const clip2 = b.getCuttingPlane?.(t);
|
|
138812
|
+
const oneUndefined = (clip1 === undefined) !== (clip2 === undefined);
|
|
138813
|
+
if (oneUndefined)
|
|
138814
|
+
return false;
|
|
138815
|
+
if (clip1 && clip2) {
|
|
138816
|
+
if (!clip1.getOriginRef().isAlmostEqual(clip2.getOriginRef(), 1e-6) ||
|
|
138817
|
+
!clip1.getNormalRef().isAlmostEqual(clip2.getNormalRef(), 1e-6)) {
|
|
138818
|
+
return false;
|
|
138819
|
+
}
|
|
138820
|
+
}
|
|
138821
|
+
}
|
|
138822
|
+
}
|
|
138823
|
+
return true;
|
|
138824
|
+
}
|
|
138825
|
+
function getAllElementIdsFromScript(script) {
|
|
138826
|
+
const ids = new Set();
|
|
138827
|
+
for (const modelTimeline of script.modelTimelines) {
|
|
138828
|
+
for (const elementTimeline of modelTimeline.elementTimelines) {
|
|
138829
|
+
for (const id of elementTimeline.elementIds)
|
|
138830
|
+
ids.add(id);
|
|
138831
|
+
}
|
|
138832
|
+
}
|
|
138833
|
+
return ids;
|
|
138834
|
+
}
|
|
138835
|
+
|
|
138836
|
+
|
|
138603
138837
|
/***/ }),
|
|
138604
138838
|
|
|
138605
138839
|
/***/ "../../core/frontend/lib/esm/internal/cross-package.js":
|
|
@@ -172223,6 +172457,19 @@ class DynamicState {
|
|
|
172223
172457
|
};
|
|
172224
172458
|
}
|
|
172225
172459
|
}
|
|
172460
|
+
class ScheduleScriptDynamicState {
|
|
172461
|
+
type = "dynamic";
|
|
172462
|
+
rootTile;
|
|
172463
|
+
_dispose;
|
|
172464
|
+
[Symbol.dispose]() {
|
|
172465
|
+
this._dispose();
|
|
172466
|
+
this.rootTile[Symbol.dispose]();
|
|
172467
|
+
}
|
|
172468
|
+
constructor(root, elemChanges) {
|
|
172469
|
+
this.rootTile = _tile_internal__WEBPACK_IMPORTED_MODULE_6__.DynamicIModelTile.create(root, elemChanges);
|
|
172470
|
+
this._dispose = () => { };
|
|
172471
|
+
}
|
|
172472
|
+
}
|
|
172226
172473
|
/** The tile tree has been disposed. */
|
|
172227
172474
|
class DisposedState {
|
|
172228
172475
|
type = "disposed";
|
|
@@ -172461,6 +172708,51 @@ class IModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.TileTre
|
|
|
172461
172708
|
get containsTransformNodes() {
|
|
172462
172709
|
return undefined !== this._transformNodeRanges;
|
|
172463
172710
|
}
|
|
172711
|
+
async onScheduleEditingChanged(changes) {
|
|
172712
|
+
const displayStyle = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.viewManager.selectedView?.displayStyle;
|
|
172713
|
+
const newScript = displayStyle?.scheduleScript;
|
|
172714
|
+
const scriptRef = newScript ? new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderSchedule.ScriptReference(displayStyle.id, newScript) : undefined;
|
|
172715
|
+
const scriptInfo = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.tileAdmin.getScriptInfoForTreeId(this.modelId, scriptRef);
|
|
172716
|
+
if (scriptInfo?.timeline && this.timeline !== scriptInfo.timeline) {
|
|
172717
|
+
this.decoder = (0,_tile_internal__WEBPACK_IMPORTED_MODULE_6__.acquireImdlDecoder)({
|
|
172718
|
+
type: this.batchType,
|
|
172719
|
+
omitEdges: this.edgeOptions === false,
|
|
172720
|
+
timeline: scriptInfo.timeline,
|
|
172721
|
+
iModel: this.iModel,
|
|
172722
|
+
batchModelId: this.modelId,
|
|
172723
|
+
is3d: this.is3d,
|
|
172724
|
+
containsTransformNodes: this.containsTransformNodes,
|
|
172725
|
+
noWorker: !_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.tileAdmin.decodeImdlInWorker,
|
|
172726
|
+
});
|
|
172727
|
+
this._options.timeline = scriptInfo.timeline;
|
|
172728
|
+
}
|
|
172729
|
+
const relevantChange = changes.find((c) => c.timeline.modelId === this.modelId);
|
|
172730
|
+
if (!relevantChange || relevantChange.elements.size === 0)
|
|
172731
|
+
return;
|
|
172732
|
+
const elementIds = Array.from(relevantChange.elements);
|
|
172733
|
+
const placements = await this.iModel.elements.getPlacements(elementIds, {
|
|
172734
|
+
type: this.is3d ? "3d" : "2d",
|
|
172735
|
+
});
|
|
172736
|
+
if (placements.length === 0)
|
|
172737
|
+
return;
|
|
172738
|
+
const changedElements = placements.map((x) => {
|
|
172739
|
+
return {
|
|
172740
|
+
id: x.elementId,
|
|
172741
|
+
type: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.DbOpcode.Update,
|
|
172742
|
+
range: x.calculateRange(),
|
|
172743
|
+
};
|
|
172744
|
+
});
|
|
172745
|
+
if (changedElements.length === 0)
|
|
172746
|
+
return;
|
|
172747
|
+
if (this._rootTile.tileState.type === "dynamic") {
|
|
172748
|
+
this._rootTile.transition(new StaticState(this._rootTile));
|
|
172749
|
+
}
|
|
172750
|
+
this._rootTile.transition(new ScheduleScriptDynamicState(this._rootTile, changedElements));
|
|
172751
|
+
}
|
|
172752
|
+
onScheduleEditingCommitted() {
|
|
172753
|
+
if (this._rootTile.tileState.type !== "static")
|
|
172754
|
+
this._rootTile.transition(new StaticState(this._rootTile));
|
|
172755
|
+
}
|
|
172464
172756
|
}
|
|
172465
172757
|
|
|
172466
172758
|
|
|
@@ -174840,7 +175132,7 @@ class PrimaryTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.T
|
|
|
174840
175132
|
get treeOwner() {
|
|
174841
175133
|
const newId = this.createTreeId(this.view, this._id.modelId);
|
|
174842
175134
|
const timeline = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.tileAdmin.getScriptInfoForTreeId(this._id.modelId, this.view.displayStyle[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_7__._scheduleScriptReference])?.timeline;
|
|
174843
|
-
if (0 !== (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.compareIModelTileTreeIds)(newId, this._id.treeId) || timeline
|
|
175135
|
+
if (0 !== (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.compareIModelTileTreeIds)(newId, this._id.treeId) || timeline?.isEditingCommitted) {
|
|
174844
175136
|
this._id = {
|
|
174845
175137
|
modelId: this._id.modelId,
|
|
174846
175138
|
is3d: this._id.is3d,
|
|
@@ -191160,6 +191452,19 @@ class TileTree {
|
|
|
191160
191452
|
*/
|
|
191161
191453
|
collectTileGeometry(_collector) {
|
|
191162
191454
|
}
|
|
191455
|
+
/**
|
|
191456
|
+
* Invoked when a schedule script is edited.
|
|
191457
|
+
* Override to handle updates for affected elements or timelines.
|
|
191458
|
+
*
|
|
191459
|
+
* @internal
|
|
191460
|
+
*/
|
|
191461
|
+
async onScheduleEditingChanged(_changes) { }
|
|
191462
|
+
/**
|
|
191463
|
+
* Invoked when a schedule script is committed during editing.
|
|
191464
|
+
* Override in specific tile tree types to handle the change.
|
|
191465
|
+
* @internal
|
|
191466
|
+
*/
|
|
191467
|
+
onScheduleEditingCommitted() { }
|
|
191163
191468
|
}
|
|
191164
191469
|
|
|
191165
191470
|
|
|
@@ -301102,6 +301407,13 @@ class Box extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive {
|
|
|
301102
301407
|
if (transform.matrix.isSingular())
|
|
301103
301408
|
return false;
|
|
301104
301409
|
transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
|
|
301410
|
+
if (transform.matrix.determinant() < 0.0) {
|
|
301411
|
+
// if mirror, reverse z-axis (origin and direction) to preserve outward normals
|
|
301412
|
+
this._localToWorld.origin.addInPlace(this._localToWorld.matrix.columnZ());
|
|
301413
|
+
this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
|
|
301414
|
+
[this._baseX, this._topX] = [this._topX, this._baseX];
|
|
301415
|
+
[this._baseY, this._topY] = [this._topY, this._baseY];
|
|
301416
|
+
}
|
|
301105
301417
|
return true;
|
|
301106
301418
|
}
|
|
301107
301419
|
/**
|
|
@@ -301377,6 +301689,12 @@ class Cone extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive {
|
|
|
301377
301689
|
if (transform.matrix.isSingular())
|
|
301378
301690
|
return false;
|
|
301379
301691
|
transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
|
|
301692
|
+
if (transform.matrix.determinant() < 0.0) {
|
|
301693
|
+
// if mirror, reverse z-axis (origin and direction) to preserve outward normals
|
|
301694
|
+
this._localToWorld.origin.addInPlace(this._localToWorld.matrix.columnZ());
|
|
301695
|
+
this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
|
|
301696
|
+
[this._radiusA, this._radiusB] = [this._radiusB, this._radiusA];
|
|
301697
|
+
}
|
|
301380
301698
|
return true;
|
|
301381
301699
|
}
|
|
301382
301700
|
/**
|
|
@@ -301713,11 +302031,16 @@ class LinearSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrim
|
|
|
301713
302031
|
tryTransformInPlace(transform) {
|
|
301714
302032
|
if (transform.matrix.isSingular())
|
|
301715
302033
|
return false;
|
|
301716
|
-
if (this._contour.tryTransformInPlace(transform))
|
|
301717
|
-
|
|
301718
|
-
|
|
302034
|
+
if (!this._contour.tryTransformInPlace(transform))
|
|
302035
|
+
return false;
|
|
302036
|
+
transform.multiplyVector(this._direction, this._direction);
|
|
302037
|
+
if (transform.matrix.determinant() < 0.0) {
|
|
302038
|
+
// if mirror, reverse the sweep (origin and direction) to preserve outward normals
|
|
302039
|
+
if (!this._contour.tryTransformInPlace(_geometry3d_Transform__WEBPACK_IMPORTED_MODULE_7__.Transform.createTranslation(this._direction)))
|
|
302040
|
+
return false;
|
|
302041
|
+
this._direction.scaleInPlace(-1.0);
|
|
301719
302042
|
}
|
|
301720
|
-
return
|
|
302043
|
+
return true;
|
|
301721
302044
|
}
|
|
301722
302045
|
/** Return a coordinate frame (right handed unit vectors)
|
|
301723
302046
|
* * origin on base contour
|
|
@@ -302002,7 +302325,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
302002
302325
|
|
|
302003
302326
|
/**
|
|
302004
302327
|
* A ruled sweep (surface) is a collection of 2 or more contours.
|
|
302005
|
-
* * All contours must have identical number and type of geometry
|
|
302328
|
+
* * All contours must have identical number and type of geometry: (paths, loops, parity regions, lines, arcs, other curves).
|
|
302006
302329
|
* @public
|
|
302007
302330
|
*/
|
|
302008
302331
|
class RuledSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive {
|
|
@@ -302068,6 +302391,10 @@ class RuledSweep extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimi
|
|
|
302068
302391
|
if (!contour.tryTransformInPlace(transform))
|
|
302069
302392
|
return false;
|
|
302070
302393
|
}
|
|
302394
|
+
if (transform.matrix.determinant() < 0.0) {
|
|
302395
|
+
// if mirror, reverse the sweep order to preserve outward normals
|
|
302396
|
+
this._contours.reverse();
|
|
302397
|
+
}
|
|
302071
302398
|
return true;
|
|
302072
302399
|
}
|
|
302073
302400
|
/**
|
|
@@ -302335,8 +302662,11 @@ class Sphere extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimitive
|
|
|
302335
302662
|
if (transform.matrix.isSingular())
|
|
302336
302663
|
return false;
|
|
302337
302664
|
transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
|
|
302338
|
-
if (transform.matrix.determinant() < 0.0)
|
|
302339
|
-
|
|
302665
|
+
if (transform.matrix.determinant() < 0.0) {
|
|
302666
|
+
// if mirror, reverse z-axis to preserve outward normals
|
|
302667
|
+
this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
|
|
302668
|
+
this._latitudeSweep.setStartEndRadians(-this._latitudeSweep.endRadians, -this._latitudeSweep.startRadians);
|
|
302669
|
+
}
|
|
302340
302670
|
return true;
|
|
302341
302671
|
}
|
|
302342
302672
|
/**
|
|
@@ -302992,6 +303322,10 @@ class TorusPipe extends _SolidPrimitive__WEBPACK_IMPORTED_MODULE_0__.SolidPrimit
|
|
|
302992
303322
|
if (transform.matrix.isSingular())
|
|
302993
303323
|
return false;
|
|
302994
303324
|
transform.multiplyTransformTransform(this._localToWorld, this._localToWorld);
|
|
303325
|
+
if (transform.matrix.determinant() < 0.0) {
|
|
303326
|
+
// if mirror, reverse z-axis to preserve outward normals
|
|
303327
|
+
this._localToWorld.matrix.scaleColumnsInPlace(1, 1, -1);
|
|
303328
|
+
}
|
|
302995
303329
|
return true;
|
|
302996
303330
|
}
|
|
302997
303331
|
/**
|
|
@@ -329072,7 +329406,7 @@ class Formatter {
|
|
|
329072
329406
|
let unitValue = 0.0;
|
|
329073
329407
|
if (spec.format.type === _FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Ratio) {
|
|
329074
329408
|
if (1 !== spec.format.units.length)
|
|
329075
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name}
|
|
329409
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format '${spec.format.name}' with type 'ratio' must have exactly one unit.`);
|
|
329076
329410
|
try {
|
|
329077
329411
|
unitValue = (0,_Quantity__WEBPACK_IMPORTED_MODULE_3__.applyConversion)(posMagnitude, unitConversion) + this.FPV_MINTHRESHOLD;
|
|
329078
329412
|
}
|
|
@@ -331795,7 +332129,7 @@ class TestContext {
|
|
|
331795
332129
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
331796
332130
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
331797
332131
|
await core_frontend_1.NoRenderApp.startup({
|
|
331798
|
-
applicationVersion: "5.1.0-dev.
|
|
332132
|
+
applicationVersion: "5.1.0-dev.56",
|
|
331799
332133
|
applicationId: this.settings.gprid,
|
|
331800
332134
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
331801
332135
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -356882,7 +357216,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
356882
357216
|
/***/ ((module) => {
|
|
356883
357217
|
|
|
356884
357218
|
"use strict";
|
|
356885
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.
|
|
357219
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.56","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","@types/sinon":"^17.0.2","@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","sinon":"^17.0.2","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"}}');
|
|
356886
357220
|
|
|
356887
357221
|
/***/ }),
|
|
356888
357222
|
|