@pilotdev/pilot-web-2d 23.0.12 → 24.2.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/index.d.ts +20 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export class CoreEventTypes {
|
|
|
126
126
|
static EXTENSION_LOADED: string;
|
|
127
127
|
static EXTENSION_UNLOADING: string;
|
|
128
128
|
static EXTENSION_UNLOADED: string;
|
|
129
|
+
static ACTIVE_EXTENSION_CHANGED_EVENT: string;
|
|
129
130
|
}
|
|
130
131
|
export class ExtensionEvent extends Event {
|
|
131
132
|
extensionName: string;
|
|
@@ -143,6 +144,7 @@ export interface IControl {
|
|
|
143
144
|
setToolTip(tooltipText: string): void;
|
|
144
145
|
setText(text: string): void;
|
|
145
146
|
setState(state: ControlState.State): void;
|
|
147
|
+
getState(): ControlState.State;
|
|
146
148
|
}
|
|
147
149
|
export class Control implements IControl {
|
|
148
150
|
container: HTMLElement;
|
|
@@ -154,6 +156,7 @@ export class Control implements IControl {
|
|
|
154
156
|
setToolTip(tooltipText: string): void;
|
|
155
157
|
setText(text: string): void;
|
|
156
158
|
setState(state: ControlState.State): void;
|
|
159
|
+
getState(): ControlState.State;
|
|
157
160
|
}
|
|
158
161
|
export enum ToolbarPosition {
|
|
159
162
|
TOP_FIXED = "ascn-toolbar-position-fixed-top",
|
|
@@ -203,6 +206,7 @@ export class ExtensionBase {
|
|
|
203
206
|
* @returns {string} Returns the name of the extension.
|
|
204
207
|
*/
|
|
205
208
|
getName(): string;
|
|
209
|
+
isActive(): boolean;
|
|
206
210
|
addCursorPhantomFromSvg(template: string): void;
|
|
207
211
|
removeCursorPhantom(): void;
|
|
208
212
|
onMouseDown(event: MouseEvent): void;
|
|
@@ -269,6 +273,11 @@ export class ViewerConfiguration {
|
|
|
269
273
|
mergeConfigurationAndSettings(configuration: ViewerSettings, settings: ISettings): void;
|
|
270
274
|
changeTheme(newTheme: string): void;
|
|
271
275
|
}
|
|
276
|
+
export class ExtensionActivationController {
|
|
277
|
+
getActive(): string;
|
|
278
|
+
activate(name: string): void;
|
|
279
|
+
deactivate(): void;
|
|
280
|
+
}
|
|
272
281
|
export type ErrorCallback = (message: string) => void;
|
|
273
282
|
export type SuccessCallback = (modelId: any) => void;
|
|
274
283
|
export enum DocumentType {
|
|
@@ -286,6 +295,7 @@ export abstract class ViewerBase {
|
|
|
286
295
|
readonly extensionsLoader: ExtensionLoader;
|
|
287
296
|
abstract settings: ISettings;
|
|
288
297
|
abstract events: IEventsDispatcher;
|
|
298
|
+
abstract activatedExtension: ExtensionActivationController;
|
|
289
299
|
get rootContainer(): HTMLElement;
|
|
290
300
|
getConfiguration(): ViewerConfiguration;
|
|
291
301
|
/**
|
|
@@ -345,8 +355,8 @@ export namespace Button {
|
|
|
345
355
|
}
|
|
346
356
|
export class SubMenu implements IMenu {
|
|
347
357
|
readonly controls: IControl[];
|
|
348
|
-
set selectedIndex(value:
|
|
349
|
-
get selectedIndex():
|
|
358
|
+
set selectedIndex(value: MDCListIndex);
|
|
359
|
+
get selectedIndex(): MDCListIndex;
|
|
350
360
|
setEnabled(index: number, value: boolean): void;
|
|
351
361
|
addControl(control: IControl, index?: number): void;
|
|
352
362
|
removeControl(index?: number): void;
|
|
@@ -380,13 +390,14 @@ export class Checkbox {
|
|
|
380
390
|
onChange(value: boolean): void;
|
|
381
391
|
createElement(): Element;
|
|
382
392
|
}
|
|
383
|
-
interface ISelectItem {
|
|
393
|
+
export interface ISelectItem {
|
|
384
394
|
text: string;
|
|
385
395
|
value: string;
|
|
386
396
|
}
|
|
387
397
|
export class Select {
|
|
388
398
|
|
|
389
399
|
constructor(id: string, items: ISelectItem[], placeholder: string);
|
|
400
|
+
get items(): ISelectItem[];
|
|
390
401
|
get select(): HTMLElement;
|
|
391
402
|
get disabled(): boolean;
|
|
392
403
|
set disabled(value: boolean);
|
|
@@ -394,15 +405,13 @@ export class Select {
|
|
|
394
405
|
set selectedIndex(value: number);
|
|
395
406
|
get placeholder(): string;
|
|
396
407
|
set placeholder(value: string);
|
|
397
|
-
get label():
|
|
398
|
-
get previousSelectedIndex(): number;
|
|
408
|
+
get label(): HTMLLabelElement;
|
|
399
409
|
onChange({ index, value }: {
|
|
400
410
|
index: any;
|
|
401
411
|
value: any;
|
|
402
412
|
}): void;
|
|
403
413
|
update(array: ISelectItem[], selectedIndex?: number): void;
|
|
404
414
|
}
|
|
405
|
-
export {};
|
|
406
415
|
export class ViewerToolbar extends Toolbar {
|
|
407
416
|
}
|
|
408
417
|
interface ElementClass {
|
|
@@ -464,6 +473,10 @@ export abstract class SettingsBase implements ISettings {
|
|
|
464
473
|
getSettingValue<T>(name: string): T;
|
|
465
474
|
protected abstract getKeyWithPrefix(key: string): string;
|
|
466
475
|
}
|
|
476
|
+
export function createSvgElement(svgString: string): HTMLElement;
|
|
477
|
+
export function isString(element: any): boolean;
|
|
478
|
+
export function isSvg(element: string): boolean;
|
|
479
|
+
export function isSvgString(element: any): boolean;
|
|
467
480
|
export class Viewer2DConfiguration extends ViewerConfiguration {
|
|
468
481
|
|
|
469
482
|
constructor(appearance?: ViewerSettings);
|
|
@@ -525,6 +538,7 @@ export let ViewerInstance: Viewer2D;
|
|
|
525
538
|
export class Viewer2D extends ViewerBase {
|
|
526
539
|
readonly settings: Readonly<ISettings>;
|
|
527
540
|
readonly events: Readonly<IEventsDispatcher>;
|
|
541
|
+
activatedExtension: ExtensionActivationController;
|
|
528
542
|
get document(): IDocument;
|
|
529
543
|
loadDocument(data: ArrayBuffer | string, options: DocumentLoadingOptions, onSuccessCallback: SuccessCallback, onErrorCallback: ErrorCallback): void;
|
|
530
544
|
unloadDocument(): void;
|