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.
@@ -8,3 +8,4 @@ export * from './CloudViewer/Settings/Index';
8
8
  export * from './Model/Index';
9
9
  export * from './CloudViewer/Index';
10
10
  export * from './Common/Index';
11
+ export * from './UserInterface/UIComponents/Index';
@@ -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.BackendService;
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.BackendService): void;
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 _registeredAddinApplications;
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: BackendService, commandName: string, commandArgs: any): Promise<void>;
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: BackendService, commandName: string, commandFile: File, commandArgs: any): Promise<void>;
106
+ forwardCommandForServiceBlob(service: PluginService, commandName: string, commandFile: File, commandArgs: any): Promise<void>;
121
107
  /**
122
- * A custom application that requires a specific backend implementation.
123
- * @param backendService
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
- registerApplication(backendService: BackendService): Promise<void>;
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
- * Kiszamolja a modell komponenseit alkoto face-ek midPointjait
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 BackendService {
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 args Custom arguments the backend service expects
328
+ * @param commandArgs Custom arguments the backend service expects
344
329
  */
345
- protected forwardCommand(commandName: string, args: any): void;
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 args
335
+ * @param commandArgs
351
336
  */
352
- protected forwardCommandWithBlob(commandName: string, blob: File, args: any): void;
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 GUID.
362
- * The plugin Guid represents the entry point file's name.
363
- * For example, if plugin guid is '1234-5678', then on the backend
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 getServiceGuid(): string;
352
+ abstract getPluginName(): string;
368
353
  /**
369
354
  * Getter for plugin name.
370
- * Based on the `getServiceGuid` example above, the entry point file that has
371
- * the 'BackendService' is located. Inside this file the `BackendService's`
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 getServiceClassName(): string;
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 a_geom: HTMLElement;
9
- readonly a_1D: HTMLElement;
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 activateButton;
25
- private deactivateButton;
25
+ private closeSectionOption;
26
+ private activateElement;
27
+ private deactivateElement;
26
28
  }
@@ -0,0 +1,5 @@
1
+ import * as ToolboxBuilder from './MainMenu/Toolboxes/ToolboxBuilder';
2
+ declare const ViewerUiBuilder: {
3
+ ToolboxBuilder: typeof ToolboxBuilder.ToolboxBuilder;
4
+ };
5
+ export { ViewerUiBuilder };
@@ -0,0 +1,3 @@
1
+ export declare class Toolbox {
2
+ addMethodGroup(groupName: string): any;
3
+ }
@@ -1,4 +1,5 @@
1
- export declare class ViewerCADToolbox {
1
+ import { Toolbox } from "./BaseToolbox";
2
+ export declare class ViewerCADToolbox extends Toolbox {
2
3
  operationUIs: any;
3
4
  private id;
4
5
  private element;
@@ -1,4 +1,5 @@
1
- export declare class ViewerCAEToolbox {
1
+ import { Toolbox } from "./BaseToolbox";
2
+ export declare class ViewerCAEToolbox extends Toolbox {
2
3
  operationUIs: any;
3
4
  private id;
4
5
  private element;
@@ -0,0 +1,4 @@
1
+ import { Toolbox } from "./BaseToolbox";
2
+ export declare namespace ToolboxBuilder {
3
+ function addToolbox(toolboxName: string): Toolbox;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fcs-core-viewer",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "description": "3D Viewer in the Cloud",
5
5
  "author": {
6
6
  "name": "Femsolve Kft."