@pilotdev/pilot-web-2d 25.6.0 → 25.8.3-alpha
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 +48 -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;
|
|
@@ -119,7 +120,14 @@ export class SettingChangedEvent extends Event {
|
|
|
119
120
|
newValue: any;
|
|
120
121
|
providedData: any;
|
|
121
122
|
}
|
|
123
|
+
export class ProgressBar {
|
|
124
|
+
start(): void;
|
|
125
|
+
stop(): void;
|
|
126
|
+
setDeterminate(value: boolean): void;
|
|
127
|
+
setProgress(value: number): void;
|
|
128
|
+
}
|
|
122
129
|
export class LoadingSpinner {
|
|
130
|
+
protected readonly _progress: ProgressBar;
|
|
123
131
|
set loadingTextKey(value: string);
|
|
124
132
|
get loadingTextKey(): string;
|
|
125
133
|
addToDOM(container: HTMLElement): void;
|
|
@@ -161,6 +169,11 @@ export interface IControl {
|
|
|
161
169
|
setState(state: ControlState.State): void;
|
|
162
170
|
getState(): ControlState.State;
|
|
163
171
|
}
|
|
172
|
+
export class Tooltip {
|
|
173
|
+
setTooltip(hint: string): HTMLElement;
|
|
174
|
+
setDisabled(value: boolean): void;
|
|
175
|
+
hide(): void;
|
|
176
|
+
}
|
|
164
177
|
export class Control implements IControl {
|
|
165
178
|
protected _tooltip: Tooltip;
|
|
166
179
|
container: HTMLElement;
|
|
@@ -230,6 +243,7 @@ export class ExtensionBase {
|
|
|
230
243
|
onMouseUp(event: MouseEvent): void;
|
|
231
244
|
onMouseLongTouch(event: MouseEvent): void;
|
|
232
245
|
onToolbarCreated(toolbar: Toolbar): void;
|
|
246
|
+
onContextMenu(menu: IMenu): void;
|
|
233
247
|
onTouchStart(event: TouchEvent): void;
|
|
234
248
|
onTouchEnd(event: TouchEvent): void;
|
|
235
249
|
}
|
|
@@ -342,6 +356,11 @@ export class EventsDispatcherCore implements IEventsDispatcher {
|
|
|
342
356
|
removeEvent(type: string): void;
|
|
343
357
|
clearListeners(): void;
|
|
344
358
|
}
|
|
359
|
+
export interface IMenuBuilder {
|
|
360
|
+
build(): IControl[];
|
|
361
|
+
removeAllButtons(): IMenuBuilder;
|
|
362
|
+
withButton(controlId: string, icon: string, translationKey: string, command: () => void): IMenuBuilder;
|
|
363
|
+
}
|
|
345
364
|
export class Button extends Control {
|
|
346
365
|
|
|
347
366
|
constructor(id: string);
|
|
@@ -352,6 +371,7 @@ export class Button extends Control {
|
|
|
352
371
|
getIsChecked(): boolean;
|
|
353
372
|
setIcon(iconClassName: string): void;
|
|
354
373
|
setFromSvgTemlate(template: string): void;
|
|
374
|
+
withoutIcon(): void;
|
|
355
375
|
/**
|
|
356
376
|
* Override this method to be notified when the user clicks on the button.
|
|
357
377
|
* @param {MouseEvent} event
|
|
@@ -374,10 +394,15 @@ export namespace Button {
|
|
|
374
394
|
CLICK = "click"
|
|
375
395
|
}
|
|
376
396
|
}
|
|
377
|
-
export class
|
|
397
|
+
export class ContextMenu implements IMenu {
|
|
378
398
|
readonly controls: IControl[];
|
|
379
399
|
set selectedIndex(value: number | number[]);
|
|
380
400
|
get selectedIndex(): number | number[];
|
|
401
|
+
set opened(value: boolean);
|
|
402
|
+
get opened(): boolean;
|
|
403
|
+
set textStubKey(value: string);
|
|
404
|
+
get textStubKey(): string;
|
|
405
|
+
get menuWrapper(): HTMLElement;
|
|
381
406
|
setEnabled(index: number, value: boolean): void;
|
|
382
407
|
addControl(control: IControl, index?: number): void;
|
|
383
408
|
removeControl(index?: number): void;
|
|
@@ -388,7 +413,7 @@ export class SubMenu implements IMenu {
|
|
|
388
413
|
export class ComboButton extends Control {
|
|
389
414
|
|
|
390
415
|
constructor(id: string, selectedIndex?: number);
|
|
391
|
-
get subMenu():
|
|
416
|
+
get subMenu(): ContextMenu;
|
|
392
417
|
/**
|
|
393
418
|
* Override this method to be notified when the user clicks on the button.
|
|
394
419
|
* @param {MouseEvent} event
|
|
@@ -456,6 +481,7 @@ export class Dialog extends Control implements ICloseable {
|
|
|
456
481
|
setSvgIcon(template: string): Dialog;
|
|
457
482
|
setFooter(value: HTMLElement): Dialog;
|
|
458
483
|
setDialogElementClassNames(value: ElementClass): Dialog;
|
|
484
|
+
setSize(width: number, height: number): Dialog;
|
|
459
485
|
setResizable(value: boolean): Dialog;
|
|
460
486
|
setWindowOptions(value: IWindowStateOptions): Dialog;
|
|
461
487
|
setDraggable(value: boolean): Dialog;
|
|
@@ -503,6 +529,9 @@ export function createSvgElement(svgString: string): HTMLElement;
|
|
|
503
529
|
export function isString(element: any): boolean;
|
|
504
530
|
export function isSvg(element: string): boolean;
|
|
505
531
|
export function isSvgString(element: any): boolean;
|
|
532
|
+
export class GlobalEvents {
|
|
533
|
+
static events: EventsDispatcherCore;
|
|
534
|
+
}
|
|
506
535
|
export class Viewer2DConfiguration extends ViewerConfiguration {
|
|
507
536
|
|
|
508
537
|
constructor(appearance?: ViewerSettings);
|
|
@@ -531,6 +560,7 @@ export interface IDocumentPage {
|
|
|
531
560
|
dispose(): any;
|
|
532
561
|
}
|
|
533
562
|
export interface IDocument {
|
|
563
|
+
get pageCount(): number;
|
|
534
564
|
loadDocumentAsync(arrayBuffer: ArrayBuffer): Promise<void>;
|
|
535
565
|
increaseScale(scaleFactor?: number): void;
|
|
536
566
|
decreaseScale(scaleFactor?: number): void;
|
|
@@ -577,6 +607,20 @@ export class DocumentLoadingOptions {
|
|
|
577
607
|
|
|
578
608
|
constructor(documentId?: string);
|
|
579
609
|
}
|
|
610
|
+
export interface IDocumentPrintOverlay {
|
|
611
|
+
open(indeterminate: boolean): void;
|
|
612
|
+
close(): void;
|
|
613
|
+
updateProgress(progress: number, total: number): void;
|
|
614
|
+
}
|
|
615
|
+
export class DocumentPrintOverlay extends LoadingSpinner implements IDocumentPrintOverlay {
|
|
616
|
+
open(determinate: boolean): void;
|
|
617
|
+
close(): void;
|
|
618
|
+
updateProgress(progress: number, total: number): void;
|
|
619
|
+
}
|
|
620
|
+
export interface IPrintOptions {
|
|
621
|
+
overlay?: IDocumentPrintOverlay;
|
|
622
|
+
resolution?: number;
|
|
623
|
+
}
|
|
580
624
|
export let ViewerInstance: Viewer2D;
|
|
581
625
|
export class Viewer2D extends ViewerBase {
|
|
582
626
|
readonly settings: Readonly<ISettings>;
|
|
@@ -587,6 +631,7 @@ export class Viewer2D extends ViewerBase {
|
|
|
587
631
|
unloadDocument(): void;
|
|
588
632
|
start(): Promise<number>;
|
|
589
633
|
finish(): Promise<void>;
|
|
634
|
+
print(options: IPrintOptions | undefined): Promise<void>;
|
|
590
635
|
}
|
|
591
636
|
export class GuiViewer2D extends Viewer2D {
|
|
592
637
|
getToolbar(): ViewerToolbar;
|