@osdk/react-components 0.28.0 → 0.29.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3
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/CHANGELOG.md +16 -0
- package/build/browser/pdf-viewer/PdfViewer.js +6 -2
- package/build/browser/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/browser/pdf-viewer/types.js.map +1 -1
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-D565X4TE.cjs → chunk-3E5LLOPP.cjs} +3 -3
- package/build/cjs/chunk-3E5LLOPP.cjs.map +1 -0
- package/build/cjs/chunk-54NO7SXL.cjs +11 -0
- package/build/cjs/{chunk-U4NJ4WIE.cjs.map → chunk-54NO7SXL.cjs.map} +1 -1
- package/build/cjs/{chunk-Z6RGIOQU.cjs → chunk-CDUWYFG4.cjs} +4 -4
- package/build/cjs/{chunk-Z6RGIOQU.cjs.map → chunk-CDUWYFG4.cjs.map} +1 -1
- package/build/cjs/{chunk-HLWTO3SQ.cjs → chunk-DVBKL7PU.cjs} +7 -7
- package/build/cjs/{chunk-HLWTO3SQ.cjs.map → chunk-DVBKL7PU.cjs.map} +1 -1
- package/build/cjs/{chunk-FWZS3WQ4.cjs → chunk-EZ56QDIG.cjs} +7 -3
- package/build/cjs/chunk-EZ56QDIG.cjs.map +1 -0
- package/build/cjs/chunk-IBRBXU2L.cjs +11 -0
- package/build/cjs/{chunk-Q2AQ5TDJ.cjs.map → chunk-IBRBXU2L.cjs.map} +1 -1
- package/build/cjs/{chunk-SWTUJIGW.cjs → chunk-K57WAAJ5.cjs} +4 -4
- package/build/cjs/{chunk-SWTUJIGW.cjs.map → chunk-K57WAAJ5.cjs.map} +1 -1
- package/build/cjs/chunk-LHQT74FJ.cjs +11 -0
- package/build/cjs/{chunk-MIC4N6XX.cjs.map → chunk-LHQT74FJ.cjs.map} +1 -1
- package/build/cjs/{chunk-KBZCABK4.cjs → chunk-TQHAIZUS.cjs} +4 -4
- package/build/cjs/{chunk-KBZCABK4.cjs.map → chunk-TQHAIZUS.cjs.map} +1 -1
- package/build/cjs/{chunk-OJ4Q6LJ6.cjs → chunk-V3KT6B2W.cjs} +4 -4
- package/build/cjs/{chunk-OJ4Q6LJ6.cjs.map → chunk-V3KT6B2W.cjs.map} +1 -1
- package/build/cjs/{chunk-7JOXWTUY.cjs → chunk-VFLRVA47.cjs} +24 -24
- package/build/cjs/{chunk-7JOXWTUY.cjs.map → chunk-VFLRVA47.cjs.map} +1 -1
- package/build/cjs/{chunk-C2V2GXW4.cjs → chunk-VV5QJPGW.cjs} +4 -4
- package/build/cjs/{chunk-C2V2GXW4.cjs.map → chunk-VV5QJPGW.cjs.map} +1 -1
- package/build/cjs/{chunk-GYFDR655.cjs → chunk-WZSTQLHR.cjs} +4 -4
- package/build/cjs/{chunk-GYFDR655.cjs.map → chunk-WZSTQLHR.cjs.map} +1 -1
- package/build/cjs/chunk-Z3PQLRB2.cjs +11 -0
- package/build/cjs/{chunk-S4PGPP6D.cjs.map → chunk-Z3PQLRB2.cjs.map} +1 -1
- package/build/cjs/chunk-ZJMZKUK4.cjs +11 -0
- package/build/cjs/{chunk-NNRUPDXI.cjs.map → chunk-ZJMZKUK4.cjs.map} +1 -1
- package/build/cjs/public/experimental/action-form.cjs +4 -4
- package/build/cjs/public/experimental/cbac-picker.cjs +11 -11
- package/build/cjs/public/experimental/document-viewer.cjs +5 -5
- package/build/cjs/public/experimental/document-viewer.d.cts +1 -1
- package/build/cjs/public/experimental/email-viewer.cjs +3 -3
- package/build/cjs/public/experimental/excel-viewer.cjs +3 -3
- package/build/cjs/public/experimental/filter-list.cjs +15 -15
- package/build/cjs/public/experimental/image-viewer.cjs +3 -3
- package/build/cjs/public/experimental/markdown-renderer.cjs +3 -3
- package/build/cjs/public/experimental/object-table.cjs +8 -8
- package/build/cjs/public/experimental/pdf-viewer.cjs +25 -25
- package/build/cjs/public/experimental/pdf-viewer.d.cts +2 -2
- package/build/cjs/public/experimental/tiff-renderer.cjs +3 -3
- package/build/cjs/public/experimental/video-viewer.cjs +3 -3
- package/build/cjs/public/experimental/xml-viewer.cjs +3 -3
- package/build/cjs/public/experimental.cjs +76 -76
- package/build/cjs/public/experimental.d.cts +1 -1
- package/build/cjs/{types-Cg_LdKf-.d.cts → types-cSnAM4mt.d.cts} +5 -0
- package/build/esm/pdf-viewer/PdfViewer.js +6 -2
- package/build/esm/pdf-viewer/PdfViewer.js.map +1 -1
- package/build/esm/pdf-viewer/types.js.map +1 -1
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/pdf-viewer/PdfViewer.d.ts.map +1 -1
- package/build/types/pdf-viewer/types.d.ts +5 -0
- package/build/types/pdf-viewer/types.d.ts.map +1 -1
- package/docs/Prerequisites.md +10 -21
- package/docs/StylingOverview.md +10 -7
- package/package.json +7 -7
- package/build/cjs/chunk-D565X4TE.cjs.map +0 -1
- package/build/cjs/chunk-FWZS3WQ4.cjs.map +0 -1
- package/build/cjs/chunk-MIC4N6XX.cjs +0 -11
- package/build/cjs/chunk-NNRUPDXI.cjs +0 -11
- package/build/cjs/chunk-Q2AQ5TDJ.cjs +0 -11
- package/build/cjs/chunk-S4PGPP6D.cjs +0 -11
- package/build/cjs/chunk-U4NJ4WIE.cjs +0 -11
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunk54NO7SXL_cjs = require('../chunk-54NO7SXL.cjs');
|
|
4
|
+
var chunkCDUWYFG4_cjs = require('../chunk-CDUWYFG4.cjs');
|
|
5
|
+
var chunkZ3PQLRB2_cjs = require('../chunk-Z3PQLRB2.cjs');
|
|
6
|
+
var chunkTQHAIZUS_cjs = require('../chunk-TQHAIZUS.cjs');
|
|
7
|
+
var chunkK57WAAJ5_cjs = require('../chunk-K57WAAJ5.cjs');
|
|
8
8
|
require('../chunk-POHAXPLQ.cjs');
|
|
9
|
-
var
|
|
9
|
+
var chunkVFLRVA47_cjs = require('../chunk-VFLRVA47.cjs');
|
|
10
10
|
var chunk2YA74OKB_cjs = require('../chunk-2YA74OKB.cjs');
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var chunkVV5QJPGW_cjs = require('../chunk-VV5QJPGW.cjs');
|
|
12
|
+
var chunkIBRBXU2L_cjs = require('../chunk-IBRBXU2L.cjs');
|
|
13
|
+
var chunkV3KT6B2W_cjs = require('../chunk-V3KT6B2W.cjs');
|
|
14
14
|
require('../chunk-JKNARBQW.cjs');
|
|
15
15
|
require('../chunk-3S52UDZM.cjs');
|
|
16
16
|
require('../chunk-E5OKIBYJ.cjs');
|
|
17
17
|
require('../chunk-KPLJJZUF.cjs');
|
|
18
18
|
require('../chunk-NE7GRF7G.cjs');
|
|
19
|
-
var
|
|
19
|
+
var chunkWZSTQLHR_cjs = require('../chunk-WZSTQLHR.cjs');
|
|
20
20
|
var chunkZMAWPOG5_cjs = require('../chunk-ZMAWPOG5.cjs');
|
|
21
21
|
require('../chunk-VFRZREZV.cjs');
|
|
22
22
|
require('../chunk-C6IPNPMZ.cjs');
|
|
@@ -24,131 +24,131 @@ require('../chunk-DWNKXV5E.cjs');
|
|
|
24
24
|
require('../chunk-HNBSGCSZ.cjs');
|
|
25
25
|
require('../chunk-7LXS66DW.cjs');
|
|
26
26
|
require('../chunk-MD4KDE44.cjs');
|
|
27
|
-
var
|
|
27
|
+
var chunkDVBKL7PU_cjs = require('../chunk-DVBKL7PU.cjs');
|
|
28
28
|
var chunkOUJQJQ7N_cjs = require('../chunk-OUJQJQ7N.cjs');
|
|
29
29
|
var chunkVOROB7KJ_cjs = require('../chunk-VOROB7KJ.cjs');
|
|
30
30
|
var chunkIYJOHKJE_cjs = require('../chunk-IYJOHKJE.cjs');
|
|
31
|
-
var
|
|
31
|
+
var chunkEZ56QDIG_cjs = require('../chunk-EZ56QDIG.cjs');
|
|
32
32
|
var chunkIISDOJPR_cjs = require('../chunk-IISDOJPR.cjs');
|
|
33
33
|
var chunkKHMOMROL_cjs = require('../chunk-KHMOMROL.cjs');
|
|
34
34
|
require('../chunk-UCTQICPR.cjs');
|
|
35
|
-
var
|
|
35
|
+
var chunkLHQT74FJ_cjs = require('../chunk-LHQT74FJ.cjs');
|
|
36
36
|
var chunkPKJFOG2Z_cjs = require('../chunk-PKJFOG2Z.cjs');
|
|
37
|
-
var
|
|
37
|
+
var chunkZJMZKUK4_cjs = require('../chunk-ZJMZKUK4.cjs');
|
|
38
38
|
var chunk3SJODG6U_cjs = require('../chunk-3SJODG6U.cjs');
|
|
39
39
|
require('../chunk-MVQKV5BJ.cjs');
|
|
40
|
-
require('../chunk-
|
|
40
|
+
require('../chunk-3E5LLOPP.cjs');
|
|
41
41
|
require('../chunk-Q2W6GYRK.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
Object.defineProperty(exports, "XmlViewer", {
|
|
46
46
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunk54NO7SXL_cjs.XmlViewer; }
|
|
48
48
|
});
|
|
49
49
|
Object.defineProperty(exports, "BaseFilterList", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkCDUWYFG4_cjs.BaseFilterList; }
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "FilterInput", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkCDUWYFG4_cjs.FilterInput; }
|
|
56
56
|
});
|
|
57
57
|
Object.defineProperty(exports, "FilterList", {
|
|
58
58
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkCDUWYFG4_cjs.FilterList; }
|
|
60
60
|
});
|
|
61
61
|
Object.defineProperty(exports, "FilterPopover", {
|
|
62
62
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkCDUWYFG4_cjs.FilterPopover; }
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "NO_VALUE", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkCDUWYFG4_cjs.NO_VALUE; }
|
|
68
68
|
});
|
|
69
69
|
Object.defineProperty(exports, "deserializeFilterStates", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkCDUWYFG4_cjs.deserializeFilterStates; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "filterHasActiveState", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkCDUWYFG4_cjs.filterHasActiveState; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "getFilterKey", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkCDUWYFG4_cjs.getFilterKey; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "getFilterLabel", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkCDUWYFG4_cjs.getFilterLabel; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "narrowObjectSet", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkCDUWYFG4_cjs.narrowObjectSet; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "serializeFilterStates", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkCDUWYFG4_cjs.serializeFilterStates; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "summarizeFilterValue", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkCDUWYFG4_cjs.summarizeFilterValue; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "useFilterListState", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkCDUWYFG4_cjs.useFilterListState; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "ImageViewer", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkZ3PQLRB2_cjs.ImageViewer; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "MarkdownViewerMedia", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkTQHAIZUS_cjs.MarkdownViewerMedia; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "BaseTable", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkK57WAAJ5_cjs.BaseTable; }
|
|
112
112
|
});
|
|
113
113
|
Object.defineProperty(exports, "ColumnConfigDialog", {
|
|
114
114
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkK57WAAJ5_cjs.ColumnConfigDialog; }
|
|
116
116
|
});
|
|
117
117
|
Object.defineProperty(exports, "LoadingCell", {
|
|
118
118
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkK57WAAJ5_cjs.LoadingCell; }
|
|
120
120
|
});
|
|
121
121
|
Object.defineProperty(exports, "LoadingCellContent", {
|
|
122
122
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkK57WAAJ5_cjs.LoadingCellContent; }
|
|
124
124
|
});
|
|
125
125
|
Object.defineProperty(exports, "MultiColumnSortDialog", {
|
|
126
126
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkK57WAAJ5_cjs.MultiColumnSortDialog; }
|
|
128
128
|
});
|
|
129
129
|
Object.defineProperty(exports, "ObjectTable", {
|
|
130
130
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkK57WAAJ5_cjs.ObjectTable; }
|
|
132
132
|
});
|
|
133
133
|
Object.defineProperty(exports, "PdfViewer", {
|
|
134
134
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkVFLRVA47_cjs.PdfViewer; }
|
|
136
136
|
});
|
|
137
137
|
Object.defineProperty(exports, "PdfViewerContent", {
|
|
138
138
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkVFLRVA47_cjs.PdfViewerContent; }
|
|
140
140
|
});
|
|
141
141
|
Object.defineProperty(exports, "PdfViewerProvider", {
|
|
142
142
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkVFLRVA47_cjs.PdfViewerProvider; }
|
|
144
144
|
});
|
|
145
145
|
Object.defineProperty(exports, "usePdfViewerContext", {
|
|
146
146
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkVFLRVA47_cjs.usePdfViewerContext; }
|
|
148
148
|
});
|
|
149
149
|
Object.defineProperty(exports, "usePdfViewerInstance", {
|
|
150
150
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkVFLRVA47_cjs.usePdfViewerInstance; }
|
|
152
152
|
});
|
|
153
153
|
Object.defineProperty(exports, "OsdkThemeProvider", {
|
|
154
154
|
enumerable: true,
|
|
@@ -160,55 +160,55 @@ Object.defineProperty(exports, "useOsdkTheme", {
|
|
|
160
160
|
});
|
|
161
161
|
Object.defineProperty(exports, "TiffViewerMedia", {
|
|
162
162
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkVV5QJPGW_cjs.TiffViewerMedia; }
|
|
164
164
|
});
|
|
165
165
|
Object.defineProperty(exports, "VideoViewer", {
|
|
166
166
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkIBRBXU2L_cjs.VideoViewer; }
|
|
168
168
|
});
|
|
169
169
|
Object.defineProperty(exports, "ActionForm", {
|
|
170
170
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkV3KT6B2W_cjs.ActionForm; }
|
|
172
172
|
});
|
|
173
173
|
Object.defineProperty(exports, "BaseForm", {
|
|
174
174
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkV3KT6B2W_cjs.BaseForm; }
|
|
176
176
|
});
|
|
177
177
|
Object.defineProperty(exports, "BaseCbacPicker", {
|
|
178
178
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkWZSTQLHR_cjs.BaseCbacPicker; }
|
|
180
180
|
});
|
|
181
181
|
Object.defineProperty(exports, "BaseCbacPickerDialog", {
|
|
182
182
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkWZSTQLHR_cjs.BaseCbacPickerDialog; }
|
|
184
184
|
});
|
|
185
185
|
Object.defineProperty(exports, "CbacBannerPopover", {
|
|
186
186
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkWZSTQLHR_cjs.CbacBannerPopover; }
|
|
188
188
|
});
|
|
189
189
|
Object.defineProperty(exports, "CbacPicker", {
|
|
190
190
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkWZSTQLHR_cjs.CbacPicker; }
|
|
192
192
|
});
|
|
193
193
|
Object.defineProperty(exports, "CbacPickerDialog", {
|
|
194
194
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkWZSTQLHR_cjs.CbacPickerDialog; }
|
|
196
196
|
});
|
|
197
197
|
Object.defineProperty(exports, "MaxClassificationField", {
|
|
198
198
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkWZSTQLHR_cjs.MaxClassificationField; }
|
|
200
200
|
});
|
|
201
201
|
Object.defineProperty(exports, "computeMarkingStates", {
|
|
202
202
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkWZSTQLHR_cjs.computeMarkingStates; }
|
|
204
204
|
});
|
|
205
205
|
Object.defineProperty(exports, "groupMarkingsByCategory", {
|
|
206
206
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkWZSTQLHR_cjs.groupMarkingsByCategory; }
|
|
208
208
|
});
|
|
209
209
|
Object.defineProperty(exports, "toggleMarking", {
|
|
210
210
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkWZSTQLHR_cjs.toggleMarking; }
|
|
212
212
|
});
|
|
213
213
|
Object.defineProperty(exports, "BaseCbacBanner", {
|
|
214
214
|
enumerable: true,
|
|
@@ -220,11 +220,11 @@ Object.defineProperty(exports, "CbacBanner", {
|
|
|
220
220
|
});
|
|
221
221
|
Object.defineProperty(exports, "DocumentViewer", {
|
|
222
222
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkDVBKL7PU_cjs.DocumentViewer; }
|
|
224
224
|
});
|
|
225
225
|
Object.defineProperty(exports, "ViewerType", {
|
|
226
226
|
enumerable: true,
|
|
227
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkDVBKL7PU_cjs.ViewerType; }
|
|
228
228
|
});
|
|
229
229
|
Object.defineProperty(exports, "BaseXmlViewer", {
|
|
230
230
|
enumerable: true,
|
|
@@ -240,71 +240,71 @@ Object.defineProperty(exports, "MarkdownRenderer", {
|
|
|
240
240
|
});
|
|
241
241
|
Object.defineProperty(exports, "BasePdfViewer", {
|
|
242
242
|
enumerable: true,
|
|
243
|
-
get: function () { return
|
|
243
|
+
get: function () { return chunkEZ56QDIG_cjs.BasePdfViewer; }
|
|
244
244
|
});
|
|
245
245
|
Object.defineProperty(exports, "PdfViewerAnnotationLayer", {
|
|
246
246
|
enumerable: true,
|
|
247
|
-
get: function () { return
|
|
247
|
+
get: function () { return chunkEZ56QDIG_cjs.PdfViewerAnnotationLayer; }
|
|
248
248
|
});
|
|
249
249
|
Object.defineProperty(exports, "PdfViewerOutlineSidebar", {
|
|
250
250
|
enumerable: true,
|
|
251
|
-
get: function () { return
|
|
251
|
+
get: function () { return chunkEZ56QDIG_cjs.PdfViewerOutlineSidebar; }
|
|
252
252
|
});
|
|
253
253
|
Object.defineProperty(exports, "PdfViewerSearchBar", {
|
|
254
254
|
enumerable: true,
|
|
255
|
-
get: function () { return
|
|
255
|
+
get: function () { return chunkEZ56QDIG_cjs.PdfViewerSearchBar; }
|
|
256
256
|
});
|
|
257
257
|
Object.defineProperty(exports, "PdfViewerSidebar", {
|
|
258
258
|
enumerable: true,
|
|
259
|
-
get: function () { return
|
|
259
|
+
get: function () { return chunkEZ56QDIG_cjs.PdfViewerSidebar; }
|
|
260
260
|
});
|
|
261
261
|
Object.defineProperty(exports, "PdfViewerToolbar", {
|
|
262
262
|
enumerable: true,
|
|
263
|
-
get: function () { return
|
|
263
|
+
get: function () { return chunkEZ56QDIG_cjs.PdfViewerToolbar; }
|
|
264
264
|
});
|
|
265
265
|
Object.defineProperty(exports, "usePdfAnnotationPortals", {
|
|
266
266
|
enumerable: true,
|
|
267
|
-
get: function () { return
|
|
267
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfAnnotationPortals; }
|
|
268
268
|
});
|
|
269
269
|
Object.defineProperty(exports, "usePdfAnnotationsByPage", {
|
|
270
270
|
enumerable: true,
|
|
271
|
-
get: function () { return
|
|
271
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfAnnotationsByPage; }
|
|
272
272
|
});
|
|
273
273
|
Object.defineProperty(exports, "usePdfDocument", {
|
|
274
274
|
enumerable: true,
|
|
275
|
-
get: function () { return
|
|
275
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfDocument; }
|
|
276
276
|
});
|
|
277
277
|
Object.defineProperty(exports, "usePdfFormFields", {
|
|
278
278
|
enumerable: true,
|
|
279
|
-
get: function () { return
|
|
279
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfFormFields; }
|
|
280
280
|
});
|
|
281
281
|
Object.defineProperty(exports, "usePdfHighlightMode", {
|
|
282
282
|
enumerable: true,
|
|
283
|
-
get: function () { return
|
|
283
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfHighlightMode; }
|
|
284
284
|
});
|
|
285
285
|
Object.defineProperty(exports, "usePdfOutline", {
|
|
286
286
|
enumerable: true,
|
|
287
|
-
get: function () { return
|
|
287
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfOutline; }
|
|
288
288
|
});
|
|
289
289
|
Object.defineProperty(exports, "usePdfViewer", {
|
|
290
290
|
enumerable: true,
|
|
291
|
-
get: function () { return
|
|
291
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfViewer; }
|
|
292
292
|
});
|
|
293
293
|
Object.defineProperty(exports, "usePdfViewerCore", {
|
|
294
294
|
enumerable: true,
|
|
295
|
-
get: function () { return
|
|
295
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfViewerCore; }
|
|
296
296
|
});
|
|
297
297
|
Object.defineProperty(exports, "usePdfViewerSearch", {
|
|
298
298
|
enumerable: true,
|
|
299
|
-
get: function () { return
|
|
299
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfViewerSearch; }
|
|
300
300
|
});
|
|
301
301
|
Object.defineProperty(exports, "usePdfViewerState", {
|
|
302
302
|
enumerable: true,
|
|
303
|
-
get: function () { return
|
|
303
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfViewerState; }
|
|
304
304
|
});
|
|
305
305
|
Object.defineProperty(exports, "usePdfViewerSync", {
|
|
306
306
|
enumerable: true,
|
|
307
|
-
get: function () { return
|
|
307
|
+
get: function () { return chunkEZ56QDIG_cjs.usePdfViewerSync; }
|
|
308
308
|
});
|
|
309
309
|
Object.defineProperty(exports, "TiffRenderer", {
|
|
310
310
|
enumerable: true,
|
|
@@ -316,7 +316,7 @@ Object.defineProperty(exports, "BaseVideoViewer", {
|
|
|
316
316
|
});
|
|
317
317
|
Object.defineProperty(exports, "EmailViewer", {
|
|
318
318
|
enumerable: true,
|
|
319
|
-
get: function () { return
|
|
319
|
+
get: function () { return chunkLHQT74FJ_cjs.EmailViewer; }
|
|
320
320
|
});
|
|
321
321
|
Object.defineProperty(exports, "BaseEmailViewer", {
|
|
322
322
|
enumerable: true,
|
|
@@ -324,7 +324,7 @@ Object.defineProperty(exports, "BaseEmailViewer", {
|
|
|
324
324
|
});
|
|
325
325
|
Object.defineProperty(exports, "ExcelViewer", {
|
|
326
326
|
enumerable: true,
|
|
327
|
-
get: function () { return
|
|
327
|
+
get: function () { return chunkZJMZKUK4_cjs.ExcelViewer; }
|
|
328
328
|
});
|
|
329
329
|
Object.defineProperty(exports, "BaseExcelViewer", {
|
|
330
330
|
enumerable: true,
|
|
@@ -12,7 +12,7 @@ export { OsdkThemeContextValue, OsdkThemeMode, OsdkThemeProvider, OsdkThemeProvi
|
|
|
12
12
|
export { TiffRenderer, TiffViewerMedia, TiffViewerMediaProps } from './experimental/tiff-renderer.cjs';
|
|
13
13
|
export { BaseVideoViewer, VideoViewer } from './experimental/video-viewer.cjs';
|
|
14
14
|
export { BaseXmlViewer, XmlViewer } from './experimental/xml-viewer.cjs';
|
|
15
|
-
export { A as AnnotationType, O as OutlineItem, P as PdfAnnotation, a as PdfAnnotationRenderProps, b as PdfCustomAnnotation, c as PdfDownloadResult, d as PdfFormFieldValue, e as PdfRect, f as PdfTextHighlightEvent, g as PdfViewerHandle, h as PdfViewerInstanceOptions, i as PdfViewerProps, S as SidebarMode } from '../types-
|
|
15
|
+
export { A as AnnotationType, O as OutlineItem, P as PdfAnnotation, a as PdfAnnotationRenderProps, b as PdfCustomAnnotation, c as PdfDownloadResult, d as PdfFormFieldValue, e as PdfRect, f as PdfTextHighlightEvent, g as PdfViewerHandle, h as PdfViewerInstanceOptions, i as PdfViewerProps, S as SidebarMode } from '../types-cSnAM4mt.cjs';
|
|
16
16
|
export { B as BaseEmailViewerProps, E as EmailAddress, a as EmailViewerMediaProps, P as ParsedEmail } from '../EmailViewerApi-vpg29jQa.cjs';
|
|
17
17
|
export { B as BaseExcelViewerProps, E as ExcelViewerMediaProps, P as ParsedSpreadsheet, S as SheetData } from '../ExcelViewerApi-D8tqiUvS.cjs';
|
|
18
18
|
export { B as BaseImageViewerProps, I as ImageViewerMediaProps } from '../ImageViewerApi-UjutcBVK.cjs';
|
|
@@ -190,6 +190,11 @@ interface PdfViewerProps {
|
|
|
190
190
|
* @default false
|
|
191
191
|
*/
|
|
192
192
|
enableDownload?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Filename used when the user downloads the PDF via the toolbar button.
|
|
195
|
+
* If omitted, the name is derived from the `src` URL, falling back to "document.pdf".
|
|
196
|
+
*/
|
|
197
|
+
downloadFileName?: string;
|
|
193
198
|
/**
|
|
194
199
|
* Which sidebar panel to show: thumbnails or document outline.
|
|
195
200
|
* @default "thumbnails"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { Error as ErrorIcon, Spin } from "@blueprintjs/icons";
|
|
18
18
|
import classnames from "classnames";
|
|
19
19
|
import "pdfjs-dist/web/pdf_viewer.css";
|
|
20
|
-
import React, { forwardRef, useImperativeHandle } from "react";
|
|
20
|
+
import React, { forwardRef, useCallback, useImperativeHandle } from "react";
|
|
21
21
|
import { PdfAnnotationOverlay } from "./components/PdfAnnotationOverlay.js";
|
|
22
22
|
import { PdfViewerOutlineSidebar } from "./components/PdfViewerOutlineSidebar.js";
|
|
23
23
|
import { PdfViewerSearchBar } from "./components/PdfViewerSearchBar.js";
|
|
@@ -45,6 +45,7 @@ export const BasePdfViewer = /*#__PURE__*/forwardRef(function ({
|
|
|
45
45
|
initialAutoSize = false,
|
|
46
46
|
initialSidebarOpen = false,
|
|
47
47
|
enableDownload = false,
|
|
48
|
+
downloadFileName,
|
|
48
49
|
sidebarMode: sidebarModeProp = "thumbnails",
|
|
49
50
|
outlineIcons,
|
|
50
51
|
className
|
|
@@ -85,6 +86,9 @@ export const BasePdfViewer = /*#__PURE__*/forwardRef(function ({
|
|
|
85
86
|
onFormChange
|
|
86
87
|
});
|
|
87
88
|
const annotationsByPage = usePdfAnnotationsByPage(annotations);
|
|
89
|
+
const handleDownload = useCallback(() => {
|
|
90
|
+
viewer.download(downloadFileName);
|
|
91
|
+
}, [viewer, downloadFileName]);
|
|
88
92
|
const rootClassName = classnames(styles.pdfViewer, className);
|
|
89
93
|
if (viewer.loading) {
|
|
90
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -125,7 +129,7 @@ export const BasePdfViewer = /*#__PURE__*/forwardRef(function ({
|
|
|
125
129
|
onAutoSizeToggle: viewer.toggleAutoSize,
|
|
126
130
|
onSearchOpen: viewer.search.openSearch,
|
|
127
131
|
onSidebarToggle: viewer.toggleSidebar,
|
|
128
|
-
onDownload:
|
|
132
|
+
onDownload: handleDownload,
|
|
129
133
|
enableDownload: enableDownload,
|
|
130
134
|
onRotateLeft: viewer.rotateLeft,
|
|
131
135
|
onRotateRight: viewer.rotateRight,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfViewer.js","names":["Error","ErrorIcon","Spin","classnames","React","forwardRef","useImperativeHandle","PdfAnnotationOverlay","PdfViewerOutlineSidebar","PdfViewerSearchBar","PdfViewerSidebar","PdfViewerToolbar","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfHighlightMode","usePdfViewerState","styles","BasePdfViewer","src","annotations","onAnnotationClick","onDownload","enableHighlight","onTextHighlight","onHighlightDelete","formData","onFormSubmit","onFormChange","initialPage","initialScale","initialAutoSize","initialSidebarOpen","enableDownload","sidebarMode","sidebarModeProp","outlineIcons","className","ref","viewer","highlightModeActive","toggleHighlightMode","deleteHighlight","pdfViewerRef","document","enabled","scrollToPage","hasFormFields","submitFormData","eventBusRef","annotationsByPage","rootClassName","pdfViewer","loading","createElement","loadingContainer","spinnerIcon","error","errorContainer","errorIcon","message","currentPage","numPages","scale","autoSize","sidebarOpen","onPageChange","onZoomIn","zoomIn","onZoomOut","zoomOut","onAutoSizeToggle","toggleAutoSize","onSearchOpen","search","openSearch","onSidebarToggle","toggleSidebar","download","onRotateLeft","rotateLeft","onRotateRight","rotateRight","onHighlightToggle","enableFormSave","onFormSave","isSearchOpen","query","totalMatches","currentMatchIndex","onQueryChange","setQuery","onNext","nextMatch","onPrev","prevMatch","onClose","closeSearch","contentArea","onPageClick","onSidebarModeChange","setSidebarMode","outlineItems","onItemClick","scrollContainerWrapper","containerRef","scrollContainer","viewerRef","portalTargets","map","target","pageAnnotations","pageNumber","length","key"],"sources":["PdfViewer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { forwardRef, useImperativeHandle } from \"react\";\nimport { PdfAnnotationOverlay } from \"./components/PdfAnnotationOverlay.js\";\nimport { PdfViewerOutlineSidebar } from \"./components/PdfViewerOutlineSidebar.js\";\nimport { PdfViewerSearchBar } from \"./components/PdfViewerSearchBar.js\";\nimport { PdfViewerSidebar } from \"./components/PdfViewerSidebar.js\";\nimport { PdfViewerToolbar } from \"./components/PdfViewerToolbar.js\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\nimport styles from \"./PdfViewer.module.css\";\nimport type { PdfViewerHandle, PdfViewerProps } from \"./types.js\";\n\nexport const BasePdfViewer: React.ForwardRefExoticComponent<\n PdfViewerProps & React.RefAttributes<PdfViewerHandle>\n> = forwardRef<PdfViewerHandle, PdfViewerProps>(\n function BasePdfViewer({\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n onDownload,\n enableHighlight = false,\n onTextHighlight,\n onHighlightDelete,\n formData,\n onFormSubmit,\n onFormChange,\n initialPage = 1,\n initialScale = 1.0,\n initialAutoSize = false,\n initialSidebarOpen = false,\n enableDownload = false,\n sidebarMode: sidebarModeProp = \"thumbnails\",\n outlineIcons,\n className,\n }, ref) {\n const viewer = usePdfViewerState({\n src,\n initialPage,\n initialScale,\n initialAutoSize,\n initialSidebarOpen,\n sidebarMode: sidebarModeProp,\n onDownload,\n });\n\n const { highlightModeActive, toggleHighlightMode, deleteHighlight } =\n usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: enableHighlight,\n onTextHighlight,\n onHighlightDelete,\n });\n\n useImperativeHandle(ref, () => ({\n scrollToPage: viewer.scrollToPage,\n deleteHighlight,\n }), [viewer.scrollToPage, deleteHighlight]);\n\n const { hasFormFields, submitFormData } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormSubmit,\n onFormChange,\n });\n\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n\n const rootClassName = classnames(styles.pdfViewer, className);\n\n if (viewer.loading) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>\n <Spin className={styles.spinnerIcon} />\n Loading…\n </div>\n </div>\n );\n }\n\n if (viewer.error != null) {\n return (\n <div className={rootClassName}>\n <div className={styles.errorContainer}>\n <ErrorIcon className={styles.errorIcon} />\n Failed to load PDF: {viewer.error.message}\n </div>\n </div>\n );\n }\n\n if (viewer.document == null) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>No document</div>\n </div>\n );\n }\n\n return (\n <div className={rootClassName}>\n <PdfViewerToolbar\n currentPage={viewer.currentPage}\n numPages={viewer.numPages}\n scale={viewer.scale}\n autoSize={viewer.autoSize}\n sidebarOpen={viewer.sidebarOpen}\n onPageChange={viewer.scrollToPage}\n onZoomIn={viewer.zoomIn}\n onZoomOut={viewer.zoomOut}\n onAutoSizeToggle={viewer.toggleAutoSize}\n onSearchOpen={viewer.search.openSearch}\n onSidebarToggle={viewer.toggleSidebar}\n onDownload={viewer.download}\n enableDownload={enableDownload}\n onRotateLeft={viewer.rotateLeft}\n onRotateRight={viewer.rotateRight}\n enableHighlight={enableHighlight}\n highlightModeActive={highlightModeActive}\n onHighlightToggle={toggleHighlightMode}\n enableFormSave={onFormSubmit != null && hasFormFields}\n onFormSave={submitFormData}\n />\n {viewer.search.isSearchOpen && (\n <PdfViewerSearchBar\n query={viewer.search.query}\n totalMatches={viewer.search.totalMatches}\n currentMatchIndex={viewer.search.currentMatchIndex}\n onQueryChange={viewer.search.setQuery}\n onNext={viewer.search.nextMatch}\n onPrev={viewer.search.prevMatch}\n onClose={viewer.search.closeSearch}\n />\n )}\n <div className={styles.contentArea}>\n {viewer.sidebarOpen && viewer.sidebarMode === \"thumbnails\" && (\n <PdfViewerSidebar\n document={viewer.document}\n numPages={viewer.numPages}\n currentPage={viewer.currentPage}\n onPageClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n />\n )}\n {viewer.sidebarOpen && viewer.sidebarMode === \"outline\" && (\n <PdfViewerOutlineSidebar\n outlineItems={viewer.outlineItems}\n currentPage={viewer.currentPage}\n onItemClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n outlineIcons={outlineIcons}\n />\n )}\n <div className={styles.scrollContainerWrapper}>\n <div ref={viewer.containerRef} className={styles.scrollContainer}>\n <div ref={viewer.viewerRef} className=\"pdfViewer\" />\n {viewer.portalTargets.map((target) => {\n const pageAnnotations = annotationsByPage[target.pageNumber]\n ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return (\n <PdfAnnotationOverlay\n key={target.pageNumber}\n target={target}\n annotations={pageAnnotations}\n onAnnotationClick={onAnnotationClick}\n />\n );\n })}\n </div>\n </div>\n </div>\n </div>\n );\n },\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,KAAK,IAAIC,SAAS,EAAEC,IAAI,QAAQ,oBAAoB;AAC7D,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,+BAA+B;AACtC,OAAOC,KAAK,IAAIC,UAAU,EAAEC,mBAAmB,QAAQ,OAAO;AAC9D,SAASC,oBAAoB,QAAQ,sCAAsC;AAC3E,SAASC,uBAAuB,QAAQ,yCAAyC;AACjF,SAASC,kBAAkB,QAAQ,oCAAoC;AACvE,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,sBAAsB,QAAQ,gBAAgB;AACvD,SAASC,uBAAuB,QAAQ,oCAAoC;AAC5E,SAASC,gBAAgB,QAAQ,6BAA6B;AAC9D,SAASC,mBAAmB,QAAQ,gCAAgC;AACpE,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,OAAOC,MAAM,MAAM,wBAAwB;AAG3C,OAAO,MAAMC,aAEZ,gBAAGb,UAAU,CACZ,UAAuB;EACrBc,GAAG;EACHC,WAAW,GAAGR,s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nB2G,GAAG,EAAEJ,MAAM,CAACE,UAAW;MACvBF,MAAM,EAAEA,MAAO;MACf1F,WAAW,EAAE2F,eAAgB;MAC7B1F,iBAAiB,EAAEA;IAAkB,CACtC,CAAC;EAEN,CAAC,CACE,CACF,CACF,CACF,CAAC;AAEV,CACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"PdfViewer.js","names":["Error","ErrorIcon","Spin","classnames","React","forwardRef","useCallback","useImperativeHandle","PdfAnnotationOverlay","PdfViewerOutlineSidebar","PdfViewerSearchBar","PdfViewerSidebar","PdfViewerToolbar","EMPTY_ANNOTATION_ARRAY","usePdfAnnotationsByPage","usePdfFormFields","usePdfHighlightMode","usePdfViewerState","styles","BasePdfViewer","src","annotations","onAnnotationClick","onDownload","enableHighlight","onTextHighlight","onHighlightDelete","formData","onFormSubmit","onFormChange","initialPage","initialScale","initialAutoSize","initialSidebarOpen","enableDownload","downloadFileName","sidebarMode","sidebarModeProp","outlineIcons","className","ref","viewer","highlightModeActive","toggleHighlightMode","deleteHighlight","pdfViewerRef","document","enabled","scrollToPage","hasFormFields","submitFormData","eventBusRef","annotationsByPage","handleDownload","download","rootClassName","pdfViewer","loading","createElement","loadingContainer","spinnerIcon","error","errorContainer","errorIcon","message","currentPage","numPages","scale","autoSize","sidebarOpen","onPageChange","onZoomIn","zoomIn","onZoomOut","zoomOut","onAutoSizeToggle","toggleAutoSize","onSearchOpen","search","openSearch","onSidebarToggle","toggleSidebar","onRotateLeft","rotateLeft","onRotateRight","rotateRight","onHighlightToggle","enableFormSave","onFormSave","isSearchOpen","query","totalMatches","currentMatchIndex","onQueryChange","setQuery","onNext","nextMatch","onPrev","prevMatch","onClose","closeSearch","contentArea","onPageClick","onSidebarModeChange","setSidebarMode","outlineItems","onItemClick","scrollContainerWrapper","containerRef","scrollContainer","viewerRef","portalTargets","map","target","pageAnnotations","pageNumber","length","key"],"sources":["PdfViewer.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Error as ErrorIcon, Spin } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport \"pdfjs-dist/web/pdf_viewer.css\";\nimport React, { forwardRef, useCallback, useImperativeHandle } from \"react\";\nimport { PdfAnnotationOverlay } from \"./components/PdfAnnotationOverlay.js\";\nimport { PdfViewerOutlineSidebar } from \"./components/PdfViewerOutlineSidebar.js\";\nimport { PdfViewerSearchBar } from \"./components/PdfViewerSearchBar.js\";\nimport { PdfViewerSidebar } from \"./components/PdfViewerSidebar.js\";\nimport { PdfViewerToolbar } from \"./components/PdfViewerToolbar.js\";\nimport { EMPTY_ANNOTATION_ARRAY } from \"./constants.js\";\nimport { usePdfAnnotationsByPage } from \"./hooks/usePdfAnnotationsByPage.js\";\nimport { usePdfFormFields } from \"./hooks/usePdfFormFields.js\";\nimport { usePdfHighlightMode } from \"./hooks/usePdfHighlightMode.js\";\nimport { usePdfViewerState } from \"./hooks/usePdfViewerState.js\";\nimport styles from \"./PdfViewer.module.css\";\nimport type { PdfViewerHandle, PdfViewerProps } from \"./types.js\";\n\nexport const BasePdfViewer: React.ForwardRefExoticComponent<\n PdfViewerProps & React.RefAttributes<PdfViewerHandle>\n> = forwardRef<PdfViewerHandle, PdfViewerProps>(\n function BasePdfViewer({\n src,\n annotations = EMPTY_ANNOTATION_ARRAY,\n onAnnotationClick,\n onDownload,\n enableHighlight = false,\n onTextHighlight,\n onHighlightDelete,\n formData,\n onFormSubmit,\n onFormChange,\n initialPage = 1,\n initialScale = 1.0,\n initialAutoSize = false,\n initialSidebarOpen = false,\n enableDownload = false,\n downloadFileName,\n sidebarMode: sidebarModeProp = \"thumbnails\",\n outlineIcons,\n className,\n }, ref) {\n const viewer = usePdfViewerState({\n src,\n initialPage,\n initialScale,\n initialAutoSize,\n initialSidebarOpen,\n sidebarMode: sidebarModeProp,\n onDownload,\n });\n\n const { highlightModeActive, toggleHighlightMode, deleteHighlight } =\n usePdfHighlightMode({\n pdfViewerRef: viewer.pdfViewerRef,\n document: viewer.document,\n enabled: enableHighlight,\n onTextHighlight,\n onHighlightDelete,\n });\n\n useImperativeHandle(ref, () => ({\n scrollToPage: viewer.scrollToPage,\n deleteHighlight,\n }), [viewer.scrollToPage, deleteHighlight]);\n\n const { hasFormFields, submitFormData } = usePdfFormFields({\n pdfViewerRef: viewer.pdfViewerRef,\n eventBusRef: viewer.eventBusRef,\n document: viewer.document,\n formData,\n onFormSubmit,\n onFormChange,\n });\n\n const annotationsByPage = usePdfAnnotationsByPage(annotations);\n\n const handleDownload = useCallback(() => {\n viewer.download(downloadFileName);\n }, [viewer, downloadFileName]);\n\n const rootClassName = classnames(styles.pdfViewer, className);\n\n if (viewer.loading) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>\n <Spin className={styles.spinnerIcon} />\n Loading…\n </div>\n </div>\n );\n }\n\n if (viewer.error != null) {\n return (\n <div className={rootClassName}>\n <div className={styles.errorContainer}>\n <ErrorIcon className={styles.errorIcon} />\n Failed to load PDF: {viewer.error.message}\n </div>\n </div>\n );\n }\n\n if (viewer.document == null) {\n return (\n <div className={rootClassName}>\n <div className={styles.loadingContainer}>No document</div>\n </div>\n );\n }\n\n return (\n <div className={rootClassName}>\n <PdfViewerToolbar\n currentPage={viewer.currentPage}\n numPages={viewer.numPages}\n scale={viewer.scale}\n autoSize={viewer.autoSize}\n sidebarOpen={viewer.sidebarOpen}\n onPageChange={viewer.scrollToPage}\n onZoomIn={viewer.zoomIn}\n onZoomOut={viewer.zoomOut}\n onAutoSizeToggle={viewer.toggleAutoSize}\n onSearchOpen={viewer.search.openSearch}\n onSidebarToggle={viewer.toggleSidebar}\n onDownload={handleDownload}\n enableDownload={enableDownload}\n onRotateLeft={viewer.rotateLeft}\n onRotateRight={viewer.rotateRight}\n enableHighlight={enableHighlight}\n highlightModeActive={highlightModeActive}\n onHighlightToggle={toggleHighlightMode}\n enableFormSave={onFormSubmit != null && hasFormFields}\n onFormSave={submitFormData}\n />\n {viewer.search.isSearchOpen && (\n <PdfViewerSearchBar\n query={viewer.search.query}\n totalMatches={viewer.search.totalMatches}\n currentMatchIndex={viewer.search.currentMatchIndex}\n onQueryChange={viewer.search.setQuery}\n onNext={viewer.search.nextMatch}\n onPrev={viewer.search.prevMatch}\n onClose={viewer.search.closeSearch}\n />\n )}\n <div className={styles.contentArea}>\n {viewer.sidebarOpen && viewer.sidebarMode === \"thumbnails\" && (\n <PdfViewerSidebar\n document={viewer.document}\n numPages={viewer.numPages}\n currentPage={viewer.currentPage}\n onPageClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n />\n )}\n {viewer.sidebarOpen && viewer.sidebarMode === \"outline\" && (\n <PdfViewerOutlineSidebar\n outlineItems={viewer.outlineItems}\n currentPage={viewer.currentPage}\n onItemClick={viewer.scrollToPage}\n sidebarMode={viewer.sidebarMode}\n onSidebarModeChange={viewer.setSidebarMode}\n outlineIcons={outlineIcons}\n />\n )}\n <div className={styles.scrollContainerWrapper}>\n <div ref={viewer.containerRef} className={styles.scrollContainer}>\n <div ref={viewer.viewerRef} className=\"pdfViewer\" />\n {viewer.portalTargets.map((target) => {\n const pageAnnotations = annotationsByPage[target.pageNumber]\n ?? EMPTY_ANNOTATION_ARRAY;\n if (pageAnnotations.length === 0) {\n return null;\n }\n return (\n <PdfAnnotationOverlay\n key={target.pageNumber}\n target={target}\n annotations={pageAnnotations}\n onAnnotationClick={onAnnotationClick}\n />\n );\n })}\n </div>\n </div>\n </div>\n </div>\n );\n },\n);\n"],"mappings":"AAAA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,WAAW,IAAI5B,MAAM,CAACL,WAAW,KAAK,SAAS,iBACrDhC,KAAA,CAAAsD,aAAA,CAACjD,uBAAuB;IACtBgG,YAAY,EAAEhE,MAAM,CAACgE,YAAa;IAClCxC,WAAW,EAAExB,MAAM,CAACwB,WAAY;IAChCyC,WAAW,EAAEjE,MAAM,CAACO,YAAa;IACjCZ,WAAW,EAAEK,MAAM,CAACL,WAAY;IAChCmE,mBAAmB,EAAE9D,MAAM,CAAC+D,cAAe;IAC3ClE,YAAY,EAAEA;EAAa,CAC5B,CACF,eACDlC,KAAA,CAAAsD,aAAA;IAAKnB,SAAS,EAAErB,MAAM,CAACyF;EAAuB,gBAC5CvG,KAAA,CAAAsD,aAAA;IAAKlB,GAAG,EAAEC,MAAM,CAACmE,YAAa;IAACrE,SAAS,EAAErB,MAAM,CAAC2F;EAAgB,gBAC/DzG,KAAA,CAAAsD,aAAA;IAAKlB,GAAG,EAAEC,MAAM,CAACqE,SAAU;IAACvE,SAAS,EAAC;EAAW,CAAE,CAAC,EACnDE,MAAM,CAACsE,aAAa,CAACC,GAAG,CAAEC,MAAM,IAAK;IACpC,MAAMC,eAAe,GAAG9D,iBAAiB,CAAC6D,MAAM,CAACE,UAAU,CAAC,IACvDtG,sBAAsB;IAC3B,IAAIqG,eAAe,CAACE,MAAM,KAAK,CAAC,EAAE;MAChC,OAAO,IAAI;IACb;IACA,oBACEhH,KAAA,CAAAsD,aAAA,CAAClD,oBAAoB;MACnB6G,GAAG,EAAEJ,MAAM,CAACE,UAAW;MACvBF,MAAM,EAAEA,MAAO;MACf5F,WAAW,EAAE6F,eAAgB;MAC7B5F,iBAAiB,EAAEA;IAAkB,CACtC,CAAC;EAEN,CAAC,CACE,CACF,CACF,CACF,CAAC;AAEV,CACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type React from \"react\";\n\n/** Which sidebar panel to display when the sidebar is open. */\nexport type SidebarMode = \"thumbnails\" | \"outline\";\n\n/** A single item in the PDF document outline (table of contents). */\nexport interface OutlineItem {\n title: string;\n depth: number;\n pageNumber: number;\n bold: boolean;\n italic: boolean;\n}\n\n/** The visual style of an annotation rendered on the PDF. */\nexport type AnnotationType =\n | \"highlight\"\n | \"underline\"\n | \"comment\"\n | \"pin\"\n | \"custom\";\n\n/** A rectangle in PDF coordinate space (origin: bottom-left of page). */\nexport interface PdfRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/** Props passed to a custom annotation renderer. */\nexport interface PdfAnnotationRenderProps {\n annotation: PdfAnnotation;\n scale: number;\n pageHeight: number;\n transform: number[];\n}\n\n/** Common fields shared by all annotation types. */\ninterface PdfAnnotationBase {\n /** Unique identifier for this annotation */\n id: string;\n /** Page number (1-indexed) */\n page: number;\n /** Coordinates in PDF points (origin: bottom-left of page) */\n rect: PdfRect;\n /** Additional rects for multi-line text highlights. When present, all rects are rendered. */\n rects?: PdfRect[];\n /** Optional label or tooltip text */\n label?: string;\n /** Optional color override (CSS color string) */\n color?: string;\n}\n\n/** A built-in annotation type (highlight, underline, comment, pin). */\ninterface PdfStandardAnnotation extends PdfAnnotationBase {\n /** The type of annotation to render */\n type: \"highlight\" | \"underline\" | \"comment\" | \"pin\";\n}\n\n/** A custom annotation with a user-provided renderer. */\nexport interface PdfCustomAnnotation extends PdfAnnotationBase {\n /** Must be \"custom\" for custom-rendered annotations */\n type: \"custom\";\n /** Render function for the custom annotation content (required for custom type) */\n render: (props: PdfAnnotationRenderProps) => React.ReactNode;\n}\n\n/** A single annotation positioned on a specific page of the PDF. */\nexport type PdfAnnotation = PdfStandardAnnotation | PdfCustomAnnotation;\n\n/** Result passed to the {@link PdfViewerProps.onDownload} callback. */\nexport type PdfDownloadResult =\n | { success: true; filename: string }\n | { success: false; error: Error };\n\n/** Possible values for a PDF form field. */\nexport type PdfFormFieldValue = string | boolean | string[];\n\n/** Data emitted when the user creates a text highlight via the highlight editor. */\nexport interface PdfTextHighlightEvent {\n /** Internal PDF.js editor ID. Use with `deleteHighlight` to programmatically remove. */\n editorId: string;\n /** Page number (1-indexed) */\n page: number;\n /** Bounding rects in PDF coordinate space (bottom-left origin) */\n rects: PdfRect[];\n /** The selected text content */\n selectedText: string;\n /** Highlight color as CSS color string */\n color: string;\n}\n\n/** Imperative handle for programmatic control of a {@link PdfViewer} or {@link BasePdfViewer}. */\nexport interface PdfViewerHandle {\n /** Scroll the viewer to the given page number (1-indexed). */\n scrollToPage: (page: number) => void;\n /** Programmatically delete a highlight by its `editorId` (from {@link PdfTextHighlightEvent}). */\n deleteHighlight: (editorId: string) => void;\n}\n\n/**\n * Options for {@link usePdfViewerInstance}.\n * Equivalent to {@link PdfViewerProps} minus the `className` rendering concern.\n */\nexport interface PdfViewerInstanceOptions {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Annotations to overlay on the PDF */\n annotations?: PdfAnnotation[];\n /** Callback fired when an annotation is clicked */\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n /** Callback fired when a download completes or fails */\n onDownload?: (result: PdfDownloadResult) => void;\n /** Whether the highlight toggle button is shown in the toolbar */\n highlightEnabled?: boolean;\n /** Callback fired when the user creates a text highlight */\n onTextHighlight?: (event: PdfTextHighlightEvent) => void;\n /** Callback fired when the user deletes a highlight */\n onHighlightDelete?: (event: PdfTextHighlightEvent) => void;\n /** Initial form field values keyed by field name */\n formData?: Record<string, PdfFormFieldValue>;\n /** Callback fired when the user clicks the save button */\n onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;\n /** Callback fired when any form field value changes */\n onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;\n /** Initial page number (1-indexed, default 1) */\n initialPage?: number;\n /** Initial zoom scale (default 1.0) */\n initialScale?: number;\n /**\n * Whether auto-size (fit to width) is initially enabled.\n * When enabled, the PDF scales to fit the container width and\n * re-fits automatically on resize. Manual zoom disables auto-size.\n * Takes precedence over {@link initialScale} when enabled.\n * @default false\n */\n initialAutoSize?: boolean;\n /** Whether the sidebar is initially open (default false) */\n initialSidebarOpen?: boolean;\n /** Whether the download button is shown in the toolbar */\n enableDownload?: boolean;\n /** Which sidebar panel to show: thumbnails or document outline */\n sidebarMode?: SidebarMode;\n /** Custom icon components for each outline depth level (0-indexed) */\n outlineIcons?: Partial<Record<number, React.ComponentType>>;\n}\n\n/** Props for the {@link PdfViewer} component. */\nexport interface PdfViewerProps {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Annotations to overlay on the PDF */\n annotations?: PdfAnnotation[];\n /**\n * Callback fired when an annotation is clicked.\n *\n * @param annotation - The annotation that was clicked\n * @returns void\n */\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n /**\n * Callback fired when a download completes or fails.\n *\n * @param result - The download result indicating success with the filename, or failure with an error\n * @returns void\n */\n onDownload?: (result: PdfDownloadResult) => void;\n /**\n * Whether the highlight toggle button is shown in the toolbar.\n * @default false\n */\n enableHighlight?: boolean;\n /**\n * Callback fired when the user creates a text highlight.\n * Only fires when highlight mode is active.\n *\n * @param event - The highlight event with page, rects, text, and color\n * @returns void\n */\n onTextHighlight?: (event: PdfTextHighlightEvent) => void;\n /**\n * Callback fired when the user deletes a highlight via the PDF.js editor UI.\n *\n * @param event - The highlight event that was deleted\n * @returns void\n */\n onHighlightDelete?: (event: PdfTextHighlightEvent) => void;\n /** Initial page number (1-indexed, default 1) */\n initialPage?: number;\n /** Initial zoom scale (default 1.0) */\n initialScale?: number;\n /**\n * Whether auto-size (fit to width) is initially enabled.\n * When enabled, the PDF scales to fit the container width and\n * re-fits automatically on resize. Manual zoom disables auto-size.\n * Takes precedence over {@link initialScale} when enabled.\n * @default false\n */\n initialAutoSize?: boolean;\n /** Whether the sidebar is initially open (default false) */\n initialSidebarOpen?: boolean;\n /**\n * Whether the download button is shown in the toolbar.\n * @default false\n */\n enableDownload?: boolean;\n /**\n * Which sidebar panel to show: thumbnails or document outline.\n * @default \"thumbnails\"\n */\n sidebarMode?: SidebarMode;\n /**\n * Custom icon components for each outline depth level (0-indexed).\n * Key 0 = top-level items, 1 = first nesting level, etc.\n * If omitted, no icons are rendered.\n */\n outlineIcons?: Partial<Record<number, React.ComponentType>>;\n /**\n * Initial form field values keyed by field name. Applied when the document loads.\n * Use this to pre-populate form fields when resuming a previously edited PDF.\n */\n formData?: Record<string, PdfFormFieldValue>;\n /**\n * Callback fired when the user clicks the save button in the toolbar.\n * Receives all current form field values keyed by field name.\n *\n * @param data - All form field values keyed by field name\n * @returns void\n */\n onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;\n /**\n * Callback fired when any form field value changes.\n *\n * @param fieldName - The name of the field that changed\n * @param value - The new value\n * @returns void\n */\n onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;\n /** Additional CSS class name for the root element */\n className?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["types.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type React from \"react\";\n\n/** Which sidebar panel to display when the sidebar is open. */\nexport type SidebarMode = \"thumbnails\" | \"outline\";\n\n/** A single item in the PDF document outline (table of contents). */\nexport interface OutlineItem {\n title: string;\n depth: number;\n pageNumber: number;\n bold: boolean;\n italic: boolean;\n}\n\n/** The visual style of an annotation rendered on the PDF. */\nexport type AnnotationType =\n | \"highlight\"\n | \"underline\"\n | \"comment\"\n | \"pin\"\n | \"custom\";\n\n/** A rectangle in PDF coordinate space (origin: bottom-left of page). */\nexport interface PdfRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/** Props passed to a custom annotation renderer. */\nexport interface PdfAnnotationRenderProps {\n annotation: PdfAnnotation;\n scale: number;\n pageHeight: number;\n transform: number[];\n}\n\n/** Common fields shared by all annotation types. */\ninterface PdfAnnotationBase {\n /** Unique identifier for this annotation */\n id: string;\n /** Page number (1-indexed) */\n page: number;\n /** Coordinates in PDF points (origin: bottom-left of page) */\n rect: PdfRect;\n /** Additional rects for multi-line text highlights. When present, all rects are rendered. */\n rects?: PdfRect[];\n /** Optional label or tooltip text */\n label?: string;\n /** Optional color override (CSS color string) */\n color?: string;\n}\n\n/** A built-in annotation type (highlight, underline, comment, pin). */\ninterface PdfStandardAnnotation extends PdfAnnotationBase {\n /** The type of annotation to render */\n type: \"highlight\" | \"underline\" | \"comment\" | \"pin\";\n}\n\n/** A custom annotation with a user-provided renderer. */\nexport interface PdfCustomAnnotation extends PdfAnnotationBase {\n /** Must be \"custom\" for custom-rendered annotations */\n type: \"custom\";\n /** Render function for the custom annotation content (required for custom type) */\n render: (props: PdfAnnotationRenderProps) => React.ReactNode;\n}\n\n/** A single annotation positioned on a specific page of the PDF. */\nexport type PdfAnnotation = PdfStandardAnnotation | PdfCustomAnnotation;\n\n/** Result passed to the {@link PdfViewerProps.onDownload} callback. */\nexport type PdfDownloadResult =\n | { success: true; filename: string }\n | { success: false; error: Error };\n\n/** Possible values for a PDF form field. */\nexport type PdfFormFieldValue = string | boolean | string[];\n\n/** Data emitted when the user creates a text highlight via the highlight editor. */\nexport interface PdfTextHighlightEvent {\n /** Internal PDF.js editor ID. Use with `deleteHighlight` to programmatically remove. */\n editorId: string;\n /** Page number (1-indexed) */\n page: number;\n /** Bounding rects in PDF coordinate space (bottom-left origin) */\n rects: PdfRect[];\n /** The selected text content */\n selectedText: string;\n /** Highlight color as CSS color string */\n color: string;\n}\n\n/** Imperative handle for programmatic control of a {@link PdfViewer} or {@link BasePdfViewer}. */\nexport interface PdfViewerHandle {\n /** Scroll the viewer to the given page number (1-indexed). */\n scrollToPage: (page: number) => void;\n /** Programmatically delete a highlight by its `editorId` (from {@link PdfTextHighlightEvent}). */\n deleteHighlight: (editorId: string) => void;\n}\n\n/**\n * Options for {@link usePdfViewerInstance}.\n * Equivalent to {@link PdfViewerProps} minus the `className` rendering concern.\n */\nexport interface PdfViewerInstanceOptions {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Annotations to overlay on the PDF */\n annotations?: PdfAnnotation[];\n /** Callback fired when an annotation is clicked */\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n /** Callback fired when a download completes or fails */\n onDownload?: (result: PdfDownloadResult) => void;\n /** Whether the highlight toggle button is shown in the toolbar */\n highlightEnabled?: boolean;\n /** Callback fired when the user creates a text highlight */\n onTextHighlight?: (event: PdfTextHighlightEvent) => void;\n /** Callback fired when the user deletes a highlight */\n onHighlightDelete?: (event: PdfTextHighlightEvent) => void;\n /** Initial form field values keyed by field name */\n formData?: Record<string, PdfFormFieldValue>;\n /** Callback fired when the user clicks the save button */\n onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;\n /** Callback fired when any form field value changes */\n onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;\n /** Initial page number (1-indexed, default 1) */\n initialPage?: number;\n /** Initial zoom scale (default 1.0) */\n initialScale?: number;\n /**\n * Whether auto-size (fit to width) is initially enabled.\n * When enabled, the PDF scales to fit the container width and\n * re-fits automatically on resize. Manual zoom disables auto-size.\n * Takes precedence over {@link initialScale} when enabled.\n * @default false\n */\n initialAutoSize?: boolean;\n /** Whether the sidebar is initially open (default false) */\n initialSidebarOpen?: boolean;\n /** Whether the download button is shown in the toolbar */\n enableDownload?: boolean;\n /** Which sidebar panel to show: thumbnails or document outline */\n sidebarMode?: SidebarMode;\n /** Custom icon components for each outline depth level (0-indexed) */\n outlineIcons?: Partial<Record<number, React.ComponentType>>;\n}\n\n/** Props for the {@link PdfViewer} component. */\nexport interface PdfViewerProps {\n /** PDF source — URL string or ArrayBuffer */\n src: string | ArrayBuffer;\n /** Annotations to overlay on the PDF */\n annotations?: PdfAnnotation[];\n /**\n * Callback fired when an annotation is clicked.\n *\n * @param annotation - The annotation that was clicked\n * @returns void\n */\n onAnnotationClick?: (annotation: PdfAnnotation) => void;\n /**\n * Callback fired when a download completes or fails.\n *\n * @param result - The download result indicating success with the filename, or failure with an error\n * @returns void\n */\n onDownload?: (result: PdfDownloadResult) => void;\n /**\n * Whether the highlight toggle button is shown in the toolbar.\n * @default false\n */\n enableHighlight?: boolean;\n /**\n * Callback fired when the user creates a text highlight.\n * Only fires when highlight mode is active.\n *\n * @param event - The highlight event with page, rects, text, and color\n * @returns void\n */\n onTextHighlight?: (event: PdfTextHighlightEvent) => void;\n /**\n * Callback fired when the user deletes a highlight via the PDF.js editor UI.\n *\n * @param event - The highlight event that was deleted\n * @returns void\n */\n onHighlightDelete?: (event: PdfTextHighlightEvent) => void;\n /** Initial page number (1-indexed, default 1) */\n initialPage?: number;\n /** Initial zoom scale (default 1.0) */\n initialScale?: number;\n /**\n * Whether auto-size (fit to width) is initially enabled.\n * When enabled, the PDF scales to fit the container width and\n * re-fits automatically on resize. Manual zoom disables auto-size.\n * Takes precedence over {@link initialScale} when enabled.\n * @default false\n */\n initialAutoSize?: boolean;\n /** Whether the sidebar is initially open (default false) */\n initialSidebarOpen?: boolean;\n /**\n * Whether the download button is shown in the toolbar.\n * @default false\n */\n enableDownload?: boolean;\n /**\n * Filename used when the user downloads the PDF via the toolbar button.\n * If omitted, the name is derived from the `src` URL, falling back to \"document.pdf\".\n */\n downloadFileName?: string;\n /**\n * Which sidebar panel to show: thumbnails or document outline.\n * @default \"thumbnails\"\n */\n sidebarMode?: SidebarMode;\n /**\n * Custom icon components for each outline depth level (0-indexed).\n * Key 0 = top-level items, 1 = first nesting level, etc.\n * If omitted, no icons are rendered.\n */\n outlineIcons?: Partial<Record<number, React.ComponentType>>;\n /**\n * Initial form field values keyed by field name. Applied when the document loads.\n * Use this to pre-populate form fields when resuming a previously edited PDF.\n */\n formData?: Record<string, PdfFormFieldValue>;\n /**\n * Callback fired when the user clicks the save button in the toolbar.\n * Receives all current form field values keyed by field name.\n *\n * @param data - All form field values keyed by field name\n * @returns void\n */\n onFormSubmit?: (data: Record<string, PdfFormFieldValue>) => void;\n /**\n * Callback fired when any form field value changes.\n *\n * @param fieldName - The name of the field that changed\n * @param value - The new value\n * @returns void\n */\n onFormChange?: (fieldName: string, value: PdfFormFieldValue) => void;\n /** Additional CSS class name for the root element */\n className?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const PACKAGE_USER_AGENT = `osdk-react-components/${"0.
|
|
17
|
+
const PACKAGE_USER_AGENT = `osdk-react-components/${"0.29.0-main-e5533908222aa2ef650553f0a110d4d61ccebac3"}`;
|
|
18
18
|
export function componentUserAgent(componentName) {
|
|
19
19
|
return `${PACKAGE_USER_AGENT}/${componentName}`;
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT =\n `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GACtB,
|
|
1
|
+
{"version":3,"file":"UserAgent.js","names":["PACKAGE_USER_AGENT","componentUserAgent","componentName"],"sources":["UserAgent.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst PACKAGE_USER_AGENT =\n `osdk-react-components/${process.env.PACKAGE_VERSION}`;\n\nexport function componentUserAgent(componentName: string): string {\n return `${PACKAGE_USER_AGENT}/${componentName}`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,kBAAkB,GACtB,iFAAsD;AAExD,OAAO,SAASC,kBAAkBA,CAACC,aAAqB,EAAU;EAChE,OAAO,GAAGF,kBAAkB,IAAIE,aAAa,EAAE;AACjD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAkBA,OAAO,+BAAgC;AACvC,OAAO,
|
|
1
|
+
{"mappings":"AAkBA,OAAO,+BAAgC;AACvC,OAAO,WAA6D,OAAQ;AAY5E,cAAc,iBAAiB,sBAAsB,YAAa;AAElE,OAAO,cAAMA,eAAe,MAAM,0BAChC,iBAAiB,MAAM,cAAc","names":["BasePdfViewer: React.ForwardRefExoticComponent<\n PdfViewerProps & React.RefAttributes<PdfViewerHandle>\n>"],"sources":["../../../src/pdf-viewer/PdfViewer.tsx"],"version":3,"file":"PdfViewer.d.ts"}
|
|
@@ -190,6 +190,11 @@ export interface PdfViewerProps {
|
|
|
190
190
|
*/
|
|
191
191
|
enableDownload?: boolean;
|
|
192
192
|
/**
|
|
193
|
+
* Filename used when the user downloads the PDF via the toolbar button.
|
|
194
|
+
* If omitted, the name is derived from the `src` URL, falling back to "document.pdf".
|
|
195
|
+
*/
|
|
196
|
+
downloadFileName?: string;
|
|
197
|
+
/**
|
|
193
198
|
* Which sidebar panel to show: thumbnails or document outline.
|
|
194
199
|
* @default "thumbnails"
|
|
195
200
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,YAAY,WAAW,OAAQ;;AAG/B,YAAY,cAAc,eAAe;;AAGzC,iBAAiB,YAAY;CAC3B;CACA;CACA;CACA;CACA;AACD;;AAGD,YAAY,iBACR,cACA,cACA,YACA,QACA;;AAGJ,iBAAiB,QAAQ;CACvB;CACA;CACA;CACA;AACD;;AAGD,iBAAiB,yBAAyB;CACxC,YAAY;CACZ;CACA;CACA;AACD;;UAGS,kBAAkB;;CAE1B;;CAEA;;CAEA,MAAM;;CAEN,QAAQ;;CAER;;CAEA;AACD;;UAGS,8BAA8B,kBAAkB;;CAExD,MAAM,cAAc,cAAc,YAAY;AAC/C;;AAGD,iBAAiB,4BAA4B,kBAAkB;;CAE7D,MAAM;;CAEN,SAASA,OAAO,6BAA6B,MAAM;AACpD;;AAGD,YAAY,gBAAgB,wBAAwB;;AAGpD,YAAY,oBACR;CAAE,SAAS;CAAM;AAAkB,IACnC;CAAE,SAAS;CAAO,OAAO;AAAO;;AAGpC,YAAY;;AAGZ,iBAAiB,sBAAsB;;CAErC;;CAEA;;CAEA,OAAO;;CAEP;;CAEA;AACD;;AAGD,iBAAiB,gBAAgB;;CAE/B,eAAeC;;CAEf,kBAAkBC;AACnB;;;;;AAMD,iBAAiB,yBAAyB;;CAExC,cAAc;;CAEd,cAAc;;CAEd,qBAAqBC,YAAY;;CAEjC,cAAcC,QAAQ;;CAEtB;;CAEA,mBAAmBC,OAAO;;CAE1B,qBAAqBA,OAAO;;CAE5B,WAAW,eAAe;;CAE1B,gBAAgBC,MAAM,eAAe;;CAErC,gBAAgBC,mBAAmBC,OAAO;;CAE1C;;CAEA;;;;;;;;CAQA;;CAEA;;CAEA;;CAEA,cAAc;;CAEd,eAAe,QAAQ,eAAe,MAAM;AAC7C;;AAGD,iBAAiB,eAAe;;CAE9B,cAAc;;CAEd,cAAc;;;;;;;CAOd,qBAAqBL,YAAY;;;;;;;CAOjC,cAAcC,QAAQ;;;;;CAKtB;;;;;;;;CAQA,mBAAmBC,OAAO;;;;;;;CAO1B,qBAAqBA,OAAO;;CAE5B;;CAEA;;;;;;;;CAQA;;CAEA;;;;;CAKA;;;;;CAKA,cAAc;;;;;;CAMd,eAAe,QAAQ,eAAe,MAAM;;;;;CAK5C,WAAW,eAAe;;;;;;;;CAQ1B,gBAAgBC,MAAM,eAAe;;;;;;;;CAQrC,gBAAgBC,mBAAmBC,OAAO;;CAE1C;AACD","names":["props: PdfAnnotationRenderProps","page: number","editorId: string","annotation: PdfAnnotation","result: PdfDownloadResult","event: PdfTextHighlightEvent","data: Record<string, PdfFormFieldValue>","fieldName: string","value: PdfFormFieldValue"],"sources":["../../../src/pdf-viewer/types.ts"],"version":3,"file":"types.d.ts"}
|
|
1
|
+
{"mappings":"AAgBA,YAAY,WAAW,OAAQ;;AAG/B,YAAY,cAAc,eAAe;;AAGzC,iBAAiB,YAAY;CAC3B;CACA;CACA;CACA;CACA;AAC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AMd,eAAe,QAAQ,eAAe,MAAM;;;;;CAK5C,WAAW,eAAe;;;;;;;;CAQ1B,gBAAgBC,MAAM,eAAe;;;;;;;;CAQrC,gBAAgBC,mBAAmBC,OAAO;;CAE1C;AACD","names":["props: PdfAnnotationRenderProps","page: number","editorId: string","annotation: PdfAnnotation","result: PdfDownloadResult","event: PdfTextHighlightEvent","data: Record<string, PdfFormFieldValue>","fieldName: string","value: PdfFormFieldValue"],"sources":["../../../src/pdf-viewer/types.ts"],"version":3,"file":"types.d.ts"}
|