@cecee/document-flip-book 1.0.19 → 1.0.21

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.
Files changed (91) hide show
  1. package/dist/cjs/AccountingBook/assets/active-line.png +0 -0
  2. package/dist/cjs/AccountingBook/assets/default-line.png +0 -0
  3. package/dist/cjs/AccountingBook/assets/filp-bg.png +0 -0
  4. package/dist/cjs/AccountingBook/components/AccountingVoucher/index.d.ts +26 -0
  5. package/dist/cjs/AccountingBook/components/AccountingVoucher/index.js +398 -0
  6. package/dist/cjs/AccountingBook/components/AccountingVoucher/index.less +231 -0
  7. package/dist/cjs/AccountingBook/components/ExportModal.d.ts +10 -0
  8. package/dist/cjs/AccountingBook/components/ExportModal.js +96 -0
  9. package/dist/cjs/AccountingBook/components/FilpPage.d.ts +7 -0
  10. package/dist/cjs/AccountingBook/components/FilpPage.js +39 -0
  11. package/dist/cjs/AccountingBook/components/HeaderBar.d.ts +28 -0
  12. package/dist/cjs/AccountingBook/components/HeaderBar.js +245 -0
  13. package/dist/cjs/AccountingBook/components/ImagePageRenderer.d.ts +11 -0
  14. package/dist/cjs/AccountingBook/components/ImagePageRenderer.js +91 -0
  15. package/dist/cjs/AccountingBook/components/LoadingComponent.d.ts +7 -0
  16. package/dist/cjs/AccountingBook/components/LoadingComponent.js +54 -0
  17. package/dist/cjs/AccountingBook/components/PDFPageRenderer.d.ts +13 -0
  18. package/dist/cjs/AccountingBook/components/PDFPageRenderer.js +259 -0
  19. package/dist/cjs/AccountingBook/components/index.less +6 -0
  20. package/dist/cjs/AccountingBook/constants.d.ts +11 -0
  21. package/dist/cjs/AccountingBook/constants.js +25 -0
  22. package/dist/cjs/AccountingBook/hooks/useAmountSearch.d.ts +24 -0
  23. package/dist/cjs/AccountingBook/hooks/useAmountSearch.js +165 -0
  24. package/dist/cjs/AccountingBook/hooks/usePageFlip.d.ts +15 -0
  25. package/dist/cjs/AccountingBook/hooks/usePageFlip.js +67 -0
  26. package/dist/cjs/AccountingBook/index.d.ts +29 -1
  27. package/dist/cjs/AccountingBook/index.js +1163 -7
  28. package/dist/cjs/AccountingBook/index.less +188 -0
  29. package/dist/cjs/AccountingBook/types.d.ts +84 -0
  30. package/dist/cjs/AccountingBook/types.js +5 -0
  31. package/dist/cjs/AccountingBook/utils/canvasUtils.d.ts +51 -0
  32. package/dist/cjs/AccountingBook/utils/canvasUtils.js +499 -0
  33. package/dist/cjs/AccountingBook/utils/html.d.ts +9 -0
  34. package/dist/cjs/AccountingBook/utils/html.js +97 -0
  35. package/dist/cjs/AccountingBook/utils/utils.d.ts +38 -0
  36. package/dist/cjs/AccountingBook/utils/utils.js +204 -0
  37. package/dist/cjs/DocumentFlipBook/ExportModal.d.ts +1 -1
  38. package/dist/cjs/DocumentFlipBook/ExportModal.js +1 -1
  39. package/dist/cjs/DocumentFlipBook/HeaderBar.d.ts +2 -1
  40. package/dist/cjs/DocumentFlipBook/HeaderBar.js +13 -11
  41. package/dist/cjs/DocumentFlipBook/SideTabs.js +111 -6
  42. package/dist/cjs/DocumentFlipBook/index.d.ts +1 -0
  43. package/dist/cjs/DocumentFlipBook/index.js +6 -3
  44. package/dist/cjs/DocumentFlipBook/index.less +235 -9
  45. package/dist/cjs/declarations.d.ts +21 -0
  46. package/dist/esm/AccountingBook/assets/active-line.png +0 -0
  47. package/dist/esm/AccountingBook/assets/default-line.png +0 -0
  48. package/dist/esm/AccountingBook/assets/filp-bg.png +0 -0
  49. package/dist/esm/AccountingBook/components/AccountingVoucher/index.d.ts +26 -0
  50. package/dist/esm/AccountingBook/components/AccountingVoucher/index.js +391 -0
  51. package/dist/esm/AccountingBook/components/AccountingVoucher/index.less +231 -0
  52. package/dist/esm/AccountingBook/components/ExportModal.d.ts +10 -0
  53. package/dist/esm/AccountingBook/components/ExportModal.js +88 -0
  54. package/dist/esm/AccountingBook/components/FilpPage.d.ts +7 -0
  55. package/dist/esm/AccountingBook/components/FilpPage.js +33 -0
  56. package/dist/esm/AccountingBook/components/HeaderBar.d.ts +28 -0
  57. package/dist/esm/AccountingBook/components/HeaderBar.js +236 -0
  58. package/dist/esm/AccountingBook/components/ImagePageRenderer.d.ts +11 -0
  59. package/dist/esm/AccountingBook/components/ImagePageRenderer.js +85 -0
  60. package/dist/esm/AccountingBook/components/LoadingComponent.d.ts +7 -0
  61. package/dist/esm/AccountingBook/components/LoadingComponent.js +48 -0
  62. package/dist/esm/AccountingBook/components/PDFPageRenderer.d.ts +13 -0
  63. package/dist/esm/AccountingBook/components/PDFPageRenderer.js +252 -0
  64. package/dist/esm/AccountingBook/components/index.less +6 -0
  65. package/dist/esm/AccountingBook/constants.d.ts +11 -0
  66. package/dist/esm/AccountingBook/constants.js +17 -0
  67. package/dist/esm/AccountingBook/hooks/useAmountSearch.d.ts +24 -0
  68. package/dist/esm/AccountingBook/hooks/useAmountSearch.js +158 -0
  69. package/dist/esm/AccountingBook/hooks/usePageFlip.d.ts +15 -0
  70. package/dist/esm/AccountingBook/hooks/usePageFlip.js +61 -0
  71. package/dist/esm/AccountingBook/index.d.ts +29 -1
  72. package/dist/esm/AccountingBook/index.js +1162 -6
  73. package/dist/esm/AccountingBook/index.less +188 -0
  74. package/dist/esm/AccountingBook/types.d.ts +84 -0
  75. package/dist/esm/AccountingBook/types.js +1 -0
  76. package/dist/esm/AccountingBook/utils/canvasUtils.d.ts +51 -0
  77. package/dist/esm/AccountingBook/utils/canvasUtils.js +493 -0
  78. package/dist/esm/AccountingBook/utils/html.d.ts +9 -0
  79. package/dist/esm/AccountingBook/utils/html.js +89 -0
  80. package/dist/esm/AccountingBook/utils/utils.d.ts +38 -0
  81. package/dist/esm/AccountingBook/utils/utils.js +195 -0
  82. package/dist/esm/DocumentFlipBook/ExportModal.d.ts +1 -1
  83. package/dist/esm/DocumentFlipBook/ExportModal.js +1 -1
  84. package/dist/esm/DocumentFlipBook/HeaderBar.d.ts +2 -1
  85. package/dist/esm/DocumentFlipBook/HeaderBar.js +13 -11
  86. package/dist/esm/DocumentFlipBook/SideTabs.js +110 -5
  87. package/dist/esm/DocumentFlipBook/index.d.ts +1 -0
  88. package/dist/esm/DocumentFlipBook/index.js +6 -3
  89. package/dist/esm/DocumentFlipBook/index.less +235 -9
  90. package/dist/esm/declarations.d.ts +21 -0
  91. package/package.json +8 -2
@@ -0,0 +1,88 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState } from 'react';
8
+ import { Modal, Radio, Button, Flex } from 'antd';
9
+ import "./index.less";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
+ var ExportModal = function ExportModal(_ref) {
13
+ var visible = _ref.visible,
14
+ onCancel = _ref.onCancel,
15
+ onConfirm = _ref.onConfirm,
16
+ _ref$themeColor = _ref.themeColor,
17
+ themeColor = _ref$themeColor === void 0 ? '#9F7D4E' : _ref$themeColor;
18
+ var _useState = useState('pdf'),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ exportType = _useState2[0],
21
+ setExportType = _useState2[1];
22
+ return /*#__PURE__*/_jsx(Modal, {
23
+ title: /*#__PURE__*/_jsx("span", {
24
+ style: {
25
+ fontSize: 18,
26
+ fontWeight: 'bold'
27
+ },
28
+ children: "\u5BFC\u51FA"
29
+ }),
30
+ open: visible,
31
+ onCancel: onCancel,
32
+ footer: [/*#__PURE__*/_jsx(Button, {
33
+ onClick: onCancel,
34
+ style: {
35
+ color: themeColor,
36
+ borderColor: themeColor
37
+ },
38
+ children: "\u53D6\u6D88"
39
+ }, "back"), /*#__PURE__*/_jsx(Button, {
40
+ type: "primary",
41
+ onClick: function onClick() {
42
+ return onConfirm(exportType);
43
+ },
44
+ style: {
45
+ backgroundColor: themeColor,
46
+ borderColor: themeColor
47
+ },
48
+ children: "\u786E\u5B9A"
49
+ }, "submit")],
50
+ width: 400,
51
+ className: "export-modal",
52
+ children: /*#__PURE__*/_jsx("div", {
53
+ style: {
54
+ padding: '20px 0'
55
+ },
56
+ children: /*#__PURE__*/_jsx(Radio.Group, {
57
+ onChange: function onChange(e) {
58
+ return setExportType(e.target.value);
59
+ },
60
+ value: exportType,
61
+ children: /*#__PURE__*/_jsxs(Flex, {
62
+ vertical: true,
63
+ gap: 16,
64
+ children: [/*#__PURE__*/_jsx(Radio, {
65
+ value: "pdf",
66
+ className: "export-radio",
67
+ children: /*#__PURE__*/_jsx("span", {
68
+ style: {
69
+ fontSize: 16
70
+ },
71
+ children: "PDF \u6587\u6863"
72
+ })
73
+ }), /*#__PURE__*/_jsx(Radio, {
74
+ value: "epub",
75
+ className: "export-radio",
76
+ children: /*#__PURE__*/_jsx("span", {
77
+ style: {
78
+ fontSize: 16
79
+ },
80
+ children: "EPUB \u7535\u5B50\u4E66"
81
+ })
82
+ })]
83
+ })
84
+ })
85
+ })
86
+ });
87
+ };
88
+ export default ExportModal;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface FilpPageProps {
3
+ children: React.ReactNode;
4
+ index: number;
5
+ }
6
+ export declare const FilpPage: React.MemoExoticComponent<React.ForwardRefExoticComponent<FilpPageProps & React.RefAttributes<HTMLDivElement>>>;
7
+ export {};
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export var FilpPage = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5
+ var children = _ref.children,
6
+ index = _ref.index;
7
+ return /*#__PURE__*/_jsxs("div", {
8
+ className: "page",
9
+ ref: ref,
10
+ children: [/*#__PURE__*/_jsx("div", {
11
+ className: "page-content",
12
+ children: children || /*#__PURE__*/_jsxs("div", {
13
+ style: {
14
+ color: '#f00',
15
+ fontSize: '20px'
16
+ },
17
+ children: ["\u5185\u5BB9\u7F3A\u5931 (\u9875\u9762 ", index + 1, ")"]
18
+ })
19
+ }), /*#__PURE__*/_jsx("div", {
20
+ className: "page-back",
21
+ children: /*#__PURE__*/_jsx("div", {
22
+ style: {
23
+ width: '100%',
24
+ height: '100%',
25
+ backgroundColor: '#fff',
26
+ position: 'absolute',
27
+ top: 0,
28
+ left: 0
29
+ }
30
+ })
31
+ })]
32
+ });
33
+ }));
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface HeaderBarProps {
4
+ currentPage: number;
5
+ totalPages: number;
6
+ onGoFirst: () => void;
7
+ onPrevPage: () => void;
8
+ onNextPage: () => void;
9
+ onGoLast: () => void;
10
+ onPrint: () => void;
11
+ onDownload: (type: 'pdf' | 'epub') => void;
12
+ onUnbinding?: () => void;
13
+ onRefresh?: () => void;
14
+ iconColor?: string;
15
+ showSearchSelect?: boolean;
16
+ searchValue?: string;
17
+ searchOptions?: Array<{
18
+ label: string;
19
+ value: string;
20
+ pageLabel?: string;
21
+ }>;
22
+ onSearchInputChange?: (value: string) => void;
23
+ onSearchSelect?: (value: string, option: any) => void;
24
+ onSearchClear?: () => void;
25
+ themeColor?: string;
26
+ }
27
+ declare const HeaderBar: React.FC<HeaderBarProps>;
28
+ export default HeaderBar;
@@ -0,0 +1,236 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState } from 'react';
8
+ import { Button, Select, Space } from 'antd';
9
+ import { StepBackwardOutlined, CaretLeftOutlined, CaretRightOutlined, StepForwardOutlined, PrinterOutlined, DownloadOutlined, RollbackOutlined, ReloadOutlined } from '@ant-design/icons';
10
+ import ExportModal from "./ExportModal";
11
+ import "./index.less";
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsxs as _jsxs } from "react/jsx-runtime";
14
+ var HeaderBar = function HeaderBar(_ref) {
15
+ var currentPage = _ref.currentPage,
16
+ totalPages = _ref.totalPages,
17
+ onGoFirst = _ref.onGoFirst,
18
+ onPrevPage = _ref.onPrevPage,
19
+ onNextPage = _ref.onNextPage,
20
+ onGoLast = _ref.onGoLast,
21
+ onPrint = _ref.onPrint,
22
+ onDownload = _ref.onDownload,
23
+ onUnbinding = _ref.onUnbinding,
24
+ onRefresh = _ref.onRefresh,
25
+ showSearchSelect = _ref.showSearchSelect,
26
+ searchValue = _ref.searchValue,
27
+ _ref$searchOptions = _ref.searchOptions,
28
+ searchOptions = _ref$searchOptions === void 0 ? [] : _ref$searchOptions,
29
+ onSearchInputChange = _ref.onSearchInputChange,
30
+ onSearchSelect = _ref.onSearchSelect,
31
+ onSearchClear = _ref.onSearchClear,
32
+ _ref$themeColor = _ref.themeColor,
33
+ themeColor = _ref$themeColor === void 0 ? '#4Baae3' : _ref$themeColor,
34
+ _ref$iconColor = _ref.iconColor,
35
+ iconColor = _ref$iconColor === void 0 ? '#0064ff' : _ref$iconColor;
36
+ var _useState = useState(false),
37
+ _useState2 = _slicedToArray(_useState, 2),
38
+ exportModalVisible = _useState2[0],
39
+ setExportModalVisible = _useState2[1];
40
+ var handleDownloadConfirm = function handleDownloadConfirm(type) {
41
+ onDownload(type);
42
+ setExportModalVisible(false);
43
+ };
44
+ return /*#__PURE__*/_jsxs("div", {
45
+ className: "common-header-bar",
46
+ style: {
47
+ marginBottom: '10px'
48
+ },
49
+ children: [/*#__PURE__*/_jsxs("div", {
50
+ className: "header-left",
51
+ children: [/*#__PURE__*/_jsxs("div", {
52
+ className: "header-item",
53
+ children: [/*#__PURE__*/_jsxs(Button, {
54
+ type: "link",
55
+ onClick: onRefresh,
56
+ className: "header-nav-btn",
57
+ children: [/*#__PURE__*/_jsx(ReloadOutlined, {
58
+ style: {
59
+ fontSize: 16,
60
+ color: iconColor
61
+ }
62
+ }), /*#__PURE__*/_jsx("span", {
63
+ children: "\u5237\u65B0"
64
+ })]
65
+ }), /*#__PURE__*/_jsx("span", {
66
+ className: "dfb-divider"
67
+ })]
68
+ }), /*#__PURE__*/_jsxs(Space, {
69
+ size: 0,
70
+ children: [/*#__PURE__*/_jsx("div", {
71
+ className: "header-item",
72
+ children: /*#__PURE__*/_jsxs(Button, {
73
+ type: "link",
74
+ disabled: currentPage === 0,
75
+ onClick: onGoFirst,
76
+ className: "header-nav-btn",
77
+ children: [/*#__PURE__*/_jsx(StepBackwardOutlined, {
78
+ style: {
79
+ fontSize: 16,
80
+ color: iconColor
81
+ }
82
+ }), /*#__PURE__*/_jsx("span", {
83
+ children: "\u5230\u5934"
84
+ })]
85
+ })
86
+ }), /*#__PURE__*/_jsx("div", {
87
+ className: "header-item",
88
+ children: /*#__PURE__*/_jsxs(Button, {
89
+ type: "link",
90
+ disabled: currentPage === 0,
91
+ onClick: onPrevPage,
92
+ className: "header-nav-btn",
93
+ children: [/*#__PURE__*/_jsx(CaretLeftOutlined, {
94
+ style: {
95
+ fontSize: 16,
96
+ color: iconColor
97
+ }
98
+ }), /*#__PURE__*/_jsx("span", {
99
+ children: "\u4E0A\u9875"
100
+ })]
101
+ })
102
+ }), /*#__PURE__*/_jsx("div", {
103
+ className: "header-item",
104
+ children: /*#__PURE__*/_jsxs("div", {
105
+ className: "dfb-pageIndicator",
106
+ children: [currentPage + 1, " / ", totalPages]
107
+ })
108
+ }), /*#__PURE__*/_jsx("div", {
109
+ className: "header-item",
110
+ children: /*#__PURE__*/_jsxs(Button, {
111
+ type: "link",
112
+ disabled: currentPage >= totalPages - 1,
113
+ onClick: onNextPage,
114
+ className: "header-nav-btn",
115
+ children: [/*#__PURE__*/_jsx(CaretRightOutlined, {
116
+ style: {
117
+ fontSize: 16,
118
+ color: iconColor
119
+ }
120
+ }), /*#__PURE__*/_jsx("span", {
121
+ children: "\u4E0B\u9875"
122
+ })]
123
+ })
124
+ }), /*#__PURE__*/_jsx("div", {
125
+ className: "header-item",
126
+ children: /*#__PURE__*/_jsxs(Button, {
127
+ type: "link",
128
+ disabled: currentPage >= totalPages - 1,
129
+ onClick: onGoLast,
130
+ className: "header-nav-btn",
131
+ children: [/*#__PURE__*/_jsx(StepForwardOutlined, {
132
+ style: {
133
+ fontSize: 16,
134
+ color: iconColor
135
+ }
136
+ }), /*#__PURE__*/_jsx("span", {
137
+ children: "\u5230\u5C3E"
138
+ })]
139
+ })
140
+ })]
141
+ }), /*#__PURE__*/_jsx("span", {
142
+ className: "dfb-divider"
143
+ }), onUnbinding && /*#__PURE__*/_jsxs(Button, {
144
+ type: "link",
145
+ onClick: onUnbinding,
146
+ className: "header-nav-btn",
147
+ children: [/*#__PURE__*/_jsx(RollbackOutlined, {
148
+ style: {
149
+ fontSize: 16,
150
+ color: iconColor
151
+ }
152
+ }), /*#__PURE__*/_jsx("span", {
153
+ children: "\u64A4\u9500\u88C5\u8BA2"
154
+ })]
155
+ })]
156
+ }), /*#__PURE__*/_jsxs("div", {
157
+ className: "header-right",
158
+ children: [showSearchSelect && /*#__PURE__*/_jsx(Select, {
159
+ showSearch: true,
160
+ allowClear: true,
161
+ className: "toolbar-search-select",
162
+ value: searchValue || undefined,
163
+ placeholder: "\u8BF7\u8F93\u5165\u91D1\u989D\u6216\u5355\u636E\u5173\u952E\u5B57",
164
+ options: searchOptions,
165
+ maxTagTextLength: 400,
166
+ optionRender: function optionRender(option) {
167
+ var data = option.data;
168
+ return /*#__PURE__*/_jsxs("div", {
169
+ children: [/*#__PURE__*/_jsx("div", {
170
+ children: data.label
171
+ }), data.pageLabel && /*#__PURE__*/_jsx("div", {
172
+ className: "toolbar-search-select-meta",
173
+ style: {
174
+ fontSize: '12px',
175
+ color: '#999'
176
+ },
177
+ children: data.pageLabel
178
+ })]
179
+ });
180
+ },
181
+ onSearch: onSearchInputChange,
182
+ onChange: function onChange(value, option) {
183
+ if (!value) {
184
+ onSearchClear === null || onSearchClear === void 0 || onSearchClear();
185
+ return;
186
+ }
187
+ onSearchSelect === null || onSearchSelect === void 0 || onSearchSelect(value, option);
188
+ },
189
+ onClear: onSearchClear,
190
+ filterOption: false,
191
+ style: {
192
+ width: '280px',
193
+ marginLeft: '10px'
194
+ }
195
+ }), /*#__PURE__*/_jsx("span", {
196
+ className: "dfb-divider"
197
+ }), /*#__PURE__*/_jsxs(Space, {
198
+ children: [/*#__PURE__*/_jsxs(Button, {
199
+ type: "link",
200
+ onClick: onPrint,
201
+ className: "header-nav-btn",
202
+ children: [/*#__PURE__*/_jsx(PrinterOutlined, {
203
+ style: {
204
+ fontSize: 16,
205
+ color: iconColor
206
+ }
207
+ }), /*#__PURE__*/_jsx("span", {
208
+ children: "\u6253\u5370"
209
+ })]
210
+ }), /*#__PURE__*/_jsxs(Button, {
211
+ type: "link",
212
+ onClick: function onClick() {
213
+ return setExportModalVisible(true);
214
+ },
215
+ className: "header-nav-btn",
216
+ children: [/*#__PURE__*/_jsx(DownloadOutlined, {
217
+ style: {
218
+ fontSize: 16,
219
+ color: iconColor
220
+ }
221
+ }), /*#__PURE__*/_jsx("span", {
222
+ children: "\u5BFC\u51FA"
223
+ })]
224
+ })]
225
+ })]
226
+ }), /*#__PURE__*/_jsx(ExportModal, {
227
+ themeColor: themeColor,
228
+ visible: exportModalVisible,
229
+ onCancel: function onCancel() {
230
+ return setExportModalVisible(false);
231
+ },
232
+ onConfirm: handleDownloadConfirm
233
+ })]
234
+ });
235
+ };
236
+ export default HeaderBar;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface ImagePageRendererProps {
3
+ src: string;
4
+ alt: string;
5
+ attachmentId: number;
6
+ currentIndex: number;
7
+ totalCount: number;
8
+ amount: string;
9
+ }
10
+ export declare const ImagePageRenderer: React.FC<ImagePageRendererProps>;
11
+ export {};
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ export var ImagePageRenderer = function ImagePageRenderer(_ref) {
5
+ var src = _ref.src,
6
+ alt = _ref.alt,
7
+ currentIndex = _ref.currentIndex,
8
+ totalCount = _ref.totalCount,
9
+ amount = _ref.amount;
10
+ var formattedAmount = amount ? Number(amount).toLocaleString('en-US', {
11
+ minimumFractionDigits: 2,
12
+ maximumFractionDigits: 2
13
+ }) : '0.00';
14
+ return /*#__PURE__*/_jsxs("div", {
15
+ style: {
16
+ width: '100%',
17
+ height: '100%',
18
+ backgroundColor: '#fff',
19
+ position: 'relative',
20
+ padding: '0 20px 20px'
21
+ },
22
+ children: [/*#__PURE__*/_jsx("div", {
23
+ style: {
24
+ margin: '0 auto',
25
+ padding: '10px',
26
+ textAlign: 'center',
27
+ fontSize: '26px',
28
+ width: '220px',
29
+ fontWeight: 'bold',
30
+ color: '#597461'
31
+ },
32
+ children: "\u539F\u59CB\u51ED\u8BC1\u7C98\u8D34\u5355"
33
+ }), /*#__PURE__*/_jsxs("div", {
34
+ style: {
35
+ position: 'absolute',
36
+ top: '10px',
37
+ right: '20px',
38
+ textAlign: 'right',
39
+ fontSize: '14px',
40
+ color: '#597461',
41
+ lineHeight: '1.5'
42
+ },
43
+ children: [/*#__PURE__*/_jsxs("div", {
44
+ children: ["\u539F\u59CB\u51ED\u8BC1 ", /*#__PURE__*/_jsxs("span", {
45
+ style: {
46
+ borderBottom: '1px solid #597461'
47
+ },
48
+ children: [currentIndex, "/", totalCount]
49
+ }), " \u5F20"]
50
+ }), /*#__PURE__*/_jsxs("div", {
51
+ children: ["\u91D1\u989D ", /*#__PURE__*/_jsx("span", {
52
+ style: {
53
+ borderBottom: '1px solid #597461'
54
+ },
55
+ children: formattedAmount
56
+ })]
57
+ })]
58
+ }), /*#__PURE__*/_jsx("div", {
59
+ style: {
60
+ width: '100%',
61
+ height: '430px',
62
+ display: 'flex',
63
+ alignItems: 'center',
64
+ justifyContent: 'center',
65
+ margin: '10px 0',
66
+ border: '1px solid #597461',
67
+ overflow: 'hidden',
68
+ padding: '10px'
69
+ },
70
+ children: /*#__PURE__*/_jsx("img", {
71
+ src: src,
72
+ alt: alt,
73
+ style: {
74
+ maxWidth: '100%',
75
+ maxHeight: '100%',
76
+ objectFit: 'contain'
77
+ },
78
+ onError: function onError(e) {
79
+ e.currentTarget.style.display = 'none';
80
+ e.currentTarget.parentElement.innerHTML += '<span style="color: #f00; fontSize: 20px;">图片加载失败</span>';
81
+ }
82
+ })
83
+ })]
84
+ });
85
+ };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ message: string;
4
+ pdfLoading?: boolean;
5
+ }
6
+ export declare const LoadingComponent: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ export var LoadingComponent = function LoadingComponent(_ref) {
5
+ var message = _ref.message,
6
+ pdfLoading = _ref.pdfLoading;
7
+ return /*#__PURE__*/_jsxs("div", {
8
+ style: {
9
+ position: 'fixed',
10
+ top: 0,
11
+ left: 0,
12
+ width: '100%',
13
+ height: '100%',
14
+ background: 'rgba(255,255,255,0.9)',
15
+ display: 'flex',
16
+ flexDirection: 'column',
17
+ justifyContent: 'center',
18
+ alignItems: 'center',
19
+ zIndex: 9999
20
+ },
21
+ children: [/*#__PURE__*/_jsx("div", {
22
+ style: {
23
+ width: 60,
24
+ height: 60,
25
+ border: '4px solid #f3f3f3',
26
+ borderTop: '4px solid #1890ff',
27
+ borderRadius: '50%',
28
+ animation: 'spin 1s linear infinite',
29
+ marginBottom: 20
30
+ }
31
+ }), /*#__PURE__*/_jsx("div", {
32
+ style: {
33
+ fontSize: 16,
34
+ color: '#666'
35
+ },
36
+ children: message
37
+ }), pdfLoading && /*#__PURE__*/_jsx("div", {
38
+ style: {
39
+ fontSize: 14,
40
+ color: '#999',
41
+ marginTop: 8
42
+ },
43
+ children: "PDF\u6587\u4EF6\u8F83\u5927\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..."
44
+ }), /*#__PURE__*/_jsx("style", {
45
+ children: "@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"
46
+ })]
47
+ });
48
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import 'react-pdf/dist/Page/AnnotationLayer.css';
3
+ import 'react-pdf/dist/Page/TextLayer.css';
4
+ interface PDFPageRendererProps {
5
+ pdfPath: string;
6
+ attachmentId: number;
7
+ pageNumber: number;
8
+ currentIndex: number;
9
+ totalCount: number;
10
+ amount: string;
11
+ }
12
+ export declare const PDFPageRenderer: React.FC<PDFPageRendererProps>;
13
+ export {};