@pnkx-lib/ui 1.9.82 → 1.9.84
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/chunks/{AntdIcon-BhLLkfpo.js → AntdIcon-CfjDMPv2.js} +1254 -1
- package/es/chunks/{Switch-BL4ntIVa.js → Switch-BRvdbb0u.js} +1 -1
- package/es/chunks/{index-BStcC2Jc.js → index-D_iOcbs8.js} +42 -72
- package/es/chunks/useMessage-CADDGtSx.js +15 -0
- package/es/chunks/useToast-DL7nQTK1.js +22 -0
- package/es/fields/index.js +2 -2
- package/es/hooks/index.js +2 -2
- package/es/index.js +5 -5
- package/es/ui/index.js +2 -3
- package/package.json +1 -1
- package/types/hooks.d.ts +0 -22
- package/types/index.d.ts +4 -24
- package/types/ui.d.ts +2 -1
- package/es/chunks/_MapCache-hm6_DB7i.js +0 -1255
- package/es/chunks/table-CrhlYiL4.js +0 -2448
- package/es/chunks/useMessage-B2e_06XS.js +0 -93
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as classNames } from './AntdIcon-
|
1
|
+
import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as classNames } from './AntdIcon-CfjDMPv2.js';
|
2
2
|
import { Select as Select$1, Radio, Upload, Image, Switch as Switch$1 } from 'antd';
|
3
3
|
import * as React from 'react';
|
4
4
|
import { useState } from 'react';
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as classNames, l as lodashExports, f as _arrayLikeToArray, h as _unsupportedIterableToArray, w as warningOnce, i as _createClass, k as _classCallCheck, m as _defineProperty, n as _slicedToArray, o as warning$1, p as canUseDom, q as _objectSpread2, r as updateCSS, s as removeCSS, v as _arrayWithHoles, x as _nonIterableRest, y as resetWarned$1, F as FastColor, z as generate, A as presetPrimaryColors, B as presetPalettes, G as _inherits, H as _createSuper, J as _assertThisInitialized, K as _objectWithoutProperties, M as IconContext, I as Input } from './AntdIcon-
|
2
|
-
import { Button as Button$1, Cascader, Modal as Modal$1,
|
1
|
+
import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as classNames, l as lodashExports, f as _arrayLikeToArray, h as _unsupportedIterableToArray, w as warningOnce, i as _createClass, k as _classCallCheck, m as _defineProperty, n as _slicedToArray, o as warning$1, p as canUseDom, q as _objectSpread2, r as updateCSS, s as removeCSS, v as _arrayWithHoles, x as _nonIterableRest, y as resetWarned$1, F as FastColor, z as generate, A as presetPrimaryColors, B as presetPalettes, G as _inherits, H as _createSuper, J as _assertThisInitialized, K as _objectWithoutProperties, M as IconContext, I as Input } from './AntdIcon-CfjDMPv2.js';
|
2
|
+
import { Button as Button$1, Cascader, Modal as Modal$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2, Table as Table$1, Tabs as Tabs$1, Space as Space$1, Card, Skeleton as Skeleton$1, Popover as Popover$1, Badge as Badge$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Typography, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
|
3
3
|
import * as React from 'react';
|
4
4
|
import React__default, { version as version$1, isValidElement, useLayoutEffect as useLayoutEffect$1, useEffect, useRef, useMemo as useMemo$1, useCallback, useState, createContext, memo, useReducer, useContext, Component } from 'react';
|
5
5
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
|
6
6
|
import { useLocation, useNavigate } from 'react-router';
|
7
|
-
import { u as useToast
|
7
|
+
import { u as useToast } from './useToast-DL7nQTK1.js';
|
8
8
|
|
9
9
|
const Button = (props) => {
|
10
10
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Button$1, { ...props });
|
@@ -5192,71 +5192,6 @@ const SettingTable = (props) => {
|
|
5192
5192
|
);
|
5193
5193
|
};
|
5194
5194
|
|
5195
|
-
const typeColorMap = {
|
5196
|
-
error: "red",
|
5197
|
-
info: "blue",
|
5198
|
-
success: "green",
|
5199
|
-
warning: "yellow"
|
5200
|
-
};
|
5201
|
-
const Badge = ({ type, children, customColor, ...rest }) => {
|
5202
|
-
const color = type ? typeColorMap[type] : customColor;
|
5203
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Badge$1, { color, ...rest, children });
|
5204
|
-
};
|
5205
|
-
|
5206
|
-
const groupHeadingButtonItems = [
|
5207
|
-
{ label: "Tất cả", value: 1155, keyActive: 1 },
|
5208
|
-
{ label: "Hoạt động", value: 15, keyActive: 2 },
|
5209
|
-
{ label: "Ngưng hoạt động", value: 16, keyActive: 3 },
|
5210
|
-
{ label: "Tạo mới", value: 12, keyActive: 4 },
|
5211
|
-
{ label: "Chờ duyệt", value: 43, keyActive: 5 },
|
5212
|
-
{ label: "Từ chối duyệt", value: 34, keyActive: 6 },
|
5213
|
-
{ label: "Đã xoá", value: 23, keyActive: 7 }
|
5214
|
-
];
|
5215
|
-
const ButtonBadge = (props) => {
|
5216
|
-
const { label, value, active, setKeyActive, keyActive } = props;
|
5217
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
5218
|
-
Button,
|
5219
|
-
{
|
5220
|
-
className: twMerge(
|
5221
|
-
"ml-1 mt-1 !rounded-[8px] !text-[12px]",
|
5222
|
-
active ? "!border-[#007BE5] !bg-[#E5F4FF] !font-medium" : "!border-[white] !shadow-none"
|
5223
|
-
),
|
5224
|
-
onClick: () => setKeyActive(keyActive),
|
5225
|
-
children: [
|
5226
|
-
label,
|
5227
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5228
|
-
Badge,
|
5229
|
-
{
|
5230
|
-
count: value,
|
5231
|
-
color: `${active ? "#BDE3FF]" : "#EEEEF0"}`,
|
5232
|
-
className: twMerge(
|
5233
|
-
"!text-[#4D4D57] !rounded-[8px]",
|
5234
|
-
active ? "customBadgeActive" : "customBadge"
|
5235
|
-
)
|
5236
|
-
}
|
5237
|
-
)
|
5238
|
-
]
|
5239
|
-
}
|
5240
|
-
);
|
5241
|
-
};
|
5242
|
-
const GroupHeadingButton = () => {
|
5243
|
-
const [keyActive, setKeyActive] = useState(1);
|
5244
|
-
const [items, setItems] = useState(
|
5245
|
-
groupHeadingButtonItems
|
5246
|
-
);
|
5247
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pb-[15px]", children: items?.map((i, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5248
|
-
ButtonBadge,
|
5249
|
-
{
|
5250
|
-
label: i.label,
|
5251
|
-
value: i.value,
|
5252
|
-
active: i.keyActive === keyActive,
|
5253
|
-
setKeyActive,
|
5254
|
-
keyActive: i.keyActive
|
5255
|
-
},
|
5256
|
-
index
|
5257
|
-
)) });
|
5258
|
-
};
|
5259
|
-
|
5260
5195
|
const Breadcrumb = (props) => {
|
5261
5196
|
const { containerClassName, breadcrumbClassName, ...restProps } = props;
|
5262
5197
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb$1, { className: breadcrumbClassName, ...restProps }) });
|
@@ -5319,7 +5254,8 @@ const HeadingTable = (props) => {
|
|
5319
5254
|
showSetting,
|
5320
5255
|
renderHeadingSearch,
|
5321
5256
|
rightHeadingContent,
|
5322
|
-
breadCrumb
|
5257
|
+
breadCrumb,
|
5258
|
+
renderGroupHeadingButton
|
5323
5259
|
} = props;
|
5324
5260
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
5325
5261
|
Heading,
|
@@ -5331,7 +5267,7 @@ const HeadingTable = (props) => {
|
|
5331
5267
|
renderHeadingSearch && renderHeadingSearch(),
|
5332
5268
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, { className: "!my-5 !mb-4" }),
|
5333
5269
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
5334
|
-
|
5270
|
+
renderGroupHeadingButton,
|
5335
5271
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5336
5272
|
IconSettingTable,
|
5337
5273
|
{
|
@@ -5634,6 +5570,7 @@ const Table = ({
|
|
5634
5570
|
renderHeadingSearch,
|
5635
5571
|
rightHeadingContent,
|
5636
5572
|
menu,
|
5573
|
+
renderGroupHeadingButton,
|
5637
5574
|
showIndexColumn = true,
|
5638
5575
|
...rest
|
5639
5576
|
}) => {
|
@@ -5771,7 +5708,8 @@ const Table = ({
|
|
5771
5708
|
renderHeadingSearch,
|
5772
5709
|
setOpenStting,
|
5773
5710
|
showSetting,
|
5774
|
-
breadCrumb: generateBreadcrumb
|
5711
|
+
breadCrumb: generateBreadcrumb,
|
5712
|
+
renderGroupHeadingButton
|
5775
5713
|
}
|
5776
5714
|
),
|
5777
5715
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -5986,6 +5924,17 @@ const Container = ({
|
|
5986
5924
|
);
|
5987
5925
|
};
|
5988
5926
|
|
5927
|
+
const typeColorMap = {
|
5928
|
+
error: "red",
|
5929
|
+
info: "blue",
|
5930
|
+
success: "green",
|
5931
|
+
warning: "yellow"
|
5932
|
+
};
|
5933
|
+
const Badge = ({ type, children, customColor, ...rest }) => {
|
5934
|
+
const color = type ? typeColorMap[type] : customColor;
|
5935
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Badge$1, { color, ...rest, children });
|
5936
|
+
};
|
5937
|
+
|
5989
5938
|
const Col = (props) => {
|
5990
5939
|
const { colClassName, ...restProps } = props;
|
5991
5940
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Col$1, { className: colClassName, ...restProps });
|
@@ -12771,6 +12720,27 @@ const CategoryStatus = ({ status }) => {
|
|
12771
12720
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
|
12772
12721
|
};
|
12773
12722
|
|
12723
|
+
const START_PAGE = 1;
|
12724
|
+
const START_PAGE_SIZE = 10;
|
12725
|
+
const PAGE_NUMBER = "page_number";
|
12726
|
+
const PAGE_SIZE = "page_size";
|
12727
|
+
const SORT_BY = "SortBy";
|
12728
|
+
const SORT_DESC = "SortDesc";
|
12729
|
+
var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
|
12730
|
+
TypeActionRowTable2["DELETE"] = "DELETE";
|
12731
|
+
TypeActionRowTable2["EDIT"] = "EDIT";
|
12732
|
+
TypeActionRowTable2["UNDO"] = "UNDO";
|
12733
|
+
TypeActionRowTable2["CANCELUNDO"] = "CANCELUNDO";
|
12734
|
+
TypeActionRowTable2["CHECKIN"] = "CHECKIN";
|
12735
|
+
TypeActionRowTable2["PRINT"] = "PRINT";
|
12736
|
+
TypeActionRowTable2["PAYMENT"] = "PAYMENT";
|
12737
|
+
TypeActionRowTable2["PLAY"] = "PLAY";
|
12738
|
+
TypeActionRowTable2["PAUSE"] = "PAUSE";
|
12739
|
+
TypeActionRowTable2["DOWNLOAD"] = "DOWNLOAD";
|
12740
|
+
TypeActionRowTable2["VIEW"] = "VIEW";
|
12741
|
+
return TypeActionRowTable2;
|
12742
|
+
})(TypeActionRowTable || {});
|
12743
|
+
|
12774
12744
|
const ActionRowTable = ({
|
12775
12745
|
type,
|
12776
12746
|
contentTooltip,
|
@@ -12808,4 +12778,4 @@ const ActionRowTable = ({
|
|
12808
12778
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: renderAction() });
|
12809
12779
|
};
|
12810
12780
|
|
12811
|
-
export { Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, BulkAction as U, ConfirmModal as V, Watermark as W, ErrorBoundary as X, CategoryStatus as Y, ActionRowTable as Z, Tooltip as a, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider$1 as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
|
12781
|
+
export { START_PAGE_SIZE as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Anchor as E, Flex as F, Appfix as G, Heading as H, AutoComplete as I, PnkxCollapse as J, PnkxColorPicker as K, Layout as L, Modal as M, Empty as N, Image as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, BulkAction as U, ConfirmModal as V, Watermark as W, ErrorBoundary as X, CategoryStatus as Y, ActionRowTable as Z, START_PAGE as _, Tooltip as a, PAGE_NUMBER as a0, PAGE_SIZE as a1, SORT_BY as a2, SORT_DESC as a3, TypeActionRowTable as a4, Tabs as b, SearchFiltersForm as c, Container as d, Badge as e, Col as f, Breadcrumb as g, Space as h, Splitter as i, Menu as j, Pagination as k, Steps as l, Sidebar as m, Tag as n, Divider$1 as o, Spin as p, Drawer as q, Popconfirm as r, Result as s, typeColorMap as t, Rate as u, Segmented as v, Statistic as w, Timeline as x, Tour as y, Tree as z };
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { message } from 'antd';
|
2
|
+
|
3
|
+
const useMessage = (defaultProps) => {
|
4
|
+
return (overrideProps) => {
|
5
|
+
const mergedProps = {
|
6
|
+
type: defaultProps?.type,
|
7
|
+
content: defaultProps?.content,
|
8
|
+
...defaultProps,
|
9
|
+
...overrideProps
|
10
|
+
};
|
11
|
+
message.open(mergedProps);
|
12
|
+
};
|
13
|
+
};
|
14
|
+
|
15
|
+
export { useMessage as u };
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { notification } from 'antd';
|
2
|
+
|
3
|
+
const useToast = (defaultProps) => {
|
4
|
+
const toast = (overrideProps) => {
|
5
|
+
const { type = "info", ...rest } = { ...defaultProps, ...overrideProps };
|
6
|
+
const mergedProps = {
|
7
|
+
message: defaultProps?.message,
|
8
|
+
showProgress: true,
|
9
|
+
pauseOnHover: false,
|
10
|
+
...defaultProps,
|
11
|
+
...rest
|
12
|
+
};
|
13
|
+
notification[type](mergedProps);
|
14
|
+
};
|
15
|
+
toast.success = (props) => toast({ ...props, type: "success" });
|
16
|
+
toast.error = (props) => toast({ ...props, type: "error" });
|
17
|
+
toast.info = (props) => toast({ ...props, type: "info" });
|
18
|
+
toast.warning = (props) => toast({ ...props, type: "warning" });
|
19
|
+
return toast;
|
20
|
+
};
|
21
|
+
|
22
|
+
export { useToast as u };
|
package/es/fields/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-
|
2
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-
|
1
|
+
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-CfjDMPv2.js';
|
2
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-BRvdbb0u.js';
|
package/es/hooks/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { u as useToast } from '../chunks/
|
2
|
-
export { u as
|
1
|
+
export { u as useToast } from '../chunks/useToast-DL7nQTK1.js';
|
2
|
+
export { u as useMessage } from '../chunks/useMessage-CADDGtSx.js';
|
package/es/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/index-
|
2
|
-
export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-
|
1
|
+
export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, a0 as PAGE_NUMBER, a1 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a2 as SORT_BY, a3 as SORT_DESC, _ as START_PAGE, $ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a4 as TypeActionRowTable, W as Watermark, t as typeColorMap } from './chunks/index-D_iOcbs8.js';
|
2
|
+
export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-CfjDMPv2.js';
|
3
3
|
import 'react-router';
|
4
|
-
export {
|
5
|
-
export {
|
6
|
-
export { u as
|
4
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-BRvdbb0u.js';
|
5
|
+
export { u as useToast } from './chunks/useToast-DL7nQTK1.js';
|
6
|
+
export { u as useMessage } from './chunks/useMessage-CADDGtSx.js';
|
package/es/ui/index.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/index-
|
2
|
-
export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-
|
1
|
+
export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, a0 as PAGE_NUMBER, a1 as PAGE_SIZE, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, a2 as SORT_BY, a3 as SORT_DESC, _ as START_PAGE, $ as START_PAGE_SIZE, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, a4 as TypeActionRowTable, W as Watermark, t as typeColorMap } from '../chunks/index-D_iOcbs8.js';
|
2
|
+
export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-CfjDMPv2.js';
|
3
3
|
import 'react-router';
|
4
|
-
export { P as PAGE_NUMBER, b as PAGE_SIZE, c as SORT_BY, d as SORT_DESC, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable } from '../chunks/table-CrhlYiL4.js';
|
package/package.json
CHANGED
package/types/hooks.d.ts
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
import { ArgsProps } from 'antd/es/notification';
|
2
2
|
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
3
|
-
import { default as default_2 } from 'react';
|
4
|
-
|
5
|
-
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
6
3
|
|
7
4
|
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
8
5
|
type?: ArgsProps_2["type"];
|
@@ -13,25 +10,6 @@ export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
|
13
10
|
type?: "success" | "error" | "info" | "warning";
|
14
11
|
};
|
15
12
|
|
16
|
-
export declare interface PaginationFilters {
|
17
|
-
page_size: number;
|
18
|
-
page_number: number;
|
19
|
-
}
|
20
|
-
|
21
|
-
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
22
|
-
filters: InitialFiltersSearch<T>;
|
23
|
-
rowsSelected: default_2.Key[];
|
24
|
-
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
25
|
-
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
26
|
-
goToPage: (page_number: number) => void;
|
27
|
-
changeRowlimit: (value: number) => void;
|
28
|
-
resetToInitialFilters: () => void;
|
29
|
-
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
30
|
-
handleChangePage: (nextPage: number) => void;
|
31
|
-
handleRequestSort: (sortField: string | number | symbol) => void;
|
32
|
-
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
33
|
-
};
|
34
|
-
|
35
13
|
export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
|
36
14
|
|
37
15
|
export declare const useToast: (defaultProps?: OptionalArgsToast) => {
|
package/types/index.d.ts
CHANGED
@@ -50,7 +50,7 @@ import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
|
|
50
50
|
import { MenuProps as MenuProps_3 } from 'antd/es/menu';
|
51
51
|
import { ModalProps as ModalProps_2 } from 'antd';
|
52
52
|
import { Pagination as Pagination_2 } from 'antd';
|
53
|
-
import { PaginationFilters
|
53
|
+
import { PaginationFilters } from '../../../../../../../../../../../src/components/hooks';
|
54
54
|
import { PaginationLocale } from 'rc-pagination';
|
55
55
|
import { PaginationProps as PaginationProps_2 } from 'antd';
|
56
56
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
@@ -400,8 +400,6 @@ export declare interface HeadingProps {
|
|
400
400
|
declare const Image_2: React.FC<ImageProps>;
|
401
401
|
export { Image_2 as Image }
|
402
402
|
|
403
|
-
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
404
|
-
|
405
403
|
export declare const Input: (props: InputProps) => JSX.Element;
|
406
404
|
|
407
405
|
export declare interface InputProps extends InputProps_2 {
|
@@ -515,11 +513,6 @@ export declare type PaginationConfig = Omit<PaginationProps, "rootClassName"> &
|
|
515
513
|
position?: "top" | "bottom" | "both";
|
516
514
|
};
|
517
515
|
|
518
|
-
export declare interface PaginationFilters {
|
519
|
-
page_size: number;
|
520
|
-
page_number: number;
|
521
|
-
}
|
522
|
-
|
523
516
|
export { PaginationLocale }
|
524
517
|
|
525
518
|
export declare type PaginationProps = PaginationProps_2;
|
@@ -723,7 +716,7 @@ declare type TabItem = {
|
|
723
716
|
disabled?: boolean;
|
724
717
|
};
|
725
718
|
|
726
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.Element;
|
719
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, renderGroupHeadingButton, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.Element;
|
727
720
|
|
728
721
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
729
722
|
|
@@ -734,7 +727,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
734
727
|
columns: TableColumnsType<T>;
|
735
728
|
loading?: boolean;
|
736
729
|
totalItems?: number;
|
737
|
-
filters:
|
730
|
+
filters: PaginationFilters & {
|
738
731
|
status?: number;
|
739
732
|
};
|
740
733
|
onChangePage: (page: number) => void;
|
@@ -750,6 +743,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
750
743
|
renderHeadingSearch: () => ReactNode;
|
751
744
|
rightHeadingContent: ReactNode;
|
752
745
|
menu: Array<MenuProps>;
|
746
|
+
renderGroupHeadingButton: ReactNode;
|
753
747
|
showIndexColumn?: boolean;
|
754
748
|
}
|
755
749
|
|
@@ -859,20 +853,6 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
859
853
|
afterOnChange?: (fileList: UploadFile[]) => void;
|
860
854
|
}
|
861
855
|
|
862
|
-
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
863
|
-
filters: InitialFiltersSearch<T>;
|
864
|
-
rowsSelected: default_2.Key[];
|
865
|
-
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
866
|
-
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
867
|
-
goToPage: (page_number: number) => void;
|
868
|
-
changeRowlimit: (value: number) => void;
|
869
|
-
resetToInitialFilters: () => void;
|
870
|
-
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
871
|
-
handleChangePage: (nextPage: number) => void;
|
872
|
-
handleRequestSort: (sortField: string | number | symbol) => void;
|
873
|
-
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
874
|
-
};
|
875
|
-
|
876
856
|
export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
|
877
857
|
|
878
858
|
export declare const useToast: (defaultProps?: OptionalArgsToast) => {
|
package/types/ui.d.ts
CHANGED
@@ -564,7 +564,7 @@ declare type TabItem = {
|
|
564
564
|
disabled?: boolean;
|
565
565
|
};
|
566
566
|
|
567
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.Element;
|
567
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, renderGroupHeadingButton, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX.Element;
|
568
568
|
|
569
569
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
570
570
|
|
@@ -591,6 +591,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
591
591
|
renderHeadingSearch: () => ReactNode;
|
592
592
|
rightHeadingContent: ReactNode;
|
593
593
|
menu: Array<MenuProps>;
|
594
|
+
renderGroupHeadingButton: ReactNode;
|
594
595
|
showIndexColumn?: boolean;
|
595
596
|
}
|
596
597
|
|