Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@bentley/imodeljs-editor-frontend

Package Overview
Dependencies
120
Maintainers
4
Versions
405
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-dev.64 to 3.0.0-dev.65

4

lib/CreateElementTool.js

@@ -60,3 +60,3 @@ "use strict";

let is3d;
if (is3d = imodeljs_common_1.isPlacement3dProps(placement)) {
if (is3d = (0, imodeljs_common_1.isPlacement3dProps)(placement)) {
const requestProps = {

@@ -90,3 +90,3 @@ id: this.getRequestId(this.elementId ? this.elementId : bentleyjs_core_1.Id64.invalid),

return;
const graphic = await imodeljs_frontend_1.readElementGraphics(graphicData, this.iModel, this.modelId ? this.modelId : bentleyjs_core_1.Id64.invalid, is3d, { noFlash: true, noHilite: true });
const graphic = await (0, imodeljs_frontend_1.readElementGraphics)(graphicData, this.iModel, this.modelId ? this.modelId : bentleyjs_core_1.Id64.invalid, is3d, { noFlash: true, noHilite: true });
if (undefined === graphic)

@@ -93,0 +93,0 @@ return;

@@ -29,3 +29,3 @@ "use strict";

catch (err) {
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, err.toString()));
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, (0, bentleyjs_core_1.getErrorMessage)(err) || "An unknown error occurred."));
}

@@ -32,0 +32,0 @@ }

