@pnkx-lib/ui 1.9.41 → 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-CqzBrT3-.js → index-DLRC7p6n.js} +124 -376
- 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 +45 -52
- package/types/ui.d.ts +35 -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
|
{
|
@@ -10572,6 +10252,8 @@ const tableCss = css`
|
|
10572
10252
|
.ant-table-thead .ant-table-cell {
|
10573
10253
|
background-color: #d6e6fe;
|
10574
10254
|
font-weight: 500;
|
10255
|
+
border-start-start-radius: 0 !important;
|
10256
|
+
border-start-end-radius: 0 !important;
|
10575
10257
|
}
|
10576
10258
|
|
10577
10259
|
.ant-table-thead th.ant-table-column-has-sorters:hover {
|
@@ -10610,11 +10292,10 @@ const Table = ({
|
|
10610
10292
|
setColumns,
|
10611
10293
|
resetToInitialFilters,
|
10612
10294
|
handleSearch,
|
10613
|
-
groupHeadingButtonItems,
|
10614
10295
|
tagSearchItems,
|
10615
10296
|
setTagSearchItems,
|
10616
|
-
|
10617
|
-
|
10297
|
+
renderHeadingSearch,
|
10298
|
+
rightHeadingContent,
|
10618
10299
|
status,
|
10619
10300
|
...rest
|
10620
10301
|
}) => {
|
@@ -10681,7 +10362,7 @@ const Table = ({
|
|
10681
10362
|
{
|
10682
10363
|
title: "Bạn có chắc chắn muốn huỷ chỉnh sửa?",
|
10683
10364
|
onConfirm: cancel,
|
10684
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography
|
10365
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: " Huỷ bỏ" })
|
10685
10366
|
}
|
10686
10367
|
),
|
10687
10368
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { htmlType: "submit", variant: "text", color: "blue", children: "Lưu" })
|
@@ -10754,16 +10435,13 @@ const Table = ({
|
|
10754
10435
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
10755
10436
|
HeadingTable,
|
10756
10437
|
{
|
10438
|
+
rightHeadingContent,
|
10439
|
+
renderHeadingSearch,
|
10757
10440
|
filters,
|
10758
10441
|
handleSearch,
|
10759
10442
|
resetToInitialFilters,
|
10760
10443
|
setOpenStting,
|
10761
|
-
showSetting
|
10762
|
-
groupHeadingButtonItems,
|
10763
|
-
tagSearchItems,
|
10764
|
-
setTagSearchItems,
|
10765
|
-
keyActive,
|
10766
|
-
setKeyActive
|
10444
|
+
showSetting
|
10767
10445
|
}
|
10768
10446
|
),
|
10769
10447
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -10892,6 +10570,54 @@ const Popover = (props) => {
|
|
10892
10570
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: containerClassName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Popover$1, { className: popoverClassName, ...restProps }) });
|
10893
10571
|
};
|
10894
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
|
+
|
10895
10621
|
const Container = ({
|
10896
10622
|
children,
|
10897
10623
|
className,
|
@@ -14487,7 +14213,7 @@ function genStyleUtils(config) {
|
|
14487
14213
|
};
|
14488
14214
|
}
|
14489
14215
|
|
14490
|
-
const version = '5.25.
|
14216
|
+
const version = '5.25.1';
|
14491
14217
|
|
14492
14218
|
function isStableColor(color) {
|
14493
14219
|
return color >= 0 && color <= 255;
|
@@ -17185,6 +16911,20 @@ const Sidebar = ({ children, menu }) => {
|
|
17185
16911
|
)
|
17186
16912
|
}
|
17187
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
|
+
) }) }),
|
17188
16928
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("nav", { className: twMerge("flex flex-1 flex-col px-2"), children: [
|
17189
16929
|
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { role: "list", className: twMerge("-mx-2 space-y-1 relative"), children: menu.map((item) => {
|
17190
16930
|
const isActive = openSubCollapse || [activeMainMenu, pathUrl].includes(item.href) || collapse;
|
@@ -17386,7 +17126,7 @@ const Sidebar = ({ children, menu }) => {
|
|
17386
17126
|
{
|
17387
17127
|
className: twMerge(
|
17388
17128
|
collapse && openSubCollapse ? "ml-18" : "",
|
17389
|
-
"flex-1 h-screen overflow-y-auto scrollbar-none"
|
17129
|
+
"flex-1 p-4 h-screen overflow-y-auto scrollbar-none"
|
17390
17130
|
),
|
17391
17131
|
children
|
17392
17132
|
}
|
@@ -17394,6 +17134,14 @@ const Sidebar = ({ children, menu }) => {
|
|
17394
17134
|
] });
|
17395
17135
|
};
|
17396
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
|
+
|
17397
17145
|
const Alert = (props) => {
|
17398
17146
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert$1, { ...props });
|
17399
17147
|
};
|
@@ -17454,9 +17202,9 @@ const Tree = (props) => {
|
|
17454
17202
|
};
|
17455
17203
|
|
17456
17204
|
const Watermark = ({ ...rest }) => {
|
17457
|
-
const { Paragraph } = Typography
|
17205
|
+
const { Paragraph } = Typography;
|
17458
17206
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex$1, { gap: "middle", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Watermark$1, { ...rest, children: [
|
17459
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs(Typography
|
17207
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { children: [
|
17460
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." }),
|
17461
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." }),
|
17462
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." })
|
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,
|
2
|
-
export { R as RadioGroup } from '../chunks/Radio-
|
1
|
+
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/Switch-jt4L5Z_9.js';
|
2
|
+
export { R as RadioGroup, S as Select } from '../chunks/Radio-CZubVPdR.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,
|
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-DLRC7p6n.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/Switch-jt4L5Z_9.js';
|
3
3
|
import 'react-router';
|
4
4
|
export { P as PAGE_INDEX, b as PAGE_SIZE, c as SORT_BY, d as SORT_DESC, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable, u as useToast } from './chunks/table-B28OPA57.js';
|
5
|
-
export { R as RadioGroup } from './chunks/Radio-
|
5
|
+
export { R as RadioGroup, S as Select } from './chunks/Radio-CZubVPdR.js';
|
6
6
|
export { u as useFiltersHandler, a as useMessage, b as useToggle } from './chunks/useToggle-C5Y4aFUQ.js';
|