@hsu-react/ui 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/{Table/_components/Pagination → Pagination}/index.js +2 -2
- package/es/components/Table/_hooks/useTableColumns.d.ts +1 -1
- package/es/components/Table/_hooks/useTablePagination.d.ts +1 -1
- package/es/components/Table/_hooks/useTablePagination.js +1 -1
- package/es/components/Table/index.d.ts +1 -1
- package/es/components/Table/index.js +1 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/lib/components/{Table/_components/Pagination → Pagination}/index.js +2 -2
- package/lib/components/Table/_hooks/useTableColumns.d.ts +1 -1
- package/lib/components/Table/_hooks/useTablePagination.d.ts +1 -1
- package/lib/components/Table/_hooks/useTablePagination.js +1 -1
- package/lib/components/Table/index.d.ts +1 -1
- package/lib/components/Table/index.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +19 -0
- package/package.json +1 -1
- package/src/components/{Table/_components/Pagination → Pagination}/index.tsx +2 -2
- package/src/components/Table/_hooks/useTableColumns.tsx +1 -1
- package/src/components/Table/_hooks/useTablePagination.ts +2 -2
- package/src/components/Table/index.tsx +1 -1
- package/src/index.ts +2 -0
- /package/es/components/{Table → Pagination}/_hooks/usePaginationSync.d.ts +0 -0
- /package/es/components/{Table → Pagination}/_hooks/usePaginationSync.js +0 -0
- /package/es/components/{Table/_components/Pagination → Pagination}/index.d.ts +0 -0
- /package/es/components/{Table/_components/Pagination → Pagination}/index.module.scss +0 -0
- /package/lib/components/{Table → Pagination}/_hooks/usePaginationSync.d.ts +0 -0
- /package/lib/components/{Table → Pagination}/_hooks/usePaginationSync.js +0 -0
- /package/lib/components/{Table/_components/Pagination → Pagination}/index.d.ts +0 -0
- /package/lib/components/{Table/_components/Pagination → Pagination}/index.module.scss +0 -0
- /package/src/components/{Table → Pagination}/_hooks/usePaginationSync.ts +0 -0
- /package/src/components/{Table/_components/Pagination → Pagination}/index.module.scss +0 -0
|
@@ -12,10 +12,10 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
12
12
|
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; }
|
|
13
13
|
import { Pagination as AntdPagination, Select } from "antd";
|
|
14
14
|
import React, { useMemo, useRef } from "react";
|
|
15
|
-
import Icon from "
|
|
15
|
+
import Icon from "../Icon";
|
|
16
16
|
import classNames from "classnames";
|
|
17
17
|
import styles from "./index.module.scss";
|
|
18
|
-
import usePaginationSync from "
|
|
18
|
+
import usePaginationSync from "./_hooks/usePaginationSync";
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
21
|
var Pagination = function Pagination(props) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ColumnsType, TableProps } from "..";
|
|
3
3
|
import { AnyObject } from "antd/es/_util/type";
|
|
4
4
|
import { TableRowSelection } from "antd/es/table/interface";
|
|
5
|
-
import { PaginationProps } from "
|
|
5
|
+
import { PaginationProps } from "../../Pagination";
|
|
6
6
|
interface UseTableColumnsParams<T extends AnyObject> {
|
|
7
7
|
columns?: ColumnsType<T>;
|
|
8
8
|
scroll?: boolean | {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PaginationProps } from "
|
|
2
|
+
import { PaginationProps } from "../../Pagination";
|
|
3
3
|
import { TableProps } from "..";
|
|
4
4
|
import { AnyObject } from "antd/es/_util/type";
|
|
5
5
|
interface UseTablePaginationParams<T extends AnyObject> {
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
8
8
|
import { Equal } from "hsu-utils";
|
|
9
|
-
import usePaginationSync from "
|
|
9
|
+
import usePaginationSync from "../../Pagination/_hooks/usePaginationSync";
|
|
10
10
|
var useTablePagination = function useTablePagination(params) {
|
|
11
11
|
var dataSource = params.dataSource,
|
|
12
12
|
pagination = params.pagination,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType as AntColumnType, ColumnGroupType as AntColumnGroupType } from "antd/lib/table";
|
|
2
2
|
import { TableProps as AntdTableProps, TooltipProps } from "antd";
|
|
3
3
|
import Drag, { DragProps } from "./_components/Drag";
|
|
4
|
-
import { PaginationProps } from "
|
|
4
|
+
import { PaginationProps } from "../Pagination";
|
|
5
5
|
import React, { ReactNode } from "react";
|
|
6
6
|
import { AnyObject } from "antd/es/_util/type";
|
|
7
7
|
import { ColumnTitleProps } from "antd/lib/table/interface";
|
|
@@ -10,7 +10,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import { Table as AntdTable } from "antd";
|
|
12
12
|
import Drag from "./_components/Drag";
|
|
13
|
-
import Pagination from "
|
|
13
|
+
import Pagination from "../Pagination";
|
|
14
14
|
import React, { useMemo, useRef } from "react";
|
|
15
15
|
import { generateRandomStr } from "hsu-utils";
|
|
16
16
|
import classNames from "classnames";
|
package/es/index.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export { default as Modal } from "./components/Modal";
|
|
|
48
48
|
export * from "./components/Modal";
|
|
49
49
|
export { default as Operate } from "./components/Operate";
|
|
50
50
|
export * from "./components/Operate";
|
|
51
|
+
export { default as Pagination } from "./components/Pagination";
|
|
52
|
+
export * from "./components/Pagination";
|
|
51
53
|
export { default as Panel } from "./components/Panel";
|
|
52
54
|
export * from "./components/Panel";
|
|
53
55
|
export { default as Search } from "./components/Search";
|
package/es/index.js
CHANGED
|
@@ -51,6 +51,8 @@ export { default as Modal } from "./components/Modal";
|
|
|
51
51
|
export * from "./components/Modal";
|
|
52
52
|
export { default as Operate } from "./components/Operate";
|
|
53
53
|
export * from "./components/Operate";
|
|
54
|
+
export { default as Pagination } from "./components/Pagination";
|
|
55
|
+
export * from "./components/Pagination";
|
|
54
56
|
export { default as Panel } from "./components/Panel";
|
|
55
57
|
export * from "./components/Panel";
|
|
56
58
|
export { default as Search } from "./components/Search";
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _antd = require("antd");
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _Icon = _interopRequireDefault(require("
|
|
9
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
|
|
12
|
-
var _usePaginationSync = _interopRequireDefault(require("
|
|
12
|
+
var _usePaginationSync = _interopRequireDefault(require("./_hooks/usePaginationSync"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ColumnsType, TableProps } from "..";
|
|
3
3
|
import { AnyObject } from "antd/es/_util/type";
|
|
4
4
|
import { TableRowSelection } from "antd/es/table/interface";
|
|
5
|
-
import { PaginationProps } from "
|
|
5
|
+
import { PaginationProps } from "../../Pagination";
|
|
6
6
|
interface UseTableColumnsParams<T extends AnyObject> {
|
|
7
7
|
columns?: ColumnsType<T>;
|
|
8
8
|
scroll?: boolean | {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PaginationProps } from "
|
|
2
|
+
import { PaginationProps } from "../../Pagination";
|
|
3
3
|
import { TableProps } from "..";
|
|
4
4
|
import { AnyObject } from "antd/es/_util/type";
|
|
5
5
|
interface UseTablePaginationParams<T extends AnyObject> {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _hsuUtils = require("hsu-utils");
|
|
9
|
-
var _usePaginationSync = _interopRequireDefault(require("
|
|
9
|
+
var _usePaginationSync = _interopRequireDefault(require("../../Pagination/_hooks/usePaginationSync"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
const useTablePagination = params => {
|
|
12
12
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnType as AntColumnType, ColumnGroupType as AntColumnGroupType } from "antd/lib/table";
|
|
2
2
|
import { TableProps as AntdTableProps, TooltipProps } from "antd";
|
|
3
3
|
import Drag, { DragProps } from "./_components/Drag";
|
|
4
|
-
import { PaginationProps } from "
|
|
4
|
+
import { PaginationProps } from "../Pagination";
|
|
5
5
|
import React, { ReactNode } from "react";
|
|
6
6
|
import { AnyObject } from "antd/es/_util/type";
|
|
7
7
|
import { ColumnTitleProps } from "antd/lib/table/interface";
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "TableDrag", {
|
|
|
12
12
|
exports.default = void 0;
|
|
13
13
|
var _antd = require("antd");
|
|
14
14
|
var _Drag = _interopRequireDefault(require("./_components/Drag"));
|
|
15
|
-
var _Pagination = _interopRequireDefault(require("
|
|
15
|
+
var _Pagination = _interopRequireDefault(require("../Pagination"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _hsuUtils = require("hsu-utils");
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
package/lib/index.d.ts
CHANGED
|
@@ -48,6 +48,8 @@ export { default as Modal } from "./components/Modal";
|
|
|
48
48
|
export * from "./components/Modal";
|
|
49
49
|
export { default as Operate } from "./components/Operate";
|
|
50
50
|
export * from "./components/Operate";
|
|
51
|
+
export { default as Pagination } from "./components/Pagination";
|
|
52
|
+
export * from "./components/Pagination";
|
|
51
53
|
export { default as Panel } from "./components/Panel";
|
|
52
54
|
export * from "./components/Panel";
|
|
53
55
|
export { default as Search } from "./components/Search";
|
package/lib/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var _exportNames = {
|
|
|
40
40
|
Markdown: true,
|
|
41
41
|
Modal: true,
|
|
42
42
|
Operate: true,
|
|
43
|
+
Pagination: true,
|
|
43
44
|
Panel: true,
|
|
44
45
|
Search: true,
|
|
45
46
|
SecondConf: true,
|
|
@@ -186,6 +187,12 @@ Object.defineProperty(exports, "Operate", {
|
|
|
186
187
|
return _Operate.default;
|
|
187
188
|
}
|
|
188
189
|
});
|
|
190
|
+
Object.defineProperty(exports, "Pagination", {
|
|
191
|
+
enumerable: true,
|
|
192
|
+
get: function () {
|
|
193
|
+
return _Pagination.default;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
189
196
|
Object.defineProperty(exports, "Panel", {
|
|
190
197
|
enumerable: true,
|
|
191
198
|
get: function () {
|
|
@@ -605,6 +612,18 @@ Object.keys(_Operate).forEach(function (key) {
|
|
|
605
612
|
}
|
|
606
613
|
});
|
|
607
614
|
});
|
|
615
|
+
var _Pagination = _interopRequireWildcard(require("./components/Pagination"));
|
|
616
|
+
Object.keys(_Pagination).forEach(function (key) {
|
|
617
|
+
if (key === "default" || key === "__esModule") return;
|
|
618
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
619
|
+
if (key in exports && exports[key] === _Pagination[key]) return;
|
|
620
|
+
Object.defineProperty(exports, key, {
|
|
621
|
+
enumerable: true,
|
|
622
|
+
get: function () {
|
|
623
|
+
return _Pagination[key];
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
});
|
|
608
627
|
var _Panel = _interopRequireWildcard(require("./components/Panel"));
|
|
609
628
|
Object.keys(_Panel).forEach(function (key) {
|
|
610
629
|
if (key === "default" || key === "__esModule") return;
|
package/package.json
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
import React, { ReactNode, useMemo, useRef } from "react";
|
|
7
7
|
|
|
8
8
|
import { BaseSelectRef } from "rc-select";
|
|
9
|
-
import Icon from "
|
|
9
|
+
import Icon from "../Icon";
|
|
10
10
|
import classNames from "classnames";
|
|
11
11
|
import styles from "./index.module.scss";
|
|
12
|
-
import usePaginationSync from "
|
|
12
|
+
import usePaginationSync from "./_hooks/usePaginationSync";
|
|
13
13
|
|
|
14
14
|
export interface PaginationProps
|
|
15
15
|
extends Omit<AntdPaginationProps, "pageSizeOptions" | "showTotal"> {
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
HELP_TOOLTIP_CONFIG,
|
|
18
18
|
} from "../_utils/tableUtils";
|
|
19
19
|
import usePermissions from "../../../hooks/usePermissions";
|
|
20
|
-
import { PaginationProps } from "
|
|
20
|
+
import { PaginationProps } from "../../Pagination";
|
|
21
21
|
|
|
22
22
|
// measureAlign columns: measured at 14px, consistent with the table body and autoWidth title measurement
|
|
23
23
|
const MEASURE_ALIGN_FONT_SIZE = 14;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
2
|
import { Equal } from "hsu-utils";
|
|
3
|
-
import { PaginationProps } from "
|
|
3
|
+
import { PaginationProps } from "../../Pagination";
|
|
4
4
|
import { TableProps } from "..";
|
|
5
5
|
import { AnyObject } from "antd/es/_util/type";
|
|
6
|
-
import usePaginationSync from "
|
|
6
|
+
import usePaginationSync from "../../Pagination/_hooks/usePaginationSync";
|
|
7
7
|
|
|
8
8
|
interface UseTablePaginationParams<T extends AnyObject> {
|
|
9
9
|
dataSource?: TableProps<T>["dataSource"];
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
TooltipProps,
|
|
9
9
|
} from "antd";
|
|
10
10
|
import Drag, { DragProps } from "./_components/Drag";
|
|
11
|
-
import Pagination, { PaginationProps } from "
|
|
11
|
+
import Pagination, { PaginationProps } from "../Pagination";
|
|
12
12
|
import React, { CSSProperties, ReactNode, useMemo, useRef } from "react";
|
|
13
13
|
|
|
14
14
|
import { AnyObject } from "antd/es/_util/type";
|
package/src/index.ts
CHANGED
|
@@ -63,6 +63,8 @@ export { default as Modal } from "./components/Modal";
|
|
|
63
63
|
export * from "./components/Modal";
|
|
64
64
|
export { default as Operate } from "./components/Operate";
|
|
65
65
|
export * from "./components/Operate";
|
|
66
|
+
export { default as Pagination } from "./components/Pagination";
|
|
67
|
+
export * from "./components/Pagination";
|
|
66
68
|
export { default as Panel } from "./components/Panel";
|
|
67
69
|
export * from "./components/Panel";
|
|
68
70
|
export { default as Search } from "./components/Search";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|