@pnkx-lib/ui 1.9.255 → 1.9.257
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/ui/index.js
CHANGED
|
@@ -4629,7 +4629,7 @@ const SettingTable = (props) => {
|
|
|
4629
4629
|
const handleOkModal = () => {
|
|
4630
4630
|
setOpen(false);
|
|
4631
4631
|
};
|
|
4632
|
-
const onSubmit = (
|
|
4632
|
+
const onSubmit = () => {
|
|
4633
4633
|
setOpen(false);
|
|
4634
4634
|
if (setDefaultSettingColumnItems) {
|
|
4635
4635
|
setDefaultSettingColumnItems(columns);
|
|
@@ -4686,7 +4686,6 @@ const SettingTable = (props) => {
|
|
|
4686
4686
|
open,
|
|
4687
4687
|
title: title || titleHeader(),
|
|
4688
4688
|
closable: true,
|
|
4689
|
-
onClose: handleCloseModal,
|
|
4690
4689
|
onOk: handleOkModal,
|
|
4691
4690
|
className: "setting-table-modal",
|
|
4692
4691
|
footer: null,
|
|
@@ -4904,37 +4903,38 @@ const DropListActions = ({
|
|
|
4904
4903
|
};
|
|
4905
4904
|
const renderContentPopover = () => {
|
|
4906
4905
|
return /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: !isEmpty(listIcon) && listIcon?.map(
|
|
4907
|
-
(item, index) => (
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
/* @__PURE__ */ jsx("span", { children: item.name || "" })
|
|
4932
|
-
]
|
|
4906
|
+
(item, index) => item?.showTitle && /* @__PURE__ */ jsxs(
|
|
4907
|
+
"button",
|
|
4908
|
+
{
|
|
4909
|
+
className: twMerge(
|
|
4910
|
+
"flex gap-4 px-3 py-2 rounded-sm transition duration-200 hover:rounded-sm",
|
|
4911
|
+
IsShow(item?.arrShow) ? "hover:bg-[#F5F6F7] cursor-pointer" : "text-[#B2B7C2] cursor-not-allowed"
|
|
4912
|
+
),
|
|
4913
|
+
disabled: IsShow(item?.arrShow) ? false : true,
|
|
4914
|
+
onClick: () => {
|
|
4915
|
+
toggle();
|
|
4916
|
+
setNotifyContent({
|
|
4917
|
+
title: item?.title || "",
|
|
4918
|
+
content: item?.content || "",
|
|
4919
|
+
typeIcon: item?.typeIcon,
|
|
4920
|
+
handleCancel: () => {
|
|
4921
|
+
toggle();
|
|
4922
|
+
},
|
|
4923
|
+
handleSubmit: () => {
|
|
4924
|
+
if (item?.action) {
|
|
4925
|
+
item?.action();
|
|
4926
|
+
}
|
|
4927
|
+
toggle();
|
|
4928
|
+
}
|
|
4929
|
+
});
|
|
4933
4930
|
},
|
|
4934
|
-
|
|
4935
|
-
|
|
4931
|
+
children: [
|
|
4932
|
+
IsShow(item?.arrShow) ? item.iconDropList : item.iconDisable,
|
|
4933
|
+
/* @__PURE__ */ jsx("span", { children: item.name || "" })
|
|
4934
|
+
]
|
|
4935
|
+
},
|
|
4936
|
+
index
|
|
4936
4937
|
)
|
|
4937
|
-
// )
|
|
4938
4938
|
) });
|
|
4939
4939
|
};
|
|
4940
4940
|
//! Render
|
|
@@ -4967,7 +4967,7 @@ const BulkActions = ({
|
|
|
4967
4967
|
title: "Xác nhận khôi phục",
|
|
4968
4968
|
content: "Bạn có chắc chắn muốn khôi phục không?",
|
|
4969
4969
|
arrShow: [CATEGORY_LIST_ENUM?.DELETE, CATEGORY_LIST_ENUM?.REJECT],
|
|
4970
|
-
|
|
4970
|
+
showTitle: true
|
|
4971
4971
|
},
|
|
4972
4972
|
{
|
|
4973
4973
|
icon: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "white" }),
|
|
@@ -4979,7 +4979,7 @@ const BulkActions = ({
|
|
|
4979
4979
|
title: "Xác nhận gửi duyệt",
|
|
4980
4980
|
content: "Bạn có chắc chắn muốn gửi duyệt không?",
|
|
4981
4981
|
arrShow: [CATEGORY_LIST_ENUM?.DRAFT],
|
|
4982
|
-
|
|
4982
|
+
showTitle: true
|
|
4983
4983
|
},
|
|
4984
4984
|
{
|
|
4985
4985
|
icon: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "white" }),
|
|
@@ -4991,7 +4991,7 @@ const BulkActions = ({
|
|
|
4991
4991
|
title: "Xác nhận hủy gửi duyệt",
|
|
4992
4992
|
content: "Bạn có chắc chắn muốn hủy gửi duyệt không?",
|
|
4993
4993
|
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL],
|
|
4994
|
-
|
|
4994
|
+
showTitle: true
|
|
4995
4995
|
},
|
|
4996
4996
|
{
|
|
4997
4997
|
icon: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "white" }),
|
|
@@ -5002,7 +5002,8 @@ const BulkActions = ({
|
|
|
5002
5002
|
typeIcon: "error",
|
|
5003
5003
|
title: "Xác nhận từ chối duyệt",
|
|
5004
5004
|
content: "Bạn có chắc chắn muốn từ chối duyệt không? Hành động này không thể hoàn tác.",
|
|
5005
|
-
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL]
|
|
5005
|
+
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL],
|
|
5006
|
+
showTitle: true
|
|
5006
5007
|
},
|
|
5007
5008
|
{
|
|
5008
5009
|
icon: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "white" }),
|
|
@@ -5014,7 +5015,7 @@ const BulkActions = ({
|
|
|
5014
5015
|
title: "Xác nhận duyệt",
|
|
5015
5016
|
content: "Bạn có chắc chắn muốn duyệt không?",
|
|
5016
5017
|
arrShow: [CATEGORY_LIST_ENUM?.WATING_APPROVAL],
|
|
5017
|
-
|
|
5018
|
+
showTitle: true
|
|
5018
5019
|
},
|
|
5019
5020
|
{
|
|
5020
5021
|
icon: /* @__PURE__ */ jsx(CancelApprovalIcon, { stroke: "white" }),
|
|
@@ -5026,7 +5027,7 @@ const BulkActions = ({
|
|
|
5026
5027
|
title: "Xác nhận hủy duyệt",
|
|
5027
5028
|
content: "Bạn có chắc chắn muốn hủy duyệt không?",
|
|
5028
5029
|
arrShow: [CATEGORY_LIST_ENUM?.ACTIVE],
|
|
5029
|
-
|
|
5030
|
+
showTitle: true
|
|
5030
5031
|
},
|
|
5031
5032
|
{
|
|
5032
5033
|
icon: /* @__PURE__ */ jsx(DeleteIcon, { fill: "white" }),
|
|
@@ -5042,7 +5043,7 @@ const BulkActions = ({
|
|
|
5042
5043
|
CATEGORY_LIST_ENUM?.ACTIVE,
|
|
5043
5044
|
CATEGORY_LIST_ENUM?.INACTIVE
|
|
5044
5045
|
],
|
|
5045
|
-
|
|
5046
|
+
showTitle: false
|
|
5046
5047
|
},
|
|
5047
5048
|
{
|
|
5048
5049
|
icon: /* @__PURE__ */ jsx(ActivateIcon, { stroke: "white" }),
|
|
@@ -5054,7 +5055,7 @@ const BulkActions = ({
|
|
|
5054
5055
|
title: "Xác nhận kích hoạt",
|
|
5055
5056
|
content: "Bạn có chắc chắn muốn kích hoạt không?",
|
|
5056
5057
|
arrShow: [CATEGORY_LIST_ENUM?.INACTIVE],
|
|
5057
|
-
|
|
5058
|
+
showTitle: true
|
|
5058
5059
|
},
|
|
5059
5060
|
{
|
|
5060
5061
|
icon: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "white" }),
|
|
@@ -5066,7 +5067,7 @@ const BulkActions = ({
|
|
|
5066
5067
|
title: "Xác nhận vô hiệu hóa",
|
|
5067
5068
|
content: "Bạn có chắc chắn muốn vô hiệu hóa không?",
|
|
5068
5069
|
arrShow: [CATEGORY_LIST_ENUM?.ACTIVE],
|
|
5069
|
-
|
|
5070
|
+
showTitle: true
|
|
5070
5071
|
}
|
|
5071
5072
|
];
|
|
5072
5073
|
const { open, shouldRender, toggle } = useToggle();
|
|
@@ -5163,8 +5164,6 @@ const useTableHeightWrapper = (options = {}) => {
|
|
|
5163
5164
|
}
|
|
5164
5165
|
});
|
|
5165
5166
|
const wrapperStyles = window.getComputedStyle(layoutWrapper);
|
|
5166
|
-
const wrapperPaddingTop = parseInt(wrapperStyles.paddingTop, 10) || 0;
|
|
5167
|
-
const wrapperPaddingBottom = parseInt(wrapperStyles.paddingBottom, 10) || 0;
|
|
5168
5167
|
const tableStyles = window.getComputedStyle(tableContainer);
|
|
5169
5168
|
const tablePaddingTop = parseInt(tableStyles.paddingTop, 10) || 0;
|
|
5170
5169
|
const tablePaddingBottom = parseInt(tableStyles.paddingBottom, 10) || 0;
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export type TListIcon = {
|
|
|
17
17
|
content?: string;
|
|
18
18
|
typeIcon?: ConfirmModalProps["typeIcon"];
|
|
19
19
|
name?: string;
|
|
20
|
-
|
|
20
|
+
showTitle?: boolean;
|
|
21
21
|
};
|
|
22
22
|
export declare const BulkActions: ({ quantity, handleDelete, handleSubmitForApproval, handleCancelSubmission, handleApprove, handleCancelApproval, handleReject, handleDeactivate, handleActivate, handleRestore, status, typeBulkaction, }: IBulkActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|