@para-ui/core 3.0.27 → 3.0.29

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 (136) hide show
  1. package/AutoBox/index.js +48 -88
  2. package/AutoTips/index.js +25 -32
  3. package/Breadcrumbs/index.js +43 -63
  4. package/Button/SplitButton.d.ts +1 -1
  5. package/Button/index.d.ts +1 -1
  6. package/Button/index.js +88 -118
  7. package/ButtonGroup/index.js +27 -36
  8. package/Carousel/index.d.ts +2 -2
  9. package/Carousel/index.js +27 -28
  10. package/Cascader/index.js +52 -64
  11. package/Checkbox/index.js +23 -39
  12. package/CheckboxGroup/index.js +31 -48
  13. package/Collapse/collapsePanel.d.ts +1 -1
  14. package/Collapse/index.d.ts +1 -1
  15. package/Collapse/index.js +9 -29
  16. package/Collapse/util.d.ts +2 -2
  17. package/CollapseBox/index.js +45 -56
  18. package/CollapseLayout/index.js +35 -54
  19. package/ComboSelect/index.js +231 -358
  20. package/ComboSelect/interface.d.ts +3 -3
  21. package/Container/index.js +17 -20
  22. package/DatePicker/generatePicker/index.d.ts +17 -17
  23. package/DatePicker/index.d.ts +4 -4
  24. package/DatePicker/index.js +111 -167
  25. package/Desktop/index.js +62 -173
  26. package/Drawer/index.js +65 -58
  27. package/Drawer/interface.d.ts +7 -3
  28. package/Dropdown/index.d.ts +1 -1
  29. package/Dropdown/index.js +3 -3
  30. package/Empty/index.js +17 -22
  31. package/Form/index.d.ts +1 -1
  32. package/Form/index.js +40 -82
  33. package/FormItem/index.d.ts +1 -1
  34. package/FormItem/index.js +13 -13
  35. package/FormItem/validateFunction.d.ts +1 -1
  36. package/FunctionModal/index.js +11 -11
  37. package/GlobalContext/index.js +3 -3
  38. package/GlobalContext/usePopupContainer.d.ts +1 -1
  39. package/Help/index.js +11 -11
  40. package/HelperText/index.js +11 -12
  41. package/InputLang/index.js +47 -80
  42. package/InputNumber/index.js +65 -100
  43. package/Label/index.js +15 -16
  44. package/Loading/index.js +6 -7
  45. package/Menu/index.js +148 -328
  46. package/Menu/interface.d.ts +2 -2
  47. package/Menu/verticalMenuList.d.ts +1 -1
  48. package/Message/index.d.ts +1 -1
  49. package/Message/index.js +45 -64
  50. package/Modal/Confirm/index.d.ts +2 -2
  51. package/Modal/index.d.ts +1 -1
  52. package/Modal/index.js +119 -152
  53. package/MultiBox/index.js +43 -75
  54. package/Notification/index.d.ts +2 -2
  55. package/Notification/index.js +51 -72
  56. package/OperateBtn/index.js +42 -70
  57. package/PageHeader/index.js +120 -286
  58. package/PageHeader/interface.d.ts +1 -1
  59. package/Pagination/index.d.ts +16 -5
  60. package/Pagination/index.js +169 -188
  61. package/ParauiProvider/index.js +2 -3
  62. package/PasswordRules/index.js +12 -30
  63. package/PopConfirm/index.d.ts +1 -1
  64. package/PopConfirm/index.js +52 -59
  65. package/Popover/index.js +8 -9
  66. package/Progress/index.d.ts +6 -6
  67. package/Progress/index.js +50 -89
  68. package/Querying/index.js +14 -17
  69. package/README.md +16 -0
  70. package/Radio/index.js +21 -33
  71. package/RadioGroup/index.js +32 -47
  72. package/Search/index.js +44 -66
  73. package/Select/index.js +176 -343
  74. package/SelectInput/index.js +8 -9
  75. package/Selector/index.js +298 -686
  76. package/SelectorPicker/index.d.ts +2 -0
  77. package/SelectorPicker/index.js +64 -97
  78. package/SingleBox/index.js +29 -54
  79. package/Slider/index.d.ts +1 -1
  80. package/Slider/index.js +29 -41
  81. package/Slider/interface.d.ts +2 -2
  82. package/Split/index.js +10 -23
  83. package/Status/index.js +8 -7
  84. package/Stepper/index.d.ts +1 -1
  85. package/Stepper/index.js +20 -25
  86. package/Switch/index.d.ts +2 -2
  87. package/Switch/index.js +19 -20
  88. package/Table/index.js +590 -1028
  89. package/Table/interface.d.ts +15 -6
  90. package/Table/tableBodyInterface.d.ts +4 -0
  91. package/Table/tablePagination.d.ts +1 -1
  92. package/Table/{tablePaginationInterFace.d.ts → tablePaginationInterface.d.ts} +4 -1
  93. package/Tabs/index.d.ts +3 -3
  94. package/Tabs/index.js +47 -65
  95. package/Tag/TagGroup.d.ts +1 -1
  96. package/Tag/index.d.ts +2 -2
  97. package/Tag/index.js +72 -107
  98. package/TextEditor/index.d.ts +2 -2
  99. package/TextEditor/index.js +81 -105
  100. package/TextField/index.js +141 -220
  101. package/TimePicker/index.d.ts +1 -1
  102. package/TimePicker/index.js +12 -15
  103. package/Timeline/index.js +42 -52
  104. package/Title/index.js +10 -9
  105. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  106. package/ToggleButton/index.js +50 -70
  107. package/Tooltip/index.js +64 -98
  108. package/Tooltip/interface.d.ts +1 -1
  109. package/Transfer/index.d.ts +1 -1
  110. package/Transfer/index.js +89 -116
  111. package/Transfer/useClick.d.ts +1 -1
  112. package/Tree/index.js +10 -10
  113. package/Tree/interface.d.ts +6 -6
  114. package/Upload/Dragger/index.d.ts +1 -1
  115. package/Upload/ImageUpload/index.d.ts +1 -1
  116. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  117. package/Upload/index.d.ts +1 -1
  118. package/Upload/index.js +283 -475
  119. package/Upload/interface.d.ts +2 -2
  120. package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
  121. package/_verture/defineProperty-62acccfc.js +34 -0
  122. package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
  123. package/_verture/{index-c40bd040.js → index-131f8fe5.js} +80 -181
  124. package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
  125. package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
  126. package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
  127. package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
  128. package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
  129. package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
  130. package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
  131. package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
  132. package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
  133. package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
  134. package/index.js +15 -15
  135. package/package.json +4 -5
  136. package/_verture/defineProperty-0590dc61.js +0 -16
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import React, { ReactNode } from 'react';
7
7
  /** 菜单类型 */
