@abyss-project/commons-front-core 1.0.146 → 2.0.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/dist/{CookieConsentSettings.component-OElkXdNK.js → CookieConsentSettings.component-Dqbo9N8Y.js} +350 -180
- package/dist/components/Inputs/ColorPalette/ColorPalette.component.d.ts +1 -0
- package/dist/components/Layouts/AbyssBillingPlan/AbyssBillingPlan.component.d.ts +1 -1
- package/dist/components/Modals/UserSettingsModal/UserSettings.compat.d.ts +0 -2
- package/dist/components/Modals/UserSettingsModal/UserSettingsModal.component.d.ts +0 -2
- package/dist/components/PdfEditor/hooks/use-pdf-document.d.ts +6 -1
- package/dist/components/PdfEditor/operations/actions.d.ts +15 -0
- package/dist/components/PdfEditor/operations/compute-page-order.d.ts +4 -0
- package/dist/components/PdfEditor/operations/extract.d.ts +2 -0
- package/dist/components/PdfEditor/operations/extract.spec.d.ts +1 -0
- package/dist/components/PdfEditor/operations/rasterize.d.ts +3 -0
- package/dist/components/PdfEditor/operations/redact.d.ts +9 -0
- package/dist/components/PdfEditor/operations/redact.spec.d.ts +1 -0
- package/dist/components/PdfEditor/operations/rotate-coords.d.ts +19 -0
- package/dist/components/PdfEditor/operations/rotate-coords.spec.d.ts +1 -0
- package/dist/components/PdfEditor/signature/SignaturePicker.d.ts +3 -0
- package/dist/components/PdfEditor/signature/SignatureSavedList.d.ts +3 -0
- package/dist/components/PdfEditor/signature/resolve-asset.d.ts +3 -0
- package/dist/components/PdfEditor/signature/resolve-asset.spec.d.ts +1 -0
- package/dist/components/PdfEditor/tools/FillFieldsTool.d.ts +2 -1
- package/dist/components/PdfEditor/tools/RedactTool.d.ts +2 -0
- package/dist/components/PdfEditor/tools/ShapeTool.d.ts +17 -0
- package/dist/components/PdfEditor/tools/SignatureTool.d.ts +3 -0
- package/dist/components/PdfEditor/tools/TextTool.d.ts +11 -1
- package/dist/components/PdfEditor/tools/Toolbar.d.ts +17 -0
- package/dist/components/PdfEditor/tools/tool-options-ui.d.ts +4 -0
- package/dist/components/PdfEditor/types.d.ts +64 -4
- package/dist/components/PdfEditor/viewer/PageOverlay.d.ts +10 -3
- package/dist/components/PdfEditor/viewer/PdfCanvas.d.ts +10 -2
- package/dist/components/PdfEditor/viewer/ViewerControls.d.ts +17 -0
- package/dist/components/Support/types.d.ts +2 -0
- package/dist/cookie-consent.js +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +200 -22
- package/dist/{index-DPJn-INz.js → index--KPqynn_.js} +2 -2
- package/dist/{index-pojd1-xt.js → index-AykyIzzG.js} +3 -3
- package/dist/{index-VzGJqZUr.js → index-B3gKqf-p.js} +3 -3
- package/dist/{index-JqXrUnnS.js → index-BCVRYGLI.js} +4 -4
- package/dist/{index-CTzGCHT1.js → index-BcInTypv.js} +4 -4
- package/dist/{index-HPIAkAU-.js → index-BdWnB1rS.js} +2 -2
- package/dist/{index-paxe4Y8a.js → index-BiREoCYc.js} +2 -2
- package/dist/{index-DedcVRIy.js → index-CL4h9Xoy.js} +4 -4
- package/dist/{index-C4iVvX_c.js → index-CSpwXL74.js} +1 -1
- package/dist/{index-DAG2YmhY.js → index-CTVUhat-.js} +2 -2
- package/dist/{index-0DKoS1Ho.js → index-Ca_vS7os.js} +2 -2
- package/dist/{index-CCaYRiXR.js → index-Cil-O_44.js} +2 -2
- package/dist/{index-CeZ2OKqT.js → index-CoY-Eqah.js} +2 -2
- package/dist/{index-DMJCOIN6.js → index-DON7Q_3s.js} +2 -2
- package/dist/{index-aJDianQ2.js → index-DZG8q-Mp.js} +3 -3
- package/dist/{index-C-0bb3BS.js → index-Db-3tPxk.js} +2 -2
- package/dist/{index-D-prSy8i.js → index-Df71mOHZ.js} +3 -3
- package/dist/{index-D-Z-Yepf.js → index-DpUTQu7B.js} +2 -2
- package/dist/{index-C_VHuOIZ.js → index-QwHRQNwT.js} +2 -2
- package/dist/{index-DP9EENt-.js → index-VEVfBSFw.js} +2 -2
- package/dist/{index-CWQyokns.js → index-a9_oOlg4.js} +34972 -32579
- package/dist/{index-BStJ2eR5.js → index-ldQTy6Xb.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/translations/en.d.ts +96 -11
- package/dist/translations/fr.d.ts +96 -11
- package/package.json +143 -139
|
@@ -4,10 +4,8 @@ type Props = {
|
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
onCancel: () => Promise<void>;
|
|
6
6
|
user: UserSettingsUser;
|
|
7
|
-
resetApiKey: () => Promise<void>;
|
|
8
7
|
fetchMe: () => Promise<void>;
|
|
9
8
|
isLoading: boolean;
|
|
10
|
-
apiKey: string;
|
|
11
9
|
abyssUrl: string;
|
|
12
10
|
};
|
|
13
11
|
declare const UserSettings: FC<Props>;
|
|
@@ -22,10 +22,8 @@ type Props = {
|
|
|
22
22
|
isOpen: boolean;
|
|
23
23
|
onCancel: () => Promise<void>;
|
|
24
24
|
onSave: (values: UserSettingsValues) => Promise<void>;
|
|
25
|
-
resetApiKey: () => Promise<void>;
|
|
26
25
|
user: UserSettingsUser;
|
|
27
26
|
isLoading: boolean;
|
|
28
|
-
apiKey: string;
|
|
29
27
|
abyssUrl: string;
|
|
30
28
|
profileSuffix?: string;
|
|
31
29
|
deleteAccountSuffix?: string;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { PDFDocumentProxy } from 'pdfjs-dist';
|
|
2
2
|
import { PdfSource } from '../types';
|
|
3
|
+
type Decryptor = (bytes: Uint8Array, password: string) => Promise<Uint8Array>;
|
|
3
4
|
interface UsePdfDocumentResult {
|
|
4
5
|
pdfDoc: PDFDocumentProxy | null;
|
|
5
6
|
sourceBytes: Uint8Array | null;
|
|
6
7
|
pageCount: number;
|
|
7
8
|
loading: boolean;
|
|
8
9
|
error: Error | null;
|
|
10
|
+
needsPassword: boolean;
|
|
11
|
+
unlocking: boolean;
|
|
12
|
+
unlockFailed: boolean;
|
|
13
|
+
unlock: (password: string) => void;
|
|
9
14
|
}
|
|
10
|
-
export declare const usePdfDocument: (source: PdfSource | null) => UsePdfDocumentResult;
|
|
15
|
+
export declare const usePdfDocument: (source: PdfSource | null, decryptor?: Decryptor) => UsePdfDocumentResult;
|
|
11
16
|
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AcroFormField, EditorAction, PdfOperation, ToolKind } from '../types';
|
|
2
|
+
export declare const addOperation: (operation: PdfOperation) => EditorAction;
|
|
3
|
+
export declare const addOperations: (operations: PdfOperation[]) => EditorAction;
|
|
4
|
+
export declare const addOperationAllPages: (operation: PdfOperation, pageIndices: number[]) => EditorAction;
|
|
5
|
+
export declare const updateOperation: (opId: string, operation: PdfOperation) => EditorAction;
|
|
6
|
+
export declare const moveOperation: (opId: string, operation: PdfOperation) => EditorAction;
|
|
7
|
+
export declare const deleteOperation: (opId: string) => EditorAction;
|
|
8
|
+
export declare const undo: () => EditorAction;
|
|
9
|
+
export declare const redo: () => EditorAction;
|
|
10
|
+
export declare const setActiveTool: (tool: ToolKind) => EditorAction;
|
|
11
|
+
export declare const setActivePage: (pageIndex: number) => EditorAction;
|
|
12
|
+
export declare const setAcroFormFields: (fields: AcroFormField[]) => EditorAction;
|
|
13
|
+
export declare const setPendingSignature: (dataUrl: string | null) => EditorAction;
|
|
14
|
+
export declare const setPendingText: (text: string | null) => EditorAction;
|
|
15
|
+
export declare const setPendingApplyAllPages: (enabled: boolean) => EditorAction;
|
|
@@ -5,5 +5,9 @@ export interface InsertedPageRef {
|
|
|
5
5
|
uploadPageIndex: number;
|
|
6
6
|
}
|
|
7
7
|
export declare function computeInsertionTable(numPages: number, operations: PdfOperation[]): Map<number, InsertedPageRef>;
|
|
8
|
+
export declare function computeBlankPages(numPages: number, operations: PdfOperation[]): Map<number, {
|
|
9
|
+
widthPt: number;
|
|
10
|
+
heightPt: number;
|
|
11
|
+
}>;
|
|
8
12
|
export declare function computePageOrder(numPages: number, operations: PdfOperation[]): number[];
|
|
9
13
|
export declare function computeRotationMap(operations: PdfOperation[]): Map<number, number>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PdfOperation } from '../types';
|
|
2
|
+
export interface RedactRect {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
widthPt: number;
|
|
6
|
+
heightPt: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const hasRedactions: (operations: PdfOperation[]) => boolean;
|
|
9
|
+
export declare const collectRedactions: (operations: PdfOperation[]) => Map<number, RedactRect[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Rotation = 0 | 90 | 180 | 270;
|
|
2
|
+
export declare const normalizeRotation: (deg: number) => Rotation;
|
|
3
|
+
export declare const viewSize: (cw: number, ch: number, rotation: Rotation) => {
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const contentSize: (vw: number, vh: number, rotation: Rotation) => {
|
|
8
|
+
w: number;
|
|
9
|
+
h: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const contentToView: (x: number, y: number, rotation: Rotation, cw: number, ch: number) => {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const viewToContent: (x: number, y: number, rotation: Rotation, cw: number, ch: number) => {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const innerLayerTransform: (rotation: Rotation, contentWidthPx: number, contentHeightPx: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AssetPalette, SaveSignatureFn } from '../types';
|
|
3
|
+
import { ResolveAssetBytes } from './resolve-asset';
|
|
3
4
|
interface SignaturePickerProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
onClose: () => void;
|
|
@@ -7,6 +8,8 @@ interface SignaturePickerProps {
|
|
|
7
8
|
onCaptureText?: (text: string) => void;
|
|
8
9
|
assetPalette?: AssetPalette;
|
|
9
10
|
onSaveSignature?: SaveSignatureFn;
|
|
11
|
+
resolveAssetBytes?: ResolveAssetBytes;
|
|
12
|
+
onAssetError?: (message: string) => void;
|
|
10
13
|
manageAssetsUrl?: string;
|
|
11
14
|
}
|
|
12
15
|
export declare const SignaturePicker: React.FC<SignaturePickerProps>;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AssetPalette } from '../types';
|
|
3
|
+
import { ResolveAssetBytes } from './resolve-asset';
|
|
3
4
|
interface SignatureSavedListProps {
|
|
4
5
|
palette: AssetPalette;
|
|
5
6
|
onPick: (dataUrl: string) => void;
|
|
6
7
|
onPickText?: (text: string) => void;
|
|
7
8
|
onClose: () => void;
|
|
9
|
+
resolveAssetBytes?: ResolveAssetBytes;
|
|
10
|
+
onAssetError?: (message: string) => void;
|
|
8
11
|
}
|
|
9
12
|
export declare const SignatureSavedList: React.FC<SignatureSavedListProps>;
|
|
10
13
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { AcroFormField, EditorAction } from '../types';
|
|
2
|
+
import { AcroFormField, EditorAction, PdfOperation } from '../types';
|
|
3
3
|
interface FillFieldsToolProps {
|
|
4
4
|
fields: AcroFormField[];
|
|
5
|
+
operations: PdfOperation[];
|
|
5
6
|
dispatch: React.Dispatch<EditorAction>;
|
|
6
7
|
}
|
|
7
8
|
export declare const FillFieldsTool: React.FC<FillFieldsToolProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ShapeKind } from '../types';
|
|
3
|
+
interface ShapeToolProps {
|
|
4
|
+
mode: 'shape' | 'highlight';
|
|
5
|
+
shapeKind: ShapeKind;
|
|
6
|
+
onShapeKind: (k: ShapeKind) => void;
|
|
7
|
+
color: string;
|
|
8
|
+
onColorChange: (c: string) => void;
|
|
9
|
+
strokeWidth: number;
|
|
10
|
+
onStrokeWidthChange: (w: number) => void;
|
|
11
|
+
fill: string | null;
|
|
12
|
+
onFillChange: (c: string | null) => void;
|
|
13
|
+
highlightColor: string;
|
|
14
|
+
onHighlightColorChange: (c: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const ShapeTool: React.FC<ShapeToolProps>;
|
|
17
|
+
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AssetPalette, EditorAction, SaveSignatureFn } from '../types';
|
|
3
|
+
import { ResolveAssetBytes } from '../signature/resolve-asset';
|
|
3
4
|
interface SignatureToolProps {
|
|
4
5
|
pendingSignature: string | null;
|
|
5
6
|
pendingApplyAllPages: boolean;
|
|
6
7
|
dispatch: React.Dispatch<EditorAction>;
|
|
7
8
|
assetPalette?: AssetPalette;
|
|
8
9
|
onSaveSignature?: SaveSignatureFn;
|
|
10
|
+
resolveAssetBytes?: ResolveAssetBytes;
|
|
11
|
+
onAssetError?: (message: string) => void;
|
|
9
12
|
manageAssetsUrl?: string;
|
|
10
13
|
}
|
|
11
14
|
export declare const SignatureTool: React.FC<SignatureToolProps>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { TextFontFamily } from '../types';
|
|
3
|
+
interface TextToolProps {
|
|
4
|
+
color: string;
|
|
5
|
+
onColorChange: (c: string) => void;
|
|
6
|
+
size: number;
|
|
7
|
+
onSizeChange: (s: number) => void;
|
|
8
|
+
family: TextFontFamily;
|
|
9
|
+
onFamilyChange: (f: TextFontFamily) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TextTool: React.FC<TextToolProps>;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AssetPalette, ToolKind, EditorAction, ExportOption } from '../types';
|
|
3
|
+
import { ResolveAssetBytes } from '../signature/resolve-asset';
|
|
3
4
|
interface ToolbarProps {
|
|
4
5
|
activeTool: ToolKind;
|
|
5
6
|
canUndo: boolean;
|
|
@@ -12,7 +13,23 @@ interface ToolbarProps {
|
|
|
12
13
|
exportOptions: ExportOption[];
|
|
13
14
|
fileName?: string;
|
|
14
15
|
assetPalette?: AssetPalette;
|
|
16
|
+
resolveAssetBytes?: ResolveAssetBytes;
|
|
17
|
+
onAssetError?: (message: string) => void;
|
|
15
18
|
pendingApplyAllPages?: boolean;
|
|
19
|
+
compact?: boolean;
|
|
20
|
+
sidebarOpen?: boolean;
|
|
21
|
+
onToggleSidebar?: () => void;
|
|
22
|
+
onAddBlankPage?: () => void;
|
|
23
|
+
onAddPageNumbers?: () => void;
|
|
24
|
+
onWatermark?: () => void;
|
|
25
|
+
onInsertImage?: () => void;
|
|
26
|
+
onInsertCloudImage?: () => void;
|
|
27
|
+
onExtractPages?: () => void;
|
|
28
|
+
onProtect?: () => void;
|
|
29
|
+
onCompress?: () => void;
|
|
30
|
+
securing?: boolean;
|
|
31
|
+
toolOptions?: React.ReactNode;
|
|
32
|
+
placementActive?: boolean;
|
|
16
33
|
}
|
|
17
34
|
export declare const Toolbar: React.FC<ToolbarProps>;
|
|
18
35
|
export {};
|
|
@@ -9,13 +9,19 @@ export declare enum PdfOperationType {
|
|
|
9
9
|
ANNOTATE_TEXT = "ANNOTATE_TEXT",
|
|
10
10
|
ANNOTATE_DRAW = "ANNOTATE_DRAW",
|
|
11
11
|
ANNOTATE_IMAGE = "ANNOTATE_IMAGE",
|
|
12
|
+
ANNOTATE_SHAPE = "ANNOTATE_SHAPE",
|
|
13
|
+
ANNOTATE_HIGHLIGHT = "ANNOTATE_HIGHLIGHT",
|
|
14
|
+
ANNOTATE_REDACT = "ANNOTATE_REDACT",
|
|
12
15
|
FILL_FIELD = "FILL_FIELD",
|
|
13
16
|
PAGE_REORDER = "PAGE_REORDER",
|
|
14
17
|
PAGE_DELETE = "PAGE_DELETE",
|
|
15
18
|
PAGE_ROTATE = "PAGE_ROTATE",
|
|
16
19
|
PAGE_INSERT_FROM_UPLOAD = "PAGE_INSERT_FROM_UPLOAD",
|
|
20
|
+
PAGE_INSERT_BLANK = "PAGE_INSERT_BLANK",
|
|
17
21
|
FLATTEN = "FLATTEN"
|
|
18
22
|
}
|
|
23
|
+
export type ShapeKind = 'rect' | 'ellipse' | 'line' | 'arrow';
|
|
24
|
+
export type TextFontFamily = 'sans' | 'serif' | 'mono';
|
|
19
25
|
export type PdfImageSource = {
|
|
20
26
|
kind: 'USER_ASSET';
|
|
21
27
|
assetId: string;
|
|
@@ -32,6 +38,9 @@ export type PdfOperation = {
|
|
|
32
38
|
text: string;
|
|
33
39
|
fontSize: number;
|
|
34
40
|
color: string;
|
|
41
|
+
fontFamily?: TextFontFamily;
|
|
42
|
+
opacity?: number;
|
|
43
|
+
rotationDeg?: number;
|
|
35
44
|
} | {
|
|
36
45
|
opId: string;
|
|
37
46
|
type: PdfOperationType.ANNOTATE_DRAW;
|
|
@@ -48,6 +57,35 @@ export type PdfOperation = {
|
|
|
48
57
|
widthPt: number;
|
|
49
58
|
heightPt: number;
|
|
50
59
|
source: PdfImageSource;
|
|
60
|
+
} | {
|
|
61
|
+
opId: string;
|
|
62
|
+
type: PdfOperationType.ANNOTATE_SHAPE;
|
|
63
|
+
pageIndex: number;
|
|
64
|
+
shape: ShapeKind;
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
x2: number;
|
|
68
|
+
y2: number;
|
|
69
|
+
color: string;
|
|
70
|
+
strokeWidth: number;
|
|
71
|
+
fill?: string | null;
|
|
72
|
+
} | {
|
|
73
|
+
opId: string;
|
|
74
|
+
type: PdfOperationType.ANNOTATE_HIGHLIGHT;
|
|
75
|
+
pageIndex: number;
|
|
76
|
+
x: number;
|
|
77
|
+
y: number;
|
|
78
|
+
widthPt: number;
|
|
79
|
+
heightPt: number;
|
|
80
|
+
color: string;
|
|
81
|
+
} | {
|
|
82
|
+
opId: string;
|
|
83
|
+
type: PdfOperationType.ANNOTATE_REDACT;
|
|
84
|
+
pageIndex: number;
|
|
85
|
+
x: number;
|
|
86
|
+
y: number;
|
|
87
|
+
widthPt: number;
|
|
88
|
+
heightPt: number;
|
|
51
89
|
} | {
|
|
52
90
|
opId: string;
|
|
53
91
|
type: PdfOperationType.FILL_FIELD;
|
|
@@ -72,6 +110,12 @@ export type PdfOperation = {
|
|
|
72
110
|
afterPageIndex: number;
|
|
73
111
|
uploadKey: string;
|
|
74
112
|
uploadPages: number[];
|
|
113
|
+
} | {
|
|
114
|
+
opId: string;
|
|
115
|
+
type: PdfOperationType.PAGE_INSERT_BLANK;
|
|
116
|
+
afterPageIndex: number;
|
|
117
|
+
widthPt: number;
|
|
118
|
+
heightPt: number;
|
|
75
119
|
} | {
|
|
76
120
|
opId: string;
|
|
77
121
|
type: PdfOperationType.FLATTEN;
|
|
@@ -101,7 +145,7 @@ export type PdfSource = {
|
|
|
101
145
|
fileName: string;
|
|
102
146
|
};
|
|
103
147
|
export type PdfEditorMode = 'anonymous-client' | 'anonymous-shared' | 'session-authenticated' | 'session-cloud-bridge';
|
|
104
|
-
export type ToolKind = 'select' | 'text' | 'draw' | 'signature' | 'eraser' | 'fill-fields';
|
|
148
|
+
export type ToolKind = 'select' | 'text' | 'draw' | 'shape' | 'highlight' | 'redact' | 'signature' | 'eraser' | 'fill-fields';
|
|
105
149
|
export interface AcroFormField {
|
|
106
150
|
name: string;
|
|
107
151
|
kind: 'text' | 'checkbox' | 'radio' | 'dropdown';
|
|
@@ -122,11 +166,14 @@ export interface EditorState {
|
|
|
122
166
|
export type EditorAction = {
|
|
123
167
|
type: 'ADD_OPERATION';
|
|
124
168
|
payload: PdfOperation;
|
|
169
|
+
} | {
|
|
170
|
+
type: 'ADD_OPERATIONS';
|
|
171
|
+
payload: PdfOperation[];
|
|
125
172
|
} | {
|
|
126
173
|
type: 'ADD_OPERATION_ALL_PAGES';
|
|
127
174
|
payload: {
|
|
128
175
|
op: PdfOperation;
|
|
129
|
-
|
|
176
|
+
pageIndices: number[];
|
|
130
177
|
};
|
|
131
178
|
} | {
|
|
132
179
|
type: 'UPDATE_OPERATION';
|
|
@@ -134,6 +181,12 @@ export type EditorAction = {
|
|
|
134
181
|
opId: string;
|
|
135
182
|
op: PdfOperation;
|
|
136
183
|
};
|
|
184
|
+
} | {
|
|
185
|
+
type: 'MOVE_OPERATION';
|
|
186
|
+
payload: {
|
|
187
|
+
opId: string;
|
|
188
|
+
op: PdfOperation;
|
|
189
|
+
};
|
|
137
190
|
} | {
|
|
138
191
|
type: 'DELETE_OPERATION';
|
|
139
192
|
payload: {
|
|
@@ -199,19 +252,26 @@ export type SaveSignatureFn = (params: {
|
|
|
199
252
|
export type OperationsAdapter = (params: {
|
|
200
253
|
operations: PdfOperation[];
|
|
201
254
|
}) => Promise<void>;
|
|
255
|
+
export interface PdfSecurity {
|
|
256
|
+
setPassword?: (bytes: Uint8Array, password: string) => Promise<Uint8Array>;
|
|
257
|
+
removePassword?: (bytes: Uint8Array, password: string) => Promise<Uint8Array>;
|
|
258
|
+
compress?: (bytes: Uint8Array) => Promise<Uint8Array>;
|
|
259
|
+
}
|
|
202
260
|
export interface PdfEditorProps {
|
|
203
261
|
source: PdfSource;
|
|
204
262
|
mode: PdfEditorMode;
|
|
205
263
|
initialOperations?: PdfOperation[];
|
|
206
264
|
operationsAdapter?: OperationsAdapter;
|
|
207
265
|
assetPalette?: AssetPalette;
|
|
266
|
+
resolveAssetBytes?: (item: AssetPaletteItem) => Promise<string>;
|
|
267
|
+
onAssetError?: (message: string) => void;
|
|
208
268
|
onSaveSignature?: SaveSignatureFn;
|
|
209
269
|
onExport: (request: ExportRequest) => Promise<void>;
|
|
210
270
|
exportOptions: ExportOption[];
|
|
211
|
-
title?: string;
|
|
212
|
-
onTitleChange?: (title: string) => Promise<void>;
|
|
213
271
|
readOnly?: boolean;
|
|
214
272
|
cloudImport?: PdfEditorCloudImportProps;
|
|
215
273
|
manageAssetsUrl?: string;
|
|
216
274
|
onChangeSource?: () => void;
|
|
275
|
+
pdfSecurity?: PdfSecurity;
|
|
276
|
+
pickCloudImage?: () => Promise<string | null>;
|
|
217
277
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { PdfOperation, ToolKind, EditorAction } from '../types';
|
|
2
|
+
import { PdfOperation, ToolKind, EditorAction, ShapeKind, TextFontFamily } from '../types';
|
|
3
3
|
interface PageOverlayProps {
|
|
4
4
|
pageIndex: number;
|
|
5
5
|
displayIndex: number;
|
|
@@ -11,11 +11,18 @@ interface PageOverlayProps {
|
|
|
11
11
|
pendingSignature: string | null;
|
|
12
12
|
pendingText: string | null;
|
|
13
13
|
pendingApplyAllPages: boolean;
|
|
14
|
-
|
|
14
|
+
pageIndices: number[];
|
|
15
15
|
dispatch: React.Dispatch<EditorAction>;
|
|
16
|
-
textInput?: string;
|
|
17
16
|
drawColor?: string;
|
|
18
17
|
drawStrokeWidth?: number;
|
|
18
|
+
textColor?: string;
|
|
19
|
+
textSize?: number;
|
|
20
|
+
textFamily?: TextFontFamily;
|
|
21
|
+
shapeKind?: ShapeKind;
|
|
22
|
+
shapeFill?: string | null;
|
|
23
|
+
highlightColor?: string;
|
|
24
|
+
scale?: number;
|
|
25
|
+
rotation?: number;
|
|
19
26
|
}
|
|
20
27
|
export declare const PageOverlay: React.FC<PageOverlayProps>;
|
|
21
28
|
export {};
|
|
@@ -7,11 +7,19 @@ interface PdfCanvasProps {
|
|
|
7
7
|
pdfDoc: PDFDocumentProxy;
|
|
8
8
|
uploadedDocs: Map<string, PDFDocumentProxy>;
|
|
9
9
|
insertionTable: Map<number, InsertedPageRef>;
|
|
10
|
+
blankPages?: Map<number, {
|
|
11
|
+
widthPt: number;
|
|
12
|
+
heightPt: number;
|
|
13
|
+
}>;
|
|
10
14
|
rotationMap?: Map<number, number>;
|
|
11
15
|
scale?: number;
|
|
12
16
|
activePageIndex: number;
|
|
13
17
|
pageOrder: number[];
|
|
14
|
-
onPageDimensions?: (pageIndex: number, width: number, height: number) => void;
|
|
18
|
+
onPageDimensions?: (pageIndex: number, width: number, height: number, totalRotation: number, pointWidth: number) => void;
|
|
19
|
+
onVisiblePageChange?: (displayIndex: number) => void;
|
|
15
20
|
children?: (virtualIndex: number, displayIndex: number) => React.ReactNode;
|
|
16
21
|
}
|
|
17
|
-
export
|
|
22
|
+
export interface PdfCanvasHandle {
|
|
23
|
+
scrollToPage: (displayIndex: number) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const PdfCanvas: React.ForwardRefExoticComponent<PdfCanvasProps & React.RefAttributes<PdfCanvasHandle>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ViewerControlsProps {
|
|
3
|
+
zoom: number;
|
|
4
|
+
onZoomIn: () => void;
|
|
5
|
+
onZoomOut: () => void;
|
|
6
|
+
onFitWidth: () => void;
|
|
7
|
+
onResetZoom: () => void;
|
|
8
|
+
canZoomIn: boolean;
|
|
9
|
+
canZoomOut: boolean;
|
|
10
|
+
currentPage: number;
|
|
11
|
+
totalPages: number;
|
|
12
|
+
onGoToPage: (index: number) => void;
|
|
13
|
+
compact?: boolean;
|
|
14
|
+
sidebarWidth?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const ViewerControls: React.FC<ViewerControlsProps>;
|
|
17
|
+
export {};
|
|
@@ -192,6 +192,7 @@ export interface SupportSidebarProps extends SupportCloudImportProps {
|
|
|
192
192
|
id: string;
|
|
193
193
|
name: string;
|
|
194
194
|
} | null;
|
|
195
|
+
onViewContext?: (contextType: string, contextId: string) => void;
|
|
195
196
|
}
|
|
196
197
|
export interface SupportTicketDetailProps extends SupportCloudImportProps {
|
|
197
198
|
ticket: ISupportTicket;
|
|
@@ -235,6 +236,7 @@ export interface SupportTicketDetailProps extends SupportCloudImportProps {
|
|
|
235
236
|
name: string;
|
|
236
237
|
} | null;
|
|
237
238
|
onUploadMessageAttachment?: (file: File) => void;
|
|
239
|
+
onViewContext?: (contextType: string, contextId: string) => void;
|
|
238
240
|
}
|
|
239
241
|
export interface SupportStatusBadgeProps {
|
|
240
242
|
status: SupportTicketStatus;
|
package/dist/cookie-consent.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, c as a, C as n, a as i, R as C, V as t, d as r, f as k, r as c, e as A, u as l, b, w as d } from "./CookieConsentSettings.component-
|
|
1
|
+
import { A as s, c as a, C as n, a as i, R as C, V as t, d as r, f as k, r as c, e as A, u as l, b, w as d } from "./CookieConsentSettings.component-Dqbo9N8Y.js";
|
|
2
2
|
export {
|
|
3
3
|
s as AbyssCookieConsentProvider,
|
|
4
4
|
a as COOKIE_NAME,
|