@cecee/document-flip-book 1.0.17 → 1.0.19
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/LICENSE +15 -0
- package/README.md +83 -0
- package/dist/cjs/AccountingBook/index.d.ts +3 -0
- package/dist/cjs/AccountingBook/index.js +19 -0
- package/dist/cjs/{ArchiveCover.js → DocumentFlipBook/ArchiveCover.js} +23 -3
- package/dist/cjs/{ExportModal.js → DocumentFlipBook/ExportModal.js} +1 -1
- package/dist/cjs/{ProjectCover.js → DocumentFlipBook/ProjectCover.js} +23 -3
- package/dist/cjs/{exportHtml.d.ts → DocumentFlipBook/exportHtml.d.ts} +3 -3
- package/dist/cjs/{exportHtml.js → DocumentFlipBook/exportHtml.js} +104 -48
- package/dist/cjs/{exportPdf.d.ts → DocumentFlipBook/exportPdf.d.ts} +2 -0
- package/dist/cjs/{exportPdf.js → DocumentFlipBook/exportPdf.js} +17 -6
- package/dist/cjs/{globalCache.d.ts → DocumentFlipBook/globalCache.d.ts} +2 -1
- package/dist/cjs/DocumentFlipBook/images/Clip_1.svg +97 -0
- package/dist/cjs/DocumentFlipBook/images/Clip_2.svg +1114 -0
- package/dist/cjs/DocumentFlipBook/images/Inside.svg +10 -0
- package/dist/cjs/DocumentFlipBook/images/book.svg +1 -0
- package/dist/cjs/DocumentFlipBook/images/coverSpine.svg +4 -0
- package/dist/{esm/DocumentFlipBook.d.ts → cjs/DocumentFlipBook/index.d.ts} +2 -0
- package/dist/cjs/{DocumentFlipBook.js → DocumentFlipBook/index.js} +119 -25
- package/dist/cjs/{index.less → DocumentFlipBook/index.less} +194 -78
- package/dist/cjs/{printPdf.d.ts → DocumentFlipBook/printPdf.d.ts} +1 -0
- package/dist/cjs/{utils.d.ts → DocumentFlipBook/utils.d.ts} +2 -1
- package/dist/cjs/{utils.js → DocumentFlipBook/utils.js} +4 -1
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +10 -3
- package/dist/esm/AccountingBook/index.d.ts +3 -0
- package/dist/esm/AccountingBook/index.js +13 -0
- package/dist/esm/{ArchiveCover.js → DocumentFlipBook/ArchiveCover.js} +23 -3
- package/dist/esm/{ExportModal.js → DocumentFlipBook/ExportModal.js} +1 -1
- package/dist/esm/{ProjectCover.js → DocumentFlipBook/ProjectCover.js} +23 -3
- package/dist/esm/{exportHtml.d.ts → DocumentFlipBook/exportHtml.d.ts} +3 -3
- package/dist/esm/{exportHtml.js → DocumentFlipBook/exportHtml.js} +103 -47
- package/dist/esm/{exportPdf.d.ts → DocumentFlipBook/exportPdf.d.ts} +2 -0
- package/dist/esm/{exportPdf.js → DocumentFlipBook/exportPdf.js} +17 -6
- package/dist/esm/{globalCache.d.ts → DocumentFlipBook/globalCache.d.ts} +2 -1
- package/dist/esm/DocumentFlipBook/images/Clip_1.svg +97 -0
- package/dist/esm/DocumentFlipBook/images/Clip_2.svg +1114 -0
- package/dist/esm/DocumentFlipBook/images/Inside.svg +10 -0
- package/dist/esm/DocumentFlipBook/images/book.svg +1 -0
- package/dist/esm/DocumentFlipBook/images/coverSpine.svg +4 -0
- package/dist/{cjs/DocumentFlipBook.d.ts → esm/DocumentFlipBook/index.d.ts} +2 -0
- package/dist/esm/{DocumentFlipBook.js → DocumentFlipBook/index.js} +119 -25
- package/dist/esm/{index.less → DocumentFlipBook/index.less} +194 -78
- package/dist/esm/{printPdf.d.ts → DocumentFlipBook/printPdf.d.ts} +1 -0
- package/dist/esm/{utils.d.ts → DocumentFlipBook/utils.d.ts} +2 -1
- package/dist/esm/{utils.js → DocumentFlipBook/utils.js} +4 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.js +5 -3
- package/package.json +6 -1
- /package/dist/cjs/{ArchiveCover.d.ts → DocumentFlipBook/ArchiveCover.d.ts} +0 -0
- /package/dist/cjs/{ExportModal.d.ts → DocumentFlipBook/ExportModal.d.ts} +0 -0
- /package/dist/cjs/{HeaderBar.d.ts → DocumentFlipBook/HeaderBar.d.ts} +0 -0
- /package/dist/cjs/{HeaderBar.js → DocumentFlipBook/HeaderBar.js} +0 -0
- /package/dist/cjs/{PdfPage.d.ts → DocumentFlipBook/PdfPage.d.ts} +0 -0
- /package/dist/cjs/{PdfPage.js → DocumentFlipBook/PdfPage.js} +0 -0
- /package/dist/cjs/{ProjectCover.d.ts → DocumentFlipBook/ProjectCover.d.ts} +0 -0
- /package/dist/cjs/{SideTabs.d.ts → DocumentFlipBook/SideTabs.d.ts} +0 -0
- /package/dist/cjs/{SideTabs.js → DocumentFlipBook/SideTabs.js} +0 -0
- /package/dist/cjs/{globalCache.js → DocumentFlipBook/globalCache.js} +0 -0
- /package/dist/cjs/{printPdf.js → DocumentFlipBook/printPdf.js} +0 -0
- /package/dist/cjs/{types.d.ts → DocumentFlipBook/types.d.ts} +0 -0
- /package/dist/cjs/{types.js → DocumentFlipBook/types.js} +0 -0
- /package/dist/esm/{ArchiveCover.d.ts → DocumentFlipBook/ArchiveCover.d.ts} +0 -0
- /package/dist/esm/{ExportModal.d.ts → DocumentFlipBook/ExportModal.d.ts} +0 -0
- /package/dist/esm/{HeaderBar.d.ts → DocumentFlipBook/HeaderBar.d.ts} +0 -0
- /package/dist/esm/{HeaderBar.js → DocumentFlipBook/HeaderBar.js} +0 -0
- /package/dist/esm/{PdfPage.d.ts → DocumentFlipBook/PdfPage.d.ts} +0 -0
- /package/dist/esm/{PdfPage.js → DocumentFlipBook/PdfPage.js} +0 -0
- /package/dist/esm/{ProjectCover.d.ts → DocumentFlipBook/ProjectCover.d.ts} +0 -0
- /package/dist/esm/{SideTabs.d.ts → DocumentFlipBook/SideTabs.d.ts} +0 -0
- /package/dist/esm/{SideTabs.js → DocumentFlipBook/SideTabs.js} +0 -0
- /package/dist/esm/{globalCache.js → DocumentFlipBook/globalCache.js} +0 -0
- /package/dist/esm/{printPdf.js → DocumentFlipBook/printPdf.js} +0 -0
- /package/dist/esm/{types.d.ts → DocumentFlipBook/types.d.ts} +0 -0
- /package/dist/esm/{types.js → DocumentFlipBook/types.js} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="34" height="825" viewBox="0 0 34 825" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M0 0L34 8V817L0 825V0Z" fill="#3AB5EA"/>
|
|
3
|
+
<path d="M0 0L34 8V817L0 825V0Z" fill="url(#paint0_linear_28900_8954)" fill-opacity="0.53" style="mix-blend-mode:multiply"/>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="paint0_linear_28900_8954" x1="0" y1="412.5" x2="34" y2="412.5" gradientUnits="userSpaceOnUse">
|
|
6
|
+
<stop offset="0.02" stop-color="#007DB3"/>
|
|
7
|
+
<stop offset="0.995" stop-color="#00354B"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1781057525113" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11598" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M256 0C150 0 64 86 64 192v640c0 106 86 192 192 192h640c35.4 0 64-28.6 64-64s-28.6-64-64-64v-128c35.4 0 64-28.6 64-64V64c0-35.4-28.6-64-64-64H256z m0 768h512v128H256c-35.4 0-64-28.6-64-64s28.6-64 64-64z m64-480c0-17.6 14.4-32 32-32h384c17.6 0 32 14.4 32 32s-14.4 32-32 32H352c-17.6 0-32-14.4-32-32z m32 96h384c17.6 0 32 14.4 32 32s-14.4 32-32 32H352c-17.6 0-32-14.4-32-32s14.4-32 32-32z" p-id="11599" fill="#64c3f5"></path></svg>
|
|
@@ -7,6 +7,7 @@ interface DocumentFlipBookProps {
|
|
|
7
7
|
id?: string;
|
|
8
8
|
themeColor?: string;
|
|
9
9
|
documentInfo: {
|
|
10
|
+
fd: string;
|
|
10
11
|
com00cs?: any[];
|
|
11
12
|
attachments?: any[];
|
|
12
13
|
edr04bs?: any[];
|
|
@@ -27,6 +28,7 @@ interface DocumentFlipBookProps {
|
|
|
27
28
|
onSearch?: (v: string) => void;
|
|
28
29
|
showHeaderBar?: boolean;
|
|
29
30
|
pdfWorkerSrc?: string;
|
|
31
|
+
printType?: 'A4' | 'A5';
|
|
30
32
|
}
|
|
31
33
|
declare const DocumentFlipBook: React.FC<DocumentFlipBookProps>;
|
|
32
34
|
export default DocumentFlipBook;
|
|
@@ -32,7 +32,7 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructur
|
|
|
32
32
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
33
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
34
34
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
35
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
36
|
var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
37
37
|
var _ref$mode = _ref.mode,
|
|
38
38
|
initialMode = _ref$mode === void 0 ? 'page' : _ref$mode,
|
|
@@ -48,7 +48,9 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
48
48
|
onSearch = _ref$onSearch === void 0 ? function () {} : _ref$onSearch,
|
|
49
49
|
_ref$showHeaderBar = _ref.showHeaderBar,
|
|
50
50
|
showHeaderBar = _ref$showHeaderBar === void 0 ? true : _ref$showHeaderBar,
|
|
51
|
-
pdfWorkerSrc = _ref.pdfWorkerSrc
|
|
51
|
+
pdfWorkerSrc = _ref.pdfWorkerSrc,
|
|
52
|
+
_ref$printType = _ref.printType,
|
|
53
|
+
printType = _ref$printType === void 0 ? 'A4' : _ref$printType;
|
|
52
54
|
var flipRef = (0, _react.useRef)(null);
|
|
53
55
|
console.log(documentInfo);
|
|
54
56
|
|
|
@@ -56,6 +58,7 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
56
58
|
(0, _react.useEffect)(function () {
|
|
57
59
|
(0, _utils.setupPdfWorker)(pdfWorkerSrc);
|
|
58
60
|
}, [pdfWorkerSrc]);
|
|
61
|
+
var isFirstLoadOfDocument = (0, _react.useRef)(true);
|
|
59
62
|
var _useState = (0, _react.useState)([]),
|
|
60
63
|
_useState2 = _slicedToArray(_useState, 2),
|
|
61
64
|
pages = _useState2[0],
|
|
@@ -76,7 +79,10 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
76
79
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
77
80
|
mode = _useState10[0],
|
|
78
81
|
setMode = _useState10[1];
|
|
79
|
-
var
|
|
82
|
+
var _useState11 = (0, _react.useState)(0),
|
|
83
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
84
|
+
refreshKey = _useState12[0],
|
|
85
|
+
setRefreshKey = _useState12[1];
|
|
80
86
|
|
|
81
87
|
// 内部处理全屏切换
|
|
82
88
|
var handleRequestFullscreen = (0, _react.useCallback)(function () {
|
|
@@ -96,6 +102,14 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
96
102
|
window.history.back();
|
|
97
103
|
}
|
|
98
104
|
}, [onBack]);
|
|
105
|
+
|
|
106
|
+
// 计算加深的主题色,用于书本右侧阴影
|
|
107
|
+
var themeDarkColor = (0, _react.useMemo)(function () {
|
|
108
|
+
if (!themeColor) return '#8b6d44';
|
|
109
|
+
// 简单的加深逻辑:使用 CSS filter 会更方便,但在 linear-gradient 中需要显式颜色
|
|
110
|
+
// 这里我们直接将变量传给 CSS 变量,让 CSS 处理或在 TS 中简单处理
|
|
111
|
+
return themeColor; // 暂时传递原始色,稍后在 CSS 中通过 mix-blend-mode 处理更佳
|
|
112
|
+
}, [themeColor]);
|
|
99
113
|
var archiveId = (0, _react.useMemo)(function () {
|
|
100
114
|
return id || (documentInfo === null || documentInfo === void 0 ? void 0 : documentInfo.id) || (documentInfo === null || documentInfo === void 0 ? void 0 : documentInfo.code);
|
|
101
115
|
}, [id, documentInfo]);
|
|
@@ -110,10 +124,10 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
110
124
|
setPages([]); // 立即清空旧页面,防止切换时闪烁旧数据
|
|
111
125
|
setCurrent(0);
|
|
112
126
|
setActiveTab('');
|
|
113
|
-
if (flipRef.current) {
|
|
127
|
+
if (flipRef !== null && flipRef !== void 0 && flipRef.current) {
|
|
114
128
|
try {
|
|
115
129
|
var _flipRef$current;
|
|
116
|
-
(_flipRef$current = flipRef.current) === null || _flipRef$current === void 0 || (_flipRef$current = _flipRef$current.pageFlip()) === null || _flipRef$current === void 0 || _flipRef$current.turnToPage(0);
|
|
130
|
+
flipRef === null || flipRef === void 0 || (_flipRef$current = flipRef.current) === null || _flipRef$current === void 0 || (_flipRef$current = _flipRef$current.pageFlip()) === null || _flipRef$current === void 0 || _flipRef$current.turnToPage(0);
|
|
117
131
|
} catch (e) {
|
|
118
132
|
console.warn('Reset flipbook failed', e);
|
|
119
133
|
}
|
|
@@ -301,7 +315,7 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
301
315
|
return function () {
|
|
302
316
|
isMounted = false;
|
|
303
317
|
};
|
|
304
|
-
}, [documentInfo, activeTab, id]);
|
|
318
|
+
}, [documentInfo, activeTab, id, refreshKey]);
|
|
305
319
|
var total = (0, _react.useMemo)(function () {
|
|
306
320
|
return 1 + pages.length;
|
|
307
321
|
}, [pages]);
|
|
@@ -324,6 +338,10 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
324
338
|
}, [total]);
|
|
325
339
|
var handleRefresh = (0, _react.useCallback)(function () {
|
|
326
340
|
isFirstLoadOfDocument.current = true; // 标记为首次加载,使 init 逻辑停留在封面 (第 0 页)
|
|
341
|
+
_globalCache.globalPdfCache.clearAll(); // 清理所有 PDF 缓存
|
|
342
|
+
setRefreshKey(function (prev) {
|
|
343
|
+
return prev + 1;
|
|
344
|
+
}); // 增加 refreshKey 以触发 useEffect 重新执行初始化
|
|
327
345
|
setActiveTab('');
|
|
328
346
|
setCurrent(0);
|
|
329
347
|
if (flipRef.current) {
|
|
@@ -337,7 +355,7 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
337
355
|
var handleDownload = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
338
356
|
var type,
|
|
339
357
|
_yield$import,
|
|
340
|
-
|
|
358
|
+
exportArchivePagesToEpub,
|
|
341
359
|
hide,
|
|
342
360
|
filename,
|
|
343
361
|
_yield$import2,
|
|
@@ -357,12 +375,12 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
357
375
|
});
|
|
358
376
|
case 4:
|
|
359
377
|
_yield$import = _context2.sent;
|
|
360
|
-
|
|
378
|
+
exportArchivePagesToEpub = _yield$import.exportArchivePagesToEpub;
|
|
361
379
|
_context2.next = 8;
|
|
362
|
-
return
|
|
380
|
+
return exportArchivePagesToEpub({
|
|
363
381
|
pages: pages,
|
|
364
|
-
filename: "
|
|
365
|
-
title:
|
|
382
|
+
filename: "".concat((documentInfo === null || documentInfo === void 0 ? void 0 : documentInfo.fd) || '电子档案书', ".epub"),
|
|
383
|
+
title: (documentInfo === null || documentInfo === void 0 ? void 0 : documentInfo.fd) || '电子档案书',
|
|
366
384
|
getDocument: _globalCache.globalPdfCache.getDocument,
|
|
367
385
|
coverInfo: {
|
|
368
386
|
data: documentInfo === null || documentInfo === void 0 ? void 0 : documentInfo.acc51c,
|
|
@@ -390,7 +408,8 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
390
408
|
pages: pages,
|
|
391
409
|
getDocument: _globalCache.globalPdfCache.getDocument,
|
|
392
410
|
filename: filename,
|
|
393
|
-
scale: 2
|
|
411
|
+
scale: 2,
|
|
412
|
+
printType: printType
|
|
394
413
|
});
|
|
395
414
|
case 18:
|
|
396
415
|
_antd.message.success('已开始下载');
|
|
@@ -409,7 +428,7 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
409
428
|
return _context2.stop();
|
|
410
429
|
}
|
|
411
430
|
}, _callee2, null, [[10, 21, 24, 27]]);
|
|
412
|
-
})), [pages, title]);
|
|
431
|
+
})), [pages, title, printType]);
|
|
413
432
|
var handlePrint = (0, _react.useCallback)( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
414
433
|
var hide, _yield$import3, printArchiveAsPdf;
|
|
415
434
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
@@ -428,7 +447,8 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
428
447
|
return printArchiveAsPdf({
|
|
429
448
|
pages: pages,
|
|
430
449
|
getDocument: _globalCache.globalPdfCache.getDocument,
|
|
431
|
-
scale: 2
|
|
450
|
+
scale: 2,
|
|
451
|
+
printType: printType
|
|
432
452
|
});
|
|
433
453
|
case 8:
|
|
434
454
|
_context3.next = 13;
|
|
@@ -446,7 +466,7 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
446
466
|
return _context3.stop();
|
|
447
467
|
}
|
|
448
468
|
}, _callee3, null, [[1, 10, 13, 16]]);
|
|
449
|
-
})), [pages]);
|
|
469
|
+
})), [pages, printType]);
|
|
450
470
|
|
|
451
471
|
// 提取为独立的渲染函数,增加懒加载逻辑
|
|
452
472
|
var renderContent = (0, _react.useCallback)(function (idx) {
|
|
@@ -531,6 +551,10 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
531
551
|
}, [pages, documentInfo, current, themeColor]);
|
|
532
552
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
533
553
|
className: "dfb-root ".concat(mode === 'modal' ? 'is-fullscreen-modal' : ''),
|
|
554
|
+
style: {
|
|
555
|
+
'--dfb-theme-color': themeColor,
|
|
556
|
+
'--dfb-theme-dark-color': themeDarkColor
|
|
557
|
+
},
|
|
534
558
|
children: [showHeaderBar && /*#__PURE__*/(0, _jsxRuntime.jsx)(_HeaderBar.default, {
|
|
535
559
|
mode: mode,
|
|
536
560
|
title: title,
|
|
@@ -552,19 +576,63 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
552
576
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Spin, {
|
|
553
577
|
size: "large",
|
|
554
578
|
spinning: loading,
|
|
555
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
579
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
556
580
|
className: "dfb-book-wrapper",
|
|
557
581
|
style: {
|
|
558
582
|
minHeight: _utils.VIEWPORT_HEIGHT + 40
|
|
559
583
|
},
|
|
560
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
561
|
-
className:
|
|
584
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
585
|
+
className: "dfb-book-background-layer",
|
|
562
586
|
style: {
|
|
563
|
-
|
|
564
|
-
}
|
|
565
|
-
|
|
587
|
+
opacity: current === 0 && !activeTab ? 0 : 1
|
|
588
|
+
}
|
|
589
|
+
}), (current > 0 || activeTab) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
590
|
+
className: "dfb-spine-decoration-layer",
|
|
591
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
592
|
+
className: "dfb-inside-spine",
|
|
593
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
|
594
|
+
width: "100%",
|
|
595
|
+
height: "100%",
|
|
596
|
+
viewBox: "0 0 34 825",
|
|
597
|
+
preserveAspectRatio: "none",
|
|
598
|
+
fill: "none",
|
|
599
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
600
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
601
|
+
d: "M0 0L34 8V817L0 825V0Z",
|
|
602
|
+
fill: themeColor
|
|
603
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
604
|
+
d: "M0 0L34 8V817L0 825V0Z",
|
|
605
|
+
fill: "url(#paint0_linear_inside)",
|
|
606
|
+
fillOpacity: "0.53",
|
|
607
|
+
style: {
|
|
608
|
+
mixBlendMode: 'multiply'
|
|
609
|
+
}
|
|
610
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("defs", {
|
|
611
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("linearGradient", {
|
|
612
|
+
id: "paint0_linear_inside",
|
|
613
|
+
x1: "0",
|
|
614
|
+
y1: "412.5",
|
|
615
|
+
x2: "34",
|
|
616
|
+
y2: "412.5",
|
|
617
|
+
gradientUnits: "userSpaceOnUse",
|
|
618
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
619
|
+
offset: "0.02",
|
|
620
|
+
stopColor: "#000",
|
|
621
|
+
stopOpacity: "0.6"
|
|
622
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("stop", {
|
|
623
|
+
offset: "0.995",
|
|
624
|
+
stopColor: "#000",
|
|
625
|
+
stopOpacity: "0.2"
|
|
626
|
+
})]
|
|
627
|
+
})
|
|
628
|
+
})]
|
|
629
|
+
})
|
|
630
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
566
631
|
className: "dfb-book-spine"
|
|
567
|
-
})
|
|
632
|
+
})]
|
|
633
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
634
|
+
className: current === 0 ? '' : 'dfb-book-content-layer',
|
|
635
|
+
children: [(pages === null || pages === void 0 ? void 0 : pages.length) > 0 && tabItems.length > 0 && !loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SideTabs.default, {
|
|
568
636
|
items: tabItems,
|
|
569
637
|
activeKey: activeTab,
|
|
570
638
|
className: current === 0 ? 'is-on-cover' : !activeTab ? 'is-on-activeTab' : '',
|
|
@@ -623,7 +691,22 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
623
691
|
height: '100%',
|
|
624
692
|
background: '#fff'
|
|
625
693
|
},
|
|
626
|
-
children:
|
|
694
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
695
|
+
style: {
|
|
696
|
+
position: 'relative',
|
|
697
|
+
width: '100%',
|
|
698
|
+
height: '100%'
|
|
699
|
+
},
|
|
700
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
701
|
+
className: "dfb-book-thickness-left-1"
|
|
702
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
703
|
+
className: "dfb-book-thickness-left-2"
|
|
704
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
705
|
+
className: "dfb-book-thickness-right-1"
|
|
706
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
707
|
+
className: "dfb-book-thickness-right-2"
|
|
708
|
+
}), renderContent(i)]
|
|
709
|
+
})
|
|
627
710
|
}, i);
|
|
628
711
|
})
|
|
629
712
|
}, "".concat(archiveId, "-").concat(activeTab)), !loading && pages.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -634,10 +717,21 @@ var DocumentFlipBook = function DocumentFlipBook(_ref) {
|
|
|
634
717
|
margin: 'auto',
|
|
635
718
|
background: '#fff'
|
|
636
719
|
},
|
|
637
|
-
children:
|
|
720
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
721
|
+
style: {
|
|
722
|
+
position: 'relative',
|
|
723
|
+
width: '100%',
|
|
724
|
+
height: '100%'
|
|
725
|
+
},
|
|
726
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
727
|
+
className: "dfb-book-thickness-right-1"
|
|
728
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
729
|
+
className: "dfb-book-thickness-right-2"
|
|
730
|
+
}), renderContent(0)]
|
|
731
|
+
})
|
|
638
732
|
})]
|
|
639
733
|
})]
|
|
640
|
-
})
|
|
734
|
+
})]
|
|
641
735
|
})
|
|
642
736
|
})
|
|
643
737
|
})]
|