8
- export declare type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
8
+ export type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
9
9
  /** 菜单列表项参数 */
10
10
  export interface MenuChildrenProps {
11
11
  /** 样式class */
@@ -1,18 +1,29 @@
1
1
  /**
2
2
  * @author linhd
3
- * @date 2021/10/26 13:57
4
- * @description 分页
3
+ * @date 2022/12/13 2:19 PM
4
+ * @description 分页组件
5
5
  */
6
- import React, { FunctionComponent } from 'react';
6
+ import React, { FunctionComponent } from "react";
7
7
  import './index.scss';
8
+ /**
9
+ * sizes: 总数
10
+ * currentPage:当前第...页
11
+ * pageRow:每页行数
12
+ * pager: 切换页数
13
+ * jumper: 跳转到
14
+ * */
15
+ export type PaginationLayout = 'sizes' | 'currentPage' | 'pageRow' | 'pager' | 'jumper';
16
+ export type PaginationFlippingArrow = 'first' | 'prev' | 'next' | 'last';
8
17
  export interface PaginationProps {
9
18
  /** class名称 */
10
19
  className?: string;
11
20
  /** style */
12
21
  style?: React.CSSProperties;
13
22
  /** 模式 */
14
- type?: 'simple' | 'complex';
15
- /** 自适应模式 只有type=complex生效 */
23
+ type?: 'simple' | 'complex' | PaginationLayout[];
24
+ /** 方向键layout,默认全有 */
25
+ flippingArrow?: PaginationFlippingArrow[];
26
+ /** 自适应模式 只有type=complex生效,默认true */
16
27
  autoType?: boolean;
17
28
  /** 总数 */
18
29
  total?: number;
@@ -1,47 +1,50 @@
1
- import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
1
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import React__default, { useState, useRef, useEffect, useMemo } from 'react';
4
- import PaginationCom from 'rc-pagination';
4
+ import GlobalContext from '@para-ui/core/GlobalContext';
5
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
6
+ import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-66aa48a1.js';
7
+ import { TextField } from '../TextField/index.js';
8
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
9
+ import Select from '../Select/index.js';
5
10
  import DoubleLeft from '@para-ui/icons/DoubleLeft';
6
- import DoubleRight from '@para-ui/icons/DoubleRight';
7
11
  import NavigateBefore from '@para-ui/icons/Left';
12
+ import PaginationCom from 'rc-pagination';
8
13
  import Right from '@para-ui/icons/Right';
9
- import Select from '../Select/index.js';
10
- import { TextField } from '../TextField/index.js';
11
- import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
12
- import GlobalContext from '@para-ui/core/GlobalContext';
13
- import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
14
- import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
15
- import '../_verture/defineProperty-0590dc61.js';
16
- import '../_verture/toConsumableArray-f8047a75.js';
14
+ import DoubleRight from '@para-ui/icons/DoubleRight';
17
15
  import '../_verture/typeof-498dd2b1.js';
18
- import '../Empty/index.js';
19
- import 'clsx';
20
- import '../_verture/useGlobalProps-af9a2af6.js';
16
+ import '../_verture/tslib.es6-55ed4bd2.js';
21
17
  import '../Label/index.js';
22
18
  import '../Help/index.js';
23
- import '../_verture/tslib.es6-55ed4bd2.js';
24
19
  import '../Tooltip/index.js';
25
20
  import 'rc-tooltip';
26
21
  import 'rc-tooltip/lib/placements';
22
+ import 'clsx';
27
23
  import '@para-ui/icons/Help';
28
- import '../_verture/index-bbed73a3.js';
24
+ import '@paraview/lib';
25
+ import '@para-ui/icons/PreviewClose';
26
+ import '@para-ui/icons/PreviewOpen';
27
+ import '@para-ui/icons/CloseCircle';
28
+ import '../AutoTips/index.js';
29
+ import '../Loading/index.js';
30
+ import '@para-ui/icons/LoadingF';
31
+ import '../HelperText/index.js';
32
+ import '../_verture/useGlobalProps-1b846a65.js';
33
+ import '../_verture/index-be4faaee.js';
29
34
  import 'rc-dropdown';
30
- import '../_verture/usePopupContainer-b8ab7cab.js';
35
+ import '../_verture/usePopupContainer-87febeb9.js';
31
36
  import 'dayjs';
32
- import '@paraview/lib';
37
+ import '../_verture/defineProperty-62acccfc.js';
38
+ import '../_verture/toConsumableArray-87c7d895.js';
39
+ import '../Empty/index.js';
33
40
  import '@para-ui/icons/Close';
34
- import '@para-ui/icons/CloseCircle';
35
41
  import '@para-ui/icons/Down';
36
42
  import '@para-ui/icons/Check';
37
43
  import '@para-ui/icons/Search';
38
- import '../AutoTips/index.js';
39
- import '../Loading/index.js';
40
- import '@para-ui/icons/LoadingF';
41
44
  import '../Popover/index.js';
42
- import '../HelperText/index.js';
43
- import '@para-ui/icons/PreviewClose';
44
- import '@para-ui/icons/PreviewOpen';
45
+
46
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/10/26 13:57\n* @description 分页样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-pagination {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n opacity: 1;\n}\n.paraui-v3-pagination.paraui-v3-pagination-over {\n overflow: hidden;\n height: 32px;\n opacity: 0;\n transition: all 0.3s;\n}\n.paraui-v3-pagination.paraui-v3-pagination-no-left-arrow > .pagination-content {\n padding-left: 0;\n}\n.paraui-v3-pagination.paraui-v3-pagination-no-right-arrow > .pagination-content {\n padding-right: 0;\n}\n.paraui-v3-pagination > .pagination-space {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .pagination-space:last-child {\n margin-right: 0;\n}\n.paraui-v3-pagination > .current-page > .current-page-num {\n color: rgb(46, 55, 67);\n margin-right: 4px;\n margin-left: 4px;\n}\n.paraui-v3-pagination > .current-page > .current-page-sign {\n margin-right: 3px;\n}\n.paraui-v3-pagination > .page-line-memo > span {\n display: inline-block;\n margin-right: 8px;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .page-line-memo .page-line-select {\n min-width: 80px;\n width: inherit;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .pagination-content {\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n height: 32px;\n line-height: 30px;\n padding: 0 12px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-pagination > .pagination-content > .left-page, .paraui-v3-pagination > .pagination-content > .right-page {\n display: inline-block;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div, .paraui-v3-pagination > .pagination-content > .right-page > div {\n display: inline-block;\n line-height: 0;\n vertical-align: top;\n cursor: pointer;\n width: 20px;\n height: 20px;\n border-radius: 2px;\n margin-right: 8px;\n position: relative;\n top: 5px;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn {\n cursor: not-allowed;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover {\n background-color: white;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:last-child, .paraui-v3-pagination > .pagination-content > .right-page > div:last-child {\n margin-right: 0;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover, .paraui-v3-pagination > .pagination-content > .right-page > div:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div > svg, .paraui-v3-pagination > .pagination-content > .right-page > div > svg {\n font-size: 16px;\n position: relative;\n top: 2px;\n left: 2px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-pagination > .pagination-content > .left-page {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination {\n height: 100%;\n display: inline-block;\n box-shadow: none;\n vertical-align: top;\n line-height: 30px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li {\n min-width: 20px;\n height: 20px;\n line-height: 20px;\n display: inline-block;\n text-align: center;\n cursor: pointer;\n border-radius: 2px;\n padding: 0 5px;\n margin: 0 3px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:first-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li:last-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-next {\n display: none;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:hover {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-item-active {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .right-page {\n margin-left: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo {\n display: flex;\n align-items: center;\n}\n.paraui-v3-pagination > .skip-page-memo > span {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field {\n width: 58px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .right-icon {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 8px;\n padding-right: 4px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding: 0 8px;\n}";
47
+ styleInject(css_248z);
45
48
 
46
49
  var en = {
47
50
  total: 'Total {total}',
@@ -64,106 +67,80 @@ var localeJson = {
64
67
  en: en
65
68
  };
66
69
 
67
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/10/26 13:57\n* @description 分页样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-pagination {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n opacity: 1;\n}\n.paraui-v3-pagination.paraui-v3-pagination-over {\n overflow: hidden;\n height: 32px;\n opacity: 0;\n transition: all 0.3s;\n}\n.paraui-v3-pagination > .total-num {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .current-page {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .current-page > .current-page-num {\n color: rgb(46, 55, 67);\n margin-right: 4px;\n margin-left: 4px;\n}\n.paraui-v3-pagination > .current-page > .current-page-sign {\n margin-right: 3px;\n}\n.paraui-v3-pagination > .page-line-memo {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .page-line-memo > span {\n display: inline-block;\n margin-right: 8px;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .page-line-memo .page-line-select {\n min-width: 80px;\n width: inherit;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .pagination-content {\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n height: 32px;\n line-height: 30px;\n padding: 0 12px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-pagination > .pagination-content > .left-page, .paraui-v3-pagination > .pagination-content > .right-page {\n display: inline-block;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div, .paraui-v3-pagination > .pagination-content > .right-page > div {\n display: inline-block;\n line-height: 0;\n vertical-align: top;\n cursor: pointer;\n width: 20px;\n height: 20px;\n border-radius: 2px;\n margin-right: 8px;\n position: relative;\n top: 5px;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn {\n cursor: not-allowed;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover {\n background-color: white;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:last-child, .paraui-v3-pagination > .pagination-content > .right-page > div:last-child {\n margin-right: 0;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover, .paraui-v3-pagination > .pagination-content > .right-page > div:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div > svg, .paraui-v3-pagination > .pagination-content > .right-page > div > svg {\n font-size: 16px;\n position: relative;\n top: 2px;\n left: 2px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-pagination > .pagination-content > .left-page {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination {\n height: 100%;\n display: inline-block;\n box-shadow: none;\n vertical-align: top;\n line-height: 30px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li {\n min-width: 20px;\n height: 20px;\n line-height: 20px;\n display: inline-block;\n text-align: center;\n cursor: pointer;\n border-radius: 2px;\n padding: 0 5px;\n margin: 0 3px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:first-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li:last-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-next {\n display: none;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:hover {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-item-active {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .right-page {\n margin-left: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo {\n margin-left: 24px;\n display: flex;\n align-items: center;\n}\n.paraui-v3-pagination > .skip-page-memo > span {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field {\n width: 58px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .right-icon {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 8px;\n padding-right: 4px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding: 0 8px;\n}";
68
- styleInject(css_248z);
69
-
70
70
  var Pagination = function Pagination(props) {
71
71
  var className = props.className,
72
- style = props.style,
73
- _props$type = props.type,
74
- type = _props$type === void 0 ? 'simple' : _props$type,
75
- _props$autoType = props.autoType,
76
- autoType = _props$autoType === void 0 ? true : _props$autoType,
77
- _props$total = props.total,
78
- total = _props$total === void 0 ? 0 : _props$total,
79
- _props$rowsPerPage = props.rowsPerPage,
80
- rowsPerPage = _props$rowsPerPage === void 0 ? [10, 20, 30] : _props$rowsPerPage,
81
- _props$currentRowsPer = props.currentRowsPerPage,
82
- currentRowsPerPage = _props$currentRowsPer === void 0 ? 10 : _props$currentRowsPer,
83
- _props$page = props.page,
84
- page = _props$page === void 0 ? 1 : _props$page,
85
- skipFunc = props.skipFunc,
86
- changePage = props.changePage,
87
- changeRowsPerPage = props.changeRowsPerPage,
88
- getPopupContainer = props.getPopupContainer;
89
-
72
+ style = props.style,
73
+ _props$type = props.type,
74
+ type = _props$type === void 0 ? 'simple' : _props$type,
75
+ _props$autoType = props.autoType,
76
+ autoType = _props$autoType === void 0 ? true : _props$autoType,
77
+ _props$total = props.total,
78
+ total = _props$total === void 0 ? 0 : _props$total,
79
+ _props$rowsPerPage = props.rowsPerPage,
80
+ rowsPerPage = _props$rowsPerPage === void 0 ? [10, 20, 30] : _props$rowsPerPage,
81
+ _props$flippingArrow = props.flippingArrow,
82
+ flippingArrow = _props$flippingArrow === void 0 ? ['first', 'prev', 'last', 'next'] : _props$flippingArrow,
83
+ _props$currentRowsPer = props.currentRowsPerPage,
84
+ currentRowsPerPage = _props$currentRowsPer === void 0 ? 10 : _props$currentRowsPer,
85
+ _props$page = props.page,
86
+ page = _props$page === void 0 ? 1 : _props$page,
87
+ skipFunc = props.skipFunc,
88
+ changePage = props.changePage,
89
+ changeRowsPerPage = props.changeRowsPerPage,
90
+ getPopupContainer = props.getPopupContainer;
90
91
  var _React$useContext = React__default.useContext(GlobalContext),
91
- language = _React$useContext.language,
92
- locale = _React$useContext.locale;
93
-
92
+ language = _React$useContext.language,
93
+ locale = _React$useContext.locale;
94
+ var intl = useFormatMessage('Pagination', localeJson);
94
95
  var _useState = useState(currentRowsPerPage),
95
- _useState2 = _slicedToArray(_useState, 2),
96
- currentRowsPerPageCom = _useState2[0],
97
- setCurrentRowsPerPageCom = _useState2[1]; // 当前选中每页行数
98
-
99
-
100
- var _useState3 = useState(page),
101
- _useState4 = _slicedToArray(_useState3, 2),
102
- pageCom = _useState4[0],
103
- setPageCom = _useState4[1]; // 当前页数
104
-
105
-
106
- var _useState5 = useState(),
107
- _useState6 = _slicedToArray(_useState5, 2),
108
- totalPage = _useState6[0],
109
- setTotalPage = _useState6[1]; // 总页数
110
-
111
-
96
+ _useState2 = _slicedToArray(_useState, 2),
97
+ currentRowsPerPageCom = _useState2[0],
98
+ setCurrentRowsPerPageCom = _useState2[1]; // 当前选中每页行数
99
+ var _useState3 = useState([]),
100
+ _useState4 = _slicedToArray(_useState3, 2),
101
+ rowsPerPageCom = _useState4[0],
102
+ setRowsPerPageCom = _useState4[1]; // 每页显示的行数
103
+ var _useState5 = useState(page),
104
+ _useState6 = _slicedToArray(_useState5, 2),
105
+ pageCom = _useState6[0],
106
+ setPageCom = _useState6[1]; // 当前页数
112
107
  var _useState7 = useState(),
113
- _useState8 = _slicedToArray(_useState7, 2),
114
- skipValue = _useState8[0],
115
- setSkipValue = _useState8[1];
116
-
117
- var _useState9 = useState([]),
118
- _useState10 = _slicedToArray(_useState9, 2),
119
- rowsPerPageCom = _useState10[0],
120
- setRowsPerPageCom = _useState10[1];
121
-
108
+ _useState8 = _slicedToArray(_useState7, 2),
109
+ totalPage = _useState8[0],
110
+ setTotalPage = _useState8[1]; // 总页数
111
+ var _useState9 = useState(),
112
+ _useState10 = _slicedToArray(_useState9, 2),
113
+ skipValue = _useState10[0],
114
+ setSkipValue = _useState10[1]; // 跳转页数
122
115
  var _useState11 = useState(),
123
- _useState12 = _slicedToArray(_useState11, 2),
124
- typeCom = _useState12[0],
125
- setTypeCom = _useState12[1];
126
-
116
+ _useState12 = _slicedToArray(_useState11, 2),
117
+ typeCom = _useState12[0],
118
+ setTypeCom = _useState12[1]; // 组件类型
127
119
  var refDom = useRef();
128
-
129
- var _useState13 = useState({}),
130
- _useState14 = _slicedToArray(_useState13, 1),
131
- constData = _useState14[0];
132
-
133
- constData.type = type;
134
- constData.autoType = autoType;
135
- var intl = useFormatMessage('Pagination', localeJson);
120
+ var constData = useRef({});
121
+ constData.current.type = type;
122
+ constData.current.autoType = autoType;
136
123
  useEffect(function () {
137
124
  return function () {
138
125
  window.removeEventListener("resize", changeSize);
139
- clearTimeout(constData.timer);
140
- clearTimeout(constData.timerClass);
141
- clearTimeout(constData.changePagination);
126
+ clearTimeout(constData.current.timer);
127
+ clearTimeout(constData.current.timerClass);
128
+ clearTimeout(constData.current.changePagination);
142
129
  };
143
130
  }, []);
144
131
  useEffect(function () {
145
- if (currentRowsPerPage !== currentRowsPerPageCom) setCurrentRowsPerPageCom(currentRowsPerPage);
146
- }, [currentRowsPerPage]);
132
+ setTypeCom(type);
133
+ }, [type]);
147
134
  useEffect(function () {
148
- if (page !== pageCom) {
149
- setPageCom(page);
150
- }
135
+ setPageCom(page);
151
136
  }, [page]);
137
+ // 当前选中每页行数
152
138
  useEffect(function () {
153
- var num = Number(totalPage);
154
-
155
- if (pageCom > num && num !== pageCom) {
156
- setPageCom(num);
157
- }
158
- }, [pageCom, totalPage]);
159
- useEffect(function () {
160
- var num = Math.ceil(total / currentRowsPerPageCom); // props.page 防止外部传入自定义页面,设置无效(表格分页)
161
-
162
- setTotalPage(num || props.page || 1);
163
- }, [currentRowsPerPageCom, total]);
139
+ setCurrentRowsPerPageCom(currentRowsPerPage);
140
+ }, [currentRowsPerPage]);
141
+ // 下拉页数列表
164
142
  useEffect(function () {
165
143
  var arr = [];
166
-
167
144
  for (var i = 0, l = rowsPerPage.length; i < l; i++) {
168
145
  var item = rowsPerPage[i];
169
146
  var arrItem = {
@@ -172,16 +149,23 @@ var Pagination = function Pagination(props) {
172
149
  };
173
150
  arr.push(arrItem);
174
151
  }
175
-
176
152
  setRowsPerPageCom(arr);
177
153
  }, [props.rowsPerPage]);
178
154
  useEffect(function () {
179
- setTypeCom(type);
180
- }, [type]);
155
+ var num = Number(totalPage);
156
+ if (pageCom > num && num !== pageCom) {
157
+ setPageCom(num);
158
+ }
159
+ }, [pageCom, totalPage]);
160
+ useEffect(function () {
161
+ var num = Math.ceil(total / currentRowsPerPageCom);
162
+ // props.page 防止外部传入自定义页面,设置无效(表格分页)
163
+ setTotalPage(num || props.page || 1);
164
+ }, [currentRowsPerPageCom, total]);
181
165
  useEffect(function () {
182
166
  if (type === 'complex' && autoType) {
183
- changeSize(); // 复杂模式,且开启自适应模式
184
-
167
+ changeSize();
168
+ // 复杂模式,且开启自适应模式
185
169
  window.addEventListener("resize", changeSize);
186
170
  } else {
187
171
  window.removeEventListener("resize", changeSize);
@@ -189,147 +173,135 @@ var Pagination = function Pagination(props) {
189
173
  }
190
174
  }, [type, autoType]);
191
175
  useEffect(function () {
192
- if (constData.type === 'complex' && constData.autoType) {
176
+ if (constData.current.type === 'complex' && constData.current.autoType) {
193
177
  changePagination();
194
178
  }
195
179
  }, [total, currentRowsPerPageCom, pageCom, language]);
196
180
  /**
197
181
  * 改变了分页数据,需要判断当前是否换行了
198
182
  * */
199
-
200
183
  var changePagination = function changePagination() {
201
- clearTimeout(constData.changePagination);
202
- constData.changePagination = setTimeout(function () {
184
+ clearTimeout(constData.current.changePagination);
185
+ constData.current.changePagination = setTimeout(function () {
203
186
  var current = refDom.current;
204
- var skipDom = current && current.querySelector('.skip-page-memo'); // 简单模式,不存在跳转
205
-
187
+ var skipDom = current && current.querySelector('.skip-page-memo');
188
+ // 简单模式,不存在跳转
206
189
  if (skipDom) {
207
190
  // 复杂模式,换行了 -> 变成简单模式
208
191
  if (current.offsetTop !== skipDom.offsetTop) {
209
192
  setTypeCom('simple');
210
193
  }
211
194
  } else {
212
- setTypeCom('complex'); // 简单模式 -> 复杂, 需要再次判断是否换行了
213
-
195
+ setTypeCom('complex');
196
+ // 简单模式 -> 复杂, 需要再次判断是否换行了
214
197
  changePagination();
215
198
  }
216
199
  });
217
200
  };
218
- /** 屏幕宽度发生变化 */
219
-
220
-
201
+ /** 改变屏幕大小 */
221
202
  var changeSize = function changeSize() {
222
- clearTimeout(constData.timer);
223
- clearTimeout(constData.timerClass);
203
+ clearTimeout(constData.current.timer);
204
+ clearTimeout(constData.current.timerClass);
224
205
  var current = refDom.current;
225
206
  if (!current) return;
226
207
  current.classList.add($prefixCls + '-pagination-over');
227
- constData.timer = setTimeout(function () {
208
+ constData.current.timer = setTimeout(function () {
228
209
  if (!current) return;
229
- var skipDom = current.querySelector('.skip-page-memo'); // 简单模式,不存在跳转
230
-
210
+ var skipDom = current.querySelector('.skip-page-memo');
211
+ // 简单模式,不存在跳转
231
212
  if (skipDom) {
232
213
  // 复杂模式,换行了 -> 变成简单模式
233
214
  if (current.offsetTop !== skipDom.offsetTop) {
234
215
  setTypeCom('simple');
235
216
  }
236
217
  } else {
237
- setTypeCom('complex'); // 简单模式 -> 复杂, 需要再次判断是否换行了
238
-
218
+ setTypeCom('complex');
219
+ // 简单模式 -> 复杂, 需要再次判断是否换行了
239
220
  changeSize();
240
221
  }
241
-
242
- constData.timerClass = setTimeout(function () {
222
+ constData.current.timerClass = setTimeout(function () {
243
223
  current.classList.remove($prefixCls + '-pagination-over');
244
224
  }, 200);
245
225
  }, 200);
246
- }; // 点击每页行数下拉
247
-
248
-
249
- var clickRowsPerPage = function clickRowsPerPage(num) {
250
- if (num === currentRowsPerPageCom) return;
251
- setCurrentRowsPerPageCom(num);
252
- if (changeRowsPerPage) changeRowsPerPage(num);
253
- }; // 点击分页
254
-
255
-
226
+ };
227
+ /**
228
+ * 是否存在当前类型
229
+ * */
230
+ var notLayout = function notLayout(layout) {
231
+ return constData.current.type instanceof Array && constData.current.type.indexOf(layout) === -1;
232
+ };
233
+ // 点击分页
256
234
  var clickPage = function clickPage(type) {
257
235
  return function (value) {
258
236
  var num = pageCom;
259
-
260
237
  switch (type) {
261
238
  case "first":
262
239
  if (pageCom === 1) return;
263
240
  num = 1;
264
241
  break;
265
-
266
242
  case "prev":
267
243
  if (pageCom === 1) return;
268
244
  num--;
269
245
  break;
270
-
271
246
  case "last":
272
247
  if (pageCom === totalPage) return;
273
248
  num = totalPage;
274
249
  break;
275
-
276
250
  case "next":
277
251
  if (pageCom === totalPage) return;
278
252
  num++;
279
253
  break;
280
-
281
254
  case "pagination":
282
255
  num = value;
283
256
  break;
284
257
  }
285
-
286
258
  if (num !== undefined) setPageCom(num);
287
259
  changePage && changePage(num);
288
260
  };
289
- }; // 鼠标按下
290
-
291
-
261
+ };
262
+ // 点击每页行数下拉
263
+ var clickRowsPerPage = function clickRowsPerPage(num) {
264
+ if (num === currentRowsPerPageCom) return;
265
+ setCurrentRowsPerPageCom(num);
266
+ if (changeRowsPerPage) changeRowsPerPage(num);
267
+ };
268
+ // 鼠标按下
292
269
  var keyPress = function keyPress(event) {
293
270
  var arr = ['E', 'e', '.', '-'];
294
-
295
271
  if (arr.indexOf(event.key) !== -1) {
296
272
  event.preventDefault();
297
273
  }
298
- }; // 回车事件
299
-
300
-
274
+ };
275
+ // 回车事件
301
276
  var keyUp = function keyUp(event) {
302
277
  if (event.keyCode === 13) {
303
278
  var num = parseInt(skipValue && skipValue.toString() || '0');
304
-
305
279
  if (num <= 0) {
306
280
  num = 1;
307
281
  setSkipValue(num);
308
282
  }
309
-
310
283
  if (num > Number(totalPage)) {
311
284
  num = Number(totalPage);
312
285
  setSkipValue(num);
313
- } // 回车事件
314
-
315
-
286
+ }
287
+ // 回车事件
316
288
  if (skipFunc) skipFunc(num, skipValue);
317
289
  setPageCom(num);
318
290
  changePage && changePage(num);
319
291
  }
320
- }; // 改变输入框
321
-
322
-
292
+ };
293
+ // 改变输入框
323
294
  var changeSkipValue = function changeSkipValue(event) {
324
295
  setSkipValue(event.target.value);
325
296
  };
326
297
  /* 总数量 */
327
-
328
-
329
298
  var TotalMemo = useMemo(function () {
299
+ if (typeCom === 'simple' || notLayout('sizes')) {
300
+ return null;
301
+ }
330
302
  // 共{total}条
331
303
  return jsx("div", Object.assign({
332
- className: "total-num"
304
+ className: "total-num pagination-space"
333
305
  }, {
334
306
  children: intl({
335
307
  id: 'total'
@@ -337,12 +309,14 @@ var Pagination = function Pagination(props) {
337
309
  total: total
338
310
  })
339
311
  }));
340
- }, [total, language, locale]);
312
+ }, [total, language, locale, typeCom]);
341
313
  /* 每页行数 */
342
-
343
314
  var PageLineMemo = useMemo(function () {
315
+ if (notLayout('pageRow')) {
316
+ return null;
317
+ }
344
318
  return jsxs("div", Object.assign({
345
- className: "page-line-memo"
319
+ className: "page-line-memo pagination-space"
346
320
  }, {
347
321
  children: [jsx("span", {
348
322
  children: intl({
@@ -359,10 +333,12 @@ var Pagination = function Pagination(props) {
359
333
  getPopupContainer: getPopupContainer
360
334
  })]
361
335
  }));
362
- }, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale]);
336
+ }, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale, typeCom]);
363
337
  /* 当前页面 */
364
-
365
338
  var CurrentPageMemo = useMemo(function () {
339
+ if (notLayout('currentPage')) {
340
+ return null;
341
+ }
366
342
  var html = jsxs(Fragment, {
367
343
  children: [jsx("span", Object.assign({
368
344
  className: "current-page-num"
@@ -378,9 +354,8 @@ var Pagination = function Pagination(props) {
378
354
  children: totalPage
379
355
  }))]
380
356
  });
381
-
382
357
  return jsx("div", Object.assign({
383
- className: "current-page"
358
+ className: "current-page pagination-space"
384
359
  }, {
385
360
  children: intl({
386
361
  id: 'currentPage'
@@ -388,28 +363,31 @@ var Pagination = function Pagination(props) {
388
363
  currentPage: html
389
364
  })
390
365
  }));
391
- }, [pageCom, totalPage, language, locale]);
366
+ }, [pageCom, totalPage, language, locale, typeCom]);
392
367
  /* 页码 */
393
-
394
368
  var PaginationMemo = useMemo(function () {
369
+ if (notLayout('pager')) {
370
+ return null;
371
+ }
372
+ var bol = constData.current.type instanceof Array && constData.current.type.indexOf('pager') !== -1;
395
373
  return jsxs("div", Object.assign({
396
- className: "pagination-content"
374
+ className: "pagination-content pagination-space"
397
375
  }, {
398
376
  children: [jsxs("div", Object.assign({
399
377
  className: "left-page"
400
378
  }, {
401
- children: [jsx("div", Object.assign({
379
+ children: [flippingArrow.indexOf('first') !== -1 && jsx("div", Object.assign({
402
380
  onClick: clickPage('first'),
403
381
  className: pageCom === 1 ? 'disabled-btn' : ''
404
382
  }, {
405
383
  children: jsx(DoubleLeft, {})
406
- })), jsx("div", Object.assign({
384
+ })), flippingArrow.indexOf('prev') !== -1 && jsx("div", Object.assign({
407
385
  onClick: clickPage('prev'),
408
386
  className: pageCom === 1 ? 'disabled-btn' : ''
409
387
  }, {
410
388
  children: jsx(NavigateBefore, {})
411
389
  }))]
412
- })), typeCom === 'complex' && jsx(PaginationCom, {
390
+ })), (typeCom === 'complex' || bol) && jsx(PaginationCom, {
413
391
  prefixCls: $rcPrefixCls + '-pagination',
414
392
  current: pageCom,
415
393
  pageSize: currentRowsPerPageCom,
@@ -421,12 +399,12 @@ var Pagination = function Pagination(props) {
421
399
  }), jsxs("div", Object.assign({
422
400
  className: "right-page"
423
401
  }, {
424
- children: [jsx("div", Object.assign({
402
+ children: [flippingArrow.indexOf('next') !== -1 && jsx("div", Object.assign({
425
403
  onClick: clickPage('next'),
426
404
  className: pageCom === totalPage ? 'disabled-btn' : ''
427
405
  }, {
428
406
  children: jsx(Right, {})
429
- })), jsx("div", Object.assign({
407
+ })), flippingArrow.indexOf('last') !== -1 && jsx("div", Object.assign({
430
408
  onClick: clickPage('last'),
431
409
  className: pageCom === totalPage ? 'disabled-btn' : ''
432
410
  }, {
@@ -434,12 +412,14 @@ var Pagination = function Pagination(props) {
434
412
  }))]
435
413
  }))]
436
414
  }));
437
- }, [total, pageCom, totalPage, currentRowsPerPageCom, typeCom]);
415
+ }, [total, pageCom, totalPage, currentRowsPerPageCom, typeCom, props.flippingArrow]);
438
416
  /* 跳转页数 */
439
-
440
417
  var SkipPageMemo = useMemo(function () {
418
+ if (typeCom === 'simple' || notLayout('jumper')) {
419
+ return null;
420
+ }
441
421
  return jsxs("div", Object.assign({
442
- className: "skip-page-memo"
422
+ className: "skip-page-memo pagination-space"
443
423
  }, {
444
424
  children: [jsx("span", {
445
425
  children: intl({
@@ -459,20 +439,21 @@ var Pagination = function Pagination(props) {
459
439
  onKeyUp: keyUp
460
440
  })]
461
441
  }));
462
- }, [skipValue, totalPage, language, locale]); // 处理class
463
-
442
+ }, [skipValue, totalPage, language, locale, typeCom]);
443
+ // 处理class
464
444
  var handClass = function handClass() {
465
445
  var str = $prefixCls + '-pagination';
446
+ if (flippingArrow.indexOf('first') === -1 && flippingArrow.indexOf('prev') === -1) str += ' ' + $prefixCls + '-pagination-no-left-arrow';
447
+ if (flippingArrow.indexOf('next') === -1 && flippingArrow.indexOf('last') === -1) str += ' ' + $prefixCls + '-pagination-no-right-arrow';
466
448
  if (className) str += ' ' + className;
467
449
  return str;
468
450
  };
469
-
470
451
  return jsxs("div", Object.assign({
471
452
  className: handClass(),
472
453
  style: style,
473
454
  ref: refDom
474
455
  }, {
475
- children: [typeCom === 'complex' && TotalMemo, CurrentPageMemo, PageLineMemo, PaginationMemo, typeCom === 'complex' && SkipPageMemo]
456
+ children: [TotalMemo, CurrentPageMemo, PageLineMemo, PaginationMemo, SkipPageMemo]
476
457
  }));
477
458
  };
478
459