@embedpdf/angular 3.0.0-next.13 → 3.0.0-next.15
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/README.md +309 -0
- package/dist/README.md +309 -0
- package/dist/actions/index.d.ts +34 -16
- package/dist/anchored/index.d.ts +67 -0
- package/dist/annotation/index.d.ts +599 -0
- package/dist/commands/index.d.ts +109 -0
- package/dist/fesm2022/embedpdf-angular-actions.mjs +117 -36
- package/dist/fesm2022/embedpdf-angular-actions.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-anchored.mjs +148 -0
- package/dist/fesm2022/embedpdf-angular-anchored.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-annotation.mjs +1960 -0
- package/dist/fesm2022/embedpdf-angular-annotation.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-commands.mjs +235 -0
- package/dist/fesm2022/embedpdf-angular-commands.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-form.mjs +1074 -0
- package/dist/fesm2022/embedpdf-angular-form.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-history.mjs +54 -0
- package/dist/fesm2022/embedpdf-angular-history.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-i18n.mjs +100 -0
- package/dist/fesm2022/embedpdf-angular-i18n.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-interaction.mjs +157 -0
- package/dist/fesm2022/embedpdf-angular-interaction.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-link.mjs +306 -0
- package/dist/fesm2022/embedpdf-angular-link.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-measurement.mjs +106 -0
- package/dist/fesm2022/embedpdf-angular-measurement.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-metadata.mjs +77 -0
- package/dist/fesm2022/embedpdf-angular-metadata.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-page-edit.mjs +65 -0
- package/dist/fesm2022/embedpdf-angular-page-edit.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-page-view.mjs +297 -0
- package/dist/fesm2022/embedpdf-angular-page-view.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-redaction.mjs +93 -0
- package/dist/fesm2022/embedpdf-angular-redaction.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-render.mjs +331 -69
- package/dist/fesm2022/embedpdf-angular-render.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-runtime.mjs +1147 -390
- package/dist/fesm2022/embedpdf-angular-runtime.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-search.mjs +251 -0
- package/dist/fesm2022/embedpdf-angular-search.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-selection.mjs +477 -0
- package/dist/fesm2022/embedpdf-angular-selection.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-shell.mjs +177 -0
- package/dist/fesm2022/embedpdf-angular-shell.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-signature.mjs +120 -0
- package/dist/fesm2022/embedpdf-angular-signature.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-stage.mjs +688 -288
- package/dist/fesm2022/embedpdf-angular-stage.mjs.map +1 -1
- package/dist/fesm2022/embedpdf-angular-stamp.mjs +169 -0
- package/dist/fesm2022/embedpdf-angular-stamp.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-testing.mjs +89 -0
- package/dist/fesm2022/embedpdf-angular-testing.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-toolbar.mjs +1123 -0
- package/dist/fesm2022/embedpdf-angular-toolbar.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular-view-manager.mjs +69 -0
- package/dist/fesm2022/embedpdf-angular-view-manager.mjs.map +1 -0
- package/dist/fesm2022/embedpdf-angular.mjs +23 -3
- package/dist/fesm2022/embedpdf-angular.mjs.map +1 -1
- package/dist/form/index.d.ts +79 -0
- package/dist/history/index.d.ts +28 -0
- package/dist/i18n/index.d.ts +52 -0
- package/dist/index.d.ts +20 -0
- package/dist/interaction/index.d.ts +58 -0
- package/dist/link/index.d.ts +77 -0
- package/dist/measurement/index.d.ts +46 -0
- package/dist/metadata/index.d.ts +51 -0
- package/dist/page-edit/index.d.ts +22 -0
- package/dist/page-view/index.d.ts +94 -0
- package/dist/redaction/index.d.ts +38 -0
- package/dist/render/index.d.ts +45 -6
- package/dist/runtime/index.d.ts +579 -199
- package/dist/search/index.d.ts +71 -0
- package/dist/selection/index.d.ts +141 -0
- package/dist/shell/index.d.ts +88 -0
- package/dist/signature/index.d.ts +45 -0
- package/dist/stage/index.d.ts +242 -141
- package/dist/stamp/index.d.ts +58 -0
- package/dist/testing/index.d.ts +53 -0
- package/dist/toolbar/index.d.ts +257 -0
- package/dist/view-manager/index.d.ts +23 -0
- package/package.json +135 -14
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as _embedpdf_plugin_search from '@embedpdf/plugin-search';
|
|
2
|
+
import { SearchHit, SearchConfig } from '@embedpdf/plugin-search';
|
|
3
|
+
export * from '@embedpdf/plugin-search';
|
|
4
|
+
import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
|
|
5
|
+
import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
|
|
6
|
+
import * as _embedpdf_core from '@embedpdf/core';
|
|
7
|
+
import { PageRef } from '@embedpdf/core';
|
|
8
|
+
import * as i0 from '@angular/core';
|
|
9
|
+
import { Signal } from '@angular/core';
|
|
10
|
+
import { SearchHighlightPiece } from '@embedpdf/web';
|
|
11
|
+
|
|
12
|
+
declare const EpdfSearch_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_search.SearchCapability, {
|
|
13
|
+
query: _embedpdf_plugin_search.SearchQuery | null;
|
|
14
|
+
status: _embedpdf_plugin_search.SearchStatus;
|
|
15
|
+
hitCount: number;
|
|
16
|
+
activeHitIndex: number;
|
|
17
|
+
activeHit: SearchHit | null;
|
|
18
|
+
progress: _embedpdf_plugin_search.SearchProgress;
|
|
19
|
+
error: _embedpdf_core.PluginErrorInfo | null;
|
|
20
|
+
}, "search" | "canSearch" | "refresh" | "cancel" | "clear" | "nextHit" | "previousHit" | "goToHit" | "revealActiveHit" | "getQuery" | "getStatus" | "listHits" | "getHitCount" | "listPagesWithHits" | "getActiveHitIndex" | "getActiveHit" | "getProgress" | "getError" | "findAll", "onStarted" | "onProgressChanged" | "onCompleted" | "onCancelled" | "onFailed" | "onActiveHitChanged" | "onCleared">;
|
|
21
|
+
/**
|
|
22
|
+
* Search: `search({ text })`, `nextHit()`, `goToHit(hit)` and the rest of the Search page's
|
|
23
|
+
* methods, every value of its State table as a signal (`search.hitCount()`), its events as
|
|
24
|
+
* streams (`search.completed$`), and its settings (`search.updateSettings({ highlight })`).
|
|
25
|
+
* Without a document the signals read empty and the methods refuse with `not-ready`.
|
|
26
|
+
*/
|
|
27
|
+
declare class EpdfSearch extends EpdfSearch_base {
|
|
28
|
+
/**
|
|
29
|
+
* Every match found so far, for a list of results. The plugin hands out the same array until
|
|
30
|
+
* matches are added, so a list redraws only when there are new ones. Empty without a document.
|
|
31
|
+
*/
|
|
32
|
+
readonly hits: Signal<readonly SearchHit[]>;
|
|
33
|
+
/**
|
|
34
|
+
* The matches on one page (its ref or its index), for a count on a thumbnail. Pass a function
|
|
35
|
+
* (`() => this.page().ref`) and it follows the page you show. Empty for a page that isn't in
|
|
36
|
+
* the document, and without one.
|
|
37
|
+
*/
|
|
38
|
+
hitsOn(page: PageRef | number | (() => PageRef | number)): Signal<readonly SearchHit[]>;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfSearch, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EpdfSearch>;
|
|
41
|
+
}
|
|
42
|
+
/** The search plugin, with its settings: `withSearch({ highlight: { color: '#fde047' } })`. */
|
|
43
|
+
declare function withSearch(options?: SearchConfig): EmbedPdfFeature;
|
|
44
|
+
|
|
45
|
+
declare class EpdfSearchLayer {
|
|
46
|
+
private readonly clicks$;
|
|
47
|
+
/** A match was clicked (not dragged across): makes matches clickable while it's listened to. */
|
|
48
|
+
readonly hitClick: i0.OutputRef<SearchHit>;
|
|
49
|
+
private readonly page;
|
|
50
|
+
/** The search plugin of the page's own document. */
|
|
51
|
+
private readonly search;
|
|
52
|
+
/** This page's matches: the plugin's own array, the same until matches land on this page. */
|
|
53
|
+
private readonly hits;
|
|
54
|
+
private readonly active;
|
|
55
|
+
private readonly highlight;
|
|
56
|
+
private readonly color;
|
|
57
|
+
private readonly activeColor;
|
|
58
|
+
protected readonly blendMode: i0.Signal<string>;
|
|
59
|
+
/** One painted piece per line of each match: a box when upright, a polygon when turned. */
|
|
60
|
+
protected readonly pieces: i0.Signal<readonly SearchHighlightPiece<SearchHit>[]>;
|
|
61
|
+
/** Tells a click on a match from a drag that starts there (and selects text). */
|
|
62
|
+
private readonly clickDetector;
|
|
63
|
+
/** Whether `(hitClick)` is listened to: only then do matches take the pointer. */
|
|
64
|
+
protected get clickable(): boolean;
|
|
65
|
+
protected press(event: PointerEvent): void;
|
|
66
|
+
protected click(event: MouseEvent, hit: SearchHit): void;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfSearchLayer, never>;
|
|
68
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EpdfSearchLayer, "epdf-search-layer", never, {}, { "hitClick": "hitClick"; }, never, never, true, never>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { EpdfSearch, EpdfSearchLayer, withSearch };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as _embedpdf_plugin_selection from '@embedpdf/plugin-selection';
|
|
2
|
+
import { SelectionConfig } from '@embedpdf/plugin-selection';
|
|
3
|
+
export * from '@embedpdf/plugin-selection';
|
|
4
|
+
import { SelectionHandleSession } from '@embedpdf/web';
|
|
5
|
+
export { copySelection } from '@embedpdf/web';
|
|
6
|
+
import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
|
|
7
|
+
import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
|
|
8
|
+
import * as _embedpdf_core from '@embedpdf/core';
|
|
9
|
+
import { CapabilityToken } from '@embedpdf/core';
|
|
10
|
+
import * as _angular_core from '@angular/core';
|
|
11
|
+
import { AnchoredPlacement } from '@embedpdf/angular/anchored';
|
|
12
|
+
import { StageCapability } from '@embedpdf/plugin-stage/contract';
|
|
13
|
+
|
|
14
|
+
declare const EpdfSelection_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_selection.SelectionCapability, {
|
|
15
|
+
hasSelection: boolean;
|
|
16
|
+
isSelecting: boolean;
|
|
17
|
+
range: _embedpdf_plugin_selection.TextRange | null;
|
|
18
|
+
pages: readonly _embedpdf_core.PageRef[];
|
|
19
|
+
}, "canSelect" | "canCopy" | "select" | "selectAll" | "selectPage" | "selectWordAt" | "selectLineAt" | "extendTo" | "clear" | "getSnapshot" | "getRange" | "listSelectedPages" | "listSegments" | "listRects" | "getAnchor" | "readText" | "readTextInRange", "onChanged" | "onCommitted" | "onCleared">;
|
|
20
|
+
/**
|
|
21
|
+
* Text selection: `select()` and the other methods of the Selecting page, every value of its
|
|
22
|
+
* State table as a signal (`selection.hasSelection()`), its events as streams
|
|
23
|
+
* (`selection.committed$`), and its settings (`selection.settings()`,
|
|
24
|
+
* `selection.updateSettings({ color })`). Without a document the signals read empty and the
|
|
25
|
+
* methods refuse with `not-ready`.
|
|
26
|
+
*/
|
|
27
|
+
declare class EpdfSelection extends EpdfSelection_base {
|
|
28
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfSelection, never>;
|
|
29
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EpdfSelection>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The selection plugin: selecting text with the pointer, a finger and from code. It works with
|
|
33
|
+
* the interaction plugin, so give `withInteraction()` too:
|
|
34
|
+
* `provideEmbedPdf({ engine }, withStage(), withInteraction(), withSelection())`.
|
|
35
|
+
*/
|
|
36
|
+
declare function withSelection(options?: SelectionConfig): EmbedPdfFeature;
|
|
37
|
+
|
|
38
|
+
declare class EpdfSelectionLayer {
|
|
39
|
+
private readonly page;
|
|
40
|
+
private readonly host;
|
|
41
|
+
/** The selection plugin of the page's own document, with what layers need of it. */
|
|
42
|
+
private readonly selection;
|
|
43
|
+
/** This page's selected lines: the same array until the selection on this page changes. */
|
|
44
|
+
private readonly segments;
|
|
45
|
+
/** False while something else draws the selection itself (a highlighter's preview). */
|
|
46
|
+
protected readonly visible: _angular_core.Signal<boolean>;
|
|
47
|
+
private readonly color;
|
|
48
|
+
/** Each line's corners in the page's pixels, which turn with the page. */
|
|
49
|
+
protected readonly polygons: _angular_core.Signal<string[]>;
|
|
50
|
+
/** The CSS variable, then the setting, then the accent (with its own variable) at 35%. */
|
|
51
|
+
protected readonly fill: _angular_core.Signal<string>;
|
|
52
|
+
constructor();
|
|
53
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfSelectionLayer, never>;
|
|
54
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfSelectionLayer, "epdf-selection-layer", never, {}, {}, never, never, true, never>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class EpdfSelectionMenu {
|
|
58
|
+
/** Which side of the selection: `'top'`, `'bottom'`, `'left'` or `'right'`, or a corner. */
|
|
59
|
+
readonly placement: _angular_core.InputSignal<AnchoredPlacement>;
|
|
60
|
+
/** Screen pixels between the selection and the menu. */
|
|
61
|
+
readonly gap: _angular_core.InputSignal<number>;
|
|
62
|
+
/** The selection of the document this part of the template talks to. */
|
|
63
|
+
private readonly selection;
|
|
64
|
+
private readonly selecting;
|
|
65
|
+
private readonly settled;
|
|
66
|
+
/** Where the menu goes; nothing while a drag is still selecting. */
|
|
67
|
+
protected readonly anchor: _angular_core.Signal<_embedpdf_plugin_selection.SelectionAnchor | null>;
|
|
68
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfSelectionMenu, never>;
|
|
69
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfSelectionMenu, "epdf-selection-menu", never, { "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
type Role = 'start' | 'end';
|
|
73
|
+
/** One handle, laid out in the Stage's own box. */
|
|
74
|
+
interface HandleLayout {
|
|
75
|
+
readonly role: Role;
|
|
76
|
+
readonly left: number;
|
|
77
|
+
readonly top: number;
|
|
78
|
+
readonly height: number;
|
|
79
|
+
readonly barTop: number;
|
|
80
|
+
readonly barHeight: number;
|
|
81
|
+
readonly headTop: number;
|
|
82
|
+
/** Null for upright text: an upright handle carries no transform. */
|
|
83
|
+
readonly transform: string | null;
|
|
84
|
+
readonly transformOrigin: string | null;
|
|
85
|
+
}
|
|
86
|
+
/** What a press on a handle starts: the point it grabbed (the bar's middle), and the drag. */
|
|
87
|
+
type SelectionGripDrag = {
|
|
88
|
+
readonly base: {
|
|
89
|
+
readonly x: number;
|
|
90
|
+
readonly y: number;
|
|
91
|
+
};
|
|
92
|
+
readonly session: SelectionHandleSession;
|
|
93
|
+
} | null;
|
|
94
|
+
declare class EpdfSelectionHandles {
|
|
95
|
+
/** The view the handles are drawn over: the Stage they're in, unless you name another. */
|
|
96
|
+
readonly token: _angular_core.InputSignal<CapabilityToken<StageCapability> | undefined>;
|
|
97
|
+
protected readonly pad = 14;
|
|
98
|
+
protected readonly bar = 2;
|
|
99
|
+
protected readonly head = 12;
|
|
100
|
+
protected readonly gripWidth: number;
|
|
101
|
+
private readonly host;
|
|
102
|
+
private readonly enclosingStage;
|
|
103
|
+
/** How the surface it's in places things: the Stage's camera, or nothing to project through. */
|
|
104
|
+
private readonly projection;
|
|
105
|
+
private readonly documentId;
|
|
106
|
+
private readonly selection;
|
|
107
|
+
private readonly stage;
|
|
108
|
+
private readonly selecting;
|
|
109
|
+
private readonly visible;
|
|
110
|
+
private readonly settings;
|
|
111
|
+
/** Both ends of the selection, compared corner by corner: the same until one moves. */
|
|
112
|
+
private readonly endpoints;
|
|
113
|
+
/** The handle being dragged: it keeps both handles shown while it selects. */
|
|
114
|
+
private readonly dragging;
|
|
115
|
+
/** Each color is its CSS variable first, then the setting; an unset color is the accent. */
|
|
116
|
+
protected readonly color: _angular_core.Signal<string>;
|
|
117
|
+
protected readonly shadow: _angular_core.Signal<string>;
|
|
118
|
+
/** Whether this sits over a Stage, the only surface with a camera to place handles through. */
|
|
119
|
+
private readonly overStage;
|
|
120
|
+
protected readonly handles: _angular_core.Signal<readonly HandleLayout[]>;
|
|
121
|
+
protected readonly armStart: () => SelectionGripDrag;
|
|
122
|
+
protected readonly armEnd: () => SelectionGripDrag;
|
|
123
|
+
constructor();
|
|
124
|
+
/** A press on a handle: start a drag from the other end, with the selection as it is now. */
|
|
125
|
+
private arm;
|
|
126
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfSelectionHandles, never>;
|
|
127
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EpdfSelectionHandles, "epdf-selection-handles", never, { "token": { "alias": "token"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare class EpdfSelectionClipboard {
|
|
131
|
+
/** Read the selected text when the selection settles (default true). */
|
|
132
|
+
readonly prefetch: _angular_core.InputSignal<boolean | undefined>;
|
|
133
|
+
/** Ctrl+C or the Copy menu met a selection the user may not copy: say so. */
|
|
134
|
+
readonly refused: _angular_core.OutputEmitterRef<void>;
|
|
135
|
+
private readonly selection;
|
|
136
|
+
constructor();
|
|
137
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EpdfSelectionClipboard, never>;
|
|
138
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EpdfSelectionClipboard, "epdf-selection-clipboard, [epdfSelectionClipboard]", never, { "prefetch": { "alias": "prefetch"; "required": false; "isSignal": true; }; }, { "refused": "refused"; }, never, never, true, never>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export { EpdfSelection, EpdfSelectionClipboard, EpdfSelectionHandles, EpdfSelectionLayer, EpdfSelectionMenu, withSelection };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as _embedpdf_plugin_shell from '@embedpdf/plugin-shell';
|
|
2
|
+
import { SurfaceProps, OpenSurfaceOptions } from '@embedpdf/plugin-shell';
|
|
3
|
+
export * from '@embedpdf/plugin-shell';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { Signal } from '@angular/core';
|
|
6
|
+
import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
|
|
7
|
+
import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
|
|
8
|
+
|
|
9
|
+
/** One named panel, dialog or overlay of the service's document. */
|
|
10
|
+
interface EpdfSurface {
|
|
11
|
+
/** Whether it's open; false without a document. */
|
|
12
|
+
readonly isOpen: Signal<boolean>;
|
|
13
|
+
/** The props it was opened with, or updated to; empty when it has none. */
|
|
14
|
+
readonly props: Signal<SurfaceProps>;
|
|
15
|
+
/** Open it: `exclusive` closes the others of that group, `props` travel with it. */
|
|
16
|
+
open(options?: OpenSurfaceOptions): void;
|
|
17
|
+
close(): void;
|
|
18
|
+
/** Open it when it's closed, close it when it's open. */
|
|
19
|
+
toggle(options?: OpenSurfaceOptions): void;
|
|
20
|
+
}
|
|
21
|
+
declare const EpdfShell_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_shell.ShellCapability, {
|
|
22
|
+
openSurfaces: readonly _embedpdf_plugin_shell.SurfaceState[];
|
|
23
|
+
openMenus: readonly string[];
|
|
24
|
+
}, "open" | "close" | "toggle" | "isOpen" | "getSurface" | "listOpenSurfaces" | "updateSurfaceProps" | "closeAll" | "isMenuOpen" | "listOpenMenus" | "openMenu" | "closeMenu" | "toggleMenu" | "closeAllMenus" | "getSnapshot" | "applySnapshot", "onSurfaceOpened" | "onSurfaceClosed" | "onMenuOpened" | "onMenuClosed">;
|
|
25
|
+
/**
|
|
26
|
+
* The panels, dialogs and menus of this part of the template's document: `openSurfaces()` and
|
|
27
|
+
* `openMenus()` as signals, the shell's methods, `surfaceOpened$` and the other events, and
|
|
28
|
+
* `surface(id)` for one panel.
|
|
29
|
+
*/
|
|
30
|
+
declare class EpdfShell extends EpdfShell_base {
|
|
31
|
+
/**
|
|
32
|
+
* One panel, dialog or overlay: `isOpen()` and `props()` as signals, and `open()`, `close()`
|
|
33
|
+
* and `toggle()`. Pass a function for an id that changes (a component's input). Without a
|
|
34
|
+
* document it reads as closed and its verbs do nothing.
|
|
35
|
+
*
|
|
36
|
+
* protected readonly panel = inject(EpdfShell).surface('comments');
|
|
37
|
+
*/
|
|
38
|
+
surface(id: string | (() => string)): EpdfSurface;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfShell, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EpdfShell>;
|
|
41
|
+
}
|
|
42
|
+
/** The shell plugin: which panels, dialogs and menus are open, per document. */
|
|
43
|
+
declare function withShell(): EmbedPdfFeature;
|
|
44
|
+
/**
|
|
45
|
+
* A button of yours that opens and closes a panel, and says whether it's open
|
|
46
|
+
* (`aria-expanded`). `epdfPanelToggleExclusive` gives the panel its group, so opening it
|
|
47
|
+
* closes the group's other panel:
|
|
48
|
+
*
|
|
49
|
+
* <button epdfPanelToggle="comments" epdfPanelToggleExclusive="right">Comments</button>
|
|
50
|
+
*
|
|
51
|
+
* The template reference has `isOpen()`: `#comments="epdfPanelToggle"`.
|
|
52
|
+
*/
|
|
53
|
+
declare class EpdfPanelToggle {
|
|
54
|
+
/** The panel's name. */
|
|
55
|
+
readonly id: i0.InputSignal<string>;
|
|
56
|
+
/** Its group: opening it closes the other open panel of the same group. */
|
|
57
|
+
readonly exclusive: i0.InputSignal<string | undefined>;
|
|
58
|
+
private readonly panel;
|
|
59
|
+
/** Whether the panel is open. */
|
|
60
|
+
readonly isOpen: Signal<boolean>;
|
|
61
|
+
/** Open the panel when it's closed, close it when it's open. */
|
|
62
|
+
toggle(): void;
|
|
63
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfPanelToggle, never>;
|
|
64
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfPanelToggle, "[epdfPanelToggle]", ["epdfPanelToggle"], { "id": { "alias": "epdfPanelToggle"; "required": true; "isSignal": true; }; "exclusive": { "alias": "epdfPanelToggleExclusive"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* An element of yours that takes the cursor when the panel `epdfSurfaceFocus` names asks for it:
|
|
68
|
+
* on every `open(id, { focus: true })`, a command whose panel says `focus` among them, and when
|
|
69
|
+
* the element appears while the request is up (the panel opened, or its code loaded, because of
|
|
70
|
+
* it). A plain open never moves it. `epdfSurfaceFocusSelect` selects an input's text, so typing
|
|
71
|
+
* replaces it:
|
|
72
|
+
*
|
|
73
|
+
* <input epdfSurfaceFocus="search" epdfSurfaceFocusSelect [(ngModel)]="query" />
|
|
74
|
+
*
|
|
75
|
+
* It reads the panel of this part of the template's document.
|
|
76
|
+
*/
|
|
77
|
+
declare class EpdfSurfaceFocus {
|
|
78
|
+
/** The panel's name. */
|
|
79
|
+
readonly id: i0.InputSignal<string>;
|
|
80
|
+
/** Select the text of an input or a text area as it takes focus. */
|
|
81
|
+
readonly select: i0.InputSignalWithTransform<boolean, unknown>;
|
|
82
|
+
constructor();
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfSurfaceFocus, never>;
|
|
84
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EpdfSurfaceFocus, "[epdfSurfaceFocus]", never, { "id": { "alias": "epdfSurfaceFocus"; "required": true; "isSignal": true; }; "select": { "alias": "epdfSurfaceFocusSelect"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { EpdfPanelToggle, EpdfShell, EpdfSurfaceFocus, withShell };
|
|
88
|
+
export type { EpdfSurface };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as _embedpdf_plugin_signature from '@embedpdf/plugin-signature';
|
|
2
|
+
import { SignerRow, SignatureConfig } from '@embedpdf/plugin-signature';
|
|
3
|
+
export * from '@embedpdf/plugin-signature';
|
|
4
|
+
import * as _embedpdf_angular_runtime from '@embedpdf/angular/runtime';
|
|
5
|
+
import { EmbedPdfFeature } from '@embedpdf/angular/runtime';
|
|
6
|
+
import * as _embedpdf_core from '@embedpdf/core';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { Signal } from '@angular/core';
|
|
9
|
+
|
|
10
|
+
declare const EpdfSignature_base: _embedpdf_angular_runtime.PluginServiceClass<_embedpdf_plugin_signature.SignatureCapability, {
|
|
11
|
+
signatures: readonly _embedpdf_plugin_signature.SignatureInfo[];
|
|
12
|
+
protection: _embedpdf_plugin_signature.DocumentProtection | null;
|
|
13
|
+
target: _embedpdf_plugin_signature.FormFieldRef | null;
|
|
14
|
+
busy: boolean;
|
|
15
|
+
pending: _embedpdf_plugin_signature.SignaturePending | null;
|
|
16
|
+
status: _embedpdf_core.ResourceStatus;
|
|
17
|
+
}, "sign" | "getStatus" | "refresh" | "validate" | "getSnapshot" | "canFill" | "listSignatures" | "listUnsignedFields" | "getSignature" | "listVerdicts" | "getVerdict" | "getProtection" | "getPending" | "isBusy" | "getMode" | "getTarget" | "prepareSignature" | "completeSignature" | "cancelPending" | "fillField" | "clearField" | "placeMark" | "setTarget" | "requestInspection" | "validateField" | "analyzeChanges" | "readRevision" | "canSign" | "canCertify" | "canReadRevision", "onSigned" | "onFilled" | "onCleared" | "onValidated" | "onProtectionChanged" | "onInvalidationPredicted" | "onTargetChanged" | "onSignRequested" | "onInspectionRequested">;
|
|
18
|
+
/**
|
|
19
|
+
* Signatures: `signatures()`, `protection()`, `target()`, `busy()`, `pending()` and `status()`
|
|
20
|
+
* as signals; signing, filling and checking as methods (`sign()`, `placeMark()`,
|
|
21
|
+
* `fillField()`, `validate()`, …, the Signatures page's Methods table); the events as streams
|
|
22
|
+
* (`signed$`, `invalidationPredicted$`, `targetChanged$`, …); and the settings. Without a
|
|
23
|
+
* document, `signatures()` is empty and a method refuses with `not-ready`.
|
|
24
|
+
*/
|
|
25
|
+
declare class EpdfSignature extends EpdfSignature_base {
|
|
26
|
+
/** The stamp plugin, where a person's marks are kept; absent without `withStamp()`. */
|
|
27
|
+
private readonly stamp;
|
|
28
|
+
private readonly libraries;
|
|
29
|
+
private readonly assets;
|
|
30
|
+
/**
|
|
31
|
+
* The people whose marks this browser holds, one row per stamp library of kind
|
|
32
|
+
* `signatures`, each with its signatures and its initials, for a picker. Empty without the
|
|
33
|
+
* stamp plugin. Rename, delete and export a person with the stamp plugin's library methods.
|
|
34
|
+
*/
|
|
35
|
+
readonly signerRows: Signal<readonly SignerRow[]>;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EpdfSignature, never>;
|
|
37
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EpdfSignature>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The signature plugin, with its settings: the `key` to sign with (a signer, or a function that
|
|
41
|
+
* gives one when someone signs), the `mode`, the certificates you `trust`, and `allowCertify`.
|
|
42
|
+
*/
|
|
43
|
+
declare function withSignature(config?: SignatureConfig): EmbedPdfFeature;
|
|
44
|
+
|
|
45
|
+
export { EpdfSignature, withSignature };
|