@ngstarter-ui/components 21.0.33 → 21.0.35
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/ai/component-registry.json +49 -28
- package/fesm2022/ngstarter-ui-components-form-field.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-icon.mjs +118 -7
- package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-panel.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +915 -52
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngstarter-ui-components-icon.d.ts +27 -6
- package/types/ngstarter-ui-components-panel.d.ts +1 -1
- package/types/ngstarter-ui-components-pdf-viewer.d.ts +205 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngstarter-ui/components",
|
|
3
3
|
"description": "NgStarter - AI-friendly Enterprise Angular UI Components and Admin Panel",
|
|
4
|
-
"version": "21.0.
|
|
4
|
+
"version": "21.0.35",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/elementarlabsdev/ngstarter.git"
|
|
@@ -1,17 +1,38 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
3
|
import { SafeHtml } from '@angular/platform-browser';
|
|
4
|
+
import { getIcon } from 'iconify-icon';
|
|
4
5
|
|
|
5
6
|
declare class Icon implements OnInit, OnChanges {
|
|
6
7
|
private _sanitizer;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
private _iconRegistry;
|
|
9
|
+
protected _iconHtml: i0.WritableSignal<SafeHtml | null>;
|
|
10
|
+
name: i0.InputSignal<string>;
|
|
9
11
|
private loaded;
|
|
12
|
+
private loadId;
|
|
10
13
|
ngOnInit(): Promise<void>;
|
|
11
14
|
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
12
15
|
private _loadIcon;
|
|
13
|
-
static ɵfac:
|
|
14
|
-
static ɵcmp:
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Icon, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Icon, "ngs-icon", ["ngsIcon"], { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
18
|
}
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
type IconData = NonNullable<ReturnType<typeof getIcon>>;
|
|
21
|
+
declare class IconRegistry {
|
|
22
|
+
private readonly _cache;
|
|
23
|
+
private readonly _pending;
|
|
24
|
+
private readonly _queue;
|
|
25
|
+
private _flushQueued;
|
|
26
|
+
get(name: string): Promise<IconData>;
|
|
27
|
+
clear(): void;
|
|
28
|
+
private _scheduleFlush;
|
|
29
|
+
private _flush;
|
|
30
|
+
private _resolve;
|
|
31
|
+
private _reject;
|
|
32
|
+
private _serializeName;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconRegistry, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<IconRegistry>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { Icon, IconRegistry };
|
|
38
|
+
export type { IconData };
|
|
@@ -59,5 +59,5 @@ declare class PanelContent implements PanelContentInterface {
|
|
|
59
59
|
static ɵcmp: i0.ɵɵComponentDeclaration<PanelContent, "ngs-panel-content", ["ngsPanelContent"], {}, {}, never, ["*"], true, [{ directive: typeof i1.CdkScrollable; inputs: {}; outputs: {}; }]>;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export { PANEL_CONTENT, Panel, PanelAside, PanelContent, PanelFooter, PanelHeader, PanelSidebar };
|
|
62
|
+
export { PANEL_CONTENT, Panel, PanelAside, PanelContent, PanelFooter, PanelHeader, PanelSidebar, PanelSubheader };
|
|
63
63
|
export type { PanelContentInterface };
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { Rotation, PdfEngine } from '@embedpdf/models';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
2
5
|
import { PluginRegistry } from '@embedpdf/core';
|
|
3
|
-
import { PdfEngine } from '@embedpdf/models';
|
|
4
6
|
|
|
5
7
|
type PdfViewerSource = string | ArrayBuffer | Uint8Array | Blob | null | undefined;
|
|
8
|
+
interface PdfViewerAnnotationDataSourceContext {
|
|
9
|
+
source: PdfViewerSource;
|
|
10
|
+
documentName: string | null;
|
|
11
|
+
pageCount: number;
|
|
12
|
+
}
|
|
13
|
+
interface PdfViewerAnnotationDataSourceParams extends PdfViewerAnnotationDataSourceContext {
|
|
14
|
+
successCallback(annotations: PdfViewerAnnotationView[]): void;
|
|
15
|
+
failCallback(error?: unknown): void;
|
|
16
|
+
}
|
|
17
|
+
interface PdfViewerServerAnnotationDataSource {
|
|
18
|
+
getAnnotations(params: PdfViewerAnnotationDataSourceParams): void;
|
|
19
|
+
}
|
|
20
|
+
type PdfViewerAnnotationDataSourceResult = PdfViewerAnnotationView[] | Promise<PdfViewerAnnotationView[]> | Observable<PdfViewerAnnotationView[]>;
|
|
21
|
+
type PdfViewerAnnotationDataSource = PdfViewerAnnotationDataSourceResult | PdfViewerServerAnnotationDataSource | ((params: PdfViewerAnnotationDataSourceContext) => PdfViewerAnnotationDataSourceResult);
|
|
22
|
+
type PdfViewerAnnotationWhen = string | ((annotation: PdfViewerAnnotationView, index: number) => boolean);
|
|
23
|
+
interface PdfViewerAnnotationTemplateContext {
|
|
24
|
+
$implicit: PdfViewerAnnotationView;
|
|
25
|
+
annotation: PdfViewerAnnotationView;
|
|
26
|
+
index: number;
|
|
27
|
+
goToPage(pageNumber: number): void;
|
|
28
|
+
}
|
|
6
29
|
interface PdfViewerLoadedEvent {
|
|
7
30
|
pageCount: number;
|
|
8
31
|
}
|
|
@@ -17,6 +40,8 @@ interface PdfViewerPageView {
|
|
|
17
40
|
url: string | null;
|
|
18
41
|
scale: number;
|
|
19
42
|
renderedScale: number | null;
|
|
43
|
+
rotation?: number;
|
|
44
|
+
renderedRotation?: number | null;
|
|
20
45
|
width: number;
|
|
21
46
|
height: number;
|
|
22
47
|
isRendering: boolean;
|
|
@@ -28,6 +53,28 @@ interface PdfViewerThumbnailView {
|
|
|
28
53
|
width: number;
|
|
29
54
|
height: number;
|
|
30
55
|
}
|
|
56
|
+
interface PdfViewerAnnotationView {
|
|
57
|
+
id?: string | number;
|
|
58
|
+
type?: string;
|
|
59
|
+
label?: string;
|
|
60
|
+
author: string;
|
|
61
|
+
time?: string;
|
|
62
|
+
avatarUrl?: string;
|
|
63
|
+
avatarLabel?: string;
|
|
64
|
+
text: string;
|
|
65
|
+
pageNumber: number;
|
|
66
|
+
replyLabel?: string;
|
|
67
|
+
[key: string]: unknown;
|
|
68
|
+
}
|
|
69
|
+
interface PdfViewerSearchResultView {
|
|
70
|
+
id?: string | number;
|
|
71
|
+
pageNumber: number;
|
|
72
|
+
excerpt: string;
|
|
73
|
+
}
|
|
74
|
+
interface PdfViewerSearchOptions {
|
|
75
|
+
caseSensitive: boolean;
|
|
76
|
+
wholeWord: boolean;
|
|
77
|
+
}
|
|
31
78
|
interface PdfViewerTextRectView {
|
|
32
79
|
text: string;
|
|
33
80
|
left: number;
|
|
@@ -49,12 +96,32 @@ interface PdfViewerSelectionRectView extends PdfViewerTextRectView {
|
|
|
49
96
|
pageNumber: number;
|
|
50
97
|
}
|
|
51
98
|
|
|
99
|
+
declare class PdfViewerAnnotationDef {
|
|
100
|
+
template: TemplateRef<PdfViewerAnnotationTemplateContext>;
|
|
101
|
+
readonly annotationWhen: _angular_core.InputSignal<PdfViewerAnnotationWhen | undefined>;
|
|
102
|
+
readonly defWhen: _angular_core.InputSignal<PdfViewerAnnotationWhen | undefined>;
|
|
103
|
+
readonly when: _angular_core.InputSignal<PdfViewerAnnotationWhen | undefined>;
|
|
104
|
+
constructor(template: TemplateRef<PdfViewerAnnotationTemplateContext>);
|
|
105
|
+
matches(annotation: PdfViewerAnnotationView, index: number, typeProperty: string): boolean;
|
|
106
|
+
hasWhen(): boolean;
|
|
107
|
+
private whenValue;
|
|
108
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfViewerAnnotationDef, never>;
|
|
109
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PdfViewerAnnotationDef, "[ngsPdfViewerAnnotationDef], [ngsPdfViewerAnnotation]", never, { "annotationWhen": { "alias": "ngsPdfViewerAnnotation"; "required": false; "isSignal": true; }; "defWhen": { "alias": "ngsPdfViewerAnnotationDef"; "required": false; "isSignal": true; }; "when": { "alias": "ngsPdfViewerAnnotationWhen"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
110
|
+
}
|
|
111
|
+
|
|
52
112
|
interface PdfViewerPageListItem {
|
|
53
113
|
pageNumber: number;
|
|
54
114
|
thumbnail: PdfViewerThumbnailView | null;
|
|
55
115
|
}
|
|
116
|
+
interface PdfViewerPageSpread {
|
|
117
|
+
id: string;
|
|
118
|
+
leadingPlaceholder: boolean;
|
|
119
|
+
leadingPlaceholderPage: PdfViewerPageView | null;
|
|
120
|
+
pages: PdfViewerPageView[];
|
|
121
|
+
}
|
|
56
122
|
type PdfViewerSpreadMode = 'single' | 'two-odd' | 'two-even';
|
|
57
123
|
type PdfViewerScrollLayout = 'vertical' | 'horizontal';
|
|
124
|
+
type PdfViewerZoomMode = 'custom' | 'fit-page' | 'fit-width';
|
|
58
125
|
declare class PdfViewer {
|
|
59
126
|
private readonly textSelectionHorizontalPadding;
|
|
60
127
|
private readonly textSelectionLineHeight;
|
|
@@ -66,16 +133,26 @@ declare class PdfViewer {
|
|
|
66
133
|
private readonly isBrowser;
|
|
67
134
|
private readonly viewerBody;
|
|
68
135
|
private readonly pageList;
|
|
136
|
+
protected readonly annotationDefs: _angular_core.Signal<readonly PdfViewerAnnotationDef[]>;
|
|
69
137
|
src: _angular_core.InputSignal<PdfViewerSource>;
|
|
138
|
+
documentName: _angular_core.InputSignal<string | null>;
|
|
70
139
|
wasmUrl: _angular_core.InputSignal<string>;
|
|
71
140
|
page: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
72
141
|
scale: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
73
142
|
minScale: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
74
143
|
maxScale: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
75
144
|
zoomStep: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
145
|
+
maxRenderPixels: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
146
|
+
maxRenderDimension: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
76
147
|
renderAll: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
77
148
|
showToolbar: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
78
149
|
showPageList: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
150
|
+
showSearchPanel: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
151
|
+
showAnnotationsPanel: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
152
|
+
annotations: _angular_core.InputSignal<PdfViewerAnnotationView[]>;
|
|
153
|
+
annotationsDataSource: _angular_core.InputSignal<PdfViewerAnnotationDataSource | null>;
|
|
154
|
+
annotationTypeProperty: _angular_core.InputSignal<string>;
|
|
155
|
+
searchQuery: _angular_core.InputSignal<string>;
|
|
79
156
|
withAnnotations: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
80
157
|
withForms: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
81
158
|
loaded: _angular_core.OutputEmitterRef<PdfViewerLoadedEvent>;
|
|
@@ -90,11 +167,21 @@ declare class PdfViewer {
|
|
|
90
167
|
protected readonly activePage: _angular_core.WritableSignal<number>;
|
|
91
168
|
protected readonly zoom: _angular_core.WritableSignal<number>;
|
|
92
169
|
protected readonly pageListVisible: _angular_core.WritableSignal<boolean>;
|
|
170
|
+
protected readonly searchPanelVisible: _angular_core.WritableSignal<boolean>;
|
|
171
|
+
protected readonly annotationsPanelVisible: _angular_core.WritableSignal<boolean>;
|
|
172
|
+
protected readonly asidePanelInteractive: _angular_core.WritableSignal<boolean>;
|
|
93
173
|
protected readonly spreadMode: _angular_core.WritableSignal<PdfViewerSpreadMode>;
|
|
94
174
|
protected readonly scrollLayout: _angular_core.WritableSignal<PdfViewerScrollLayout>;
|
|
175
|
+
protected readonly pageRotation: _angular_core.WritableSignal<Rotation>;
|
|
176
|
+
protected readonly zoomMode: _angular_core.WritableSignal<PdfViewerZoomMode>;
|
|
177
|
+
protected readonly annotationItems: _angular_core.WritableSignal<PdfViewerAnnotationView[]>;
|
|
178
|
+
protected readonly activeSearchQuery: _angular_core.WritableSignal<string>;
|
|
179
|
+
protected readonly pdfSearchResults: _angular_core.WritableSignal<PdfViewerSearchResultView[]>;
|
|
95
180
|
protected readonly selectionRects: _angular_core.WritableSignal<PdfViewerSelectionRectView[]>;
|
|
96
181
|
protected readonly hasDocument: _angular_core.Signal<boolean>;
|
|
97
182
|
protected readonly isPageListVisible: _angular_core.Signal<boolean>;
|
|
183
|
+
protected readonly isSearchPanelVisible: _angular_core.Signal<boolean>;
|
|
184
|
+
protected readonly isAnnotationsPanelVisible: _angular_core.Signal<boolean>;
|
|
98
185
|
protected readonly thumbnailPageMap: _angular_core.Signal<Map<number, PdfViewerThumbnailView>>;
|
|
99
186
|
protected readonly pageItems: _angular_core.Signal<PdfViewerPageListItem[]>;
|
|
100
187
|
protected readonly canGoPrevious: _angular_core.Signal<boolean>;
|
|
@@ -102,6 +189,9 @@ declare class PdfViewer {
|
|
|
102
189
|
protected readonly canZoomOut: _angular_core.Signal<boolean>;
|
|
103
190
|
protected readonly canZoomIn: _angular_core.Signal<boolean>;
|
|
104
191
|
protected readonly zoomLabel: _angular_core.Signal<string>;
|
|
192
|
+
protected readonly displayDocumentName: _angular_core.Signal<string>;
|
|
193
|
+
protected readonly pageSpreads: _angular_core.Signal<PdfViewerPageSpread[]>;
|
|
194
|
+
protected readonly zoomPresets: number[];
|
|
105
195
|
private engine;
|
|
106
196
|
private pdfDocument;
|
|
107
197
|
private registry;
|
|
@@ -109,17 +199,24 @@ declare class PdfViewer {
|
|
|
109
199
|
private visiblePageRatios;
|
|
110
200
|
private loadToken;
|
|
111
201
|
private renderToken;
|
|
202
|
+
private searchToken;
|
|
112
203
|
private scrollSyncFrame;
|
|
113
204
|
private programmaticScrollTargetPage;
|
|
114
205
|
private programmaticScrollTimeout;
|
|
115
206
|
private pageObserverFrame;
|
|
116
207
|
private pageObserverTimeout;
|
|
117
208
|
private visiblePageRenderFrame;
|
|
209
|
+
private visiblePageRenderTimeout;
|
|
118
210
|
private pageObserverRefreshAttempts;
|
|
119
211
|
private selectionStart;
|
|
120
212
|
private isViewInitialized;
|
|
213
|
+
private annotationDataSourceToken;
|
|
214
|
+
private annotationDataSourceCleanup;
|
|
215
|
+
private lastZoomChangeTime;
|
|
121
216
|
private readonly programmaticScrollMinDuration;
|
|
122
217
|
private readonly programmaticScrollMaxDuration;
|
|
218
|
+
private readonly qualityRenderZoomIdleDelay;
|
|
219
|
+
private readonly documentOpenTimeoutMs;
|
|
123
220
|
constructor();
|
|
124
221
|
ngAfterViewInit(): void;
|
|
125
222
|
previousPage(): void;
|
|
@@ -127,23 +224,47 @@ declare class PdfViewer {
|
|
|
127
224
|
zoomIn(): void;
|
|
128
225
|
zoomOut(): void;
|
|
129
226
|
togglePageList(): void;
|
|
227
|
+
protected toggleSearchPanel(): void;
|
|
228
|
+
protected toggleAnnotationsPanel(): void;
|
|
229
|
+
protected closeAsidePanel(): void;
|
|
230
|
+
protected updatePdfSearch(event: {
|
|
231
|
+
query: string;
|
|
232
|
+
options: PdfViewerSearchOptions;
|
|
233
|
+
}): Promise<void>;
|
|
234
|
+
protected selectSearchResult(result: PdfViewerSearchResultView): void;
|
|
235
|
+
protected setZoomPreset(scale: number): void;
|
|
236
|
+
protected isZoomPresetSelected(scale: number): boolean;
|
|
237
|
+
protected fitToPage(): void;
|
|
238
|
+
protected fitToWidth(): void;
|
|
130
239
|
protected setSpreadMode(mode: PdfViewerSpreadMode): void;
|
|
131
240
|
protected setScrollLayout(layout: PdfViewerScrollLayout): void;
|
|
132
241
|
protected rotateClockwise(): void;
|
|
133
242
|
protected rotateCounterClockwise(): void;
|
|
243
|
+
private groupPagesIntoSpreads;
|
|
244
|
+
private setPageRotation;
|
|
245
|
+
private rotatePageBy;
|
|
246
|
+
private refreshLayoutAfterModeChange;
|
|
134
247
|
protected toggleFullscreen(): void;
|
|
135
248
|
setPage(pageNumber: number): void;
|
|
136
249
|
protected onViewerScroll(): void;
|
|
250
|
+
protected onViewerWheel(event: WheelEvent): void;
|
|
137
251
|
protected selectionRectsForPage(pageNumber: number): PdfViewerSelectionRectView[];
|
|
138
|
-
protected isPageImageFresh(page: PdfViewerPageView): boolean;
|
|
139
252
|
protected startTextSelection(event: PointerEvent | MouseEvent, page: PdfViewerPageView): void;
|
|
140
253
|
protected updateTextSelection(event: PointerEvent | MouseEvent, page: PdfViewerPageView): void;
|
|
141
254
|
protected finishTextSelection(event: PointerEvent | MouseEvent, page: PdfViewerPageView): void;
|
|
255
|
+
private loadAnnotationsDataSource;
|
|
256
|
+
private applyAnnotationDataSourceResult;
|
|
257
|
+
private setAnnotationItems;
|
|
258
|
+
private isServerAnnotationDataSource;
|
|
259
|
+
private isPromiseLike;
|
|
142
260
|
protected cancelTextSelection(): void;
|
|
261
|
+
private searchPdf;
|
|
262
|
+
private toSearchResultView;
|
|
143
263
|
private loadDocument;
|
|
144
264
|
private initializePageShells;
|
|
145
265
|
private getPageNumbersToDisplay;
|
|
146
266
|
private scheduleVisiblePagesRender;
|
|
267
|
+
private queueVisiblePageRenderFrame;
|
|
147
268
|
private scheduleCurrentVisiblePagesRender;
|
|
148
269
|
private renderVisiblePages;
|
|
149
270
|
private setZoom;
|
|
@@ -160,29 +281,44 @@ declare class PdfViewer {
|
|
|
160
281
|
private getSelectionPoint;
|
|
161
282
|
private getSelectionRects;
|
|
162
283
|
private openSource;
|
|
284
|
+
private fetchPdfSource;
|
|
285
|
+
private openDocumentBuffer;
|
|
286
|
+
private withTimeout;
|
|
163
287
|
private closeDocument;
|
|
164
288
|
private revokeRenderedPages;
|
|
165
289
|
private revokeThumbnailPages;
|
|
166
290
|
private revokeObjectUrl;
|
|
291
|
+
private getSourceName;
|
|
167
292
|
private sanitizePage;
|
|
168
293
|
private sanitizeScale;
|
|
169
294
|
private roundZoom;
|
|
295
|
+
private floorFitZoom;
|
|
170
296
|
private clamp;
|
|
171
297
|
private roundCssPixel;
|
|
298
|
+
private parseCssPixel;
|
|
172
299
|
private getDevicePixelRatio;
|
|
300
|
+
private getPageRasterRenderOptions;
|
|
173
301
|
private createDocumentId;
|
|
174
302
|
private isRenderCurrent;
|
|
175
303
|
private cancelScrollSyncFrame;
|
|
176
304
|
private cancelPageObserverFrame;
|
|
177
305
|
private cancelVisiblePageRenderFrame;
|
|
306
|
+
private getCurrentTime;
|
|
307
|
+
private getQualityRenderDelay;
|
|
308
|
+
private getZoomAnchor;
|
|
309
|
+
private restoreZoomAnchor;
|
|
178
310
|
private disconnectPageObserver;
|
|
179
311
|
private schedulePageObserverRefresh;
|
|
180
312
|
private scheduleNextPageObserverRefresh;
|
|
181
313
|
private setupPageIntersectionObserver;
|
|
314
|
+
private getFitScale;
|
|
182
315
|
private getScaleBounds;
|
|
183
316
|
private sanitizeZoomStep;
|
|
184
317
|
private sanitizePositiveNumber;
|
|
185
318
|
private getPageDisplaySize;
|
|
319
|
+
private getPageBaseSize;
|
|
320
|
+
private getPageDisplayRotation;
|
|
321
|
+
private normalizeRotation;
|
|
186
322
|
private scrollToPage;
|
|
187
323
|
private syncActivePageFromViewport;
|
|
188
324
|
private syncActivePageFromIntersections;
|
|
@@ -190,6 +326,7 @@ declare class PdfViewer {
|
|
|
190
326
|
private findActivePageInViewport;
|
|
191
327
|
private scrollPageListToPage;
|
|
192
328
|
private getPageScrollTop;
|
|
329
|
+
private getPageScrollLeft;
|
|
193
330
|
private getElementScrollTop;
|
|
194
331
|
private getProgrammaticScrollTimeout;
|
|
195
332
|
private startProgrammaticScrollLock;
|
|
@@ -198,7 +335,28 @@ declare class PdfViewer {
|
|
|
198
335
|
private completeProgrammaticScroll;
|
|
199
336
|
private clearProgrammaticScrollLock;
|
|
200
337
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfViewer, never>;
|
|
201
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfViewer, "ngs-pdf-viewer", ["ngsPdfViewer"], { "src": { "alias": "src"; "required": false; "isSignal": true; }; "wasmUrl": { "alias": "wasmUrl"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "scale": { "alias": "scale"; "required": false; "isSignal": true; }; "minScale": { "alias": "minScale"; "required": false; "isSignal": true; }; "maxScale": { "alias": "maxScale"; "required": false; "isSignal": true; }; "zoomStep": { "alias": "zoomStep"; "required": false; "isSignal": true; }; "renderAll": { "alias": "renderAll"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showPageList": { "alias": "showPageList"; "required": false; "isSignal": true; }; "withAnnotations": { "alias": "withAnnotations"; "required": false; "isSignal": true; }; "withForms": { "alias": "withForms"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "pageChanged": "pageChanged"; "pageRendered": "pageRendered"; "error": "error"; },
|
|
338
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfViewer, "ngs-pdf-viewer", ["ngsPdfViewer"], { "src": { "alias": "src"; "required": false; "isSignal": true; }; "documentName": { "alias": "documentName"; "required": false; "isSignal": true; }; "wasmUrl": { "alias": "wasmUrl"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "scale": { "alias": "scale"; "required": false; "isSignal": true; }; "minScale": { "alias": "minScale"; "required": false; "isSignal": true; }; "maxScale": { "alias": "maxScale"; "required": false; "isSignal": true; }; "zoomStep": { "alias": "zoomStep"; "required": false; "isSignal": true; }; "maxRenderPixels": { "alias": "maxRenderPixels"; "required": false; "isSignal": true; }; "maxRenderDimension": { "alias": "maxRenderDimension"; "required": false; "isSignal": true; }; "renderAll": { "alias": "renderAll"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "showPageList": { "alias": "showPageList"; "required": false; "isSignal": true; }; "showSearchPanel": { "alias": "showSearchPanel"; "required": false; "isSignal": true; }; "showAnnotationsPanel": { "alias": "showAnnotationsPanel"; "required": false; "isSignal": true; }; "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "annotationsDataSource": { "alias": "annotationsDataSource"; "required": false; "isSignal": true; }; "annotationTypeProperty": { "alias": "annotationTypeProperty"; "required": false; "isSignal": true; }; "searchQuery": { "alias": "searchQuery"; "required": false; "isSignal": true; }; "withAnnotations": { "alias": "withAnnotations"; "required": false; "isSignal": true; }; "withForms": { "alias": "withForms"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "pageChanged": "pageChanged"; "pageRendered": "pageRendered"; "error": "error"; }, ["annotationDefs"], never, true, never>;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare class PdfViewerAnnotations {
|
|
342
|
+
annotations: _angular_core.InputSignal<PdfViewerAnnotationView[]>;
|
|
343
|
+
annotationDefs: _angular_core.InputSignal<readonly PdfViewerAnnotationDef[]>;
|
|
344
|
+
annotationTypeProperty: _angular_core.InputSignal<string>;
|
|
345
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
346
|
+
pageSelected: _angular_core.OutputEmitterRef<number>;
|
|
347
|
+
protected readonly filterQuery: _angular_core.WritableSignal<string>;
|
|
348
|
+
protected readonly filteredAnnotations: _angular_core.Signal<PdfViewerAnnotationView[]>;
|
|
349
|
+
protected setFilterQuery(event: Event): void;
|
|
350
|
+
protected clearFilterQuery(): void;
|
|
351
|
+
protected getAnnotationTemplate(annotation: PdfViewerAnnotationView, index: number): TemplateRef<PdfViewerAnnotationTemplateContext> | null;
|
|
352
|
+
protected getAnnotationTemplateContext(annotation: PdfViewerAnnotationView, index: number): PdfViewerAnnotationTemplateContext;
|
|
353
|
+
protected getAnnotationTypeLabel(annotation: PdfViewerAnnotationView): string;
|
|
354
|
+
protected getAvatarLabel(annotation: PdfViewerAnnotationView): string;
|
|
355
|
+
protected getAvatarImage(annotation: PdfViewerAnnotationView): string;
|
|
356
|
+
protected getReplyLabel(annotation: PdfViewerAnnotationView): string;
|
|
357
|
+
private annotationMatchesFilter;
|
|
358
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfViewerAnnotations, never>;
|
|
359
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfViewerAnnotations, "ngs-pdf-viewer-annotations", never, { "annotations": { "alias": "annotations"; "required": false; "isSignal": true; }; "annotationDefs": { "alias": "annotationDefs"; "required": false; "isSignal": true; }; "annotationTypeProperty": { "alias": "annotationTypeProperty"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "pageSelected": "pageSelected"; }, never, never, true, never>;
|
|
202
360
|
}
|
|
203
361
|
|
|
204
362
|
declare class PdfViewerEngineService {
|
|
@@ -210,5 +368,47 @@ declare class PdfViewerEngineService {
|
|
|
210
368
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PdfViewerEngineService>;
|
|
211
369
|
}
|
|
212
370
|
|
|
213
|
-
|
|
214
|
-
|
|
371
|
+
interface PdfViewerSearchResultPart {
|
|
372
|
+
text: string;
|
|
373
|
+
highlight: boolean;
|
|
374
|
+
}
|
|
375
|
+
interface PdfViewerSearchResultGroup {
|
|
376
|
+
pageNumber: number;
|
|
377
|
+
results: Array<{
|
|
378
|
+
result: PdfViewerSearchResultView;
|
|
379
|
+
index: number;
|
|
380
|
+
}>;
|
|
381
|
+
}
|
|
382
|
+
declare class PdfViewerSearch {
|
|
383
|
+
results: _angular_core.InputSignal<PdfViewerSearchResultView[]>;
|
|
384
|
+
query: _angular_core.InputSignal<string>;
|
|
385
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
386
|
+
resultSelected: _angular_core.OutputEmitterRef<PdfViewerSearchResultView>;
|
|
387
|
+
searchChanged: _angular_core.OutputEmitterRef<{
|
|
388
|
+
query: string;
|
|
389
|
+
options: PdfViewerSearchOptions;
|
|
390
|
+
}>;
|
|
391
|
+
protected readonly caseSensitive: _angular_core.WritableSignal<boolean>;
|
|
392
|
+
protected readonly wholeWord: _angular_core.WritableSignal<boolean>;
|
|
393
|
+
protected readonly activeResultIndex: _angular_core.WritableSignal<number>;
|
|
394
|
+
protected readonly queryValue: _angular_core.WritableSignal<string>;
|
|
395
|
+
protected readonly hasQuery: _angular_core.Signal<boolean>;
|
|
396
|
+
protected readonly visibleResultGroups: _angular_core.Signal<PdfViewerSearchResultGroup[]>;
|
|
397
|
+
protected readonly resultCountLabel: _angular_core.Signal<string>;
|
|
398
|
+
constructor();
|
|
399
|
+
protected setQuery(event: Event): void;
|
|
400
|
+
protected clearQuery(): void;
|
|
401
|
+
protected setCaseSensitive(value: boolean): void;
|
|
402
|
+
protected setWholeWord(value: boolean): void;
|
|
403
|
+
protected previousResult(): void;
|
|
404
|
+
protected nextResult(): void;
|
|
405
|
+
protected selectResult(result: PdfViewerSearchResultView, index: number): void;
|
|
406
|
+
protected resultParts(result: PdfViewerSearchResultView): PdfViewerSearchResultPart[];
|
|
407
|
+
private emitSearchChanged;
|
|
408
|
+
private escapeRegExp;
|
|
409
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PdfViewerSearch, never>;
|
|
410
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PdfViewerSearch, "ngs-pdf-viewer-search", never, { "results": { "alias": "results"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "resultSelected": "resultSelected"; "searchChanged": "searchChanged"; }, never, never, true, never>;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export { PdfViewer, PdfViewerAnnotationDef, PdfViewerAnnotations, PdfViewerEngineService, PdfViewerSearch };
|
|
414
|
+
export type { PdfViewerAnnotationDataSource, PdfViewerAnnotationDataSourceContext, PdfViewerAnnotationDataSourceParams, PdfViewerAnnotationDataSourceResult, PdfViewerAnnotationTemplateContext, PdfViewerAnnotationView, PdfViewerAnnotationWhen, PdfViewerLoadedEvent, PdfViewerPageRenderedEvent, PdfViewerPageView, PdfViewerSearchOptions, PdfViewerSearchResultView, PdfViewerSelectionRectView, PdfViewerServerAnnotationDataSource, PdfViewerSource, PdfViewerTextGlyphView, PdfViewerTextRectView, PdfViewerThumbnailView };
|