@@ -42,4 +42,6 @@ /** @packageDocumentation

protected _startedCmd?: string;
protected readonly _checkedIds: Map<string, boolean>;
protected _graphicsProvider?: ElementGeometryGraphicsProvider;
protected _graphicsPending?: true | undefined;
protected _firstResult: boolean;
protected allowView(vp: Viewport): boolean;

@@ -52,4 +54,3 @@ isCompatibleViewport(vp: Viewport | undefined, isSelectedViewChange: boolean): boolean;

addFeatureOverrides(overrides: FeatureSymbology.Overrides, _vp: Viewport): void;
protected updateAgendaAppearanceProvider(): void;
protected onAgendaModified(): Promise<void>;
protected updateAgendaAppearanceProvider(drop?: true): void;
protected get geometryCacheFilter(): ElementGeometryCacheFilter | undefined;

@@ -64,2 +65,5 @@ protected isElementValidForOperation(hit: HitDetail, out?: LocateResponse): Promise<boolean>;

protected clearElementGeometryCache(): Promise<void>;
onUnsuspend(): Promise<void>;
onSuspend(): Promise<void>;
onPostInstall(): Promise<void>;
onCleanup(): Promise<void>;

@@ -66,0 +70,0 @@ }

@@ -28,3 +28,3 @@ "use strict";

try {
const graphic = await imodeljs_frontend_1.readElementGraphics(graphicData, this.iModel, bentleyjs_core_1.Id64.invalid, true, { noFlash: true, noHilite: true });
const graphic = await (0, imodeljs_frontend_1.readElementGraphics)(graphicData, this.iModel, bentleyjs_core_1.Id64.invalid, true, { noFlash: true, noHilite: true });
const graphicOwner = graphic ? imodeljs_frontend_1.IModelApp.renderSystem.createGraphicOwner(graphic) : undefined;

@@ -149,2 +149,7 @@ this.cleanupGraphic();

class ElementGeometryCacheTool extends imodeljs_frontend_1.ElementSetTool {
constructor() {
super(...arguments);
this._checkedIds = new Map();
this._firstResult = true;
}
allowView(vp) { return vp.view.is3d(); }

@@ -169,3 +174,3 @@ isCompatibleViewport(vp, isSelectedViewChange) { return (super.isCompatibleViewport(vp, isSelectedViewChange) && undefined !== vp && this.allowView(vp)); }

}
updateAgendaAppearanceProvider() {
updateAgendaAppearanceProvider(drop) {
if (!this.wantAgendaAppearanceOverride)

@@ -176,3 +181,3 @@ return;

continue;
if (this.agenda.isEmpty)
if (drop || this.agenda.isEmpty)
vp.dropFeatureOverrideProvider(this);

@@ -183,18 +188,20 @@ else if (!vp.addFeatureOverrideProvider(this))

}
async onAgendaModified() {
this.updateAgendaAppearanceProvider();
return super.onAgendaModified();
}
get geometryCacheFilter() { return undefined; }
async isElementValidForOperation(hit, out) {
// TODO: Cache accept status...
if (!await super.isElementValidForOperation(hit, out))
return false;
try {
this._startedCmd = await this.startCommand();
return await ElementGeometryCacheTool.callCommand("createElementGeometryCache", hit.sourceId, this.geometryCacheFilter);
}
catch (err) {
if (!hit.isElementHit)
return false;
let accept = this._checkedIds.get(hit.sourceId);
if (undefined === accept) {
try {
this._startedCmd = await this.startCommand();
accept = await ElementGeometryCacheTool.callCommand("createElementGeometryCache", hit.sourceId, this.geometryCacheFilter);
}
catch (err) {
accept = false;
}
this._checkedIds.set(hit.sourceId, accept);
}
return accept;
}

@@ -215,4 +222,9 @@ onDynamicFrame(_ev, context) {

this._graphicsPending = undefined;
if (undefined !== graphicData)
if (undefined !== graphicData) {
if (this._firstResult) {
this.updateAgendaAppearanceProvider();
this._firstResult = false;
}
return this.createGraphic(graphicData);
}
if (undefined !== this._graphicsProvider)

@@ -239,6 +251,21 @@ this._graphicsProvider.cleanupGraphic();

}
async onUnsuspend() {
if (!this._firstResult)
this.updateAgendaAppearanceProvider();
return super.onUnsuspend();
}
async onSuspend() {
if (!this._firstResult)
this.updateAgendaAppearanceProvider(true);
return super.onSuspend();
}
async onPostInstall() {
await super.onPostInstall();
if (this.wantAgendaAppearanceOverride)
this.agenda.manageHiliteState = false;
}
async onCleanup() {
await super.onCleanup(); // Empty agenda before updateAgendaAppearanceProvider...
this.updateAgendaAppearanceProvider();
await super.onCleanup();
await this.clearElementGeometryCache();
this.updateAgendaAppearanceProvider(true);
this.clearGraphic();

@@ -316,3 +343,3 @@ }

}
if (undefined !== this._currentSubEntity && this._currentSubEntity.isSame(current.subEntity))
if (undefined !== this._currentSubEntity && this._currentSubEntity.hasGraphic && this._currentSubEntity.isSame(current.subEntity))
return false;

@@ -349,3 +376,3 @@ if (undefined === this._currentSubEntity)

const current = await this.doPickSubEntities(hit.sourceId, boresite);
const chordTolerance = current ? CreateElementTool_1.computeChordToleranceFromPoint(ev.viewport, geometry_core_1.Point3d.fromJSON(current.point)) : 0.0;
const chordTolerance = current ? (0, CreateElementTool_1.computeChordToleranceFromPoint)(ev.viewport, geometry_core_1.Point3d.fromJSON(current.point)) : 0.0;
if (!await this.setCurrentSubEntity(hit.sourceId, current, chordTolerance))

@@ -385,3 +412,3 @@ return false;

wantGraphic: isAccept ? undefined : true,
chordTolerance: CreateElementTool_1.computeChordToleranceFromPoint(ev.viewport, ev.point),
chordTolerance: (0, CreateElementTool_1.computeChordToleranceFromPoint)(ev.viewport, ev.point),
requestId: `${this.toolId}:${this.agenda.elements[0]}`,

@@ -388,0 +415,0 @@ writeChanges: isAccept ? true : undefined,

@@ -794,3 +794,3 @@ "use strict";

catch (err) {
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, err.toString()));
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, (0, bentleyjs_core_1.getErrorMessage)(err) || "An unknown error occurred."));
}

@@ -797,0 +797,0 @@ deco.onChanged.raiseEvent(deco.iModel, ProjectLocationChanged.Save);

@@ -34,3 +34,3 @@ "use strict";

return;
const placement = imodeljs_common_1.isPlacement2dProps(placementProps) ? imodeljs_common_1.Placement2d.fromJSON(placementProps) : imodeljs_common_1.Placement3d.fromJSON(placementProps);
const placement = (0, imodeljs_common_1.isPlacement2dProps)(placementProps) ? imodeljs_common_1.Placement2d.fromJSON(placementProps) : imodeljs_common_1.Placement3d.fromJSON(placementProps);
if (!placement.isValid)

@@ -47,3 +47,3 @@ return; // Ignore assembly parents w/o geometry, etc...

return;
const graphic = await imodeljs_frontend_1.readElementGraphics(graphicData, this.iModel, elementProps[0].model, placement.is3d, { noFlash: true, noHilite: true });
const graphic = await (0, imodeljs_frontend_1.readElementGraphics)(graphicData, this.iModel, elementProps[0].model, placement.is3d, { noFlash: true, noHilite: true });
if (undefined === graphic)

@@ -206,3 +206,3 @@ return;

catch (err) {
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, err.toString()));
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, (0, bentleyjs_core_1.getErrorMessage)(err) || "An unknown error occurred."));
}

@@ -374,3 +374,3 @@ }

catch (err) {
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, err.toString()));
imodeljs_frontend_1.IModelApp.notifications.outputMessage(new imodeljs_frontend_1.NotifyMessageDetails(imodeljs_frontend_1.OutputMessagePriority.Error, (0, bentleyjs_core_1.getErrorMessage)(err) || "An unknown error occurred."));
}

@@ -377,0 +377,0 @@ }

{
"name": "@bentley/imodeljs-editor-frontend",
"version": "3.0.0-dev.64",
"version": "3.0.0-dev.65",
"description": "iModel.js frontend components",

@@ -25,5 +25,5 @@ "main": "lib/imodeljs-editor-frontend.js",

"peerDependencies": {
"@bentley/bentleyjs-core": "^3.0.0-dev.64",
"@bentley/imodeljs-common": "^3.0.0-dev.64",
"@bentley/imodeljs-i18n": "^3.0.0-dev.64"
"@bentley/bentleyjs-core": "^3.0.0-dev.65",
"@bentley/imodeljs-common": "^3.0.0-dev.65",
"@bentley/imodeljs-i18n": "^3.0.0-dev.65"
},

@@ -35,8 +35,8 @@ "//devDependencies": [

"devDependencies": {
"@bentley/bentleyjs-core": "3.0.0-dev.64",
"@bentley/build-tools": "3.0.0-dev.64",
"@bentley/certa": "3.0.0-dev.64",
"@bentley/eslint-plugin": "3.0.0-dev.64",
"@bentley/imodeljs-common": "3.0.0-dev.64",
"@bentley/imodeljs-i18n": "3.0.0-dev.64",
"@bentley/bentleyjs-core": "3.0.0-dev.65",
"@bentley/build-tools": "3.0.0-dev.65",
"@bentley/certa": "3.0.0-dev.65",
"@bentley/eslint-plugin": "3.0.0-dev.65",
"@bentley/imodeljs-common": "3.0.0-dev.65",
"@bentley/imodeljs-i18n": "3.0.0-dev.65",
"@types/chai": "^4.1.4",

@@ -54,3 +54,3 @@ "@types/mocha": "^8.2.2",

"source-map-loader": "^1.0.0",
"typescript": "~4.3.0"
"typescript": "~4.4.0"
},

@@ -62,6 +62,6 @@ "//dependencies": [

"dependencies": {
"@bentley/geometry-core": "3.0.0-dev.64",
"@bentley/imodeljs-editor-common": "3.0.0-dev.64",
"@bentley/imodeljs-frontend": "3.0.0-dev.64",
"@bentley/ui-abstract": "3.0.0-dev.64"
"@bentley/geometry-core": "3.0.0-dev.65",
"@bentley/imodeljs-editor-common": "3.0.0-dev.65",
"@bentley/imodeljs-frontend": "3.0.0-dev.65",
"@bentley/ui-abstract": "3.0.0-dev.65"
},

@@ -68,0 +68,0 @@ "eslintConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc