@pnkx-lib/ui 1.9.83 → 1.9.85
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-bLE_HmL-.js → AntdIcon-OdNt_XE3.js} +1254 -1
- package/es/chunks/{Switch-Dbw7Aemy.js → Switch-BpQVmWXF.js} +1 -1
- package/es/chunks/{index-Bp_HTq2H.js → index-BmfEnmGs.js} +102 -19
- 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/fields.d.ts +7 -4
- package/types/hooks.d.ts +5 -33
- package/types/index.d.ts +68 -67
- package/types/ui.d.ts +55 -30
- 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-OdNt_XE3.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, 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,
|
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-OdNt_XE3.js';
|
2
|
+
import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$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, 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,6 +5192,70 @@ 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 ButtonBadge = (props) => {
|
5207
|
+
const {
|
5208
|
+
buttonItem,
|
5209
|
+
active,
|
5210
|
+
handleClickGroupHeadingButtonItem,
|
5211
|
+
setKeyActive
|
5212
|
+
} = props;
|
5213
|
+
const handleClick = (event) => {
|
5214
|
+
handleClickGroupHeadingButtonItem && handleClickGroupHeadingButtonItem(buttonItem, event);
|
5215
|
+
setKeyActive(buttonItem.keyActive);
|
5216
|
+
};
|
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: handleClick,
|
5225
|
+
children: [
|
5226
|
+
buttonItem.label,
|
5227
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5228
|
+
Badge,
|
5229
|
+
{
|
5230
|
+
count: buttonItem.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 = (props) => {
|
5243
|
+
const { handleClickGroupHeadingButtonItem, groupHeadingButtonItems } = props;
|
5244
|
+
const [keyActive, setKeyActive] = useState(
|
5245
|
+
groupHeadingButtonItems?.[0].keyActive
|
5246
|
+
);
|
5247
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pb-[15px]", children: groupHeadingButtonItems?.map((i, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5248
|
+
ButtonBadge,
|
5249
|
+
{
|
5250
|
+
buttonItem: i,
|
5251
|
+
active: i.keyActive === keyActive,
|
5252
|
+
setKeyActive,
|
5253
|
+
handleClickGroupHeadingButtonItem
|
5254
|
+
},
|
5255
|
+
index
|
5256
|
+
)) });
|
5257
|
+
};
|
5258
|
+
|
5195
5259
|
const Breadcrumb = (props) => {
|
5196
5260
|
const { containerClassName, breadcrumbClassName, ...restProps } = props;
|
5197
5261
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb$1, { className: breadcrumbClassName, ...restProps }) });
|
@@ -5255,7 +5319,8 @@ const HeadingTable = (props) => {
|
|
5255
5319
|
renderHeadingSearch,
|
5256
5320
|
rightHeadingContent,
|
5257
5321
|
breadCrumb,
|
5258
|
-
|
5322
|
+
groupHeadingButtonItems,
|
5323
|
+
handleClickGroupHeadingButtonItem
|
5259
5324
|
} = props;
|
5260
5325
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
5261
5326
|
Heading,
|
@@ -5267,7 +5332,13 @@ const HeadingTable = (props) => {
|
|
5267
5332
|
renderHeadingSearch && renderHeadingSearch(),
|
5268
5333
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, { className: "!my-5 !mb-4" }),
|
5269
5334
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
5270
|
-
|
5335
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5336
|
+
GroupHeadingButton,
|
5337
|
+
{
|
5338
|
+
groupHeadingButtonItems,
|
5339
|
+
handleClickGroupHeadingButtonItem
|
5340
|
+
}
|
5341
|
+
),
|
5271
5342
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5272
5343
|
IconSettingTable,
|
5273
5344
|
{
|
@@ -5570,7 +5641,8 @@ const Table = ({
|
|
5570
5641
|
renderHeadingSearch,
|
5571
5642
|
rightHeadingContent,
|
5572
5643
|
menu,
|
5573
|
-
|
5644
|
+
groupHeadingButtonItems,
|
5645
|
+
handleClickGroupHeadingButtonItem,
|
5574
5646
|
showIndexColumn = true,
|
5575
5647
|
...rest
|
5576
5648
|
}) => {
|
@@ -5709,7 +5781,8 @@ const Table = ({
|
|
5709
5781
|
setOpenStting,
|
5710
5782
|
showSetting,
|
5711
5783
|
breadCrumb: generateBreadcrumb,
|
5712
|
-
|
5784
|
+
groupHeadingButtonItems,
|
5785
|
+
handleClickGroupHeadingButtonItem
|
5713
5786
|
}
|
5714
5787
|
),
|
5715
5788
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -5924,17 +5997,6 @@ const Container = ({
|
|
5924
5997
|
);
|
5925
5998
|
};
|
5926
5999
|
|
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
|
-
|
5938
6000
|
const Col = (props) => {
|
5939
6001
|
const { colClassName, ...restProps } = props;
|
5940
6002
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Col$1, { className: colClassName, ...restProps });
|
@@ -12720,6 +12782,27 @@ const CategoryStatus = ({ status }) => {
|
|
12720
12782
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
|
12721
12783
|
};
|
12722
12784
|
|
12785
|
+
const START_PAGE = 1;
|
12786
|
+
const START_PAGE_SIZE = 10;
|
12787
|
+
const PAGE_NUMBER = "page_number";
|
12788
|
+
const PAGE_SIZE = "page_size";
|
12789
|
+
const SORT_BY = "SortBy";
|
12790
|
+
const SORT_DESC = "SortDesc";
|
12791
|
+
var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
|
12792
|
+
TypeActionRowTable2["DELETE"] = "DELETE";
|
12793
|
+
TypeActionRowTable2["EDIT"] = "EDIT";
|
12794
|
+
TypeActionRowTable2["UNDO"] = "UNDO";
|
12795
|
+
TypeActionRowTable2["CANCELUNDO"] = "CANCELUNDO";
|
12796
|
+
TypeActionRowTable2["CHECKIN"] = "CHECKIN";
|
12797
|
+
TypeActionRowTable2["PRINT"] = "PRINT";
|
12798
|
+
TypeActionRowTable2["PAYMENT"] = "PAYMENT";
|
12799
|
+
TypeActionRowTable2["PLAY"] = "PLAY";
|
12800
|
+
TypeActionRowTable2["PAUSE"] = "PAUSE";
|
12801
|
+
TypeActionRowTable2["DOWNLOAD"] = "DOWNLOAD";
|
12802
|
+
TypeActionRowTable2["VIEW"] = "VIEW";
|
12803
|
+
return TypeActionRowTable2;
|
12804
|
+
})(TypeActionRowTable || {});
|
12805
|
+
|
12723
12806
|
const ActionRowTable = ({
|
12724
12807
|
type,
|
12725
12808
|
contentTooltip,
|
@@ -12757,4 +12840,4 @@ const ActionRowTable = ({
|
|
12757
12840
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: renderAction() });
|
12758
12841
|
};
|
12759
12842
|
|
12760
|
-
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 };
|
12843
|
+
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-OdNt_XE3.js';
|
2
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-BpQVmWXF.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-BmfEnmGs.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-OdNt_XE3.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-BpQVmWXF.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-BmfEnmGs.js';
|
2
|
+
export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-OdNt_XE3.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/fields.d.ts
CHANGED
@@ -13,7 +13,7 @@ import { RangePickerProps } from 'antd/es/date-picker';
|
|
13
13
|
import * as React_2 from 'react';
|
14
14
|
import { ReactDatePickerProps } from 'react-datepicker';
|
15
15
|
import { SelectProps } from 'antd';
|
16
|
-
import { SwitchProps } from 'antd';
|
16
|
+
import { SwitchProps as SwitchProps_2 } from 'antd';
|
17
17
|
import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
|
18
18
|
import { UploadFile } from 'antd';
|
19
19
|
import { UploadProps } from 'antd';
|
@@ -128,12 +128,13 @@ export declare interface SelectFieldProps extends SelectProps {
|
|
128
128
|
label?: string;
|
129
129
|
required?: boolean;
|
130
130
|
afterOnChange?: (value: any) => void;
|
131
|
-
|
131
|
+
classNameContainer?: string;
|
132
|
+
classNameSelect?: string;
|
132
133
|
}
|
133
134
|
|
134
|
-
export declare const
|
135
|
+
export declare const Switch: (props: SwitchProps) => JSX_2.Element;
|
135
136
|
|
136
|
-
export declare interface
|
137
|
+
export declare interface SwitchProps extends Omit<SwitchProps_2, "onChange"> {
|
137
138
|
field?: ControllerRenderProps<any, any>;
|
138
139
|
formState?: UseFormStateReturn<any>;
|
139
140
|
label?: string;
|
@@ -179,6 +180,8 @@ declare type TPositionRadio = "before" | "after";
|
|
179
180
|
|
180
181
|
declare type TSize = "small" | "medium" | "large";
|
181
182
|
|
183
|
+
export declare const UploadField: (props: UploadFieldProps) => JSX_2.Element;
|
184
|
+
|
182
185
|
export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "onChange" | "fileList"> {
|
183
186
|
field?: ControllerRenderProps<any, any>;
|
184
187
|
formState?: UseFormStateReturn<any>;
|
package/types/hooks.d.ts
CHANGED
@@ -1,37 +1,15 @@
|
|
1
|
-
import { ArgsProps } from 'antd/
|
2
|
-
import { ArgsProps as ArgsProps_2 } from 'antd/
|
3
|
-
import { default as default_2 } from 'react';
|
1
|
+
import { ArgsProps } from 'antd/es/notification';
|
2
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
4
3
|
|
5
|
-
export declare type
|
6
|
-
|
7
|
-
export declare type OptionalArgsMessage = Partial<ArgsProps> & {
|
8
|
-
type?: ArgsProps["type"];
|
4
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
5
|
+
type?: ArgsProps_2["type"];
|
9
6
|
};
|
10
7
|
|
11
|
-
export declare type OptionalArgsToast = Partial<
|
8
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
12
9
|
message?: React.ReactNode;
|
13
10
|
type?: "success" | "error" | "info" | "warning";
|
14
11
|
};
|
15
12
|
|
16
|
-
export declare interface PaginationFilters {
|
17
|
-
PageSize: number;
|
18
|
-
PageIndex: 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: (PageIndex: 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) => {
|
@@ -42,10 +20,4 @@ export declare const useToast: (defaultProps?: OptionalArgsToast) => {
|
|
42
20
|
warning(props?: OptionalArgsToast): void;
|
43
21
|
};
|
44
22
|
|
45
|
-
export declare const useToggle: () => {
|
46
|
-
open: boolean;
|
47
|
-
toggle: () => void;
|
48
|
-
shouldRender: boolean;
|
49
|
-
};
|
50
|
-
|
51
23
|
export { }
|
package/types/index.d.ts
CHANGED
@@ -2,8 +2,8 @@ import { AffixProps } from 'antd';
|
|
2
2
|
import { AlertProps as AlertProps_2 } from 'antd';
|
3
3
|
import { Anchor as Anchor_2 } from 'antd';
|
4
4
|
import { AnchorProps } from 'antd';
|
5
|
-
import { ArgsProps } from 'antd/
|
6
|
-
import { ArgsProps as ArgsProps_2 } from 'antd/
|
5
|
+
import { ArgsProps } from 'antd/es/notification';
|
6
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
7
7
|
import { AutoCompleteProps as AutoCompleteProps_2 } from 'antd';
|
8
8
|
import { BadgeProps as BadgeProps_2 } from 'antd';
|
9
9
|
import { BasicProps } from 'antd/es/layout/layout';
|
@@ -47,10 +47,10 @@ import { JSX as JSX_3 } from 'react';
|
|
47
47
|
import { MenuDividerProps } from 'antd/es/menu';
|
48
48
|
import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
|
49
49
|
import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
|
50
|
-
import { MenuProps as
|
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/interface/common';
|
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';
|
@@ -81,7 +81,7 @@ import { StepProps as StepProps_2 } from 'antd';
|
|
81
81
|
import { Steps as Steps_2 } from 'antd';
|
82
82
|
import { StepsProps as StepsProps_2 } from 'antd';
|
83
83
|
import { SubMenuProps as SubMenuProps_2 } from 'antd/es/menu';
|
84
|
-
import { SwitchProps } from 'antd';
|
84
|
+
import { SwitchProps as SwitchProps_2 } from 'antd';
|
85
85
|
import { TableColumnsType as TableColumnsType_2 } from 'antd';
|
86
86
|
import { TableProps } from 'antd/lib/table';
|
87
87
|
import { TabsProps as TabsProps_2 } from 'antd';
|
@@ -101,7 +101,6 @@ import { UseFormReturn } from 'react-hook-form';
|
|
101
101
|
import { UseFormSetValue } from 'react-hook-form';
|
102
102
|
import { UseFormStateReturn } from 'react-hook-form';
|
103
103
|
import { WatermarkProps } from 'antd';
|
104
|
-
import * as yup from 'yup';
|
105
104
|
|
106
105
|
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX_2.Element;
|
107
106
|
|
@@ -388,6 +387,12 @@ export declare type FlexProps = FlexProps_2;
|
|
388
387
|
|
389
388
|
export declare type FlexPropsUnion = BaseProps_7 & FlexProps;
|
390
389
|
|
390
|
+
declare interface GroupHeadingButtonItem {
|
391
|
+
label: string;
|
392
|
+
value: number;
|
393
|
+
keyActive: number;
|
394
|
+
}
|
395
|
+
|
391
396
|
export declare const Heading: (props: HeadingProps) => JSX_2.Element;
|
392
397
|
|
393
398
|
export declare interface HeadingProps {
|
@@ -401,8 +406,6 @@ export declare interface HeadingProps {
|
|
401
406
|
declare const Image_2: React.FC<ImageProps>;
|
402
407
|
export { Image_2 as Image }
|
403
408
|
|
404
|
-
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
405
|
-
|
406
409
|
export declare const Input: (props: InputProps) => JSX_2.Element;
|
407
410
|
|
408
411
|
export declare interface InputProps extends InputProps_2 {
|
@@ -445,13 +448,47 @@ export declare type LayoutProps = BaseProps_8 & BasicProps;
|
|
445
448
|
|
446
449
|
export declare const Menu: CompoundedMenu;
|
447
450
|
|
448
|
-
export declare type MenuComponentProps = ExtraProps &
|
451
|
+
export declare type MenuComponentProps = ExtraProps & MenuProps_2;
|
449
452
|
|
450
453
|
declare const MenuItem: FC<MenuItemProps>;
|
451
454
|
|
452
455
|
export declare type MenuItemProps = MenuItemProps_2;
|
453
456
|
|
454
|
-
export declare type MenuProps =
|
457
|
+
export declare type MenuProps = {
|
458
|
+
name: string;
|
459
|
+
href: string;
|
460
|
+
icon: default_2.ReactNode;
|
461
|
+
current: boolean;
|
462
|
+
subMenu?: Array<{
|
463
|
+
name: string;
|
464
|
+
href: string;
|
465
|
+
icon: default_2.ReactNode;
|
466
|
+
children?: Array<{
|
467
|
+
name: string;
|
468
|
+
href: string;
|
469
|
+
icon?: default_2.ReactNode;
|
470
|
+
}>;
|
471
|
+
}>;
|
472
|
+
};
|
473
|
+
|
474
|
+
declare type MenuProps_2 = MenuProps_3;
|
475
|
+
|
476
|
+
declare type MenuProps_4 = {
|
477
|
+
name: string;
|
478
|
+
href: string;
|
479
|
+
icon: React.ReactNode;
|
480
|
+
current: boolean;
|
481
|
+
subMenu?: Array<{
|
482
|
+
name: string;
|
483
|
+
href: string;
|
484
|
+
icon: React.ReactNode;
|
485
|
+
children?: Array<{
|
486
|
+
name: string;
|
487
|
+
href: string;
|
488
|
+
icon?: React.ReactNode;
|
489
|
+
}>;
|
490
|
+
}>;
|
491
|
+
};
|
455
492
|
|
456
493
|
export declare const Modal: ({ children, ...rest }: ModalProps) => JSX_2.Element;
|
457
494
|
|
@@ -463,18 +500,18 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
463
500
|
multiple: true;
|
464
501
|
};
|
465
502
|
|
466
|
-
export declare type OptionalArgsMessage = Partial<
|
467
|
-
type?:
|
503
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
504
|
+
type?: ArgsProps_2["type"];
|
468
505
|
};
|
469
506
|
|
470
|
-
export declare type OptionalArgsToast = Partial<
|
507
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
471
508
|
message?: React.ReactNode;
|
472
509
|
type?: "success" | "error" | "info" | "warning";
|
473
510
|
};
|
474
511
|
|
475
|
-
export declare const
|
512
|
+
export declare const PAGE_NUMBER = "page_number";
|
476
513
|
|
477
|
-
export declare const PAGE_SIZE = "
|
514
|
+
export declare const PAGE_SIZE = "page_size";
|
478
515
|
|
479
516
|
export declare const Pagination: typeof Pagination_2;
|
480
517
|
|
@@ -482,11 +519,6 @@ export declare type PaginationConfig = Omit<PaginationProps, "rootClassName"> &
|
|
482
519
|
position?: "top" | "bottom" | "both";
|
483
520
|
};
|
484
521
|
|
485
|
-
export declare interface PaginationFilters {
|
486
|
-
PageSize: number;
|
487
|
-
PageIndex: number;
|
488
|
-
}
|
489
|
-
|
490
522
|
export { PaginationLocale }
|
491
523
|
|
492
524
|
export declare type PaginationProps = PaginationProps_2;
|
@@ -613,24 +645,15 @@ export declare interface SelectFieldProps extends SelectProps {
|
|
613
645
|
label?: string;
|
614
646
|
required?: boolean;
|
615
647
|
afterOnChange?: (value: any) => void;
|
616
|
-
|
648
|
+
classNameContainer?: string;
|
649
|
+
classNameSelect?: string;
|
617
650
|
}
|
618
651
|
|
619
652
|
export declare const Sidebar: ({ children, menu }: SidebarProps) => JSX_2.Element;
|
620
653
|
|
621
654
|
export declare interface SidebarProps {
|
622
655
|
children?: React.ReactNode;
|
623
|
-
menu: Array<
|
624
|
-
name: string;
|
625
|
-
href: string;
|
626
|
-
icon: React.ReactNode;
|
627
|
-
current: boolean;
|
628
|
-
children?: Array<{
|
629
|
-
name: string;
|
630
|
-
href: string;
|
631
|
-
icon?: React.ReactNode;
|
632
|
-
}>;
|
633
|
-
}>;
|
656
|
+
menu: Array<MenuProps_4>;
|
634
657
|
}
|
635
658
|
|
636
659
|
declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
|
@@ -680,9 +703,9 @@ declare const SubMenu: FC<SubMenuProps>;
|
|
680
703
|
|
681
704
|
export declare type SubMenuProps = SubMenuProps_2;
|
682
705
|
|
683
|
-
export declare const
|
706
|
+
export declare const Switch: (props: SwitchProps) => JSX_2.Element;
|
684
707
|
|
685
|
-
export declare interface
|
708
|
+
export declare interface SwitchProps extends Omit<SwitchProps_2, "onChange"> {
|
686
709
|
field?: ControllerRenderProps<any, any>;
|
687
710
|
formState?: UseFormStateReturn<any>;
|
688
711
|
label?: string;
|
@@ -699,20 +722,18 @@ declare type TabItem = {
|
|
699
722
|
disabled?: boolean;
|
700
723
|
};
|
701
724
|
|
702
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey,
|
725
|
+
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, groupHeadingButtonItems, handleClickGroupHeadingButtonItem, showIndexColumn, ...rest }: TableCommonProps<T>) => JSX_2.Element;
|
703
726
|
|
704
727
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
705
728
|
|
706
|
-
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
707
|
-
editable?: boolean;
|
708
|
-
})[];
|
729
|
+
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {})[];
|
709
730
|
|
710
731
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
711
|
-
dataSource
|
732
|
+
dataSource?: T[];
|
712
733
|
columns: TableColumnsType<T>;
|
713
734
|
loading?: boolean;
|
714
|
-
totalItems
|
715
|
-
filters:
|
735
|
+
totalItems?: number;
|
736
|
+
filters: PaginationFilters & {
|
716
737
|
status?: number;
|
717
738
|
};
|
718
739
|
onChangePage: (page: number) => void;
|
@@ -722,17 +743,15 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
722
743
|
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
723
744
|
onRowClick?: (record: T) => void;
|
724
745
|
rowKey?: string | ((record: T) => string);
|
725
|
-
className?: string;
|
726
|
-
editable?: boolean;
|
727
|
-
onSave?: (data: T) => void;
|
728
746
|
titleSettingTableModal?: string;
|
729
747
|
showSetting?: boolean;
|
730
748
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
731
749
|
renderHeadingSearch: () => ReactNode;
|
732
750
|
rightHeadingContent: ReactNode;
|
733
|
-
|
734
|
-
|
735
|
-
|
751
|
+
menu: Array<MenuProps>;
|
752
|
+
groupHeadingButtonItems: GroupHeadingButtonItem[];
|
753
|
+
handleClickGroupHeadingButtonItem?: (value?: GroupHeadingButtonItem, e?: default_2.MouseEvent<HTMLElement, MouseEvent>) => void;
|
754
|
+
showIndexColumn?: boolean;
|
736
755
|
}
|
737
756
|
|
738
757
|
export declare const Tabs: default_2.FC<TabsProps>;
|
@@ -826,6 +845,8 @@ export declare const Typography: {
|
|
826
845
|
Text: (props: TextProps) => JSX_2.Element;
|
827
846
|
};
|
828
847
|
|
848
|
+
export declare const UploadField: (props: UploadFieldProps) => JSX_2.Element;
|
849
|
+
|
829
850
|
export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "onChange" | "fileList"> {
|
830
851
|
field?: ControllerRenderProps<any, any>;
|
831
852
|
formState?: UseFormStateReturn<any>;
|
@@ -839,20 +860,6 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
839
860
|
afterOnChange?: (fileList: UploadFile[]) => void;
|
840
861
|
}
|
841
862
|
|
842
|
-
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
843
|
-
filters: InitialFiltersSearch<T>;
|
844
|
-
rowsSelected: default_2.Key[];
|
845
|
-
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
846
|
-
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
847
|
-
goToPage: (PageIndex: number) => void;
|
848
|
-
changeRowlimit: (value: number) => void;
|
849
|
-
resetToInitialFilters: () => void;
|
850
|
-
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
851
|
-
handleChangePage: (nextPage: number) => void;
|
852
|
-
handleRequestSort: (sortField: string | number | symbol) => void;
|
853
|
-
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
854
|
-
};
|
855
|
-
|
856
863
|
export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
|
857
864
|
|
858
865
|
export declare const useToast: (defaultProps?: OptionalArgsToast) => {
|
@@ -863,12 +870,6 @@ export declare const useToast: (defaultProps?: OptionalArgsToast) => {
|
|
863
870
|
warning(props?: OptionalArgsToast): void;
|
864
871
|
};
|
865
872
|
|
866
|
-
export declare const useToggle: () => {
|
867
|
-
open: boolean;
|
868
|
-
toggle: () => void;
|
869
|
-
shouldRender: boolean;
|
870
|
-
};
|
871
|
-
|
872
873
|
export declare const Watermark: ({ ...rest }: WatermarkProps) => JSX_2.Element;
|
873
874
|
|
874
875
|
export { }
|