Socket
Socket
Sign inDemoInstall

@shapediver/viewer.shared.services

Package Overview
Dependencies
Maintainers
5
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shapediver/viewer.shared.services - npm Package Compare versions

Comparing version 1.6.5 to 1.6.6

2

dist/dom-event-engine/DomEventEngine.d.ts

@@ -10,3 +10,3 @@ import { IDomEventListener } from './IDomEventListener';

addDomEventListener(listener: IDomEventListener): string;
removeDomEventListener(id: string): void;
removeDomEventListener(id: string): boolean;
removeAllDomEventListener(): void;

@@ -13,0 +13,0 @@ dispose(): void;

@@ -21,4 +21,7 @@ "use strict";

removeDomEventListener(id) {
if (this._domEventListeners[id])
if (this._domEventListeners[id]) {
delete this._domEventListeners[id];
return true;
}
return false;
}

@@ -25,0 +28,0 @@ removeAllDomEventListener() {

@@ -26,2 +26,3 @@ export declare enum CAMERA {

SESSION_CUSTOMIZED = "session.customized",
SESSION_INITIAL_OUTPUTS_LOADED = "session.initialOutputsLoaded",
SESSION_CLOSED = "session.closed"

@@ -43,4 +44,3 @@ }

};
export declare type EVENTTYPE = typeof EVENTTYPE;
export declare type MAINEVENTTYPE = typeof CAMERA | typeof ENVIRONMENTMAP | typeof RENDERING | typeof SCENE | typeof SESSION | typeof SETTINGS | typeof VIEWER;
//# sourceMappingURL=EventTypes.d.ts.map

@@ -35,2 +35,3 @@ "use strict";

SESSION["SESSION_CUSTOMIZED"] = "session.customized";
SESSION["SESSION_INITIAL_OUTPUTS_LOADED"] = "session.initialOutputsLoaded";
SESSION["SESSION_CLOSED"] = "session.closed";

@@ -37,0 +38,0 @@ })(SESSION = exports.SESSION || (exports.SESSION = {}));

@@ -1,39 +0,3 @@

import { vec3 } from "gl-matrix";
export interface IViewerEvent {
viewerId: string;
cameraId?: string;
environmentMapId?: string;
anchorId?: string;
lightId?: string;
boundingBox?: {
min: vec3;
max: vec3;
};
export interface IEvent {
}
export interface ISessionEvent {
sessionId: string;
exportId?: string;
parameterId?: string;
sections?: {
session: {
parameter: {
displayname?: boolean;
order?: boolean;
hidden?: boolean;
};
export: {
displayname?: boolean;
order?: boolean;
hidden?: boolean;
};
};
viewer: {
scene?: boolean;
camera?: boolean;
light?: boolean;
environment?: boolean;
};
};
}
export declare type IEvent = IViewerEvent | ISessionEvent;
//# sourceMappingURL=IEvent.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
;
//# sourceMappingURL=IEvent.js.map

@@ -8,3 +8,3 @@ import { EventEngine } from './event-engine/EventEngine';

import { IDomEventListener } from './dom-event-engine/IDomEventListener';
import { IEvent, ISessionEvent, IViewerEvent } from './event-engine/interfaces/IEvent';
import { IEvent } from './event-engine/interfaces/IEvent';
import { Converter } from './converter/Converter';

@@ -20,3 +20,3 @@ import { HttpClient } from './http-client/HttpClient';

import { MimeTypeUtils } from './mime-type-utils/MimeTypeUtils';
export { EventEngine, EVENTTYPE, MAINEVENTTYPE, IEvent, IViewerEvent, ISessionEvent };
export { EventEngine, EVENTTYPE, MAINEVENTTYPE, IEvent };
export { SettingsEngine };

@@ -23,0 +23,0 @@ export { StateEngine };

@@ -78,22 +78,25 @@ "use strict";

loadSettings(json, sessionId, loadAsPrimary = false) {
try {
viewer_settings_1.validate(json, '3.0');
this._version = '3.0';
if (JSON.stringify(json) !== JSON.stringify({})) {
try {
viewer_settings_1.validate(json, '3.0');
this._version = '3.0';
}
catch (e) {
if (!(e.message && e.message.includes('The settings do have a different version than the target version.')))
this._logger.error(Logger_1.LOGGINGTOPIC.SETTINGS, new SDError_1.SDError(e.message, e), 'Settings could not be validated.', false, true);
}
try {
viewer_settings_1.validate(json, '2.0');
this._version = '2.0';
}
catch (e) { }
try {
viewer_settings_1.validate(json, '1.0');
this._version = '1.0';
}
catch (e) { }
}
catch (e) {
if (!(e.message && e.message.includes('The settings do have a different version than the target version.')))
this._logger.error(Logger_1.LOGGINGTOPIC.SETTINGS, new SDError_1.SDError(e.message, e), 'Settings could not be validated.', false, true);
}
try {
viewer_settings_1.validate(json, '2.0');
this._version = '2.0';
}
catch (e) { }
try {
viewer_settings_1.validate(json, '1.0');
this._version = '1.0';
}
catch (e) { }
if (!this._version) {
this._version = '3.0';
this._settings = viewer_settings_1.DefaultsV3();
this._eventEngine.emitEvent(EventTypes_1.EVENTTYPE.SETTINGS.SETTINGS_REGISTERED, { sessionId });

@@ -100,0 +103,0 @@ }

@@ -6,2 +6,3 @@ import { StatePromise } from './StatePromise';

private readonly _primarySessionLoaded;
private readonly _primarySessionInitialOutputsLoaded;
private readonly _primarySettingsRegistered;

@@ -15,2 +16,3 @@ private readonly _firstViewerShown;

get primarySessionLoaded(): StatePromise<boolean>;
get primarySessionInitialOutputsLoaded(): StatePromise<boolean>;
get firstViewerShown(): StatePromise<boolean>;

@@ -17,0 +19,0 @@ get fontLoaded(): StatePromise<boolean>;

@@ -23,9 +23,5 @@ "use strict";

this._primarySessionLoaded = new StatePromise_1.StatePromise();
this._primarySessionInitialOutputsLoaded = new StatePromise_1.StatePromise();
this._firstViewerShown = new StatePromise_1.StatePromise();
this._fontLoaded = new StatePromise_1.StatePromise();
this._eventEngine.addListener(index_1.EVENTTYPE.SETTINGS.SETTINGS_REGISTERED, (e) => {
const sessionEvent = e;
if (sessionEvent.sessionId)
this.getCustomState(sessionEvent.sessionId + '_settings_registered').resolve(true);
});
}

@@ -41,2 +37,5 @@ get primarySettingsRegistered() {

}
get primarySessionInitialOutputsLoaded() {
return this._primarySessionInitialOutputsLoaded;
}
get firstViewerShown() {

@@ -43,0 +42,0 @@ return this._firstViewerShown;

{
"name": "@shapediver/viewer.shared.services",
"version": "1.6.5",
"version": "1.6.6",
"description": "",

@@ -42,4 +42,4 @@ "keywords": [],

"@sentry/tracing": "^6.7.2",
"@shapediver/viewer.settings": "^0.1.12",
"@shapediver/viewer.shared.build-data": "^1.6.5",
"@shapediver/viewer.settings": "*",
"@shapediver/viewer.shared.build-data": "^1.6.6",
"@types/ua-parser-js": "^0.7.36",

@@ -53,3 +53,3 @@ "@types/uuid": "^8.3.0",

},
"gitHead": "1463353b90fb0b93c53a1a70f02332588a7e1cb0"
"gitHead": "c609455a59e94ede70b624764205ac14ae95004d"
}

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 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc