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