fcs-core-viewer 0.9.2 → 0.10.1
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 +3 -9
- package/fcs-core-viewer@types/CloudViewer/FcsViewer.d.ts +23 -45
- 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
|
@@ -21,12 +21,6 @@ interface BackendInstructions {
|
|
|
21
21
|
* Task callback arguments
|
|
22
22
|
*/
|
|
23
23
|
callback_guid_id?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Optional addin arguments
|
|
26
|
-
*/
|
|
27
|
-
addin_command?: string;
|
|
28
|
-
addin?: string;
|
|
29
|
-
on_finished_arguments?: {};
|
|
30
24
|
}
|
|
31
25
|
/**
|
|
32
26
|
* All events that were triggered by the backend.
|
|
@@ -94,12 +88,12 @@ export declare class BackendEvents implements IBackendEvents {
|
|
|
94
88
|
* Contains guid to backend service mappings.
|
|
95
89
|
*/
|
|
96
90
|
attachedServices: {
|
|
97
|
-
[key: string]: CloudViewer.
|
|
91
|
+
[key: string]: CloudViewer.PluginService;
|
|
98
92
|
};
|
|
99
93
|
/**
|
|
100
94
|
* Contains all approved guids
|
|
101
95
|
*/
|
|
102
|
-
|
|
96
|
+
registeredPluginNames: string[];
|
|
103
97
|
/**
|
|
104
98
|
* Callback function GUIDs
|
|
105
99
|
*/
|
|
@@ -122,7 +116,7 @@ export declare class BackendEvents implements IBackendEvents {
|
|
|
122
116
|
* @param service
|
|
123
117
|
* @param serviceMethod
|
|
124
118
|
*/
|
|
125
|
-
attachService(service: CloudViewer.
|
|
119
|
+
attachService(service: CloudViewer.PluginService): void;
|
|
126
120
|
/**
|
|
127
121
|
* We pass in a function that will be called when the backend task finishes.
|
|
128
122
|
* 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<Response>;
|
|
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<Response>;
|
|
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,37 +325,30 @@ 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): Promise<Response>;
|
|
346
331
|
/**
|
|
347
332
|
* Forward the command to the backend service with input file.
|
|
348
333
|
* @param commandName
|
|
349
334
|
* @param blob
|
|
350
|
-
* @param
|
|
351
|
-
*/
|
|
352
|
-
protected forwardCommandWithBlob(commandName: string, blob: File, args: any): void;
|
|
353
|
-
/**
|
|
354
|
-
* Returns array of functions that are called
|
|
355
|
-
* when backend service finishes.
|
|
335
|
+
* @param commandArgs
|
|
356
336
|
*/
|
|
357
|
-
|
|
358
|
-
[key: string]: Function;
|
|
359
|
-
};
|
|
337
|
+
protected forwardCommandWithBlob(commandName: string, blob: File, commandArgs: any): Promise<Response>;
|
|
360
338
|
/**
|
|
361
|
-
* Getter for plugin
|
|
362
|
-
* The plugin
|
|
363
|
-
* For example, if plugin
|
|
339
|
+
* Getter for plugin name.
|
|
340
|
+
* The plugin name represents the entry point file's name.
|
|
341
|
+
* For example, if plugin name is '1234-5678', then on the backend
|
|
364
342
|
* server a local copy of '1234-5678' folder will be created with a
|
|
365
343
|
* 1234-5678.py entry point file.
|
|
366
344
|
*/
|
|
367
|
-
abstract
|
|
345
|
+
abstract getPluginName(): string;
|
|
368
346
|
/**
|
|
369
347
|
* Getter for plugin name.
|
|
370
|
-
* Based on the `
|
|
371
|
-
* the '
|
|
348
|
+
* Based on the `getPluginName` example above, the entry point file that has
|
|
349
|
+
* the 'PluginService' is located. Inside this file the `PluginService's`
|
|
372
350
|
* implementation class has this name.
|
|
373
351
|
*/
|
|
374
|
-
abstract
|
|
352
|
+
abstract getPluginClassName(): string;
|
|
375
353
|
}
|
|
376
354
|
}
|
|
@@ -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 {};
|