@itwin/rpcinterface-full-stack-tests 4.5.0-dev.32 → 4.5.0-dev.36
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/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +236 -36
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\
|
|
1
|
+
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\486\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -145086,7 +145086,7 @@ function trsMatrix(translation, rotation, scale, result) {
|
|
|
145086
145086
|
const rotTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createRefs(undefined, rotation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createFromQuaternion(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point4d.create(rotation[0], rotation[1], rotation[2], rotation[3])) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
|
|
145087
145087
|
rotTf.matrix.transposeInPlace(); // See comment on Matrix3d.createFromQuaternion
|
|
145088
145088
|
const transTf = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(translation ? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(translation[0], translation[1], translation[2]) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d.createZero());
|
|
145089
|
-
const tf =
|
|
145089
|
+
const tf = rotTf.multiplyTransformTransform(scaleTf, result);
|
|
145090
145090
|
transTf.multiplyTransformTransform(tf, tf);
|
|
145091
145091
|
return tf;
|
|
145092
145092
|
}
|
|
@@ -149627,14 +149627,15 @@ var SpatialTileTreeReferences;
|
|
|
149627
149627
|
})(SpatialTileTreeReferences || (SpatialTileTreeReferences = {}));
|
|
149628
149628
|
/** Represents the [[TileTreeReference]]s associated with one model in a [[SpatialTileTreeReferences]]. */
|
|
149629
149629
|
class SpatialModelRefs {
|
|
149630
|
-
constructor(model, view) {
|
|
149630
|
+
constructor(model, view, excluded) {
|
|
149631
149631
|
/** TileTreeReferences representing nodes transformed by the view's schedule script. */
|
|
149632
149632
|
this._animatedRefs = [];
|
|
149633
149633
|
this._modelRef = model.createTileTreeReference(view);
|
|
149634
149634
|
this._isPrimaryRef = this._modelRef instanceof PrimaryTreeReference;
|
|
149635
|
+
this._isExcluded = excluded;
|
|
149635
149636
|
}
|
|
149636
149637
|
*[Symbol.iterator]() {
|
|
149637
|
-
if (!this._primaryRef || !this._primaryRef.deactivated)
|
|
149638
|
+
if ((!this._primaryRef || !this._primaryRef.deactivated) && !this._isExcluded)
|
|
149638
149639
|
yield this._modelRef;
|
|
149639
149640
|
for (const animated of this._animatedRefs)
|
|
149640
149641
|
if (!animated.deactivated)
|
|
@@ -149644,7 +149645,7 @@ class SpatialModelRefs {
|
|
|
149644
149645
|
}
|
|
149645
149646
|
updateAnimated(script) {
|
|
149646
149647
|
const ref = this._primaryRef;
|
|
149647
|
-
if (!ref)
|
|
149648
|
+
if (!ref || this._isExcluded)
|
|
149648
149649
|
return;
|
|
149649
149650
|
this._animatedRefs.length = 0;
|
|
149650
149651
|
const nodeIds = script?.script.getTransformBatchIds(ref.model.id);
|
|
@@ -149693,6 +149694,8 @@ class SpatialRefs {
|
|
|
149693
149694
|
this._allLoaded = false;
|
|
149694
149695
|
this._refs = new Map();
|
|
149695
149696
|
this._swapRefs = new Map();
|
|
149697
|
+
this._sectionCutOnlyRefs = new Map();
|
|
149698
|
+
this._swapSectionCutOnlyRefs = new Map();
|
|
149696
149699
|
this._view = view;
|
|
149697
149700
|
this._scheduleScript = view.displayStyle.scheduleScriptReference; // eslint-disable-line deprecation/deprecation
|
|
149698
149701
|
this._sectionCut = this.getSectionCutFromView();
|
|
@@ -149709,6 +149712,11 @@ class SpatialRefs {
|
|
|
149709
149712
|
for (const modelRef of this._refs.values())
|
|
149710
149713
|
for (const ref of modelRef)
|
|
149711
149714
|
yield ref;
|
|
149715
|
+
if (this._sectionCut) {
|
|
149716
|
+
for (const modelRef of this._sectionCutOnlyRefs.values())
|
|
149717
|
+
for (const ref of modelRef)
|
|
149718
|
+
yield ref;
|
|
149719
|
+
}
|
|
149712
149720
|
}
|
|
149713
149721
|
setDeactivated(modelIds, deactivated, refs) {
|
|
149714
149722
|
if (undefined === modelIds) {
|
|
@@ -149739,6 +149747,8 @@ class SpatialRefs {
|
|
|
149739
149747
|
this._sectionCut = sectionCut;
|
|
149740
149748
|
for (const ref of this._refs.values())
|
|
149741
149749
|
ref.updateSectionCut(sectionCut);
|
|
149750
|
+
for (const ref of this._sectionCutOnlyRefs.values())
|
|
149751
|
+
ref.updateSectionCut(sectionCut);
|
|
149742
149752
|
}
|
|
149743
149753
|
}
|
|
149744
149754
|
getSectionCutFromView() {
|
|
@@ -149748,19 +149758,32 @@ class SpatialRefs {
|
|
|
149748
149758
|
}
|
|
149749
149759
|
/** Ensure this._refs contains a SpatialModelRefs for all loaded models in the model selector. */
|
|
149750
149760
|
updateModels() {
|
|
149751
|
-
|
|
149752
|
-
|
|
149761
|
+
let prev = this._refs;
|
|
149762
|
+
let cur = this._swapRefs;
|
|
149753
149763
|
this._refs = cur;
|
|
149754
149764
|
this._swapRefs = prev;
|
|
149755
149765
|
cur.clear();
|
|
149766
|
+
prev = this._sectionCutOnlyRefs;
|
|
149767
|
+
cur = this._swapSectionCutOnlyRefs;
|
|
149768
|
+
this._sectionCutOnlyRefs = cur;
|
|
149769
|
+
this._swapSectionCutOnlyRefs = prev;
|
|
149770
|
+
cur.clear();
|
|
149756
149771
|
for (const modelId of this._view.modelSelector.models) {
|
|
149757
|
-
|
|
149758
|
-
|
|
149772
|
+
let excluded = false;
|
|
149773
|
+
if (undefined !== this._excludedModels && this._excludedModels.has(modelId)) {
|
|
149774
|
+
excluded = true;
|
|
149775
|
+
cur = this._sectionCutOnlyRefs;
|
|
149776
|
+
prev = this._swapSectionCutOnlyRefs;
|
|
149777
|
+
}
|
|
149778
|
+
else {
|
|
149779
|
+
cur = this._refs;
|
|
149780
|
+
prev = this._swapRefs;
|
|
149781
|
+
}
|
|
149759
149782
|
let modelRefs = prev.get(modelId);
|
|
149760
149783
|
if (!modelRefs) {
|
|
149761
149784
|
const model = this._view.iModel.models.getLoaded(modelId)?.asGeometricModel3d;
|
|
149762
149785
|
if (model) {
|
|
149763
|
-
modelRefs = new SpatialModelRefs(model, this._view);
|
|
149786
|
+
modelRefs = new SpatialModelRefs(model, this._view, excluded);
|
|
149764
149787
|
modelRefs.updateAnimated(this._scheduleScript);
|
|
149765
149788
|
modelRefs.updateSectionCut(this._sectionCut);
|
|
149766
149789
|
}
|
|
@@ -289593,7 +289616,7 @@ class TestContext {
|
|
|
289593
289616
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
289594
289617
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
289595
289618
|
await core_frontend_1.NoRenderApp.startup({
|
|
289596
|
-
applicationVersion: "4.5.0-dev.
|
|
289619
|
+
applicationVersion: "4.5.0-dev.36",
|
|
289597
289620
|
applicationId: this.settings.gprid,
|
|
289598
289621
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
289599
289622
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -289620,6 +289643,7 @@ exports.TestContext = TestContext;
|
|
|
289620
289643
|
"use strict";
|
|
289621
289644
|
__webpack_require__.r(__webpack_exports__);
|
|
289622
289645
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
289646
|
+
/* harmony export */ "ArrayPropertiesField": () => (/* reexport safe */ _presentation_common_content_Fields__WEBPACK_IMPORTED_MODULE_25__.ArrayPropertiesField),
|
|
289623
289647
|
/* harmony export */ "AsyncTasksTracker": () => (/* reexport safe */ _presentation_common_AsyncTasks__WEBPACK_IMPORTED_MODULE_0__.AsyncTasksTracker),
|
|
289624
289648
|
/* harmony export */ "CategoryDescription": () => (/* reexport safe */ _presentation_common_content_Category__WEBPACK_IMPORTED_MODULE_20__.CategoryDescription),
|
|
289625
289649
|
/* harmony export */ "ChildNodeSpecificationTypes": () => (/* reexport safe */ _presentation_common_rules_hierarchy_ChildNodeSpecification__WEBPACK_IMPORTED_MODULE_38__.ChildNodeSpecificationTypes),
|
|
@@ -289686,6 +289710,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
289686
289710
|
/* harmony export */ "SelectClassInfo": () => (/* reexport safe */ _presentation_common_content_Descriptor__WEBPACK_IMPORTED_MODULE_22__.SelectClassInfo),
|
|
289687
289711
|
/* harmony export */ "SortDirection": () => (/* reexport safe */ _presentation_common_content_Descriptor__WEBPACK_IMPORTED_MODULE_22__.SortDirection),
|
|
289688
289712
|
/* harmony export */ "StandardNodeTypes": () => (/* reexport safe */ _presentation_common_hierarchy_Key__WEBPACK_IMPORTED_MODULE_34__.StandardNodeTypes),
|
|
289713
|
+
/* harmony export */ "StructPropertiesField": () => (/* reexport safe */ _presentation_common_content_Fields__WEBPACK_IMPORTED_MODULE_25__.StructPropertiesField),
|
|
289689
289714
|
/* harmony export */ "UPDATE_FULL": () => (/* reexport safe */ _presentation_common_Update__WEBPACK_IMPORTED_MODULE_10__.UPDATE_FULL),
|
|
289690
289715
|
/* harmony export */ "Value": () => (/* reexport safe */ _presentation_common_content_Value__WEBPACK_IMPORTED_MODULE_30__.Value),
|
|
289691
289716
|
/* harmony export */ "VariableValueType": () => (/* reexport safe */ _presentation_common_rules_Variables__WEBPACK_IMPORTED_MODULE_76__.VariableValueType),
|
|
@@ -291377,11 +291402,28 @@ class LocalizationHelper {
|
|
|
291377
291402
|
displayValues: Object.entries(item.displayValues).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {}),
|
|
291378
291403
|
}));
|
|
291379
291404
|
}
|
|
291405
|
+
if (_content_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isArray(value)) {
|
|
291406
|
+
return value.map((v) => this.getLocalizedRawValue(v));
|
|
291407
|
+
}
|
|
291408
|
+
if (_content_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isMap(value)) {
|
|
291409
|
+
return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedRawValue(v) }), {});
|
|
291410
|
+
}
|
|
291380
291411
|
return value;
|
|
291381
291412
|
}
|
|
291382
291413
|
// warning: this function mutates the field
|
|
291383
291414
|
getLocalizedContentField(field) {
|
|
291384
291415
|
field.label = this.getLocalizedString(field.label);
|
|
291416
|
+
if (field.isPropertiesField()) {
|
|
291417
|
+
if (field.isStructPropertiesField()) {
|
|
291418
|
+
field.memberFields = field.memberFields.map((m) => this.getLocalizedContentField(m));
|
|
291419
|
+
}
|
|
291420
|
+
else if (field.isArrayPropertiesField()) {
|
|
291421
|
+
field.itemsField = this.getLocalizedContentField(field.itemsField);
|
|
291422
|
+
}
|
|
291423
|
+
}
|
|
291424
|
+
else if (field.isNestedContentField()) {
|
|
291425
|
+
field.nestedFields = field.nestedFields.map((m) => this.getLocalizedContentField(m));
|
|
291426
|
+
}
|
|
291385
291427
|
return field;
|
|
291386
291428
|
}
|
|
291387
291429
|
// warning: this function mutates the category
|
|
@@ -291404,7 +291446,7 @@ class LocalizationHelper {
|
|
|
291404
291446
|
if (typeof value === "string") {
|
|
291405
291447
|
return this.getLocalizedString(value);
|
|
291406
291448
|
}
|
|
291407
|
-
if (
|
|
291449
|
+
if (_content_Value__WEBPACK_IMPORTED_MODULE_2__.DisplayValue.isArray(value)) {
|
|
291408
291450
|
return value.map((v) => this.getLocalizedDisplayValue(v));
|
|
291409
291451
|
}
|
|
291410
291452
|
return Object.entries(value).reduce((o, [k, v]) => ({ ...o, [k]: this.getLocalizedDisplayValue(v) }), {});
|
|
@@ -291574,7 +291616,7 @@ class PresentationRpcInterface extends _itwin_core_common__WEBPACK_IMPORTED_MODU
|
|
|
291574
291616
|
/** The immutable name of the interface. */
|
|
291575
291617
|
PresentationRpcInterface.interfaceName = "PresentationRpcInterface"; // eslint-disable-line @typescript-eslint/naming-convention
|
|
291576
291618
|
/** The semantic version of the interface. */
|
|
291577
|
-
PresentationRpcInterface.interfaceVersion = "4.
|
|
291619
|
+
PresentationRpcInterface.interfaceVersion = "4.1.0";
|
|
291578
291620
|
__decorate([
|
|
291579
291621
|
_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RpcOperation.setPolicy({ allowResponseCompression: true })
|
|
291580
291622
|
// eslint-disable-next-line deprecation/deprecation
|
|
@@ -293312,11 +293354,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293312
293354
|
"use strict";
|
|
293313
293355
|
__webpack_require__.r(__webpack_exports__);
|
|
293314
293356
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
293357
|
+
/* harmony export */ "ArrayPropertiesField": () => (/* binding */ ArrayPropertiesField),
|
|
293315
293358
|
/* harmony export */ "Field": () => (/* binding */ Field),
|
|
293316
293359
|
/* harmony export */ "FieldDescriptor": () => (/* binding */ FieldDescriptor),
|
|
293317
293360
|
/* harmony export */ "FieldDescriptorType": () => (/* binding */ FieldDescriptorType),
|
|
293318
293361
|
/* harmony export */ "NestedContentField": () => (/* binding */ NestedContentField),
|
|
293319
293362
|
/* harmony export */ "PropertiesField": () => (/* binding */ PropertiesField),
|
|
293363
|
+
/* harmony export */ "StructPropertiesField": () => (/* binding */ StructPropertiesField),
|
|
293320
293364
|
/* harmony export */ "getFieldByDescriptor": () => (/* binding */ getFieldByDescriptor),
|
|
293321
293365
|
/* harmony export */ "getFieldByName": () => (/* binding */ getFieldByName)
|
|
293322
293366
|
/* harmony export */ });
|
|
@@ -293337,14 +293381,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
293337
293381
|
|
|
293338
293382
|
|
|
293339
293383
|
|
|
293340
|
-
|
|
293341
|
-
const isPropertiesField = (field) => {
|
|
293384
|
+
function isPropertiesField(field) {
|
|
293342
293385
|
return !!field.properties;
|
|
293343
|
-
}
|
|
293344
|
-
|
|
293345
|
-
|
|
293386
|
+
}
|
|
293387
|
+
function isArrayPropertiesField(field) {
|
|
293388
|
+
return !!field.itemsField;
|
|
293389
|
+
}
|
|
293390
|
+
function isStructPropertiesField(field) {
|
|
293391
|
+
return !!field.memberFields;
|
|
293392
|
+
}
|
|
293393
|
+
function isNestedContentField(field) {
|
|
293346
293394
|
return !!field.nestedFields;
|
|
293347
|
-
}
|
|
293395
|
+
}
|
|
293348
293396
|
/**
|
|
293349
293397
|
* Describes a single content field. A field is usually represented as a grid column
|
|
293350
293398
|
* or a property pane row.
|
|
@@ -293410,23 +293458,7 @@ class Field {
|
|
|
293410
293458
|
};
|
|
293411
293459
|
}
|
|
293412
293460
|
/** Serialize this object to compressed JSON */
|
|
293413
|
-
toCompressedJSON(
|
|
293414
|
-
if (this.isPropertiesField()) {
|
|
293415
|
-
return {
|
|
293416
|
-
...this.toJSON(),
|
|
293417
|
-
properties: this.properties.map((property) => _Property__WEBPACK_IMPORTED_MODULE_4__.Property.toCompressedJSON(property, classesMap)),
|
|
293418
|
-
};
|
|
293419
|
-
}
|
|
293420
|
-
if (this.isNestedContentField()) {
|
|
293421
|
-
const { id, ...leftOverInfo } = this.contentClassInfo;
|
|
293422
|
-
classesMap[id] = leftOverInfo;
|
|
293423
|
-
return {
|
|
293424
|
-
...this.toJSON(),
|
|
293425
|
-
contentClassInfo: id,
|
|
293426
|
-
pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => _EC__WEBPACK_IMPORTED_MODULE_1__.RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),
|
|
293427
|
-
nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),
|
|
293428
|
-
};
|
|
293429
|
-
}
|
|
293461
|
+
toCompressedJSON(_classesMap) {
|
|
293430
293462
|
return this.toJSON();
|
|
293431
293463
|
}
|
|
293432
293464
|
/** Deserialize [[Field]] from JSON */
|
|
@@ -293519,6 +293551,14 @@ class PropertiesField extends Field {
|
|
|
293519
293551
|
super(category, name, label, description, isReadonly, priority, editor, renderer);
|
|
293520
293552
|
this.properties = properties;
|
|
293521
293553
|
}
|
|
293554
|
+
/** Is this a an array property field */
|
|
293555
|
+
isArrayPropertiesField() {
|
|
293556
|
+
return false;
|
|
293557
|
+
}
|
|
293558
|
+
/** Is this a an struct property field */
|
|
293559
|
+
isStructPropertiesField() {
|
|
293560
|
+
return false;
|
|
293561
|
+
}
|
|
293522
293562
|
clone() {
|
|
293523
293563
|
const clone = new PropertiesField(this.category, this.name, this.label, this.type, this.isReadonly, this.priority, this.properties, this.editor, this.renderer);
|
|
293524
293564
|
clone.rebuildParentship(this.parent);
|
|
@@ -293531,11 +293571,24 @@ class PropertiesField extends Field {
|
|
|
293531
293571
|
properties: this.properties,
|
|
293532
293572
|
};
|
|
293533
293573
|
}
|
|
293574
|
+
/** Serialize this object to compressed JSON */
|
|
293575
|
+
toCompressedJSON(classesMap) {
|
|
293576
|
+
return {
|
|
293577
|
+
...super.toCompressedJSON(classesMap),
|
|
293578
|
+
properties: this.properties.map((property) => _Property__WEBPACK_IMPORTED_MODULE_4__.Property.toCompressedJSON(property, classesMap)),
|
|
293579
|
+
};
|
|
293580
|
+
}
|
|
293534
293581
|
/** Deserialize [[PropertiesField]] from JSON */
|
|
293535
293582
|
static fromJSON(json, categories) {
|
|
293536
293583
|
if (!json) {
|
|
293537
293584
|
return undefined;
|
|
293538
293585
|
}
|
|
293586
|
+
if (isArrayPropertiesField(json)) {
|
|
293587
|
+
return ArrayPropertiesField.fromJSON(json, categories);
|
|
293588
|
+
}
|
|
293589
|
+
if (isStructPropertiesField(json)) {
|
|
293590
|
+
return StructPropertiesField.fromJSON(json, categories);
|
|
293591
|
+
}
|
|
293539
293592
|
const field = Object.create(PropertiesField.prototype);
|
|
293540
293593
|
return Object.assign(field, json, {
|
|
293541
293594
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
@@ -293546,6 +293599,12 @@ class PropertiesField extends Field {
|
|
|
293546
293599
|
* @public
|
|
293547
293600
|
*/
|
|
293548
293601
|
static fromCompressedJSON(json, classesMap, categories) {
|
|
293602
|
+
if (isArrayPropertiesField(json)) {
|
|
293603
|
+
return ArrayPropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
293604
|
+
}
|
|
293605
|
+
if (isStructPropertiesField(json)) {
|
|
293606
|
+
return StructPropertiesField.fromCompressedJSON(json, classesMap, categories);
|
|
293607
|
+
}
|
|
293549
293608
|
const field = Object.create(PropertiesField.prototype);
|
|
293550
293609
|
return Object.assign(field, json, {
|
|
293551
293610
|
category: this.getCategoryFromFieldJson(json, categories),
|
|
@@ -293604,6 +293663,110 @@ class PropertiesField extends Field {
|
|
|
293604
293663
|
return true;
|
|
293605
293664
|
}
|
|
293606
293665
|
}
|
|
293666
|
+
/**
|
|
293667
|
+
* Describes a content field that's based on one or more similar EC array properties.
|
|
293668
|
+
* @public
|
|
293669
|
+
*/
|
|
293670
|
+
class ArrayPropertiesField extends PropertiesField {
|
|
293671
|
+
constructor(category, name, label, description, itemsField, isReadonly, priority, properties, editor, renderer) {
|
|
293672
|
+
super(category, name, label, description, isReadonly, priority, properties, editor, renderer);
|
|
293673
|
+
this.itemsField = itemsField;
|
|
293674
|
+
}
|
|
293675
|
+
isArrayPropertiesField() {
|
|
293676
|
+
return true;
|
|
293677
|
+
}
|
|
293678
|
+
clone() {
|
|
293679
|
+
const clone = new ArrayPropertiesField(this.category, this.name, this.label, this.type, this.itemsField.clone(), this.isReadonly, this.priority, this.properties, this.editor, this.renderer);
|
|
293680
|
+
clone.rebuildParentship(this.parent);
|
|
293681
|
+
return clone;
|
|
293682
|
+
}
|
|
293683
|
+
/** Serialize this object to JSON */
|
|
293684
|
+
toJSON() {
|
|
293685
|
+
return {
|
|
293686
|
+
...super.toJSON(),
|
|
293687
|
+
itemsField: this.itemsField.toJSON(),
|
|
293688
|
+
};
|
|
293689
|
+
}
|
|
293690
|
+
/** Serialize this object to compressed JSON */
|
|
293691
|
+
toCompressedJSON(classesMap) {
|
|
293692
|
+
return {
|
|
293693
|
+
...super.toCompressedJSON(classesMap),
|
|
293694
|
+
itemsField: this.itemsField.toCompressedJSON(classesMap),
|
|
293695
|
+
};
|
|
293696
|
+
}
|
|
293697
|
+
/** Deserialize [[ArrayPropertiesField]] from JSON */
|
|
293698
|
+
static fromJSON(json, categories) {
|
|
293699
|
+
const field = Object.create(ArrayPropertiesField.prototype);
|
|
293700
|
+
return Object.assign(field, json, {
|
|
293701
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
293702
|
+
itemsField: PropertiesField.fromJSON(json.itemsField, categories),
|
|
293703
|
+
});
|
|
293704
|
+
}
|
|
293705
|
+
/**
|
|
293706
|
+
* Deserialize an [[ArrayPropertiesField]] from compressed JSON.
|
|
293707
|
+
* @public
|
|
293708
|
+
*/
|
|
293709
|
+
static fromCompressedJSON(json, classesMap, categories) {
|
|
293710
|
+
const field = Object.create(ArrayPropertiesField.prototype);
|
|
293711
|
+
return Object.assign(field, json, {
|
|
293712
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
293713
|
+
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
293714
|
+
itemsField: PropertiesField.fromCompressedJSON(json.itemsField, classesMap, categories),
|
|
293715
|
+
});
|
|
293716
|
+
}
|
|
293717
|
+
}
|
|
293718
|
+
/**
|
|
293719
|
+
* Describes a content field that's based on one or more similar EC struct properties.
|
|
293720
|
+
* @public
|
|
293721
|
+
*/
|
|
293722
|
+
class StructPropertiesField extends PropertiesField {
|
|
293723
|
+
constructor(category, name, label, description, memberFields, isReadonly, priority, properties, editor, renderer) {
|
|
293724
|
+
super(category, name, label, description, isReadonly, priority, properties, editor, renderer);
|
|
293725
|
+
this.memberFields = memberFields;
|
|
293726
|
+
}
|
|
293727
|
+
isStructPropertiesField() {
|
|
293728
|
+
return true;
|
|
293729
|
+
}
|
|
293730
|
+
clone() {
|
|
293731
|
+
const clone = new StructPropertiesField(this.category, this.name, this.label, this.type, this.memberFields.map((m) => m.clone()), this.isReadonly, this.priority, this.properties, this.editor, this.renderer);
|
|
293732
|
+
clone.rebuildParentship(this.parent);
|
|
293733
|
+
return clone;
|
|
293734
|
+
}
|
|
293735
|
+
/** Serialize this object to JSON */
|
|
293736
|
+
toJSON() {
|
|
293737
|
+
return {
|
|
293738
|
+
...super.toJSON(),
|
|
293739
|
+
memberFields: this.memberFields.map((m) => m.toJSON()),
|
|
293740
|
+
};
|
|
293741
|
+
}
|
|
293742
|
+
/** Serialize this object to compressed JSON */
|
|
293743
|
+
toCompressedJSON(classesMap) {
|
|
293744
|
+
return {
|
|
293745
|
+
...super.toCompressedJSON(classesMap),
|
|
293746
|
+
memberFields: this.memberFields.map((m) => m.toCompressedJSON(classesMap)),
|
|
293747
|
+
};
|
|
293748
|
+
}
|
|
293749
|
+
/** Deserialize [[StructPropertiesField]] from JSON */
|
|
293750
|
+
static fromJSON(json, categories) {
|
|
293751
|
+
const field = Object.create(StructPropertiesField.prototype);
|
|
293752
|
+
return Object.assign(field, json, {
|
|
293753
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
293754
|
+
memberFields: json.memberFields.map((m) => PropertiesField.fromJSON(m, categories)),
|
|
293755
|
+
});
|
|
293756
|
+
}
|
|
293757
|
+
/**
|
|
293758
|
+
* Deserialize a [[StructPropertiesField]] from compressed JSON.
|
|
293759
|
+
* @public
|
|
293760
|
+
*/
|
|
293761
|
+
static fromCompressedJSON(json, classesMap, categories) {
|
|
293762
|
+
const field = Object.create(StructPropertiesField.prototype);
|
|
293763
|
+
return Object.assign(field, json, {
|
|
293764
|
+
category: this.getCategoryFromFieldJson(json, categories),
|
|
293765
|
+
properties: json.properties.map((propertyJson) => fromCompressedPropertyJSON(propertyJson, classesMap)),
|
|
293766
|
+
memberFields: json.memberFields.map((m) => PropertiesField.fromCompressedJSON(m, classesMap, categories)),
|
|
293767
|
+
});
|
|
293768
|
+
}
|
|
293769
|
+
}
|
|
293607
293770
|
/**
|
|
293608
293771
|
* Describes a content field that contains [Nested content]($docs/presentation/content/Terminology#nested-content).
|
|
293609
293772
|
*
|
|
@@ -293662,6 +293825,17 @@ class NestedContentField extends Field {
|
|
|
293662
293825
|
autoExpand: this.autoExpand,
|
|
293663
293826
|
};
|
|
293664
293827
|
}
|
|
293828
|
+
/** Serialize this object to compressed JSON */
|
|
293829
|
+
toCompressedJSON(classesMap) {
|
|
293830
|
+
const { id, ...leftOverInfo } = this.contentClassInfo;
|
|
293831
|
+
classesMap[id] = leftOverInfo;
|
|
293832
|
+
return {
|
|
293833
|
+
...super.toCompressedJSON(classesMap),
|
|
293834
|
+
contentClassInfo: id,
|
|
293835
|
+
pathToPrimaryClass: this.pathToPrimaryClass.map((classInfo) => _EC__WEBPACK_IMPORTED_MODULE_1__.RelatedClassInfo.toCompressedJSON(classInfo, classesMap)),
|
|
293836
|
+
nestedFields: this.nestedFields.map((field) => field.toCompressedJSON(classesMap)),
|
|
293837
|
+
};
|
|
293838
|
+
}
|
|
293665
293839
|
/**
|
|
293666
293840
|
* Deserialize [[NestedContentField]] from JSON
|
|
293667
293841
|
* @deprecated in 3.x. Use [[NestedContentField.fromCompressedJSON]]
|
|
@@ -294022,6 +294196,11 @@ class ContentFormatter {
|
|
|
294022
294196
|
await this.formatNestedContentDisplayValues(value, field.nestedFields);
|
|
294023
294197
|
continue;
|
|
294024
294198
|
}
|
|
294199
|
+
// format property items
|
|
294200
|
+
if (field.isPropertiesField()) {
|
|
294201
|
+
displayValues[field.name] = await this.formatPropertyValue(value, field);
|
|
294202
|
+
continue;
|
|
294203
|
+
}
|
|
294025
294204
|
displayValues[field.name] = await this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);
|
|
294026
294205
|
}
|
|
294027
294206
|
}
|
|
@@ -294030,6 +294209,27 @@ class ContentFormatter {
|
|
|
294030
294209
|
await this.formatValues(nestedValue.values, nestedValue.displayValues, fields, nestedValue.mergedFieldNames);
|
|
294031
294210
|
}
|
|
294032
294211
|
}
|
|
294212
|
+
async formatPropertyValue(value, field) {
|
|
294213
|
+
if (field.isArrayPropertiesField()) {
|
|
294214
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isArray(value));
|
|
294215
|
+
return this.formatArrayItems(value, field);
|
|
294216
|
+
}
|
|
294217
|
+
if (field.isStructPropertiesField()) {
|
|
294218
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isMap(value));
|
|
294219
|
+
return this.formatStructMembers(value, field);
|
|
294220
|
+
}
|
|
294221
|
+
return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);
|
|
294222
|
+
}
|
|
294223
|
+
async formatArrayItems(itemValues, field) {
|
|
294224
|
+
return Promise.all(itemValues.map(async (value) => this.formatPropertyValue(value, field.itemsField)));
|
|
294225
|
+
}
|
|
294226
|
+
async formatStructMembers(memberValues, field) {
|
|
294227
|
+
const displayValues = {};
|
|
294228
|
+
await Promise.all(field.memberFields.map(async (memberField) => {
|
|
294229
|
+
displayValues[memberField.name] = await this.formatPropertyValue(memberValues[memberField.name], memberField);
|
|
294230
|
+
}));
|
|
294231
|
+
return displayValues;
|
|
294232
|
+
}
|
|
294033
294233
|
}
|
|
294034
294234
|
/** @alpha */
|
|
294035
294235
|
class ContentPropertyValueFormatter {
|
|
@@ -309112,7 +309312,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
309112
309312
|
/***/ ((module) => {
|
|
309113
309313
|
|
|
309114
309314
|
"use strict";
|
|
309115
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.5.0-dev.
|
|
309315
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.5.0-dev.36","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 --includes=../../generated-docs/extract --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 -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./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 -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","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:^4.5.0-dev.36","@itwin/core-bentley":"workspace:^4.5.0-dev.36","@itwin/core-common":"workspace:^4.5.0-dev.36","@itwin/core-geometry":"workspace:^4.5.0-dev.36","@itwin/core-orbitgt":"workspace:^4.5.0-dev.36","@itwin/core-quantity":"workspace:^4.5.0-dev.36"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//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.1.0","@itwin/object-storage-core":"^2.2.2","@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"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
309116
309316
|
|
|
309117
309317
|
/***/ }),
|
|
309118
309318
|
|