@pilotdev/pilot-web-2d 25.6.0 → 25.8.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 +37 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type StringMap = {
|
|
|
16
16
|
};
|
|
17
17
|
export class Localization {
|
|
18
18
|
static initialize(options: any): Promise<void>;
|
|
19
|
-
static translate<T extends (string | StringMap) = string>(stringToTrans: string): T;
|
|
19
|
+
static translate<T extends (string | StringMap) = string>(stringToTrans: string, options?: {}): T;
|
|
20
20
|
static setLanguage(language: string): Promise<void>;
|
|
21
21
|
static extendLocalization(locales: any): boolean;
|
|
22
22
|
static numberToStr(value: number, digitsAfterPoint?: number): string;
|
|
@@ -82,6 +82,7 @@ export namespace Viewer3DIcons {
|
|
|
82
82
|
const VIEWER_MEASUREMENT_DIMENSION_ICON: string;
|
|
83
83
|
const VIEWER_ZOOM_TO_FIT_ICON: string;
|
|
84
84
|
const VIEWER_RENDER_OPTIONS_ICON: string;
|
|
85
|
+
const VIEWER_CONTEXT_MENU_COPY_PROPS: string;
|
|
85
86
|
}
|
|
86
87
|
export namespace ViewerGeneralIcons {
|
|
87
88
|
const CLOSE: string;
|
|
@@ -120,6 +121,7 @@ export class SettingChangedEvent extends Event {
|
|
|
120
121
|
providedData: any;
|
|
121
122
|
}
|
|
122
123
|
export class LoadingSpinner {
|
|
124
|
+
protected readonly _progress: ProgressBar;
|
|
123
125
|
set loadingTextKey(value: string);
|
|
124
126
|
get loadingTextKey(): string;
|
|
125
127
|
addToDOM(container: HTMLElement): void;
|
|
@@ -230,6 +232,7 @@ export class ExtensionBase {
|
|
|
230
232
|
onMouseUp(event: MouseEvent): void;
|
|
231
233
|
onMouseLongTouch(event: MouseEvent): void;
|
|
232
234
|
onToolbarCreated(toolbar: Toolbar): void;
|
|
235
|
+
onContextMenu(menu: IMenu): void;
|
|
233
236
|
onTouchStart(event: TouchEvent): void;
|
|
234
237
|
onTouchEnd(event: TouchEvent): void;
|
|
235
238
|
}
|
|
@@ -342,6 +345,11 @@ export class EventsDispatcherCore implements IEventsDispatcher {
|
|
|
342
345
|
removeEvent(type: string): void;
|
|
343
346
|
clearListeners(): void;
|
|
344
347
|
}
|
|
348
|
+
export interface IMenuBuilder {
|
|
349
|
+
build(): IControl[];
|
|
350
|
+
removeAllButtons(): IMenuBuilder;
|
|
351
|
+
withButton(controlId: string, icon: string, translationKey: string, command: () => void): IMenuBuilder;
|
|
352
|
+
}
|
|
345
353
|
export class Button extends Control {
|
|
346
354
|
|
|
347
355
|
constructor(id: string);
|
|
@@ -352,6 +360,7 @@ export class Button extends Control {
|
|
|
352
360
|
getIsChecked(): boolean;
|
|
353
361
|
setIcon(iconClassName: string): void;
|
|
354
362
|
setFromSvgTemlate(template: string): void;
|
|
363
|
+
withoutIcon(): void;
|
|
355
364
|
/**
|
|
356
365
|
* Override this method to be notified when the user clicks on the button.
|
|
357
366
|
* @param {MouseEvent} event
|
|
@@ -374,10 +383,15 @@ export namespace Button {
|
|
|
374
383
|
CLICK = "click"
|
|
375
384
|
}
|
|
376
385
|
}
|
|
377
|
-
export class
|
|
386
|
+
export class ContextMenu implements IMenu {
|
|
378
387
|
readonly controls: IControl[];
|
|
379
388
|
set selectedIndex(value: number | number[]);
|
|
380
389
|
get selectedIndex(): number | number[];
|
|
390
|
+
set opened(value: boolean);
|
|
391
|
+
get opened(): boolean;
|
|
392
|
+
set textStubKey(value: string);
|
|
393
|
+
get textStubKey(): string;
|
|
394
|
+
get menuWrapper(): HTMLElement;
|
|
381
395
|
setEnabled(index: number, value: boolean): void;
|
|
382
396
|
addControl(control: IControl, index?: number): void;
|
|
383
397
|
removeControl(index?: number): void;
|
|
@@ -388,7 +402,7 @@ export class SubMenu implements IMenu {
|
|
|
388
402
|
export class ComboButton extends Control {
|
|
389
403
|
|
|
390
404
|
constructor(id: string, selectedIndex?: number);
|
|
391
|
-
get subMenu():
|
|
405
|
+
get subMenu(): ContextMenu;
|
|
392
406
|
/**
|
|
393
407
|
* Override this method to be notified when the user clicks on the button.
|
|
394
408
|
* @param {MouseEvent} event
|
|
@@ -456,6 +470,7 @@ export class Dialog extends Control implements ICloseable {
|
|
|
456
470
|
setSvgIcon(template: string): Dialog;
|
|
457
471
|
setFooter(value: HTMLElement): Dialog;
|
|
458
472
|
setDialogElementClassNames(value: ElementClass): Dialog;
|
|
473
|
+
setSize(width: number, height: number): Dialog;
|
|
459
474
|
setResizable(value: boolean): Dialog;
|
|
460
475
|
setWindowOptions(value: IWindowStateOptions): Dialog;
|
|
461
476
|
setDraggable(value: boolean): Dialog;
|
|
@@ -503,6 +518,9 @@ export function createSvgElement(svgString: string): HTMLElement;
|
|
|
503
518
|
export function isString(element: any): boolean;
|
|
504
519
|
export function isSvg(element: string): boolean;
|
|
505
520
|
export function isSvgString(element: any): boolean;
|
|
521
|
+
export class GlobalEvents {
|
|
522
|
+
static events: EventsDispatcherCore;
|
|
523
|
+
}
|
|
506
524
|
export class Viewer2DConfiguration extends ViewerConfiguration {
|
|
507
525
|
|
|
508
526
|
constructor(appearance?: ViewerSettings);
|
|
@@ -531,6 +549,7 @@ export interface IDocumentPage {
|
|
|
531
549
|
dispose(): any;
|
|
532
550
|
}
|
|
533
551
|
export interface IDocument {
|
|
552
|
+
get pageCount(): number;
|
|
534
553
|
loadDocumentAsync(arrayBuffer: ArrayBuffer): Promise<void>;
|
|
535
554
|
increaseScale(scaleFactor?: number): void;
|
|
536
555
|
decreaseScale(scaleFactor?: number): void;
|
|
@@ -577,6 +596,20 @@ export class DocumentLoadingOptions {
|
|
|
577
596
|
|
|
578
597
|
constructor(documentId?: string);
|
|
579
598
|
}
|
|
599
|
+
export interface IDocumentPrintOverlay {
|
|
600
|
+
open(indeterminate: boolean): void;
|
|
601
|
+
close(): void;
|
|
602
|
+
updateProgress(progress: number, total: number): void;
|
|
603
|
+
}
|
|
604
|
+
export class DocumentPrintOverlay extends LoadingSpinner implements IDocumentPrintOverlay {
|
|
605
|
+
open(determinate: boolean): void;
|
|
606
|
+
close(): void;
|
|
607
|
+
updateProgress(progress: number, total: number): void;
|
|
608
|
+
}
|
|
609
|
+
export interface IPrintOptions {
|
|
610
|
+
overlay?: IDocumentPrintOverlay;
|
|
611
|
+
resolution?: number;
|
|
612
|
+
}
|
|
580
613
|
export let ViewerInstance: Viewer2D;
|
|
581
614
|
export class Viewer2D extends ViewerBase {
|
|
582
615
|
readonly settings: Readonly<ISettings>;
|
|
@@ -587,6 +620,7 @@ export class Viewer2D extends ViewerBase {
|
|
|
587
620
|
unloadDocument(): void;
|
|
588
621
|
start(): Promise<number>;
|
|
589
622
|
finish(): Promise<void>;
|
|
623
|
+
print(options: IPrintOptions | undefined): Promise<void>;
|
|
590
624
|
}
|
|
591
625
|
export class GuiViewer2D extends Viewer2D {
|
|
592
626
|
getToolbar(): ViewerToolbar;
|