@kopjra/pdf-sentinel 0.0.22 → 0.1.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/preact/pdf-sentinel.js +1717 -1701
- package/dist/preact/pdf-sentinel.js.map +1 -1
- package/dist/preact/src/components/PdfSentinel.d.ts +1 -0
- package/dist/preact/src/hooks/usePdfSentinel.d.ts +3 -2
- package/dist/preact/src/plugins/forms/FormContext.d.ts +1 -0
- package/dist/preact/src/plugins/forms/hooks/usePdfForms.d.ts +1 -1
- package/dist/preact/src/plugins/forms/shared.d.ts +1 -1
- package/dist/react/pdf-sentinel.js +1627 -1611
- package/dist/react/pdf-sentinel.js.map +1 -1
- package/dist/react/src/components/PdfSentinel.d.ts +1 -0
- package/dist/react/src/hooks/usePdfSentinel.d.ts +3 -2
- package/dist/react/src/plugins/forms/FormContext.d.ts +1 -0
- package/dist/react/src/plugins/forms/hooks/usePdfForms.d.ts +1 -1
- package/dist/react/src/plugins/forms/shared.d.ts +1 -1
- package/package.json +15 -15
|
@@ -20,6 +20,7 @@ interface PdfSentinelProps {
|
|
|
20
20
|
name: string;
|
|
21
21
|
setClosedPdf: (value: boolean) => void;
|
|
22
22
|
conditionalSignatures?: ConditionalSignature[] | undefined;
|
|
23
|
+
signatureFieldNames?: string[] | undefined;
|
|
23
24
|
}
|
|
24
25
|
export declare const PdfSentinel: FC<PdfSentinelProps>;
|
|
25
26
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UsePdfFormsResult } from '../plugins/forms/hooks/usePdfForms.ts';
|
|
2
2
|
import { ToolbarItem } from '../types/toolbar.ts';
|
|
3
3
|
export type InitialValuesType = Record<string, {
|
|
4
|
-
value
|
|
4
|
+
value?: string | boolean;
|
|
5
5
|
readonly?: boolean;
|
|
6
6
|
}>;
|
|
7
7
|
export interface ConditionalSignature {
|
|
@@ -18,8 +18,9 @@ export interface PdfSentinelOptions {
|
|
|
18
18
|
translations?: Record<string, Record<string, string>>;
|
|
19
19
|
toolbarButtons?: ToolbarItem[];
|
|
20
20
|
conditionalSignatures?: ConditionalSignature[];
|
|
21
|
+
signatureFieldNames?: string[];
|
|
21
22
|
}
|
|
22
|
-
export declare function usePdfSentinel({ pdf, name, initialValues, hideToolbar, onDocumentLoaded, locale, translations, conditionalSignatures, toolbarButtons, }: PdfSentinelOptions): {
|
|
23
|
+
export declare function usePdfSentinel({ pdf, name, initialValues, hideToolbar, onDocumentLoaded, locale, translations, conditionalSignatures, signatureFieldNames, toolbarButtons, }: PdfSentinelOptions): {
|
|
23
24
|
PdfSentinelContainer: ({ children }: {
|
|
24
25
|
children: React.ReactNode;
|
|
25
26
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,6 +8,7 @@ export declare const FormProvider: FC<{
|
|
|
8
8
|
initialValues: InitialValuesType;
|
|
9
9
|
documentId: string;
|
|
10
10
|
conditionalSignatures?: ConditionalSignature[];
|
|
11
|
+
signatureFieldNames?: string[] | undefined;
|
|
11
12
|
}>;
|
|
12
13
|
/**
|
|
13
14
|
* Hook to access the current form context. Throws if used outside provider.
|
|
@@ -16,5 +16,5 @@ export type UsePdfFormsResult = {
|
|
|
16
16
|
showErrors: boolean;
|
|
17
17
|
scrollToConditionalSignature: (index: string) => Generator;
|
|
18
18
|
};
|
|
19
|
-
export declare function usePdfForms(documentId: string, initialValues: InitialValuesType, conditionalSignatures: ConditionalSignature[] | undefined, engine: PdfEngine<Blob> | null, loader: DocumentManagerCapability | null, scrollCapability: ScrollCapability | null, viewportCapability: ViewportCapability | null): UsePdfFormsResult;
|
|
19
|
+
export declare function usePdfForms(documentId: string, initialValues: InitialValuesType, conditionalSignatures: ConditionalSignature[] | undefined, signatureFieldNames: string[] | undefined, engine: PdfEngine<Blob> | null, loader: DocumentManagerCapability | null, scrollCapability: ScrollCapability | null, viewportCapability: ViewportCapability | null): UsePdfFormsResult;
|
|
20
20
|
export {};
|
|
@@ -16,7 +16,7 @@ export type Field = {
|
|
|
16
16
|
required?: boolean;
|
|
17
17
|
conditionalIndex?: string;
|
|
18
18
|
};
|
|
19
|
-
export declare function getFormFields(documentId: string, initialValues: InitialValuesType, conditionalSignatures: ConditionalSignature[], engine: PdfEngine<Blob> | null, loader: DocumentManagerCapability | null): Promise<{
|
|
19
|
+
export declare function getFormFields(documentId: string, initialValues: InitialValuesType, conditionalSignatures: ConditionalSignature[], signatureFieldNames: string[] | undefined, engine: PdfEngine<Blob> | null, loader: DocumentManagerCapability | null, readAllFields?: boolean): Promise<{
|
|
20
20
|
fields: Field[];
|
|
21
21
|
values: Record<string, string | boolean>;
|
|
22
22
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopjra/pdf-sentinel",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "A React and Preact component library for embedding and interacting with PDF documents using EmbedPDF.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"config": {
|
|
38
|
-
"embedpdf": "2.1.
|
|
38
|
+
"embedpdf": "2.1.2"
|
|
39
39
|
},
|
|
40
40
|
"author": "",
|
|
41
41
|
"license": "ISC",
|
|
@@ -64,19 +64,19 @@
|
|
|
64
64
|
"vite-plugin-dts": "^4.2.1"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@embedpdf/core": "2.1.
|
|
68
|
-
"@embedpdf/models": "2.1.
|
|
69
|
-
"@embedpdf/engines": "2.1.
|
|
70
|
-
"@embedpdf/pdfium": "2.1.
|
|
71
|
-
"@embedpdf/plugin-document-manager": "2.1.
|
|
72
|
-
"@embedpdf/plugin-export": "2.1.
|
|
73
|
-
"@embedpdf/plugin-interaction-manager": "2.1.
|
|
74
|
-
"@embedpdf/plugin-pan": "2.1.
|
|
75
|
-
"@embedpdf/plugin-render": "2.1.
|
|
76
|
-
"@embedpdf/plugin-scroll": "2.1.
|
|
77
|
-
"@embedpdf/plugin-spread": "2.1.
|
|
78
|
-
"@embedpdf/plugin-viewport": "2.1.
|
|
79
|
-
"@embedpdf/plugin-zoom": "2.1.
|
|
67
|
+
"@embedpdf/core": "2.1.2",
|
|
68
|
+
"@embedpdf/models": "2.1.2",
|
|
69
|
+
"@embedpdf/engines": "2.1.2",
|
|
70
|
+
"@embedpdf/pdfium": "2.1.2",
|
|
71
|
+
"@embedpdf/plugin-document-manager": "2.1.2",
|
|
72
|
+
"@embedpdf/plugin-export": "2.1.2",
|
|
73
|
+
"@embedpdf/plugin-interaction-manager": "2.1.2",
|
|
74
|
+
"@embedpdf/plugin-pan": "2.1.2",
|
|
75
|
+
"@embedpdf/plugin-render": "2.1.2",
|
|
76
|
+
"@embedpdf/plugin-scroll": "2.1.2",
|
|
77
|
+
"@embedpdf/plugin-spread": "2.1.2",
|
|
78
|
+
"@embedpdf/plugin-viewport": "2.1.2",
|
|
79
|
+
"@embedpdf/plugin-zoom": "2.1.2",
|
|
80
80
|
"lodash": "^4.17.21"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|