@pnkx-lib/ui 1.9.39 → 1.9.42
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/dist/style.css +2 -2
- package/es/chunks/Radio-CZubVPdR.js +103 -0
- package/es/chunks/{Switch-5fY0eC69.js → Switch-jt4L5Z_9.js} +18 -61
- package/es/chunks/{index-CRvByTPr.js → index-DLRC7p6n.js} +695 -945
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -3
- package/es/ui/index.js +2 -2
- package/package.json +1 -1
- package/types/fields.d.ts +11 -11
- package/types/index.d.ts +46 -52
- package/types/ui.d.ts +36 -42
- package/es/chunks/Radio-Cy7MuC6V.js +0 -53
@@ -1,5 +1,5 @@
|
|
1
|
-
import { j as jsxRuntimeExports, c as Icon, _ as _extends, d as _typeof, P as PnkxField, C as CheckboxField, u as useForm,
|
2
|
-
import { Button as Button$1, Cascader, Space as Space$1, Card, Skeleton as Skeleton$1, Modal as Modal$1,
|
1
|
+
import { j as jsxRuntimeExports, c as Icon, _ as _extends, d as _typeof, P as PnkxField, C as CheckboxField, u as useForm, e as classNames, I as Input, f as _arrayLikeToArray, h as _unsupportedIterableToArray, w as warningOnce, i as _createClass, k as _classCallCheck, l as _defineProperty, m as _slicedToArray, n as warning$1, o as canUseDom, p as _objectSpread2, q as updateCSS, r as removeCSS, s as _arrayWithHoles, t as _nonIterableRest, v as resetWarned$1, F as FastColor, x as generate, y as presetPrimaryColors, z as presetPalettes, A as _inherits, B as _createSuper, G as _assertThisInitialized, H as _objectWithoutProperties, J as IconContext } from './Switch-jt4L5Z_9.js';
|
2
|
+
import { Button as Button$1, Cascader, Space as Space$1, Card, Skeleton as Skeleton$1, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2, Popconfirm as Popconfirm$1, Typography, Table as Table$1, Tabs as Tabs$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, 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, 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';
|
@@ -6553,29 +6553,33 @@ const DragIcon = ({ stroke, fill }) => /* @__PURE__ */ jsxRuntimeExports.jsx("sv
|
|
6553
6553
|
}
|
6554
6554
|
) });
|
6555
6555
|
|
6556
|
-
const SettingIcon = (
|
6557
|
-
stroke,
|
6558
|
-
fill,
|
6559
|
-
className,
|
6560
|
-
onClick
|
6561
|
-
}) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
6556
|
+
const SettingIcon = (props) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
6562
6557
|
"svg",
|
6563
6558
|
{
|
6564
|
-
|
6565
|
-
|
6566
|
-
|
6559
|
+
width: "30",
|
6560
|
+
height: "30",
|
6561
|
+
viewBox: "0 0 30 30",
|
6567
6562
|
fill: "none",
|
6568
|
-
|
6569
|
-
|
6563
|
+
xmlns: "http://www.w3.org/2000/svg",
|
6564
|
+
...props,
|
6570
6565
|
children: [
|
6571
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", {
|
6572
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
6566
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("rect", { x: "0.5", y: "0.5", width: "29", height: "29", rx: "14.5", fill: "white" }),
|
6567
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
6568
|
+
"rect",
|
6569
|
+
{
|
6570
|
+
x: "0.5",
|
6571
|
+
y: "0.5",
|
6572
|
+
width: "29",
|
6573
|
+
height: "29",
|
6574
|
+
rx: "14.5",
|
6575
|
+
stroke: props?.stroke || "#D6E6FE"
|
6576
|
+
}
|
6577
|
+
),
|
6573
6578
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
6574
6579
|
"path",
|
6575
6580
|
{
|
6576
|
-
|
6577
|
-
stroke
|
6578
|
-
d: "M16.085 11a1.5 1.5 0 0 1 2.83 0H21v1h-2.085a1.5 1.5 0 0 1-2.83 0H9v-1h5.987M17 11v1h1v-1h-1Zm.5 7a1.5 1.5 0 0 1 1.415 1H21v1h-2.085a1.5 1.5 0 0 1-2.83 0H9v-1h7.085a1.5 1.5 0 0 1 1.415-1Zm-.5 1v1h1v-1h-1Zm4-4v1h-7.085a1.5 1.5 0 0 1-2.83 0H9v-1h2.085a1.5 1.5 0 0 1 2.83 0H21Zm-9 0v1h1v-1h-1Z"
|
6581
|
+
d: "M16.0854 11C16.2913 10.4174 16.8469 10 17.5 10C18.1531 10 18.7087 10.4174 18.9146 11H21V12H18.9146C18.7087 12.5826 18.1531 13 17.5 13C16.8469 13 16.2913 12.5826 16.0854 12C15.6004 12 15.2368 12 14.9943 12C13.6622 12 11.6641 12 9 12V11C11.6611 11 13.6569 11 14.9874 11M17 11V12H18V11H17ZM17.5 18C18.1531 18 18.7087 18.4174 18.9146 19H21V20H18.9146C18.7087 20.5826 18.1531 21 17.5 21C16.8469 21 16.2913 20.5826 16.0854 20H9V19H16.0854C16.2913 18.4174 16.8469 18 17.5 18ZM17 19V20H18V19H17ZM21 15V16H13.9146C13.7087 16.5826 13.1531 17 12.5 17C11.8469 17 11.2913 16.5826 11.0854 16H9V15H11.0854C11.2913 14.4174 11.8469 14 12.5 14C13.1531 14 13.7087 14.4174 13.9146 15H21ZM12 15V16H13V15H12Z",
|
6582
|
+
fill: props?.stroke || "#116DFF"
|
6579
6583
|
}
|
6580
6584
|
)
|
6581
6585
|
]
|
@@ -9783,233 +9787,11 @@ const SettingTable = (props) => {
|
|
9783
9787
|
);
|
9784
9788
|
};
|
9785
9789
|
|
9786
|
-
const containerSearchSelect = "_containerSearchSelect_1f1fs_1";
|
9787
|
-
const inputSearchKey = "_inputSearchKey_1f1fs_8";
|
9788
9790
|
const customBadge = "_customBadge_1f1fs_14";
|
9789
9791
|
const customBadgeActive = "_customBadgeActive_1f1fs_22";
|
9790
|
-
const customContainButtonIcon = "_customContainButtonIcon_1f1fs_31";
|
9791
9792
|
const styles$1 = {
|
9792
|
-
containerSearchSelect: containerSearchSelect,
|
9793
|
-
inputSearchKey: inputSearchKey,
|
9794
9793
|
customBadge: customBadge,
|
9795
|
-
customBadgeActive: customBadgeActive
|
9796
|
-
customContainButtonIcon: customContainButtonIcon
|
9797
|
-
};
|
9798
|
-
|
9799
|
-
class Timer {
|
9800
|
-
timer;
|
9801
|
-
constructor() {
|
9802
|
-
this.timer = null;
|
9803
|
-
}
|
9804
|
-
debounce(func, time) {
|
9805
|
-
if (this.timer) {
|
9806
|
-
clearTimeout(this.timer);
|
9807
|
-
}
|
9808
|
-
this.timer = setTimeout(func, time);
|
9809
|
-
}
|
9810
|
-
}
|
9811
|
-
|
9812
|
-
const SearchIcon = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9813
|
-
"svg",
|
9814
|
-
{
|
9815
|
-
xmlns: "http://www.w3.org/2000/svg",
|
9816
|
-
width: 18,
|
9817
|
-
height: 18,
|
9818
|
-
fill: "none",
|
9819
|
-
...props,
|
9820
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9821
|
-
"path",
|
9822
|
-
{
|
9823
|
-
fill: props?.color || "#116DFF",
|
9824
|
-
fillRule: "evenodd",
|
9825
|
-
d: "M14.854 14.147a.498.498 0 0 1-.704.703l-2.13-2.124a5.5 5.5 0 1 1 .707-.707l2.127 2.128ZM8.5 13a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",
|
9826
|
-
clipRule: "evenodd"
|
9827
|
-
}
|
9828
|
-
)
|
9829
|
-
}
|
9830
|
-
);
|
9831
|
-
|
9832
|
-
const AllowClearIcon = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9833
|
-
"svg",
|
9834
|
-
{
|
9835
|
-
xmlns: "http://www.w3.org/2000/svg",
|
9836
|
-
width: 6,
|
9837
|
-
height: 6,
|
9838
|
-
fill: "none",
|
9839
|
-
...props,
|
9840
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9841
|
-
"path",
|
9842
|
-
{
|
9843
|
-
fill: props?.color || "#116DFF",
|
9844
|
-
fillRule: "evenodd",
|
9845
|
-
d: "M5.2 0 3 2.2.8 0 0 .8 2.2 3 0 5.3l.8.7L3 3.8 5.2 6l.8-.7L3.8 3 6 .8 5.2 0Z",
|
9846
|
-
clipRule: "evenodd"
|
9847
|
-
}
|
9848
|
-
)
|
9849
|
-
}
|
9850
|
-
);
|
9851
|
-
|
9852
|
-
const TrashCanIcon = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9853
|
-
"svg",
|
9854
|
-
{
|
9855
|
-
width: "18",
|
9856
|
-
height: "18",
|
9857
|
-
viewBox: "0 0 24 24",
|
9858
|
-
fill: "none",
|
9859
|
-
xmlns: "http://www.w3.org/2000/svg",
|
9860
|
-
...props,
|
9861
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9862
|
-
"path",
|
9863
|
-
{
|
9864
|
-
d: "M18.893 18.0357L19.393 18.0402V18.0402L18.893 18.0357ZM4.00049 5.5C3.72435 5.5 3.50049 5.72386 3.50049 6C3.50049 6.27614 3.72435 6.5 4.00049 6.5V5.5ZM20.0005 6.5C20.2766 6.5 20.5005 6.27614 20.5005 6C20.5005 5.72386 20.2766 5.5 20.0005 5.5V6.5ZM10.5005 10C10.5005 9.72386 10.2766 9.5 10.0005 9.5C9.72435 9.5 9.50049 9.72386 9.50049 10H10.5005ZM9.50049 18C9.50049 18.2761 9.72435 18.5 10.0005 18.5C10.2766 18.5 10.5005 18.2761 10.5005 18H9.50049ZM14.5005 10C14.5005 9.72386 14.2766 9.5 14.0005 9.5C13.7243 9.5 13.5005 9.72386 13.5005 10H14.5005ZM13.5005 18C13.5005 18.2761 13.7243 18.5 14.0005 18.5C14.2766 18.5 14.5005 18.2761 14.5005 18H13.5005ZM19.0005 6L18.5005 5.99554L18.393 18.0312L18.893 18.0357L19.393 18.0402L19.5005 6.00446L19.0005 6ZM14.8932 22V21.5H9.00049V22V22.5H14.8932V22ZM5.00049 6H4.50049V18H5.00049H5.50049V6H5.00049ZM4.00049 6V6.5H5.00049V6V5.5H4.00049V6ZM5.00049 6V6.5H8.00049V6V5.5H5.00049V6ZM8.00049 6V6.5H16.0005V6V5.5H8.00049V6ZM16.0005 6V6.5H19.0005V6V5.5H16.0005V6ZM19.0005 6V6.5H20.0005V6V5.5H19.0005V6ZM8.00049 5.55556H8.50049C8.50049 3.92176 10.0105 2.5 12.0005 2.5V2V1.5C9.5722 1.5 7.50049 3.262 7.50049 5.55556H8.00049ZM12.0005 2V2.5C13.9905 2.5 15.5005 3.92176 15.5005 5.55556H16.0005H16.5005C16.5005 3.262 14.4288 1.5 12.0005 1.5V2ZM8.00049 5.55556H7.50049V6H8.00049H8.50049V5.55556H8.00049ZM16.0005 5.55556H15.5005V6H16.0005H16.5005V5.55556H16.0005ZM9.00049 22V21.5C7.06749 21.5 5.50049 19.933 5.50049 18H5.00049H4.50049C4.50049 20.4853 6.51521 22.5 9.00049 22.5V22ZM18.893 18.0357L18.393 18.0312C18.3759 19.952 16.814 21.5 14.8932 21.5V22V22.5C17.3628 22.5 19.371 20.5097 19.393 18.0402L18.893 18.0357ZM10.0005 10H9.50049V18H10.0005H10.5005V10H10.0005ZM14.0005 10H13.5005V18H14.0005H14.5005V10H14.0005Z",
|
9865
|
-
fill: props?.color || "#E0E0E0"
|
9866
|
-
}
|
9867
|
-
)
|
9868
|
-
}
|
9869
|
-
);
|
9870
|
-
|
9871
|
-
const RenderFilterFields = (props) => {
|
9872
|
-
const {
|
9873
|
-
control,
|
9874
|
-
handleSubmit,
|
9875
|
-
reset,
|
9876
|
-
isHiddenRemove,
|
9877
|
-
resetToInitialFilters,
|
9878
|
-
isNullFilter
|
9879
|
-
} = props;
|
9880
|
-
const timer = new Timer();
|
9881
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3 mb-3 ", children: [
|
9882
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
9883
|
-
PnkxField,
|
9884
|
-
{
|
9885
|
-
iconStartInput: /* @__PURE__ */ jsxRuntimeExports.jsx(SearchIcon, {}),
|
9886
|
-
allowClear: {
|
9887
|
-
clearIcon: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "!bg-[#E7F0FF] w-[18px] h-[18px] inline-flex justify-center !items-center rounded-[50%]", children: /* @__PURE__ */ jsxRuntimeExports.jsx(AllowClearIcon, { className: "" }) })
|
9888
|
-
},
|
9889
|
-
className: `!w-[255px] !rounded-[100px] !border-[#BDE3FF] ${styles$1.inputSearchKey}`,
|
9890
|
-
component: Input,
|
9891
|
-
name: "textSearch",
|
9892
|
-
control,
|
9893
|
-
type: "search",
|
9894
|
-
placeholder: "Tìm theo mã, tên thuộc tính",
|
9895
|
-
afterOnChange: () => {
|
9896
|
-
timer.debounce((e) => {
|
9897
|
-
if (handleSubmit) {
|
9898
|
-
handleSubmit(e);
|
9899
|
-
}
|
9900
|
-
}, 300);
|
9901
|
-
}
|
9902
|
-
}
|
9903
|
-
),
|
9904
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
9905
|
-
PnkxField,
|
9906
|
-
{
|
9907
|
-
className: styles$1.containerSearchSelect,
|
9908
|
-
component: Select,
|
9909
|
-
name: "attributeTypeValue",
|
9910
|
-
control,
|
9911
|
-
options: [
|
9912
|
-
{
|
9913
|
-
value: "1",
|
9914
|
-
label: "Loại 1"
|
9915
|
-
},
|
9916
|
-
{
|
9917
|
-
value: "2",
|
9918
|
-
label: "Loại 2"
|
9919
|
-
},
|
9920
|
-
{
|
9921
|
-
value: "3",
|
9922
|
-
label: "Loại 3"
|
9923
|
-
}
|
9924
|
-
],
|
9925
|
-
placeholder: "Loại thuộc tính",
|
9926
|
-
afterOnChange: () => {
|
9927
|
-
timer.debounce((e) => {
|
9928
|
-
if (handleSubmit) {
|
9929
|
-
handleSubmit(e);
|
9930
|
-
}
|
9931
|
-
}, 300);
|
9932
|
-
}
|
9933
|
-
}
|
9934
|
-
),
|
9935
|
-
!isHiddenRemove && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9936
|
-
Button,
|
9937
|
-
{
|
9938
|
-
onClick: () => {
|
9939
|
-
resetToInitialFilters();
|
9940
|
-
if (reset) {
|
9941
|
-
reset();
|
9942
|
-
}
|
9943
|
-
},
|
9944
|
-
className: twMerge(
|
9945
|
-
"!rounded-full items-center",
|
9946
|
-
isNullFilter ? "!border-none !text-[#E0E0E0] !shadow-none !font-light" : "!border-[#FFCDC9] !text-[#DD4338]",
|
9947
|
-
styles$1.customContainButtonIcon
|
9948
|
-
),
|
9949
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TrashCanIcon, { color: isNullFilter ? "" : "#DD4338" }),
|
9950
|
-
children: "Xoá tất cả"
|
9951
|
-
}
|
9952
|
-
)
|
9953
|
-
] });
|
9954
|
-
};
|
9955
|
-
|
9956
|
-
const Tag = (props) => {
|
9957
|
-
const { children, ...rest } = props;
|
9958
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tag$1, { ...rest, children: [
|
9959
|
-
" ",
|
9960
|
-
children
|
9961
|
-
] });
|
9962
|
-
};
|
9963
|
-
|
9964
|
-
const TagsFilter = (props) => {
|
9965
|
-
const { items, resetToInitialFilters, reset, setItems, isHiddenRemove } = props;
|
9966
|
-
const handleRemoveTag = (removeIndex) => {
|
9967
|
-
if (!items) return;
|
9968
|
-
const newTags = [
|
9969
|
-
...items.slice(0, removeIndex),
|
9970
|
-
...items.slice(removeIndex + 1)
|
9971
|
-
];
|
9972
|
-
console.log(newTags);
|
9973
|
-
setItems && setItems(newTags);
|
9974
|
-
};
|
9975
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "", children: [
|
9976
|
-
items?.map((tag, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9977
|
-
Tag,
|
9978
|
-
{
|
9979
|
-
closable: {
|
9980
|
-
closeIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(AllowClearIcon, { className: "inline !ml-2", color: "#000624" }),
|
9981
|
-
"aria-label": "Close Button"
|
9982
|
-
},
|
9983
|
-
className: "!pt-[5px] !pb-[5px] !pl-[9px] w-fit !rounded-[100px] !text-[#0F1D40] !text-[14px]",
|
9984
|
-
color: "#C4DEF9",
|
9985
|
-
onClose: (e) => {
|
9986
|
-
e.preventDefault();
|
9987
|
-
handleRemoveTag(index);
|
9988
|
-
},
|
9989
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: tag })
|
9990
|
-
},
|
9991
|
-
index
|
9992
|
-
)),
|
9993
|
-
!isHiddenRemove && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9994
|
-
Button,
|
9995
|
-
{
|
9996
|
-
onClick: () => {
|
9997
|
-
resetToInitialFilters();
|
9998
|
-
if (reset) {
|
9999
|
-
reset();
|
10000
|
-
}
|
10001
|
-
setItems && setItems([]);
|
10002
|
-
},
|
10003
|
-
className: twMerge(
|
10004
|
-
"!rounded-[100px] !border-[#FFCDC9] !text-[#DD4338]",
|
10005
|
-
styles$1.customContainButtonIcon
|
10006
|
-
),
|
10007
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(TrashCanIcon, { color: "#DD4338" }),
|
10008
|
-
children: "Xoá tất cả"
|
10009
|
-
}
|
10010
|
-
)
|
10011
|
-
] });
|
10012
|
-
};
|
9794
|
+
customBadgeActive: customBadgeActive};
|
10013
9795
|
|
10014
9796
|
const typeColorMap = {
|
10015
9797
|
error: "red",
|
@@ -10022,6 +9804,15 @@ const Badge = ({ type, children, customColor, ...rest }) => {
|
|
10022
9804
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Badge$1, { color, ...rest, children });
|
10023
9805
|
};
|
10024
9806
|
|
9807
|
+
const groupHeadingButtonItems = [
|
9808
|
+
{ label: "Tất cả", value: 1155, keyActive: 1 },
|
9809
|
+
{ label: "Hoạt động", value: 15, keyActive: 2 },
|
9810
|
+
{ label: "Ngưng hoạt động", value: 16, keyActive: 3 },
|
9811
|
+
{ label: "Tạo mới", value: 12, keyActive: 4 },
|
9812
|
+
{ label: "Chờ duyệt", value: 43, keyActive: 5 },
|
9813
|
+
{ label: "Từ chối duyệt", value: 34, keyActive: 6 },
|
9814
|
+
{ label: "Đã xoá", value: 23, keyActive: 7 }
|
9815
|
+
];
|
10025
9816
|
const ButtonBadge = (props) => {
|
10026
9817
|
const { label, value, active, setKeyActive, keyActive } = props;
|
10027
9818
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
@@ -10045,8 +9836,11 @@ const ButtonBadge = (props) => {
|
|
10045
9836
|
}
|
10046
9837
|
);
|
10047
9838
|
};
|
10048
|
-
const GroupHeadingButton = (
|
10049
|
-
const
|
9839
|
+
const GroupHeadingButton = () => {
|
9840
|
+
const [keyActive, setKeyActive] = useState(1);
|
9841
|
+
const [items, setItems] = useState(
|
9842
|
+
groupHeadingButtonItems
|
9843
|
+
);
|
10050
9844
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "pb-[15px]", children: items?.map((i, index) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10051
9845
|
ButtonBadge,
|
10052
9846
|
{
|
@@ -10060,54 +9854,6 @@ const GroupHeadingButton = (props) => {
|
|
10060
9854
|
)) });
|
10061
9855
|
};
|
10062
9856
|
|
10063
|
-
const SearchFiltersForm = ({
|
10064
|
-
initialValues,
|
10065
|
-
renderFilterFields,
|
10066
|
-
onSubmit,
|
10067
|
-
onReset,
|
10068
|
-
classNamesContainer,
|
10069
|
-
classNameWrapperForm,
|
10070
|
-
hideDefaultSubmit,
|
10071
|
-
hideResetButton
|
10072
|
-
}) => {
|
10073
|
-
const { control, handleSubmit, reset, setValue } = useForm({
|
10074
|
-
defaultValues: initialValues
|
10075
|
-
});
|
10076
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { className: classNameWrapperForm, onSubmit: handleSubmit(onSubmit), children: [
|
10077
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNamesContainer, children: renderFilterFields && renderFilterFields({
|
10078
|
-
control,
|
10079
|
-
setValue,
|
10080
|
-
handleSubmit: handleSubmit(onSubmit),
|
10081
|
-
reset
|
10082
|
-
}) }),
|
10083
|
-
!hideDefaultSubmit && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end gap-2 mb-3", children: [
|
10084
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10085
|
-
Button,
|
10086
|
-
{
|
10087
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon, {}),
|
10088
|
-
className: "px-3 py-1 ",
|
10089
|
-
color: "blue",
|
10090
|
-
variant: "solid",
|
10091
|
-
htmlType: "submit",
|
10092
|
-
children: "Tìm kiếm"
|
10093
|
-
}
|
10094
|
-
),
|
10095
|
-
!hideResetButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10096
|
-
Button,
|
10097
|
-
{
|
10098
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$3, {}),
|
10099
|
-
className: "px-3 py-1",
|
10100
|
-
onClick: () => {
|
10101
|
-
reset();
|
10102
|
-
onReset?.();
|
10103
|
-
},
|
10104
|
-
children: "Đặt lại"
|
10105
|
-
}
|
10106
|
-
)
|
10107
|
-
] })
|
10108
|
-
] });
|
10109
|
-
};
|
10110
|
-
|
10111
9857
|
const Breadcrumb = (props) => {
|
10112
9858
|
const { containerClassName, breadcrumbClassName, ...restProps } = props;
|
10113
9859
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb$1, { className: breadcrumbClassName, ...restProps }) });
|
@@ -10142,10 +9888,6 @@ const Heading = (props) => {
|
|
10142
9888
|
] });
|
10143
9889
|
};
|
10144
9890
|
|
10145
|
-
function hasFalsyFieldsObject(obj) {
|
10146
|
-
return Object.values(obj).every((value) => !value);
|
10147
|
-
}
|
10148
|
-
|
10149
9891
|
const Tooltip = ({ children, ...props }) => {
|
10150
9892
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { ...props, children });
|
10151
9893
|
};
|
@@ -10188,82 +9930,20 @@ const HeadingTable = (props) => {
|
|
10188
9930
|
resetToInitialFilters,
|
10189
9931
|
setOpenStting,
|
10190
9932
|
showSetting,
|
10191
|
-
|
10192
|
-
|
10193
|
-
groupHeadingButtonItems,
|
10194
|
-
tagSearchItems,
|
10195
|
-
setTagSearchItems
|
9933
|
+
renderHeadingSearch,
|
9934
|
+
rightHeadingContent
|
10196
9935
|
} = props;
|
10197
9936
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
10198
9937
|
Heading,
|
10199
9938
|
{
|
10200
9939
|
breadcrumbItems: breadCrumb,
|
10201
9940
|
classNameWrapHeading: "justify-between",
|
10202
|
-
rightContent:
|
10203
|
-
Button,
|
10204
|
-
{
|
10205
|
-
color: "blue",
|
10206
|
-
variant: "solid",
|
10207
|
-
shape: "round",
|
10208
|
-
rootClassName: "transform translate-y-[110%]",
|
10209
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$7, {}),
|
10210
|
-
children: "Thêm mới"
|
10211
|
-
}
|
10212
|
-
),
|
9941
|
+
rightContent: rightHeadingContent,
|
10213
9942
|
children: [
|
10214
|
-
|
10215
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10216
|
-
SearchFiltersForm,
|
10217
|
-
{
|
10218
|
-
onSubmit: (values) => {
|
10219
|
-
handleSearch({
|
10220
|
-
...filters,
|
10221
|
-
keyword: values?.keyword,
|
10222
|
-
attributeType: values?.attributeType
|
10223
|
-
});
|
10224
|
-
},
|
10225
|
-
initialValues: {
|
10226
|
-
keyword: filters?.keyword,
|
10227
|
-
attributeType: filters?.attributeType
|
10228
|
-
},
|
10229
|
-
classNamesContainer: "flex",
|
10230
|
-
hideDefaultSubmit: true,
|
10231
|
-
renderFilterFields: ({ control, handleSubmit, reset }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
10232
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10233
|
-
RenderFilterFields,
|
10234
|
-
{
|
10235
|
-
control,
|
10236
|
-
handleSubmit,
|
10237
|
-
reset,
|
10238
|
-
resetToInitialFilters,
|
10239
|
-
isHiddenRemove: !!tagSearchItems && tagSearchItems?.length > 0,
|
10240
|
-
isNullFilter: hasFalsyFieldsObject(
|
10241
|
-
lodashExports.omit(filters, ["PageIndex", "PageSize"])
|
10242
|
-
)
|
10243
|
-
}
|
10244
|
-
),
|
10245
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10246
|
-
TagsFilter,
|
10247
|
-
{
|
10248
|
-
items: tagSearchItems,
|
10249
|
-
setItems: setTagSearchItems,
|
10250
|
-
resetToInitialFilters,
|
10251
|
-
isHiddenRemove: !tagSearchItems || tagSearchItems?.length === 0
|
10252
|
-
}
|
10253
|
-
)
|
10254
|
-
] })
|
10255
|
-
}
|
10256
|
-
),
|
9943
|
+
renderHeadingSearch(filters, handleSearch, resetToInitialFilters),
|
10257
9944
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, {}),
|
10258
9945
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
10259
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10260
|
-
GroupHeadingButton,
|
10261
|
-
{
|
10262
|
-
keyActive,
|
10263
|
-
setKeyActive,
|
10264
|
-
items: groupHeadingButtonItems
|
10265
|
-
}
|
10266
|
-
),
|
9946
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(GroupHeadingButton, {}),
|
10267
9947
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10268
9948
|
IconSettingTable,
|
10269
9949
|
{
|
@@ -10277,124 +9957,396 @@ const HeadingTable = (props) => {
|
|
10277
9957
|
);
|
10278
9958
|
};
|
10279
9959
|
|
10280
|
-
const
|
10281
|
-
|
10282
|
-
|
10283
|
-
|
10284
|
-
|
10285
|
-
|
9960
|
+
const ConfirmModal = ({
|
9961
|
+
title,
|
9962
|
+
content,
|
9963
|
+
typeIcon,
|
9964
|
+
titleCancelBtn = "Huỷ bỏ",
|
9965
|
+
titleSubmitBtn = "Xác nhận",
|
9966
|
+
handleCancel,
|
9967
|
+
handleSubmit,
|
10286
9968
|
...restProps
|
10287
|
-
}) => {
|
10288
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("td", { ...restProps, children: editing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10289
|
-
PnkxField,
|
10290
|
-
{
|
10291
|
-
name: dataIndex,
|
10292
|
-
control,
|
10293
|
-
component: Input,
|
10294
|
-
type: inputType
|
10295
|
-
}
|
10296
|
-
) : children });
|
10297
|
-
};
|
10298
|
-
const tableCss = css`
|
10299
|
-
.ant-table-cell::before {
|
10300
|
-
display: none !important;
|
10301
|
-
}
|
10302
|
-
.ant-table-thead .ant-table-cell {
|
10303
|
-
background-color: #d6e6fe;
|
10304
|
-
font-weight: 500;
|
10305
|
-
}
|
10306
|
-
|
10307
|
-
.ant-table-thead th.ant-table-column-has-sorters:hover {
|
10308
|
-
background-color: #d6e6fe;
|
10309
|
-
}
|
10310
|
-
|
10311
|
-
.ant-table-row.table-row-even {
|
10312
|
-
background-color: #f7f7f8;
|
10313
|
-
}
|
10314
|
-
|
10315
|
-
.ant-table-row.table-row-odd {
|
10316
|
-
background-color: #ffffff;
|
10317
|
-
}
|
10318
|
-
.ant-table-row:hover {
|
10319
|
-
background-color: #e7f0ff;
|
10320
|
-
}
|
10321
|
-
`;
|
10322
|
-
const Table = ({
|
10323
|
-
dataSource,
|
10324
|
-
columns,
|
10325
|
-
loading = false,
|
10326
|
-
totalItems,
|
10327
|
-
filters,
|
10328
|
-
onChangePage,
|
10329
|
-
onChangePageSize,
|
10330
|
-
onSort,
|
10331
|
-
rowsSelected,
|
10332
|
-
onSelect,
|
10333
|
-
onRowClick,
|
10334
|
-
rowKey = "id",
|
10335
|
-
className,
|
10336
|
-
editable,
|
10337
|
-
onSave,
|
10338
|
-
titleSettingTableModal,
|
10339
|
-
showSetting,
|
10340
|
-
setColumns,
|
10341
|
-
resetToInitialFilters,
|
10342
|
-
handleSearch,
|
10343
|
-
groupHeadingButtonItems,
|
10344
|
-
tagSearchItems,
|
10345
|
-
setTagSearchItems,
|
10346
|
-
setKeyActive,
|
10347
|
-
keyActive,
|
10348
|
-
...rest
|
10349
9969
|
}) => {
|
10350
9970
|
//! State
|
10351
|
-
const
|
10352
|
-
|
10353
|
-
|
10354
|
-
|
10355
|
-
|
10356
|
-
|
10357
|
-
|
10358
|
-
|
10359
|
-
|
10360
|
-
|
9971
|
+
const IconType = () => {
|
9972
|
+
switch (typeIcon) {
|
9973
|
+
case "success":
|
9974
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9975
|
+
"svg",
|
9976
|
+
{
|
9977
|
+
xmlns: "http://www.w3.org/2000/svg",
|
9978
|
+
width: "24",
|
9979
|
+
height: "24",
|
9980
|
+
viewBox: "0 0 24 24",
|
9981
|
+
fill: "none",
|
9982
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9983
|
+
"path",
|
9984
|
+
{
|
9985
|
+
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM16.5352 8.57109L11.5992 15.4148C11.5302 15.5111 11.4393 15.5896 11.3339 15.6437C11.2286 15.6978 11.1118 15.7261 10.9934 15.7261C10.8749 15.7261 10.7582 15.6978 10.6528 15.6437C10.5474 15.5896 10.4565 15.5111 10.3875 15.4148L7.46484 11.3648C7.37578 11.2406 7.46484 11.0672 7.61719 11.0672H8.71641C8.95547 11.0672 9.18281 11.182 9.32344 11.3789L10.9922 13.6945L14.6766 8.58516C14.8172 8.39062 15.0422 8.27344 15.2836 8.27344H16.3828C16.5352 8.27344 16.6242 8.44688 16.5352 8.57109Z",
|
9986
|
+
fill: "#52C41A"
|
9987
|
+
}
|
9988
|
+
)
|
9989
|
+
}
|
9990
|
+
);
|
9991
|
+
case "error":
|
9992
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9993
|
+
"svg",
|
9994
|
+
{
|
9995
|
+
xmlns: "http://www.w3.org/2000/svg",
|
9996
|
+
width: "24",
|
9997
|
+
height: "24",
|
9998
|
+
viewBox: "0 0 24 24",
|
9999
|
+
fill: "none",
|
10000
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10001
|
+
"path",
|
10002
|
+
{
|
10003
|
+
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM15.8766 15.9891L14.3297 15.982L12 13.2047L9.67266 15.9797L8.12344 15.9867C8.02031 15.9867 7.93594 15.9047 7.93594 15.7992C7.93594 15.7547 7.95234 15.7125 7.98047 15.6773L11.0297 12.0445L7.98047 8.41406C7.95215 8.37971 7.93643 8.3367 7.93594 8.29219C7.93594 8.18906 8.02031 8.10469 8.12344 8.10469L9.67266 8.11172L12 10.8891L14.3273 8.11406L15.8742 8.10703C15.9773 8.10703 16.0617 8.18906 16.0617 8.29453C16.0617 8.33906 16.0453 8.38125 16.0172 8.41641L12.9727 12.0469L16.0195 15.6797C16.0477 15.7148 16.0641 15.757 16.0641 15.8016C16.0641 15.9047 15.9797 15.9891 15.8766 15.9891Z",
|
10004
|
+
fill: "#FF4D4F"
|
10005
|
+
}
|
10006
|
+
)
|
10007
|
+
}
|
10008
|
+
);
|
10009
|
+
case "info":
|
10010
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10011
|
+
"svg",
|
10012
|
+
{
|
10013
|
+
xmlns: "http://www.w3.org/2000/svg",
|
10014
|
+
width: "24",
|
10015
|
+
height: "24",
|
10016
|
+
viewBox: "0 0 24 24",
|
10017
|
+
fill: "none",
|
10018
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10019
|
+
"path",
|
10020
|
+
{
|
10021
|
+
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM12.75 17.0625C12.75 17.1656 12.6656 17.25 12.5625 17.25H11.4375C11.3344 17.25 11.25 17.1656 11.25 17.0625V10.6875C11.25 10.5844 11.3344 10.5 11.4375 10.5H12.5625C12.6656 10.5 12.75 10.5844 12.75 10.6875V17.0625ZM12 9C11.7056 8.99399 11.4253 8.87282 11.2192 8.6625C11.0132 8.45218 10.8977 8.16945 10.8977 7.875C10.8977 7.58055 11.0132 7.29782 11.2192 7.0875C11.4253 6.87718 11.7056 6.75601 12 6.75C12.2944 6.75601 12.5747 6.87718 12.7808 7.0875C12.9868 7.29782 13.1023 7.58055 13.1023 7.875C13.1023 8.16945 12.9868 8.45218 12.7808 8.6625C12.5747 8.87282 12.2944 8.99399 12 9Z",
|
10022
|
+
fill: "#1677FF"
|
10023
|
+
}
|
10024
|
+
)
|
10025
|
+
}
|
10026
|
+
);
|
10027
|
+
case "warning":
|
10028
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10029
|
+
"svg",
|
10030
|
+
{
|
10031
|
+
xmlns: "http://www.w3.org/2000/svg",
|
10032
|
+
width: "24",
|
10033
|
+
height: "24",
|
10034
|
+
viewBox: "0 0 24 24",
|
10035
|
+
fill: "none",
|
10036
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10037
|
+
"path",
|
10038
|
+
{
|
10039
|
+
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM11.25 6.9375C11.25 6.83437 11.3344 6.75 11.4375 6.75H12.5625C12.6656 6.75 12.75 6.83437 12.75 6.9375V13.3125C12.75 13.4156 12.6656 13.5 12.5625 13.5H11.4375C11.3344 13.5 11.25 13.4156 11.25 13.3125V6.9375ZM12 17.25C11.7056 17.244 11.4253 17.1228 11.2192 16.9125C11.0132 16.7022 10.8977 16.4195 10.8977 16.125C10.8977 15.8305 11.0132 15.5478 11.2192 15.3375C11.4253 15.1272 11.7056 15.006 12 15C12.2944 15.006 12.5747 15.1272 12.7808 15.3375C12.9868 15.5478 13.1023 15.8305 13.1023 16.125C13.1023 16.4195 12.9868 16.7022 12.7808 16.9125C12.5747 17.1228 12.2944 17.244 12 17.25Z",
|
10040
|
+
fill: "#FAAD14"
|
10041
|
+
}
|
10042
|
+
)
|
10043
|
+
}
|
10044
|
+
);
|
10361
10045
|
}
|
10362
10046
|
};
|
10363
|
-
|
10364
|
-
|
10365
|
-
|
10366
|
-
|
10367
|
-
|
10368
|
-
|
10369
|
-
|
10370
|
-
|
10371
|
-
|
10372
|
-
|
10373
|
-
|
10374
|
-
|
10375
|
-
|
10376
|
-
|
10377
|
-
|
10378
|
-
|
10379
|
-
|
10380
|
-
|
10381
|
-
|
10382
|
-
|
10383
|
-
|
10384
|
-
|
10385
|
-
|
10047
|
+
//! Function
|
10048
|
+
//! Render
|
10049
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...restProps, footer: null, closeIcon: null, width: 400, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
10050
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
|
10051
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(IconType, {}),
|
10052
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
10053
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base font-semibold", children: title }),
|
10054
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm", children: content })
|
10055
|
+
] })
|
10056
|
+
] }),
|
10057
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 w-full justify-end items-end pt-3", children: [
|
10058
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { shape: "round", onClick: handleCancel, children: titleCancelBtn }),
|
10059
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { shape: "round", type: "primary", onClick: handleSubmit, children: titleSubmitBtn })
|
10060
|
+
] })
|
10061
|
+
] }) });
|
10062
|
+
};
|
10063
|
+
|
10064
|
+
var CATEGORY_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_LIST_ENUM2) => {
|
10065
|
+
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DRAFT"] = 0] = "DRAFT";
|
10066
|
+
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["WATING_APPROVAL"] = 1] = "WATING_APPROVAL";
|
10067
|
+
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["ACTIVE"] = 2] = "ACTIVE";
|
10068
|
+
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["INACTIVE"] = 3] = "INACTIVE";
|
10069
|
+
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["REJECT"] = 4] = "REJECT";
|
10070
|
+
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DELETE"] = 5] = "DELETE";
|
10071
|
+
return CATEGORY_LIST_ENUM2;
|
10072
|
+
})(CATEGORY_LIST_ENUM || {});
|
10073
|
+
|
10074
|
+
const BulkAction = ({
|
10075
|
+
quantity,
|
10076
|
+
handleRestore,
|
10077
|
+
handleSendApproval,
|
10078
|
+
handleCancelSendApproval,
|
10079
|
+
handleRefuseApproval,
|
10080
|
+
handleApproval,
|
10081
|
+
handleCancelApproval,
|
10082
|
+
handleDelete,
|
10083
|
+
handleActivate,
|
10084
|
+
handleInActivate,
|
10085
|
+
status
|
10086
|
+
}) => {
|
10087
|
+
//! State
|
10088
|
+
const listIcon = [
|
10089
|
+
{
|
10090
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RestoreIcon, { stroke: "white" }),
|
10091
|
+
action: handleRestore,
|
10092
|
+
showConfirmModal: false,
|
10093
|
+
title: "Khôi phục",
|
10094
|
+
arrShow: [CATEGORY_LIST_ENUM?.DELETE, CATEGORY_LIST_ENUM?.REJECT]
|
10095
|
+
},
|
10096
|
+
{
|
10097
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(SendApprovalIcon, { stroke: "white" }),
|
10098
|
+
action: handleSendApproval,
|
10099
|
+
showConfirmModal: true,
|
10100
|
+
typeIcon: "info",
|
10101
|
+
title: "Xác nhận gửi duyệt",
|
10102
|
+
content: "Bạn có chắc chắn muốn gửi duyệt mục này không?",
|
10103
|
+
arrShow: [CATEGORY_LIST_ENUM?.DRAFT]
|
10104
|
+
},
|
10105
|
+
{
|
10106
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelSendApprovalIcon, { stroke: "white" }),
|
10107
|
+
action: handleCancelSendApproval,
|
10108
|
+
showConfirmModal: true,
|
10109
|
+
typeIcon: "error",
|
10110
|
+
title: "Xác nhận hủy gửi duyệt",
|
10111
|
+
content: "Bạn có chắc chắn muốn hủy gửi duyệt mục này không?",
|
10112
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
10113
|
+
},
|
10114
|
+
{
|
10115
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefuseApprovalIcon, { stroke: "white" }),
|
10116
|
+
action: handleRefuseApproval,
|
10117
|
+
showConfirmModal: true,
|
10118
|
+
typeIcon: "error",
|
10119
|
+
title: "Xác nhận từ chối duyệt",
|
10120
|
+
content: "Bạn có chắc chắn muốn từ chối duyệt mục này không? Hành động này không thể hoàn tác.",
|
10121
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
10122
|
+
},
|
10123
|
+
{
|
10124
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalIcon, { stroke: "white" }),
|
10125
|
+
action: handleApproval,
|
10126
|
+
showConfirmModal: true,
|
10127
|
+
typeIcon: "info",
|
10128
|
+
title: "Xác nhận duyệt",
|
10129
|
+
content: "Bạn có chắc chắn muốn duyệt mục này không?",
|
10130
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
10131
|
+
},
|
10132
|
+
{
|
10133
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelApprovalIcon, { stroke: "white" }),
|
10134
|
+
action: handleCancelApproval,
|
10135
|
+
showConfirmModal: true,
|
10136
|
+
typeIcon: "error",
|
10137
|
+
title: "Xác nhận hủy duyệt",
|
10138
|
+
content: "Bạn có chắc chắn muốn hủy duyệt mục này không?",
|
10139
|
+
arrShow: [CATEGORY_LIST_ENUM?.ACTIVE]
|
10140
|
+
},
|
10141
|
+
{
|
10142
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fill: "white" }),
|
10143
|
+
action: handleDelete,
|
10144
|
+
showConfirmModal: true,
|
10145
|
+
typeIcon: "error",
|
10146
|
+
title: "Xác nhận xóa",
|
10147
|
+
content: "Bạn có chắc chắn muốn xóa mục này không? Hành động này không thể hoàn tác.",
|
10148
|
+
arrShow: [
|
10149
|
+
CATEGORY_LIST_ENUM?.DRAFT,
|
10150
|
+
CATEGORY_LIST_ENUM?.ACTIVE,
|
10151
|
+
CATEGORY_LIST_ENUM?.INACTIVE
|
10152
|
+
]
|
10153
|
+
},
|
10154
|
+
{
|
10155
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivateIcon, { stroke: "white" }),
|
10156
|
+
action: handleActivate,
|
10157
|
+
showConfirmModal: true,
|
10158
|
+
typeIcon: "info",
|
10159
|
+
title: "Xác nhận kích hoạt",
|
10160
|
+
content: "Bạn có chắc chắn muốn kích hoạt mục này không?",
|
10161
|
+
arrShow: [CATEGORY_LIST_ENUM?.INACTIVE]
|
10162
|
+
},
|
10163
|
+
{
|
10164
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(InActiveIcon, { stroke: "white" }),
|
10165
|
+
action: handleInActivate,
|
10166
|
+
showConfirmModal: true,
|
10167
|
+
typeIcon: "info",
|
10168
|
+
title: "Xác nhận vô hiệu hóa",
|
10169
|
+
content: "Bạn có chắc chắn muốn vô hiệu hóa mục này không?",
|
10170
|
+
arrShow: [CATEGORY_LIST_ENUM?.ACTIVE]
|
10386
10171
|
}
|
10387
|
-
|
10388
|
-
|
10389
|
-
|
10390
|
-
|
10172
|
+
];
|
10173
|
+
const [open, setOpen] = useState(false);
|
10174
|
+
const [notifyContent, setNotifyContent] = useState({
|
10175
|
+
title: "",
|
10176
|
+
content: "",
|
10177
|
+
typeIcon: "info",
|
10178
|
+
handleCancel: () => {
|
10179
|
+
},
|
10180
|
+
handleSubmit: () => {
|
10391
10181
|
}
|
10392
|
-
};
|
10393
|
-
const cancel = () => {
|
10394
|
-
setEditingKey("");
|
10395
|
-
};
|
10182
|
+
});
|
10396
10183
|
//! Function
|
10397
|
-
|
10184
|
+
const IsShow = (arrStatus) => {
|
10185
|
+
return arrStatus.includes(status);
|
10186
|
+
};
|
10187
|
+
//! Render
|
10188
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full flex justify-center items-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 px-[10px] py-3 bg-[#2561ED] rounded-lg w-fit", children: [
|
10189
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-white px-3", children: [
|
10190
|
+
"Đã chọn: ",
|
10191
|
+
quantity
|
10192
|
+
] }),
|
10193
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-5 border-l border-white mx-1" }),
|
10194
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center space-x-3", children: listIcon.map(
|
10195
|
+
(item, index) => IsShow(item?.arrShow) && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: item?.title, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10196
|
+
"button",
|
10197
|
+
{
|
10198
|
+
className: "p-1 rounded-sm transition duration-200 cursor-pointer hover:bg-[#1B4ACB] hover:rounded-sm",
|
10199
|
+
onClick: item?.showConfirmModal ? () => {
|
10200
|
+
setOpen(true);
|
10201
|
+
setNotifyContent({
|
10202
|
+
title: item?.title || "",
|
10203
|
+
content: item?.content || "",
|
10204
|
+
typeIcon: item?.typeIcon,
|
10205
|
+
handleCancel: () => {
|
10206
|
+
setOpen(false);
|
10207
|
+
},
|
10208
|
+
handleSubmit: item?.action
|
10209
|
+
});
|
10210
|
+
} : item?.action,
|
10211
|
+
children: item.icon
|
10212
|
+
},
|
10213
|
+
index
|
10214
|
+
) })
|
10215
|
+
) }),
|
10216
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10217
|
+
ConfirmModal,
|
10218
|
+
{
|
10219
|
+
title: notifyContent?.title,
|
10220
|
+
content: notifyContent?.content,
|
10221
|
+
typeIcon: notifyContent?.typeIcon,
|
10222
|
+
open,
|
10223
|
+
handleCancel: notifyContent?.handleCancel,
|
10224
|
+
handleSubmit: notifyContent?.handleSubmit
|
10225
|
+
}
|
10226
|
+
)
|
10227
|
+
] }) });
|
10228
|
+
};
|
10229
|
+
|
10230
|
+
const EditableCell = ({
|
10231
|
+
editing,
|
10232
|
+
dataIndex,
|
10233
|
+
inputType,
|
10234
|
+
children,
|
10235
|
+
control,
|
10236
|
+
...restProps
|
10237
|
+
}) => {
|
10238
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("td", { ...restProps, children: editing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10239
|
+
PnkxField,
|
10240
|
+
{
|
10241
|
+
name: dataIndex,
|
10242
|
+
control,
|
10243
|
+
component: Input,
|
10244
|
+
type: inputType
|
10245
|
+
}
|
10246
|
+
) : children });
|
10247
|
+
};
|
10248
|
+
const tableCss = css`
|
10249
|
+
.ant-table-cell::before {
|
10250
|
+
display: none !important;
|
10251
|
+
}
|
10252
|
+
.ant-table-thead .ant-table-cell {
|
10253
|
+
background-color: #d6e6fe;
|
10254
|
+
font-weight: 500;
|
10255
|
+
border-start-start-radius: 0 !important;
|
10256
|
+
border-start-end-radius: 0 !important;
|
10257
|
+
}
|
10258
|
+
|
10259
|
+
.ant-table-thead th.ant-table-column-has-sorters:hover {
|
10260
|
+
background-color: #d6e6fe;
|
10261
|
+
}
|
10262
|
+
|
10263
|
+
.ant-table-row.table-row-even {
|
10264
|
+
background-color: #f7f7f8;
|
10265
|
+
}
|
10266
|
+
|
10267
|
+
.ant-table-row.table-row-odd {
|
10268
|
+
background-color: #ffffff;
|
10269
|
+
}
|
10270
|
+
.ant-table-row:hover {
|
10271
|
+
background-color: #e7f0ff;
|
10272
|
+
}
|
10273
|
+
`;
|
10274
|
+
const Table = ({
|
10275
|
+
dataSource,
|
10276
|
+
columns,
|
10277
|
+
loading = false,
|
10278
|
+
totalItems,
|
10279
|
+
filters,
|
10280
|
+
onChangePage,
|
10281
|
+
onChangePageSize,
|
10282
|
+
onSort,
|
10283
|
+
rowsSelected,
|
10284
|
+
onSelect,
|
10285
|
+
onRowClick,
|
10286
|
+
rowKey = "id",
|
10287
|
+
className,
|
10288
|
+
editable,
|
10289
|
+
onSave,
|
10290
|
+
titleSettingTableModal,
|
10291
|
+
showSetting,
|
10292
|
+
setColumns,
|
10293
|
+
resetToInitialFilters,
|
10294
|
+
handleSearch,
|
10295
|
+
tagSearchItems,
|
10296
|
+
setTagSearchItems,
|
10297
|
+
renderHeadingSearch,
|
10298
|
+
rightHeadingContent,
|
10299
|
+
status,
|
10300
|
+
...rest
|
10301
|
+
}) => {
|
10302
|
+
//! State
|
10303
|
+
const paginationConfig = {
|
10304
|
+
current: filters.PageIndex,
|
10305
|
+
pageSize: filters.PageSize,
|
10306
|
+
total: totalItems,
|
10307
|
+
showSizeChanger: true,
|
10308
|
+
showQuickJumper: true,
|
10309
|
+
showTotal: (total, range) => `${range[0]}-${range[1]} of ${total} items`,
|
10310
|
+
onChange: (page, pageSize) => {
|
10311
|
+
if (page !== filters.PageIndex) onChangePage(page);
|
10312
|
+
if (pageSize !== filters.PageSize) onChangePageSize(pageSize);
|
10313
|
+
}
|
10314
|
+
};
|
10315
|
+
const [openSetting, setOpenStting] = useState(false);
|
10316
|
+
const rowSelection = {
|
10317
|
+
selectedRowKeys: rowsSelected,
|
10318
|
+
onChange: onSelect
|
10319
|
+
// getCheckboxProps: (record: any) => ({
|
10320
|
+
// disabled: true, // Ví dụ: disable nếu tuổi > 40
|
10321
|
+
// }),
|
10322
|
+
};
|
10323
|
+
const { control, handleSubmit, reset } = useForm();
|
10324
|
+
const [data, setData] = useState([]);
|
10325
|
+
const [editingKey, setEditingKey] = useState("");
|
10326
|
+
const getRowKeyValue = (record) => typeof rowKey === "function" ? rowKey(record) : record[rowKey];
|
10327
|
+
const isEditing = (record) => getRowKeyValue(record) === editingKey;
|
10328
|
+
const edit = (record) => {
|
10329
|
+
reset(record);
|
10330
|
+
setEditingKey(getRowKeyValue(record));
|
10331
|
+
};
|
10332
|
+
const save = (formValues) => {
|
10333
|
+
const key = editingKey;
|
10334
|
+
const newData = [...data];
|
10335
|
+
const index = newData.findIndex((item) => getRowKeyValue(item) === key);
|
10336
|
+
if (onSave) {
|
10337
|
+
onSave(formValues);
|
10338
|
+
}
|
10339
|
+
if (index > -1) {
|
10340
|
+
newData[index] = { ...newData[index], ...formValues };
|
10341
|
+
setData(newData);
|
10342
|
+
setEditingKey("");
|
10343
|
+
}
|
10344
|
+
};
|
10345
|
+
const cancel = () => {
|
10346
|
+
setEditingKey("");
|
10347
|
+
};
|
10348
|
+
//! Function
|
10349
|
+
useEffect(() => {
|
10398
10350
|
setData(Array.isArray(dataSource) ? dataSource : []);
|
10399
10351
|
}, [JSON.stringify(dataSource)]);
|
10400
10352
|
const columnsEditable = [
|
@@ -10410,7 +10362,7 @@ const Table = ({
|
|
10410
10362
|
{
|
10411
10363
|
title: "Bạn có chắc chắn muốn huỷ chỉnh sửa?",
|
10412
10364
|
onConfirm: cancel,
|
10413
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography
|
10365
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: " Huỷ bỏ" })
|
10414
10366
|
}
|
10415
10367
|
),
|
10416
10368
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { htmlType: "submit", variant: "text", color: "blue", children: "Lưu" })
|
@@ -10483,16 +10435,13 @@ const Table = ({
|
|
10483
10435
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10484
10436
|
HeadingTable,
|
10485
10437
|
{
|
10438
|
+
rightHeadingContent,
|
10439
|
+
renderHeadingSearch,
|
10486
10440
|
filters,
|
10487
10441
|
handleSearch,
|
10488
10442
|
resetToInitialFilters,
|
10489
10443
|
setOpenStting,
|
10490
|
-
showSetting
|
10491
|
-
groupHeadingButtonItems,
|
10492
|
-
tagSearchItems,
|
10493
|
-
setTagSearchItems,
|
10494
|
-
keyActive,
|
10495
|
-
setKeyActive
|
10444
|
+
showSetting
|
10496
10445
|
}
|
10497
10446
|
),
|
10498
10447
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -10529,7 +10478,8 @@ const Table = ({
|
|
10529
10478
|
defaultSettingColumnItems: editable ? mergedColumns : columns,
|
10530
10479
|
setDefaultSettingColumnItems: setColumns
|
10531
10480
|
}
|
10532
|
-
)
|
10481
|
+
),
|
10482
|
+
rowsSelected?.length && rowsSelected?.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed bottom-1/100 left-1/2 -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(BulkAction, { quantity: rowsSelected?.length || 0, status }) })
|
10533
10483
|
] });
|
10534
10484
|
const renderTableContent = () => {
|
10535
10485
|
if (editable) {
|
@@ -10620,6 +10570,54 @@ const Popover = (props) => {
|
|
10620
10570
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Popover$1, { className: popoverClassName, ...restProps }) });
|
10621
10571
|
};
|
10622
10572
|
|
10573
|
+
const SearchFiltersForm = ({
|
10574
|
+
initialValues,
|
10575
|
+
renderFilterFields,
|
10576
|
+
onSubmit,
|
10577
|
+
onReset,
|
10578
|
+
classNamesContainer,
|
10579
|
+
classNameWrapperForm,
|
10580
|
+
hideDefaultSubmit,
|
10581
|
+
hideResetButton
|
10582
|
+
}) => {
|
10583
|
+
const { control, handleSubmit, reset, setValue } = useForm({
|
10584
|
+
defaultValues: initialValues
|
10585
|
+
});
|
10586
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("form", { className: classNameWrapperForm, onSubmit: handleSubmit(onSubmit), children: [
|
10587
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classNamesContainer, children: renderFilterFields && renderFilterFields({
|
10588
|
+
control,
|
10589
|
+
setValue,
|
10590
|
+
handleSubmit: handleSubmit(onSubmit),
|
10591
|
+
reset
|
10592
|
+
}) }),
|
10593
|
+
!hideDefaultSubmit && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end gap-2 mb-3", children: [
|
10594
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10595
|
+
Button,
|
10596
|
+
{
|
10597
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon, {}),
|
10598
|
+
className: "px-3 py-1 ",
|
10599
|
+
color: "blue",
|
10600
|
+
variant: "solid",
|
10601
|
+
htmlType: "submit",
|
10602
|
+
children: "Tìm kiếm"
|
10603
|
+
}
|
10604
|
+
),
|
10605
|
+
!hideResetButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
10606
|
+
Button,
|
10607
|
+
{
|
10608
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefIcon$3, {}),
|
10609
|
+
className: "px-3 py-1",
|
10610
|
+
onClick: () => {
|
10611
|
+
reset();
|
10612
|
+
onReset?.();
|
10613
|
+
},
|
10614
|
+
children: "Đặt lại"
|
10615
|
+
}
|
10616
|
+
)
|
10617
|
+
] })
|
10618
|
+
] });
|
10619
|
+
};
|
10620
|
+
|
10623
10621
|
const Container = ({
|
10624
10622
|
children,
|
10625
10623
|
className,
|
@@ -14215,7 +14213,7 @@ function genStyleUtils(config) {
|
|
14215
14213
|
};
|
14216
14214
|
}
|
14217
14215
|
|
14218
|
-
const version = '5.25.
|
14216
|
+
const version = '5.25.1';
|
14219
14217
|
|
14220
14218
|
function isStableColor(color) {
|
14221
14219
|
return color >= 0 && color <= 255;
|
@@ -16913,6 +16911,20 @@ const Sidebar = ({ children, menu }) => {
|
|
16913
16911
|
)
|
16914
16912
|
}
|
16915
16913
|
),
|
16914
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: !collapse ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-[12px] m-auto flex items-center justify-center w-10 h-10 bg-white", children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: "https://pouch.jumpshare.com/preview/hOWXgtQM_x234lxOpA4km_sb9utNoaWZICgdH81HOY8wLadm2DjgwtyWnKwkJ2mlYX-z8bWrjfOrB2uhrRotd2hlUvBN6o9cv6E6pgbM-_s" }) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "px-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
16915
|
+
Input,
|
16916
|
+
{
|
16917
|
+
className: "h-[40px]",
|
16918
|
+
iconStartInput: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
16919
|
+
"img",
|
16920
|
+
{
|
16921
|
+
className: "w-[20px] h-[20px]",
|
16922
|
+
src: "https://pouch.jumpshare.com/preview/hOWXgtQM_x234lxOpA4km_sb9utNoaWZICgdH81HOY8wLadm2DjgwtyWnKwkJ2mlYX-z8bWrjfOrB2uhrRotd2hlUvBN6o9cv6E6pgbM-_s"
|
16923
|
+
}
|
16924
|
+
),
|
16925
|
+
placeholder: "Tìm kiếm"
|
16926
|
+
}
|
16927
|
+
) }) }),
|
16916
16928
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("nav", { className: twMerge("flex flex-1 flex-col px-2"), children: [
|
16917
16929
|
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { role: "list", className: twMerge("-mx-2 space-y-1 relative"), children: menu.map((item) => {
|
16918
16930
|
const isActive = openSubCollapse || [activeMainMenu, pathUrl].includes(item.href) || collapse;
|
@@ -17110,480 +17122,218 @@ const Sidebar = ({ children, menu }) => {
|
|
17110
17122
|
}
|
17111
17123
|
),
|
17112
17124
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
17113
|
-
"div",
|
17114
|
-
{
|
17115
|
-
className: twMerge(
|
17116
|
-
collapse && openSubCollapse ? "ml-18" : "",
|
17117
|
-
"flex-1 h-screen overflow-y-auto scrollbar-none"
|
17118
|
-
),
|
17119
|
-
children
|
17120
|
-
}
|
17121
|
-
)
|
17122
|
-
] });
|
17123
|
-
};
|
17124
|
-
|
17125
|
-
const
|
17126
|
-
|
17127
|
-
|
17128
|
-
|
17129
|
-
|
17130
|
-
|
17131
|
-
};
|
17132
|
-
|
17133
|
-
const
|
17134
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17135
|
-
|
17136
|
-
|
17137
|
-
|
17138
|
-
|
17139
|
-
|
17140
|
-
|
17141
|
-
|
17142
|
-
|
17143
|
-
|
17144
|
-
}
|
17145
|
-
) : children });
|
17146
|
-
};
|
17147
|
-
|
17148
|
-
const Popconfirm = ({ children, ...rest }) => {
|
17149
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popconfirm$1, { ...rest, children });
|
17150
|
-
};
|
17151
|
-
|
17152
|
-
const QRCode = (props) => {
|
17153
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(QRCode$1, { ...props });
|
17154
|
-
};
|
17155
|
-
|
17156
|
-
const Result = ({ children, ...rest }) => {
|
17157
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Result$1, { ...rest, children });
|
17158
|
-
};
|
17159
|
-
|
17160
|
-
const Rate = (props) => {
|
17161
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Rate$1, { ...props });
|
17162
|
-
};
|
17163
|
-
|
17164
|
-
const Segmented = (props) => {
|
17165
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Segmented$1, { ...props });
|
17166
|
-
};
|
17167
|
-
|
17168
|
-
const Statistic = (props) => {
|
17169
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Statistic$1, { ...props });
|
17170
|
-
};
|
17171
|
-
|
17172
|
-
const Timeline = (props) => {
|
17173
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Timeline$1, { ...props });
|
17174
|
-
};
|
17175
|
-
|
17176
|
-
const Tour = (props) => {
|
17177
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tour$1, { ...props });
|
17178
|
-
};
|
17179
|
-
|
17180
|
-
const Tree = (props) => {
|
17181
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tree$1, { ...props });
|
17182
|
-
};
|
17183
|
-
|
17184
|
-
const Watermark = ({ ...rest }) => {
|
17185
|
-
const { Paragraph } = Typography$1;
|
17186
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex$1, { gap: "middle", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Watermark$1, { ...rest, children: [
|
17187
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Typography$1, { children: [
|
17188
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "The light-speed iteration of the digital world makes products more complex. However, human consciousness and attention resources are limited. Facing this design contradiction, the pursuit of natural interaction will be the consistent direction of Ant Design." }),
|
17189
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "Natural user cognition: According to cognitive psychology, about 80% of external information is obtained through visual channels. The most important visual elements in the interface design, including layout, colors, illustrations, icons, etc., should fully absorb the laws of nature, thereby reducing the user's cognitive cost and bringing authentic and smooth feelings. In some scenarios, opportunely adding other sensory channels such as hearing, touch can create a richer and more natural product experience." }),
|
17190
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "Natural user behavior: In the interaction with the system, the designer should fully understand the relationship between users, system roles, and task objectives, and also contextually organize system functions and services. At the same time, a series of methods such as behavior analysis, artificial intelligence and sensors could be applied to assist users to make effective decisions and reduce extra operations of users, to save users' mental and physical resources and make human-computer interaction more natural." })
|
17191
|
-
] }),
|
17192
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
17193
|
-
"img",
|
17194
|
-
{
|
17195
|
-
style: {
|
17196
|
-
zIndex: 10,
|
17197
|
-
width: "100%",
|
17198
|
-
maxWidth: 800,
|
17199
|
-
position: "relative"
|
17200
|
-
},
|
17201
|
-
src: "https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ",
|
17202
|
-
alt: "img"
|
17203
|
-
}
|
17204
|
-
)
|
17205
|
-
] }) });
|
17206
|
-
};
|
17207
|
-
|
17208
|
-
const AnchorContext = /*#__PURE__*/React.createContext(undefined);
|
17209
|
-
|
17210
|
-
const AnchorLink = props => {
|
17211
|
-
const {
|
17212
|
-
href,
|
17213
|
-
title,
|
17214
|
-
prefixCls: customizePrefixCls,
|
17215
|
-
children,
|
17216
|
-
className,
|
17217
|
-
target,
|
17218
|
-
replace
|
17219
|
-
} = props;
|
17220
|
-
const context = React.useContext(AnchorContext);
|
17221
|
-
const {
|
17222
|
-
registerLink,
|
17223
|
-
unregisterLink,
|
17224
|
-
scrollTo,
|
17225
|
-
onClick,
|
17226
|
-
activeLink,
|
17227
|
-
direction
|
17228
|
-
} = context || {};
|
17229
|
-
React.useEffect(() => {
|
17230
|
-
registerLink === null || registerLink === void 0 ? void 0 : registerLink(href);
|
17231
|
-
return () => {
|
17232
|
-
unregisterLink === null || unregisterLink === void 0 ? void 0 : unregisterLink(href);
|
17233
|
-
};
|
17234
|
-
}, [href]);
|
17235
|
-
const handleClick = e => {
|
17236
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(e, {
|
17237
|
-
title,
|
17238
|
-
href
|
17239
|
-
});
|
17240
|
-
scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
|
17241
|
-
// Support clicking on an anchor does not record history.
|
17242
|
-
if (e.defaultPrevented) {
|
17243
|
-
return;
|
17244
|
-
}
|
17245
|
-
const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
|
17246
|
-
// Support external link
|
17247
|
-
if (isExternalLink) {
|
17248
|
-
if (replace) {
|
17249
|
-
e.preventDefault();
|
17250
|
-
window.location.replace(href);
|
17251
|
-
}
|
17252
|
-
return;
|
17253
|
-
}
|
17254
|
-
// Handling internal anchor link
|
17255
|
-
e.preventDefault();
|
17256
|
-
const historyMethod = replace ? 'replaceState' : 'pushState';
|
17257
|
-
window.history[historyMethod](null, '', href);
|
17258
|
-
};
|
17259
|
-
// =================== Warning =====================
|
17260
|
-
if (process.env.NODE_ENV !== 'production') {
|
17261
|
-
const warning = devUseWarning('Anchor.Link');
|
17262
|
-
process.env.NODE_ENV !== "production" ? warning(!children || direction !== 'horizontal', 'usage', '`Anchor.Link children` is not supported when `Anchor` direction is horizontal') : void 0;
|
17263
|
-
}
|
17264
|
-
const {
|
17265
|
-
getPrefixCls
|
17266
|
-
} = React.useContext(ConfigContext);
|
17267
|
-
const prefixCls = getPrefixCls('anchor', customizePrefixCls);
|
17268
|
-
const active = activeLink === href;
|
17269
|
-
const wrapperClassName = classNames(`${prefixCls}-link`, className, {
|
17270
|
-
[`${prefixCls}-link-active`]: active
|
17271
|
-
});
|
17272
|
-
const titleClassName = classNames(`${prefixCls}-link-title`, {
|
17273
|
-
[`${prefixCls}-link-title-active`]: active
|
17274
|
-
});
|
17275
|
-
return /*#__PURE__*/React.createElement("div", {
|
17276
|
-
className: wrapperClassName
|
17277
|
-
}, /*#__PURE__*/React.createElement("a", {
|
17278
|
-
className: titleClassName,
|
17279
|
-
href: href,
|
17280
|
-
title: typeof title === 'string' ? title : '',
|
17281
|
-
target: target,
|
17282
|
-
onClick: handleClick
|
17283
|
-
}, title), direction !== 'horizontal' ? children : null);
|
17284
|
-
};
|
17285
|
-
|
17286
|
-
const AnchorComponent = (props) => {
|
17287
|
-
const { containerClassName, spaceClassName, ...restProps } = props;
|
17288
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor$1, { className: spaceClassName, ...restProps }) });
|
17289
|
-
};
|
17290
|
-
AnchorComponent.Link = AnchorLink;
|
17291
|
-
const Anchor = AnchorComponent;
|
17292
|
-
|
17293
|
-
const Appfix = ({ children, ...rest }) => {
|
17294
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Affix, { ...rest, children });
|
17295
|
-
};
|
17296
|
-
|
17297
|
-
const AutoComplete = (props) => {
|
17298
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AutoComplete$1, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input$1, {}) });
|
17299
|
-
};
|
17300
|
-
|
17301
|
-
const PnkxCollapse = (props) => {
|
17302
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collapse, { ...props });
|
17303
|
-
};
|
17304
|
-
|
17305
|
-
const PnkxColorPicker = (props) => {
|
17306
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(ColorPicker, { ...props });
|
17307
|
-
};
|
17308
|
-
|
17309
|
-
const Empty = (props) => {
|
17310
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Empty$2, { ...props });
|
17311
|
-
};
|
17312
|
-
|
17313
|
-
const Image = (props) => {
|
17314
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Image$1, { ...props });
|
17315
|
-
};
|
17316
|
-
|
17317
|
-
const ConfirmModal = ({
|
17318
|
-
title,
|
17319
|
-
content,
|
17320
|
-
typeIcon,
|
17321
|
-
titleCancelBtn = "Huỷ bỏ",
|
17322
|
-
titleSubmitBtn = "Xác nhận",
|
17323
|
-
handleCancel,
|
17324
|
-
handleSubmit,
|
17325
|
-
...restProps
|
17326
|
-
}) => {
|
17327
|
-
//! State
|
17328
|
-
const IconType = () => {
|
17329
|
-
switch (typeIcon) {
|
17330
|
-
case "success":
|
17331
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17332
|
-
"svg",
|
17333
|
-
{
|
17334
|
-
xmlns: "http://www.w3.org/2000/svg",
|
17335
|
-
width: "24",
|
17336
|
-
height: "24",
|
17337
|
-
viewBox: "0 0 24 24",
|
17338
|
-
fill: "none",
|
17339
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17340
|
-
"path",
|
17341
|
-
{
|
17342
|
-
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM16.5352 8.57109L11.5992 15.4148C11.5302 15.5111 11.4393 15.5896 11.3339 15.6437C11.2286 15.6978 11.1118 15.7261 10.9934 15.7261C10.8749 15.7261 10.7582 15.6978 10.6528 15.6437C10.5474 15.5896 10.4565 15.5111 10.3875 15.4148L7.46484 11.3648C7.37578 11.2406 7.46484 11.0672 7.61719 11.0672H8.71641C8.95547 11.0672 9.18281 11.182 9.32344 11.3789L10.9922 13.6945L14.6766 8.58516C14.8172 8.39062 15.0422 8.27344 15.2836 8.27344H16.3828C16.5352 8.27344 16.6242 8.44688 16.5352 8.57109Z",
|
17343
|
-
fill: "#52C41A"
|
17344
|
-
}
|
17345
|
-
)
|
17346
|
-
}
|
17347
|
-
);
|
17348
|
-
case "error":
|
17349
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17350
|
-
"svg",
|
17351
|
-
{
|
17352
|
-
xmlns: "http://www.w3.org/2000/svg",
|
17353
|
-
width: "24",
|
17354
|
-
height: "24",
|
17355
|
-
viewBox: "0 0 24 24",
|
17356
|
-
fill: "none",
|
17357
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17358
|
-
"path",
|
17359
|
-
{
|
17360
|
-
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM15.8766 15.9891L14.3297 15.982L12 13.2047L9.67266 15.9797L8.12344 15.9867C8.02031 15.9867 7.93594 15.9047 7.93594 15.7992C7.93594 15.7547 7.95234 15.7125 7.98047 15.6773L11.0297 12.0445L7.98047 8.41406C7.95215 8.37971 7.93643 8.3367 7.93594 8.29219C7.93594 8.18906 8.02031 8.10469 8.12344 8.10469L9.67266 8.11172L12 10.8891L14.3273 8.11406L15.8742 8.10703C15.9773 8.10703 16.0617 8.18906 16.0617 8.29453C16.0617 8.33906 16.0453 8.38125 16.0172 8.41641L12.9727 12.0469L16.0195 15.6797C16.0477 15.7148 16.0641 15.757 16.0641 15.8016C16.0641 15.9047 15.9797 15.9891 15.8766 15.9891Z",
|
17361
|
-
fill: "#FF4D4F"
|
17362
|
-
}
|
17363
|
-
)
|
17364
|
-
}
|
17365
|
-
);
|
17366
|
-
case "info":
|
17367
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17368
|
-
"svg",
|
17369
|
-
{
|
17370
|
-
xmlns: "http://www.w3.org/2000/svg",
|
17371
|
-
width: "24",
|
17372
|
-
height: "24",
|
17373
|
-
viewBox: "0 0 24 24",
|
17374
|
-
fill: "none",
|
17375
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17376
|
-
"path",
|
17377
|
-
{
|
17378
|
-
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM12.75 17.0625C12.75 17.1656 12.6656 17.25 12.5625 17.25H11.4375C11.3344 17.25 11.25 17.1656 11.25 17.0625V10.6875C11.25 10.5844 11.3344 10.5 11.4375 10.5H12.5625C12.6656 10.5 12.75 10.5844 12.75 10.6875V17.0625ZM12 9C11.7056 8.99399 11.4253 8.87282 11.2192 8.6625C11.0132 8.45218 10.8977 8.16945 10.8977 7.875C10.8977 7.58055 11.0132 7.29782 11.2192 7.0875C11.4253 6.87718 11.7056 6.75601 12 6.75C12.2944 6.75601 12.5747 6.87718 12.7808 7.0875C12.9868 7.29782 13.1023 7.58055 13.1023 7.875C13.1023 8.16945 12.9868 8.45218 12.7808 8.6625C12.5747 8.87282 12.2944 8.99399 12 9Z",
|
17379
|
-
fill: "#1677FF"
|
17380
|
-
}
|
17381
|
-
)
|
17382
|
-
}
|
17383
|
-
);
|
17384
|
-
case "warning":
|
17385
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17386
|
-
"svg",
|
17387
|
-
{
|
17388
|
-
xmlns: "http://www.w3.org/2000/svg",
|
17389
|
-
width: "24",
|
17390
|
-
height: "24",
|
17391
|
-
viewBox: "0 0 24 24",
|
17392
|
-
fill: "none",
|
17393
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17394
|
-
"path",
|
17395
|
-
{
|
17396
|
-
d: "M12 1.5C6.20156 1.5 1.5 6.20156 1.5 12C1.5 17.7984 6.20156 22.5 12 22.5C17.7984 22.5 22.5 17.7984 22.5 12C22.5 6.20156 17.7984 1.5 12 1.5ZM11.25 6.9375C11.25 6.83437 11.3344 6.75 11.4375 6.75H12.5625C12.6656 6.75 12.75 6.83437 12.75 6.9375V13.3125C12.75 13.4156 12.6656 13.5 12.5625 13.5H11.4375C11.3344 13.5 11.25 13.4156 11.25 13.3125V6.9375ZM12 17.25C11.7056 17.244 11.4253 17.1228 11.2192 16.9125C11.0132 16.7022 10.8977 16.4195 10.8977 16.125C10.8977 15.8305 11.0132 15.5478 11.2192 15.3375C11.4253 15.1272 11.7056 15.006 12 15C12.2944 15.006 12.5747 15.1272 12.7808 15.3375C12.9868 15.5478 13.1023 15.8305 13.1023 16.125C13.1023 16.4195 12.9868 16.7022 12.7808 16.9125C12.5747 17.1228 12.2944 17.244 12 17.25Z",
|
17397
|
-
fill: "#FAAD14"
|
17398
|
-
}
|
17399
|
-
)
|
17400
|
-
}
|
17401
|
-
);
|
17402
|
-
}
|
17403
|
-
};
|
17404
|
-
//! Function
|
17405
|
-
//! Render
|
17406
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...restProps, footer: null, closeIcon: null, width: 400, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
17407
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
|
17408
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(IconType, {}),
|
17409
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
17410
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-base font-semibold", children: title }),
|
17411
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm", children: content })
|
17412
|
-
] })
|
17413
|
-
] }),
|
17414
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-2 w-full justify-end items-end pt-3", children: [
|
17415
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { shape: "round", onClick: handleCancel, children: titleCancelBtn }),
|
17416
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { shape: "round", type: "primary", onClick: handleSubmit, children: titleSubmitBtn })
|
17417
|
-
] })
|
17418
|
-
] }) });
|
17419
|
-
};
|
17420
|
-
|
17421
|
-
var CATEGORY_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_LIST_ENUM2) => {
|
17422
|
-
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DRAFT"] = 0] = "DRAFT";
|
17423
|
-
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["WATING_APPROVAL"] = 1] = "WATING_APPROVAL";
|
17424
|
-
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["ACTIVE"] = 2] = "ACTIVE";
|
17425
|
-
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["INACTIVE"] = 3] = "INACTIVE";
|
17426
|
-
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["REJECT"] = 4] = "REJECT";
|
17427
|
-
CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DELETE"] = 5] = "DELETE";
|
17428
|
-
return CATEGORY_LIST_ENUM2;
|
17429
|
-
})(CATEGORY_LIST_ENUM || {});
|
17430
|
-
|
17431
|
-
const BulkAction = ({
|
17432
|
-
quantity,
|
17433
|
-
handleRestore,
|
17434
|
-
handleSendApproval,
|
17435
|
-
handleCancelSendApproval,
|
17436
|
-
handleRefuseApproval,
|
17437
|
-
handleApproval,
|
17438
|
-
handleCancelApproval,
|
17439
|
-
handleDelete,
|
17440
|
-
handleActivate,
|
17441
|
-
handleInActivate,
|
17442
|
-
status
|
17443
|
-
}) => {
|
17444
|
-
//! State
|
17445
|
-
const listIcon = [
|
17446
|
-
{
|
17447
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RestoreIcon, { stroke: "white" }),
|
17448
|
-
action: handleRestore,
|
17449
|
-
showConfirmModal: false,
|
17450
|
-
title: "Khôi phục",
|
17451
|
-
arrShow: [CATEGORY_LIST_ENUM?.DELETE, CATEGORY_LIST_ENUM?.REJECT]
|
17452
|
-
},
|
17453
|
-
{
|
17454
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(SendApprovalIcon, { stroke: "white" }),
|
17455
|
-
action: handleSendApproval,
|
17456
|
-
showConfirmModal: true,
|
17457
|
-
typeIcon: "info",
|
17458
|
-
title: "Xác nhận gửi duyệt",
|
17459
|
-
content: "Bạn có chắc chắn muốn gửi duyệt mục này không?",
|
17460
|
-
arrShow: [CATEGORY_LIST_ENUM?.DRAFT]
|
17461
|
-
},
|
17462
|
-
{
|
17463
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelSendApprovalIcon, { stroke: "white" }),
|
17464
|
-
action: handleCancelSendApproval,
|
17465
|
-
showConfirmModal: true,
|
17466
|
-
typeIcon: "error",
|
17467
|
-
title: "Xác nhận hủy gửi duyệt",
|
17468
|
-
content: "Bạn có chắc chắn muốn hủy gửi duyệt mục này không?",
|
17469
|
-
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
17470
|
-
},
|
17471
|
-
{
|
17472
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(RefuseApprovalIcon, { stroke: "white" }),
|
17473
|
-
action: handleRefuseApproval,
|
17474
|
-
showConfirmModal: true,
|
17475
|
-
typeIcon: "error",
|
17476
|
-
title: "Xác nhận từ chối duyệt",
|
17477
|
-
content: "Bạn có chắc chắn muốn từ chối duyệt mục này không? Hành động này không thể hoàn tác.",
|
17478
|
-
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
17479
|
-
},
|
17480
|
-
{
|
17481
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalIcon, { stroke: "white" }),
|
17482
|
-
action: handleApproval,
|
17483
|
-
showConfirmModal: true,
|
17484
|
-
typeIcon: "info",
|
17485
|
-
title: "Xác nhận duyệt",
|
17486
|
-
content: "Bạn có chắc chắn muốn duyệt mục này không?",
|
17487
|
-
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
17488
|
-
},
|
17489
|
-
{
|
17490
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelApprovalIcon, { stroke: "white" }),
|
17491
|
-
action: handleCancelApproval,
|
17492
|
-
showConfirmModal: true,
|
17493
|
-
typeIcon: "error",
|
17494
|
-
title: "Xác nhận hủy duyệt",
|
17495
|
-
content: "Bạn có chắc chắn muốn hủy duyệt mục này không?",
|
17496
|
-
arrShow: [CATEGORY_LIST_ENUM?.ACTIVE]
|
17497
|
-
},
|
17498
|
-
{
|
17499
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fill: "white" }),
|
17500
|
-
action: handleDelete,
|
17501
|
-
showConfirmModal: true,
|
17502
|
-
typeIcon: "error",
|
17503
|
-
title: "Xác nhận xóa",
|
17504
|
-
content: "Bạn có chắc chắn muốn xóa mục này không? Hành động này không thể hoàn tác.",
|
17505
|
-
arrShow: [
|
17506
|
-
CATEGORY_LIST_ENUM?.DRAFT,
|
17507
|
-
CATEGORY_LIST_ENUM?.ACTIVE,
|
17508
|
-
CATEGORY_LIST_ENUM?.INACTIVE
|
17509
|
-
]
|
17510
|
-
},
|
17511
|
-
{
|
17512
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivateIcon, { stroke: "white" }),
|
17513
|
-
action: handleActivate,
|
17514
|
-
showConfirmModal: true,
|
17515
|
-
typeIcon: "info",
|
17516
|
-
title: "Xác nhận kích hoạt",
|
17517
|
-
content: "Bạn có chắc chắn muốn kích hoạt mục này không?",
|
17518
|
-
arrShow: [CATEGORY_LIST_ENUM?.INACTIVE]
|
17519
|
-
},
|
17125
|
+
"div",
|
17126
|
+
{
|
17127
|
+
className: twMerge(
|
17128
|
+
collapse && openSubCollapse ? "ml-18" : "",
|
17129
|
+
"flex-1 p-4 h-screen overflow-y-auto scrollbar-none"
|
17130
|
+
),
|
17131
|
+
children
|
17132
|
+
}
|
17133
|
+
)
|
17134
|
+
] });
|
17135
|
+
};
|
17136
|
+
|
17137
|
+
const Tag = (props) => {
|
17138
|
+
const { children, ...rest } = props;
|
17139
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tag$1, { ...rest, children: [
|
17140
|
+
" ",
|
17141
|
+
children
|
17142
|
+
] });
|
17143
|
+
};
|
17144
|
+
|
17145
|
+
const Alert = (props) => {
|
17146
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert$1, { ...props });
|
17147
|
+
};
|
17148
|
+
|
17149
|
+
const Spin = ({ children, ...rest }) => {
|
17150
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Spin$1, { ...rest, children });
|
17151
|
+
};
|
17152
|
+
|
17153
|
+
const Drawer = ({ onSubmit, children, ...rest }) => {
|
17154
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Drawer$1, { ...rest, children: onSubmit ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17155
|
+
"form",
|
17520
17156
|
{
|
17521
|
-
|
17522
|
-
|
17523
|
-
|
17524
|
-
|
17525
|
-
|
17526
|
-
|
17527
|
-
|
17528
|
-
}
|
17529
|
-
];
|
17530
|
-
const [open, setOpen] = useState(false);
|
17531
|
-
const [notifyContent, setNotifyContent] = useState({
|
17532
|
-
title: "",
|
17533
|
-
content: "",
|
17534
|
-
typeIcon: "info",
|
17535
|
-
handleCancel: () => {
|
17536
|
-
},
|
17537
|
-
handleSubmit: () => {
|
17157
|
+
id: "pnkx-form",
|
17158
|
+
onSubmit: (e) => {
|
17159
|
+
e.preventDefault();
|
17160
|
+
onSubmit?.(e);
|
17161
|
+
},
|
17162
|
+
method: "POST",
|
17163
|
+
children
|
17538
17164
|
}
|
17539
|
-
});
|
17540
|
-
|
17541
|
-
|
17542
|
-
|
17543
|
-
};
|
17544
|
-
|
17545
|
-
|
17546
|
-
|
17547
|
-
|
17548
|
-
|
17165
|
+
) : children });
|
17166
|
+
};
|
17167
|
+
|
17168
|
+
const Popconfirm = ({ children, ...rest }) => {
|
17169
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popconfirm$1, { ...rest, children });
|
17170
|
+
};
|
17171
|
+
|
17172
|
+
const QRCode = (props) => {
|
17173
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(QRCode$1, { ...props });
|
17174
|
+
};
|
17175
|
+
|
17176
|
+
const Result = ({ children, ...rest }) => {
|
17177
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Result$1, { ...rest, children });
|
17178
|
+
};
|
17179
|
+
|
17180
|
+
const Rate = (props) => {
|
17181
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Rate$1, { ...props });
|
17182
|
+
};
|
17183
|
+
|
17184
|
+
const Segmented = (props) => {
|
17185
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Segmented$1, { ...props });
|
17186
|
+
};
|
17187
|
+
|
17188
|
+
const Statistic = (props) => {
|
17189
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Statistic$1, { ...props });
|
17190
|
+
};
|
17191
|
+
|
17192
|
+
const Timeline = (props) => {
|
17193
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Timeline$1, { ...props });
|
17194
|
+
};
|
17195
|
+
|
17196
|
+
const Tour = (props) => {
|
17197
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tour$1, { ...props });
|
17198
|
+
};
|
17199
|
+
|
17200
|
+
const Tree = (props) => {
|
17201
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tree$1, { ...props });
|
17202
|
+
};
|
17203
|
+
|
17204
|
+
const Watermark = ({ ...rest }) => {
|
17205
|
+
const { Paragraph } = Typography;
|
17206
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex$1, { gap: "middle", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Watermark$1, { ...rest, children: [
|
17207
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { children: [
|
17208
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "The light-speed iteration of the digital world makes products more complex. However, human consciousness and attention resources are limited. Facing this design contradiction, the pursuit of natural interaction will be the consistent direction of Ant Design." }),
|
17209
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "Natural user cognition: According to cognitive psychology, about 80% of external information is obtained through visual channels. The most important visual elements in the interface design, including layout, colors, illustrations, icons, etc., should fully absorb the laws of nature, thereby reducing the user's cognitive cost and bringing authentic and smooth feelings. In some scenarios, opportunely adding other sensory channels such as hearing, touch can create a richer and more natural product experience." }),
|
17210
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Paragraph, { children: "Natural user behavior: In the interaction with the system, the designer should fully understand the relationship between users, system roles, and task objectives, and also contextually organize system functions and services. At the same time, a series of methods such as behavior analysis, artificial intelligence and sensors could be applied to assist users to make effective decisions and reduce extra operations of users, to save users' mental and physical resources and make human-computer interaction more natural." })
|
17549
17211
|
] }),
|
17550
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-5 border-l border-white mx-1" }),
|
17551
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center space-x-3", children: listIcon.map(
|
17552
|
-
(item, index) => IsShow(item?.arrShow) && /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: item?.title, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
17553
|
-
"button",
|
17554
|
-
{
|
17555
|
-
className: "p-1 rounded-sm transition duration-200 cursor-pointer hover:bg-[#1B4ACB] hover:rounded-sm",
|
17556
|
-
onClick: item?.showConfirmModal ? () => {
|
17557
|
-
setOpen(true);
|
17558
|
-
setNotifyContent({
|
17559
|
-
title: item?.title || "",
|
17560
|
-
content: item?.content || "",
|
17561
|
-
typeIcon: item?.typeIcon,
|
17562
|
-
handleCancel: () => {
|
17563
|
-
setOpen(false);
|
17564
|
-
},
|
17565
|
-
handleSubmit: item?.action
|
17566
|
-
});
|
17567
|
-
} : item?.action,
|
17568
|
-
children: item.icon
|
17569
|
-
},
|
17570
|
-
index
|
17571
|
-
) })
|
17572
|
-
) }),
|
17573
17212
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
17574
|
-
|
17213
|
+
"img",
|
17575
17214
|
{
|
17576
|
-
|
17577
|
-
|
17578
|
-
|
17579
|
-
|
17580
|
-
|
17581
|
-
|
17215
|
+
style: {
|
17216
|
+
zIndex: 10,
|
17217
|
+
width: "100%",
|
17218
|
+
maxWidth: 800,
|
17219
|
+
position: "relative"
|
17220
|
+
},
|
17221
|
+
src: "https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ",
|
17222
|
+
alt: "img"
|
17582
17223
|
}
|
17583
17224
|
)
|
17584
17225
|
] }) });
|
17585
17226
|
};
|
17586
17227
|
|
17228
|
+
const AnchorContext = /*#__PURE__*/React.createContext(undefined);
|
17229
|
+
|
17230
|
+
const AnchorLink = props => {
|
17231
|
+
const {
|
17232
|
+
href,
|
17233
|
+
title,
|
17234
|
+
prefixCls: customizePrefixCls,
|
17235
|
+
children,
|
17236
|
+
className,
|
17237
|
+
target,
|
17238
|
+
replace
|
17239
|
+
} = props;
|
17240
|
+
const context = React.useContext(AnchorContext);
|
17241
|
+
const {
|
17242
|
+
registerLink,
|
17243
|
+
unregisterLink,
|
17244
|
+
scrollTo,
|
17245
|
+
onClick,
|
17246
|
+
activeLink,
|
17247
|
+
direction
|
17248
|
+
} = context || {};
|
17249
|
+
React.useEffect(() => {
|
17250
|
+
registerLink === null || registerLink === void 0 ? void 0 : registerLink(href);
|
17251
|
+
return () => {
|
17252
|
+
unregisterLink === null || unregisterLink === void 0 ? void 0 : unregisterLink(href);
|
17253
|
+
};
|
17254
|
+
}, [href]);
|
17255
|
+
const handleClick = e => {
|
17256
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e, {
|
17257
|
+
title,
|
17258
|
+
href
|
17259
|
+
});
|
17260
|
+
scrollTo === null || scrollTo === void 0 ? void 0 : scrollTo(href);
|
17261
|
+
// Support clicking on an anchor does not record history.
|
17262
|
+
if (e.defaultPrevented) {
|
17263
|
+
return;
|
17264
|
+
}
|
17265
|
+
const isExternalLink = href.startsWith('http://') || href.startsWith('https://');
|
17266
|
+
// Support external link
|
17267
|
+
if (isExternalLink) {
|
17268
|
+
if (replace) {
|
17269
|
+
e.preventDefault();
|
17270
|
+
window.location.replace(href);
|
17271
|
+
}
|
17272
|
+
return;
|
17273
|
+
}
|
17274
|
+
// Handling internal anchor link
|
17275
|
+
e.preventDefault();
|
17276
|
+
const historyMethod = replace ? 'replaceState' : 'pushState';
|
17277
|
+
window.history[historyMethod](null, '', href);
|
17278
|
+
};
|
17279
|
+
// =================== Warning =====================
|
17280
|
+
if (process.env.NODE_ENV !== 'production') {
|
17281
|
+
const warning = devUseWarning('Anchor.Link');
|
17282
|
+
process.env.NODE_ENV !== "production" ? warning(!children || direction !== 'horizontal', 'usage', '`Anchor.Link children` is not supported when `Anchor` direction is horizontal') : void 0;
|
17283
|
+
}
|
17284
|
+
const {
|
17285
|
+
getPrefixCls
|
17286
|
+
} = React.useContext(ConfigContext);
|
17287
|
+
const prefixCls = getPrefixCls('anchor', customizePrefixCls);
|
17288
|
+
const active = activeLink === href;
|
17289
|
+
const wrapperClassName = classNames(`${prefixCls}-link`, className, {
|
17290
|
+
[`${prefixCls}-link-active`]: active
|
17291
|
+
});
|
17292
|
+
const titleClassName = classNames(`${prefixCls}-link-title`, {
|
17293
|
+
[`${prefixCls}-link-title-active`]: active
|
17294
|
+
});
|
17295
|
+
return /*#__PURE__*/React.createElement("div", {
|
17296
|
+
className: wrapperClassName
|
17297
|
+
}, /*#__PURE__*/React.createElement("a", {
|
17298
|
+
className: titleClassName,
|
17299
|
+
href: href,
|
17300
|
+
title: typeof title === 'string' ? title : '',
|
17301
|
+
target: target,
|
17302
|
+
onClick: handleClick
|
17303
|
+
}, title), direction !== 'horizontal' ? children : null);
|
17304
|
+
};
|
17305
|
+
|
17306
|
+
const AnchorComponent = (props) => {
|
17307
|
+
const { containerClassName, spaceClassName, ...restProps } = props;
|
17308
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Anchor$1, { className: spaceClassName, ...restProps }) });
|
17309
|
+
};
|
17310
|
+
AnchorComponent.Link = AnchorLink;
|
17311
|
+
const Anchor = AnchorComponent;
|
17312
|
+
|
17313
|
+
const Appfix = ({ children, ...rest }) => {
|
17314
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Affix, { ...rest, children });
|
17315
|
+
};
|
17316
|
+
|
17317
|
+
const AutoComplete = (props) => {
|
17318
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AutoComplete$1, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input$1, {}) });
|
17319
|
+
};
|
17320
|
+
|
17321
|
+
const PnkxCollapse = (props) => {
|
17322
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Collapse, { ...props });
|
17323
|
+
};
|
17324
|
+
|
17325
|
+
const PnkxColorPicker = (props) => {
|
17326
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(ColorPicker, { ...props });
|
17327
|
+
};
|
17328
|
+
|
17329
|
+
const Empty = (props) => {
|
17330
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Empty$2, { ...props });
|
17331
|
+
};
|
17332
|
+
|
17333
|
+
const Image = (props) => {
|
17334
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Image$1, { ...props });
|
17335
|
+
};
|
17336
|
+
|
17587
17337
|
class ErrorBoundaryClass extends Component {
|
17588
17338
|
constructor(props) {
|
17589
17339
|
super(props);
|