@arbidocs/react 0.4.159 → 0.4.161
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 +13 -6
- package/dist/{ProductionDialog-Dhf9MXH-.d.cts → ProductionDialog.d-BD1osHeq.d.cts} +1 -1
- package/dist/{ProductionDialog-BvRVGdvH.d.ts → ProductionDialog.d-CttHqQAh.d.ts} +1 -1
- package/dist/annotations/freeze/index.d.cts +3 -3
- package/dist/annotations/freeze/index.d.ts +3 -3
- package/dist/annotations/index.d.cts +4 -4
- package/dist/annotations/index.d.ts +4 -4
- package/dist/artifacts/index.cjs +12 -11
- package/dist/artifacts/index.cjs.map +1 -1
- package/dist/artifacts/index.d.cts +4 -4
- package/dist/artifacts/index.d.ts +4 -4
- package/dist/artifacts/index.js +3 -2
- package/dist/artifacts/index.js.map +1 -1
- package/dist/{chunk-RDLAOB55.cjs → chunk-3LMX6GXR.cjs} +150 -14
- package/dist/chunk-3LMX6GXR.cjs.map +1 -0
- package/dist/{chunk-37TQBT7Y.cjs → chunk-6MTKKT2O.cjs} +188 -126
- package/dist/chunk-6MTKKT2O.cjs.map +1 -0
- package/dist/{chunk-HKIR456G.js → chunk-CEZCFQ47.js} +149 -92
- package/dist/chunk-CEZCFQ47.js.map +1 -0
- package/dist/chunk-CPZ36AQS.js +11 -0
- package/dist/chunk-CPZ36AQS.js.map +1 -0
- package/dist/{chunk-JFKWH6EP.cjs → chunk-EUC2BTNS.cjs} +35 -4
- package/dist/chunk-EUC2BTNS.cjs.map +1 -0
- package/dist/chunk-GTJ667CP.cjs +26 -0
- package/dist/chunk-GTJ667CP.cjs.map +1 -0
- package/dist/{chunk-3XYIQZTH.js → chunk-I5ZBQ63Y.js} +33 -5
- package/dist/chunk-I5ZBQ63Y.js.map +1 -0
- package/dist/chunk-JSSKEXRR.js +22 -0
- package/dist/chunk-JSSKEXRR.js.map +1 -0
- package/dist/{chunk-QKNJ6FRD.cjs → chunk-ON4PL6DQ.cjs} +4 -4
- package/dist/chunk-ON4PL6DQ.cjs.map +1 -0
- package/dist/chunk-RCKA7BEF.cjs +14 -0
- package/dist/chunk-RCKA7BEF.cjs.map +1 -0
- package/dist/{chunk-2HNEVAXO.js → chunk-SVHGCX25.js} +3 -3
- package/dist/chunk-SVHGCX25.js.map +1 -0
- package/dist/{chunk-CNGWJDMG.js → chunk-WOXITGVS.js} +139 -15
- package/dist/chunk-WOXITGVS.js.map +1 -0
- package/dist/document-tools/index.cjs +35 -34
- package/dist/document-tools/index.cjs.map +1 -1
- package/dist/document-tools/index.d.cts +4 -4
- package/dist/document-tools/index.d.ts +4 -4
- package/dist/document-tools/index.js +4 -3
- package/dist/document-tools/index.js.map +1 -1
- package/dist/index.cjs +1694 -1432
- package/dist/index.cjs.map +1 -1
- package/dist/{index-DyFzmDZ2.d.ts → index.d-DfCFKora.d.cts} +49 -5
- package/dist/{index-DyFzmDZ2.d.cts → index.d-DfCFKora.d.ts} +49 -5
- package/dist/{index-CDTwtUr9.d.cts → index.d-eRbU1qpQ.d.cts} +333 -196
- package/dist/{index-CDTwtUr9.d.ts → index.d-eRbU1qpQ.d.ts} +333 -196
- package/dist/index.d.cts +1797 -1504
- package/dist/index.d.ts +1797 -1504
- package/dist/index.js +928 -765
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +24 -15
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +2 -1
- package/dist/ui/index.cjs +191 -142
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -1
- package/dist/viewers/index.cjs +3 -2
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.cts +2 -2
- package/dist/viewers/index.d.ts +2 -2
- package/dist/viewers/index.js +2 -1
- package/dist/viewers/index.js.map +1 -1
- package/package.json +4 -6
- package/dist/chunk-2HNEVAXO.js.map +0 -1
- package/dist/chunk-37TQBT7Y.cjs.map +0 -1
- package/dist/chunk-3XYIQZTH.js.map +0 -1
- package/dist/chunk-CNGWJDMG.js.map +0 -1
- package/dist/chunk-CPPBN2JB.js +0 -31
- package/dist/chunk-CPPBN2JB.js.map +0 -1
- package/dist/chunk-HKIR456G.js.map +0 -1
- package/dist/chunk-JFKWH6EP.cjs.map +0 -1
- package/dist/chunk-QKNJ6FRD.cjs.map +0 -1
- package/dist/chunk-R2MF7YCW.cjs +0 -36
- package/dist/chunk-R2MF7YCW.cjs.map +0 -1
- package/dist/chunk-RDLAOB55.cjs.map +0 -1
- /package/dist/{PdfViewer-bQH9yxFg.d.cts → PdfViewer.d-bQH9yxFg.d.cts} +0 -0
- /package/dist/{PdfViewer-bQH9yxFg.d.ts → PdfViewer.d-bQH9yxFg.d.ts} +0 -0
- /package/dist/{bundle-BnCSbHy2.d.cts → bundle.d-BnCSbHy2.d.cts} +0 -0
- /package/dist/{bundle-BnCSbHy2.d.ts → bundle.d-BnCSbHy2.d.ts} +0 -0
- /package/dist/{model-D63gedpb.d.cts → model.d-D63gedpb.d.cts} +0 -0
- /package/dist/{model-D63gedpb.d.ts → model.d-D63gedpb.d.ts} +0 -0
- /package/dist/{stored-markdown-Bp18vrbr.d.cts → stored-markdown.d-Bp18vrbr.d.cts} +0 -0
- /package/dist/{stored-markdown-Bp18vrbr.d.ts → stored-markdown.d-Bp18vrbr.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkON4PL6DQ_cjs = require('../chunk-ON4PL6DQ.cjs');
|
|
4
4
|
var chunkRDF2Q45F_cjs = require('../chunk-RDF2Q45F.cjs');
|
|
5
5
|
var chunkLRBOMQ6Q_cjs = require('../chunk-LRBOMQ6Q.cjs');
|
|
6
6
|
var chunkZWFMFOGP_cjs = require('../chunk-ZWFMFOGP.cjs');
|
|
@@ -9,7 +9,8 @@ require('../chunk-WYZJLZ67.cjs');
|
|
|
9
9
|
require('../chunk-Z3LLUO32.cjs');
|
|
10
10
|
require('../chunk-HJDR5HEO.cjs');
|
|
11
11
|
require('../chunk-S6A6FSG7.cjs');
|
|
12
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-GTJ667CP.cjs');
|
|
13
|
+
require('../chunk-RCKA7BEF.cjs');
|
|
13
14
|
var react = require('react');
|
|
14
15
|
var reactQuery = require('@tanstack/react-query');
|
|
15
16
|
var client = require('@arbidocs/client');
|
|
@@ -39,9 +40,9 @@ async function fetchProductionPdf(client, doc) {
|
|
|
39
40
|
const pdf = isPdfDocument(doc);
|
|
40
41
|
let blob;
|
|
41
42
|
try {
|
|
42
|
-
blob = await (pdf ?
|
|
43
|
+
blob = await (pdf ? chunkON4PL6DQ_cjs.fetchDocumentFile : chunkON4PL6DQ_cjs.fetchDocumentPdf)(client, doc.external_id);
|
|
43
44
|
} catch (e) {
|
|
44
|
-
if (!pdf && e instanceof
|
|
45
|
+
if (!pdf && e instanceof chunkON4PL6DQ_cjs.DocumentFetchError) return null;
|
|
45
46
|
throw e;
|
|
46
47
|
}
|
|
47
48
|
const bytes = new Uint8Array(await blob.arrayBuffer());
|
|
@@ -385,7 +386,7 @@ async function fetchMarkupPdf(client, documentId, version) {
|
|
|
385
386
|
}
|
|
386
387
|
var SIGNED_UNCHANGED = "The signed PDF is unchanged: the comments are kept beside it as markup.";
|
|
387
388
|
function useDocumentMarkup(documentData, snapshotVersion, currentSigned = false) {
|
|
388
|
-
const { client, notify, saveFile, onDocumentsChanged } =
|
|
389
|
+
const { client, notify, saveFile, onDocumentsChanged } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
389
390
|
const documentId = documentData?.external_id;
|
|
390
391
|
const currentVersion = documentData?.current_version ?? 1;
|
|
391
392
|
const shownVersion = snapshotVersion ?? currentVersion;
|
|
@@ -558,7 +559,7 @@ function useIsOnline() {
|
|
|
558
559
|
}
|
|
559
560
|
var documentBytesKey = (documentRef, version, kind) => version === void 0 ? ["arbi", "documentBytes", documentRef] : ["arbi", "documentBytes", documentRef, version, kind ?? "pdf"];
|
|
560
561
|
function useDocumentBytes(documentRef, options) {
|
|
561
|
-
const { client } =
|
|
562
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
562
563
|
const { version, kind, enabled = true, fallback } = options;
|
|
563
564
|
return reactQuery.useQuery({
|
|
564
565
|
queryKey: documentBytesKey(documentRef, version ?? null, kind),
|
|
@@ -568,7 +569,7 @@ function useDocumentBytes(documentRef, options) {
|
|
|
568
569
|
if (offline) return offline;
|
|
569
570
|
}
|
|
570
571
|
try {
|
|
571
|
-
return await (kind === "original" ?
|
|
572
|
+
return await (kind === "original" ? chunkON4PL6DQ_cjs.fetchDocumentFile : chunkON4PL6DQ_cjs.fetchDocumentPdf)(
|
|
572
573
|
client,
|
|
573
574
|
documentRef,
|
|
574
575
|
{ signal }
|
|
@@ -614,7 +615,7 @@ async function fetchDocumentSignatures(client, documentRef) {
|
|
|
614
615
|
return data;
|
|
615
616
|
}
|
|
616
617
|
function useDocumentSignatures(documentId, enabled = true) {
|
|
617
|
-
const { client } =
|
|
618
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
618
619
|
const { docId, version } = chunkZWFMFOGP_cjs.parseVersionRef(documentId);
|
|
619
620
|
return reactQuery.useQuery({
|
|
620
621
|
queryKey: [
|
|
@@ -685,7 +686,7 @@ async function signDocument(client$1, deploymentDomain, {
|
|
|
685
686
|
return signed.data;
|
|
686
687
|
}
|
|
687
688
|
function useSignDocument() {
|
|
688
|
-
const env =
|
|
689
|
+
const env = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
689
690
|
const queryClient = reactQuery.useQueryClient();
|
|
690
691
|
return reactQuery.useMutation({
|
|
691
692
|
mutationFn: (vars) => {
|
|
@@ -731,7 +732,7 @@ async function fetchSignatureVerification(client, reference) {
|
|
|
731
732
|
return data;
|
|
732
733
|
}
|
|
733
734
|
function useSignatureVerification(reference) {
|
|
734
|
-
const { client } =
|
|
735
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
735
736
|
return reactQuery.useQuery({
|
|
736
737
|
queryKey: ["get", VERIFY_PATH, { params: { path: { reference } } }],
|
|
737
738
|
queryFn: () => fetchSignatureVerification(client, reference),
|
|
@@ -835,7 +836,7 @@ async function fetchDocumentSignatureRequests(client, documentId) {
|
|
|
835
836
|
return data;
|
|
836
837
|
}
|
|
837
838
|
function useDocumentSignatureRequests(documentId, enabled = true) {
|
|
838
|
-
const { client } =
|
|
839
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
839
840
|
return reactQuery.useQuery({
|
|
840
841
|
queryKey: [...REQUESTS_KEY, "document", documentId],
|
|
841
842
|
queryFn: () => fetchDocumentSignatureRequests(client, documentId),
|
|
@@ -844,7 +845,7 @@ function useDocumentSignatureRequests(documentId, enabled = true) {
|
|
|
844
845
|
});
|
|
845
846
|
}
|
|
846
847
|
function useSignatureRequestsAwaitingMe(enabled = true) {
|
|
847
|
-
const { client } =
|
|
848
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
848
849
|
return reactQuery.useQuery({
|
|
849
850
|
queryKey: [...REQUESTS_KEY, "awaiting-me"],
|
|
850
851
|
queryFn: async () => {
|
|
@@ -859,7 +860,7 @@ function useSignatureRequestsAwaitingMe(enabled = true) {
|
|
|
859
860
|
});
|
|
860
861
|
}
|
|
861
862
|
function useSignatureRequest(requestId) {
|
|
862
|
-
const { client } =
|
|
863
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
863
864
|
return reactQuery.useQuery({
|
|
864
865
|
queryKey: [...REQUESTS_KEY, "one", requestId],
|
|
865
866
|
queryFn: async () => {
|
|
@@ -909,7 +910,7 @@ function useInvalidateRequests() {
|
|
|
909
910
|
return () => queryClient.invalidateQueries({ queryKey: REQUESTS_KEY });
|
|
910
911
|
}
|
|
911
912
|
function useSaveSignatureRequest() {
|
|
912
|
-
const { client } =
|
|
913
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
913
914
|
const invalidate = useInvalidateRequests();
|
|
914
915
|
return reactQuery.useMutation({
|
|
915
916
|
mutationFn: (vars) => saveSignatureRequest(client, vars),
|
|
@@ -917,7 +918,7 @@ function useSaveSignatureRequest() {
|
|
|
917
918
|
});
|
|
918
919
|
}
|
|
919
920
|
function useVoidSignatureRequest() {
|
|
920
|
-
const { client } =
|
|
921
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
921
922
|
const invalidate = useInvalidateRequests();
|
|
922
923
|
return reactQuery.useMutation({
|
|
923
924
|
mutationFn: async (requestId) => {
|
|
@@ -931,7 +932,7 @@ function useVoidSignatureRequest() {
|
|
|
931
932
|
});
|
|
932
933
|
}
|
|
933
934
|
function useDeclineSignatureRequest() {
|
|
934
|
-
const { client } =
|
|
935
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
935
936
|
const invalidate = useInvalidateRequests();
|
|
936
937
|
return reactQuery.useMutation({
|
|
937
938
|
mutationFn: async ({ requestId, reason }) => {
|
|
@@ -971,7 +972,7 @@ async function signSignatureRequest(client$1, deploymentDomain, { request, pdfBl
|
|
|
971
972
|
return signed.data;
|
|
972
973
|
}
|
|
973
974
|
function useSignSignatureRequest() {
|
|
974
|
-
const env =
|
|
975
|
+
const env = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
975
976
|
const invalidate = useInvalidateRequests();
|
|
976
977
|
const queryClient = reactQuery.useQueryClient();
|
|
977
978
|
return reactQuery.useMutation({
|
|
@@ -991,7 +992,7 @@ function useSignSignatureRequest() {
|
|
|
991
992
|
});
|
|
992
993
|
}
|
|
993
994
|
function useSignerCandidates(enabled = true) {
|
|
994
|
-
const { client, user } =
|
|
995
|
+
const { client, user } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
995
996
|
return reactQuery.useQuery({
|
|
996
997
|
queryKey: [...REQUESTS_KEY, "candidates"],
|
|
997
998
|
queryFn: async () => {
|
|
@@ -1031,7 +1032,7 @@ async function inviteSigners(client, documentId, emails) {
|
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
1034
|
function useInviteSigners() {
|
|
1034
|
-
const { client } =
|
|
1035
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
1035
1036
|
const invalidate = useInvalidateRequests();
|
|
1036
1037
|
const queryClient = reactQuery.useQueryClient();
|
|
1037
1038
|
return reactQuery.useMutation({
|
|
@@ -1076,7 +1077,7 @@ async function deleteSavedSignature(client) {
|
|
|
1076
1077
|
if (!response.ok) throw new Error(detail2(error, "Your saved signature could not be deleted"));
|
|
1077
1078
|
}
|
|
1078
1079
|
function useSavedSignature(enabled = true) {
|
|
1079
|
-
const { client } =
|
|
1080
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
1080
1081
|
return reactQuery.useQuery({
|
|
1081
1082
|
queryKey: KEY,
|
|
1082
1083
|
queryFn: () => fetchSavedSignature(client),
|
|
@@ -1086,7 +1087,7 @@ function useSavedSignature(enabled = true) {
|
|
|
1086
1087
|
});
|
|
1087
1088
|
}
|
|
1088
1089
|
function useStoreSavedSignature() {
|
|
1089
|
-
const { client } =
|
|
1090
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
1090
1091
|
const queryClient = reactQuery.useQueryClient();
|
|
1091
1092
|
return reactQuery.useMutation({
|
|
1092
1093
|
mutationFn: (signature) => storeSavedSignature(client, signature),
|
|
@@ -1094,7 +1095,7 @@ function useStoreSavedSignature() {
|
|
|
1094
1095
|
});
|
|
1095
1096
|
}
|
|
1096
1097
|
function useDeleteSavedSignature() {
|
|
1097
|
-
const { client } =
|
|
1098
|
+
const { client } = chunkON4PL6DQ_cjs.useDocumentTools();
|
|
1098
1099
|
const queryClient = reactQuery.useQueryClient();
|
|
1099
1100
|
return reactQuery.useMutation({
|
|
1100
1101
|
mutationFn: () => deleteSavedSignature(client),
|
|
@@ -1115,51 +1116,51 @@ function pngSize(base64) {
|
|
|
1115
1116
|
|
|
1116
1117
|
Object.defineProperty(exports, "DocumentFetchError", {
|
|
1117
1118
|
enumerable: true,
|
|
1118
|
-
get: function () { return
|
|
1119
|
+
get: function () { return chunkON4PL6DQ_cjs.DocumentFetchError; }
|
|
1119
1120
|
});
|
|
1120
1121
|
Object.defineProperty(exports, "DocumentToolsProvider", {
|
|
1121
1122
|
enumerable: true,
|
|
1122
|
-
get: function () { return
|
|
1123
|
+
get: function () { return chunkON4PL6DQ_cjs.DocumentToolsProvider; }
|
|
1123
1124
|
});
|
|
1124
1125
|
Object.defineProperty(exports, "certificateLink", {
|
|
1125
1126
|
enumerable: true,
|
|
1126
|
-
get: function () { return
|
|
1127
|
+
get: function () { return chunkON4PL6DQ_cjs.certificateLink; }
|
|
1127
1128
|
});
|
|
1128
1129
|
Object.defineProperty(exports, "clientUpload", {
|
|
1129
1130
|
enumerable: true,
|
|
1130
|
-
get: function () { return
|
|
1131
|
+
get: function () { return chunkON4PL6DQ_cjs.clientUpload; }
|
|
1131
1132
|
});
|
|
1132
1133
|
Object.defineProperty(exports, "contentDispositionFileName", {
|
|
1133
1134
|
enumerable: true,
|
|
1134
|
-
get: function () { return
|
|
1135
|
+
get: function () { return chunkON4PL6DQ_cjs.contentDispositionFileName; }
|
|
1135
1136
|
});
|
|
1136
1137
|
Object.defineProperty(exports, "defaultCertificateUrl", {
|
|
1137
1138
|
enumerable: true,
|
|
1138
|
-
get: function () { return
|
|
1139
|
+
get: function () { return chunkON4PL6DQ_cjs.defaultCertificateUrl; }
|
|
1139
1140
|
});
|
|
1140
1141
|
Object.defineProperty(exports, "downloadBlob", {
|
|
1141
1142
|
enumerable: true,
|
|
1142
|
-
get: function () { return
|
|
1143
|
+
get: function () { return chunkON4PL6DQ_cjs.downloadBlob; }
|
|
1143
1144
|
});
|
|
1144
1145
|
Object.defineProperty(exports, "fetchDocumentFile", {
|
|
1145
1146
|
enumerable: true,
|
|
1146
|
-
get: function () { return
|
|
1147
|
+
get: function () { return chunkON4PL6DQ_cjs.fetchDocumentFile; }
|
|
1147
1148
|
});
|
|
1148
1149
|
Object.defineProperty(exports, "fetchDocumentPdf", {
|
|
1149
1150
|
enumerable: true,
|
|
1150
|
-
get: function () { return
|
|
1151
|
+
get: function () { return chunkON4PL6DQ_cjs.fetchDocumentPdf; }
|
|
1151
1152
|
});
|
|
1152
1153
|
Object.defineProperty(exports, "uploadQueryString", {
|
|
1153
1154
|
enumerable: true,
|
|
1154
|
-
get: function () { return
|
|
1155
|
+
get: function () { return chunkON4PL6DQ_cjs.uploadQueryString; }
|
|
1155
1156
|
});
|
|
1156
1157
|
Object.defineProperty(exports, "useDocumentTools", {
|
|
1157
1158
|
enumerable: true,
|
|
1158
|
-
get: function () { return
|
|
1159
|
+
get: function () { return chunkON4PL6DQ_cjs.useDocumentTools; }
|
|
1159
1160
|
});
|
|
1160
1161
|
Object.defineProperty(exports, "useOptionalDocumentTools", {
|
|
1161
1162
|
enumerable: true,
|
|
1162
|
-
get: function () { return
|
|
1163
|
+
get: function () { return chunkON4PL6DQ_cjs.useOptionalDocumentTools; }
|
|
1163
1164
|
});
|
|
1164
1165
|
exports.DEFAULT_FIELD_SIZE = DEFAULT_FIELD_SIZE;
|
|
1165
1166
|
exports.FIELD_TYPE_LABELS = FIELD_TYPE_LABELS;
|