fcs-core-viewer 0.9.2 → 0.10.0
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/fcs-core-viewer@types/Api.d.ts +1 -0
- package/fcs-core-viewer@types/BackendEvents/BackendEvents.d.ts +2 -2
- package/fcs-core-viewer@types/CloudViewer/FcsViewer.d.ts +23 -38
- package/fcs-core-viewer@types/FrontendEvents/SidebarEvents.d.ts +6 -4
- package/fcs-core-viewer@types/UserInterface/UIComponents/Index.d.ts +5 -0
- package/fcs-core-viewer@types/UserInterface/UIComponents/MainMenu/Toolboxes/BaseToolbox.d.ts +3 -0
- package/fcs-core-viewer@types/UserInterface/UIComponents/MainMenu/Toolboxes/CADToolbox.d.ts +2 -1
- package/fcs-core-viewer@types/UserInterface/UIComponents/MainMenu/Toolboxes/CAEToolbox.d.ts +2 -1
- package/fcs-core-viewer@types/UserInterface/UIComponents/MainMenu/Toolboxes/ToolboxBuilder.d.ts +4 -0
- package/fcs-core-viewer@types/UserInterface/UiApi_deprecated/PluginExample/Plugin.d.ts +1 -0
- package/package.json +1 -1
|
@@ -94,7 +94,7 @@ export declare class BackendEvents implements IBackendEvents {
|
|
|
94
94
|
* Contains guid to backend service mappings.
|
|
95
95
|
*/
|
|
96
96
|
attachedServices: {
|
|
97
|
-
[key: string]: CloudViewer.
|
|
97
|
+
[key: string]: CloudViewer.PluginService;
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* Contains all approved guids
|
|
@@ -122,7 +122,7 @@ export declare class BackendEvents implements IBackendEvents {
|
|
|
122
122
|
* @param service
|
|
123
123
|
* @param serviceMethod
|
|
124
124
|
*/
|
|
125
|
-
attachService(service: CloudViewer.
|
|
125
|
+
attachService(service: CloudViewer.PluginService): void;
|
|
126
126
|
/**
|
|
127
127
|
* We pass in a function that will be called when the backend task finishes.
|
|
128
128
|
* We save this method in a dictionary where it will receive a GUID.
|
|
@@ -31,7 +31,7 @@ export declare namespace CloudViewer {
|
|
|
31
31
|
private _canvas;
|
|
32
32
|
private _initSettings;
|
|
33
33
|
private _viewerWrapper;
|
|
34
|
-
private
|
|
34
|
+
private _registeredPlugins;
|
|
35
35
|
private _backendManager;
|
|
36
36
|
private _activeSelectionFilter;
|
|
37
37
|
private _onSelectionEvent;
|
|
@@ -42,22 +42,6 @@ export declare namespace CloudViewer {
|
|
|
42
42
|
* Constructor to instantiate viewer.
|
|
43
43
|
*/
|
|
44
44
|
constructor(container: HTMLDivElement, initSettings?: ViewerSettings, licenseToken?: string, disallowSocketCallbacks?: boolean);
|
|
45
|
-
/**
|
|
46
|
-
* Constructs a top level item with geometric definition.
|
|
47
|
-
* @param itemId Unique ID of the item.
|
|
48
|
-
* @param itemName Name of the item.
|
|
49
|
-
* @param stlFileUrl Public download URL for STL file.
|
|
50
|
-
* @param t2gFileUrl Public download URL for T2G file.
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Places an item with geometric definition under a specified already existing item.
|
|
54
|
-
* @param itemId Unique ID of the item.
|
|
55
|
-
* @param parentId Unique ID of the item's parent.
|
|
56
|
-
* @param itemName Name of the item.
|
|
57
|
-
* @param stlFileUrl Public download URL for STL file.
|
|
58
|
-
* @param t2gFileUrl Public download URL for T2G file.
|
|
59
|
-
*/
|
|
60
|
-
addToDocumentUnder(itemId: number, parentId: number, itemName: string, stlFileUrl: string, t2gFileUrl: string, isCADModel: boolean): Promise<void>;
|
|
61
45
|
/**
|
|
62
46
|
* Generates a unique id in the viewer
|
|
63
47
|
*/
|
|
@@ -112,17 +96,21 @@ export declare namespace CloudViewer {
|
|
|
112
96
|
* Method for forwarding commands with args.
|
|
113
97
|
* @param service
|
|
114
98
|
*/
|
|
115
|
-
forwardCommandForService(service:
|
|
99
|
+
forwardCommandForService(service: PluginService, commandName: string, commandArgs: {
|
|
100
|
+
[key: string]: any;
|
|
101
|
+
}): Promise<void>;
|
|
116
102
|
/**
|
|
117
103
|
* Method for forwarding commands with args.
|
|
118
104
|
* @param service
|
|
119
105
|
*/
|
|
120
|
-
forwardCommandForServiceBlob(service:
|
|
106
|
+
forwardCommandForServiceBlob(service: PluginService, commandName: string, commandFile: File, commandArgs: any): Promise<void>;
|
|
121
107
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
108
|
+
* Loads a specific module of a plugin. Every single service that is
|
|
109
|
+
* required to be used needs to be manually specified here.
|
|
110
|
+
* @param pluginName Name of the backend service module we
|
|
111
|
+
* @param pluginClassName
|
|
124
112
|
*/
|
|
125
|
-
|
|
113
|
+
loadPlugin(pluginService: PluginService): Promise<void>;
|
|
126
114
|
/**
|
|
127
115
|
* Use this method to startup the viewer. If no backend service is registered.
|
|
128
116
|
*/
|
|
@@ -273,9 +261,6 @@ export declare namespace CloudViewer {
|
|
|
273
261
|
* @param temoraryGroup Temporary group that will store the annotation
|
|
274
262
|
*/
|
|
275
263
|
addAnnotation(annotation: AnnotationEntities.AnnotationElement, temoraryGroup: TemporaryEntities.TemporaryGroup): void;
|
|
276
|
-
/**
|
|
277
|
-
* Functions required for manipulating the model tree
|
|
278
|
-
*/
|
|
279
264
|
/**
|
|
280
265
|
* The returned JSON contains detailed hierarchical informations
|
|
281
266
|
* how the model is setup.
|
|
@@ -288,7 +273,7 @@ export declare namespace CloudViewer {
|
|
|
288
273
|
*/
|
|
289
274
|
getComponents(): {};
|
|
290
275
|
/**
|
|
291
|
-
*
|
|
276
|
+
* Available face UIDs visible are returned.
|
|
292
277
|
* @returns List of unique face IDs.
|
|
293
278
|
*/
|
|
294
279
|
getFaceUIDs(): any[];
|
|
@@ -327,7 +312,7 @@ export declare namespace CloudViewer {
|
|
|
327
312
|
* This interface serves to enforce the format of creating a frontend checkpoints
|
|
328
313
|
* that requires the backend server.
|
|
329
314
|
*/
|
|
330
|
-
abstract class
|
|
315
|
+
abstract class PluginService {
|
|
331
316
|
/**
|
|
332
317
|
* Viewer instance associated with backend service.
|
|
333
318
|
*/
|
|
@@ -340,16 +325,16 @@ export declare namespace CloudViewer {
|
|
|
340
325
|
/**
|
|
341
326
|
* Forward the command to the backend service.
|
|
342
327
|
* @param commandName
|
|
343
|
-
* @param
|
|
328
|
+
* @param commandArgs Custom arguments the backend service expects
|
|
344
329
|
*/
|
|
345
|
-
protected forwardCommand(commandName: string,
|
|
330
|
+
protected forwardCommand(commandName: string, commandArgs: any): void;
|
|
346
331
|
/**
|
|
347
332
|
* Forward the command to the backend service with input file.
|
|
348
333
|
* @param commandName
|
|
349
334
|
* @param blob
|
|
350
|
-
* @param
|
|
335
|
+
* @param commandArgs
|
|
351
336
|
*/
|
|
352
|
-
protected forwardCommandWithBlob(commandName: string, blob: File,
|
|
337
|
+
protected forwardCommandWithBlob(commandName: string, blob: File, commandArgs: any): void;
|
|
353
338
|
/**
|
|
354
339
|
* Returns array of functions that are called
|
|
355
340
|
* when backend service finishes.
|
|
@@ -358,19 +343,19 @@ export declare namespace CloudViewer {
|
|
|
358
343
|
[key: string]: Function;
|
|
359
344
|
};
|
|
360
345
|
/**
|
|
361
|
-
* Getter for plugin
|
|
362
|
-
* The plugin
|
|
363
|
-
* For example, if plugin
|
|
346
|
+
* Getter for plugin name.
|
|
347
|
+
* The plugin name represents the entry point file's name.
|
|
348
|
+
* For example, if plugin name is '1234-5678', then on the backend
|
|
364
349
|
* server a local copy of '1234-5678' folder will be created with a
|
|
365
350
|
* 1234-5678.py entry point file.
|
|
366
351
|
*/
|
|
367
|
-
abstract
|
|
352
|
+
abstract getPluginName(): string;
|
|
368
353
|
/**
|
|
369
354
|
* Getter for plugin name.
|
|
370
|
-
* Based on the `
|
|
371
|
-
* the '
|
|
355
|
+
* Based on the `getPluginName` example above, the entry point file that has
|
|
356
|
+
* the 'PluginService' is located. Inside this file the `PluginService's`
|
|
372
357
|
* implementation class has this name.
|
|
373
358
|
*/
|
|
374
|
-
abstract
|
|
359
|
+
abstract getPluginClassName(): string;
|
|
375
360
|
}
|
|
376
361
|
}
|
|
@@ -5,8 +5,8 @@ export declare class SidebarEvents {
|
|
|
5
5
|
sceneWrapper: SceneWrapper;
|
|
6
6
|
readonly menuSections: any[];
|
|
7
7
|
readonly topbarSections_L1: any[];
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
8
|
+
readonly a_CAD: HTMLElement;
|
|
9
|
+
readonly a_CAE: HTMLElement;
|
|
10
10
|
readonly viewerCADToolbox: ViewerCADToolbox;
|
|
11
11
|
readonly viewerCAEToolbox: ViewerCAEToolbox;
|
|
12
12
|
readonly a_dev: HTMLElement;
|
|
@@ -16,11 +16,13 @@ export declare class SidebarEvents {
|
|
|
16
16
|
readonly a_node: HTMLElement;
|
|
17
17
|
readonly icon_options: HTMLElement;
|
|
18
18
|
readonly section_options: HTMLElement;
|
|
19
|
+
readonly file_dialog: HTMLElement;
|
|
19
20
|
constructor(sceneWrapper: SceneWrapper);
|
|
20
21
|
/**
|
|
21
22
|
* Registers event listeners.
|
|
22
23
|
*/
|
|
23
24
|
private _registerListeners;
|
|
24
|
-
private
|
|
25
|
-
private
|
|
25
|
+
private closeSectionOption;
|
|
26
|
+
private activateElement;
|
|
27
|
+
private deactivateElement;
|
|
26
28
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|