@pnkx-lib/ui 1.9.194 → 1.9.196
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/Sidebar.js
CHANGED
|
@@ -345,7 +345,7 @@ const Sidebar = ({ children, menu, userInfo }) => {
|
|
|
345
345
|
{
|
|
346
346
|
className: twMerge(
|
|
347
347
|
collapse && openSubCollapse ? "ml-[7%]" : "",
|
|
348
|
-
"flex-1
|
|
348
|
+
"flex-1 h-full overflow-y-auto scrollbar-none transition-all duration-300"
|
|
349
349
|
),
|
|
350
350
|
children
|
|
351
351
|
}
|
package/es/ui/index.js
CHANGED
|
@@ -4872,15 +4872,15 @@ const BulkAction = ({
|
|
|
4872
4872
|
|
|
4873
4873
|
const BulkActions = ({
|
|
4874
4874
|
quantity = 0,
|
|
4875
|
-
handleRestore,
|
|
4876
|
-
handleSendApproval,
|
|
4877
|
-
handleCancelSendApproval,
|
|
4878
|
-
handleRefuseApproval,
|
|
4879
|
-
handleApproval,
|
|
4880
|
-
handleCancelApproval,
|
|
4881
4875
|
handleDelete,
|
|
4876
|
+
handleSubmitForApproval,
|
|
4877
|
+
handleCancelSubmission,
|
|
4878
|
+
handleApprove,
|
|
4879
|
+
handleCancelApproval,
|
|
4880
|
+
handleReject,
|
|
4881
|
+
handleDeactivate,
|
|
4882
4882
|
handleActivate,
|
|
4883
|
-
|
|
4883
|
+
handleRestore,
|
|
4884
4884
|
status
|
|
4885
4885
|
}) => {
|
|
4886
4886
|
//! State
|
|
@@ -4900,7 +4900,7 @@ const BulkActions = ({
|
|
|
4900
4900
|
icon: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "white" }),
|
|
4901
4901
|
iconDropList: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "#0F1D40" }),
|
|
4902
4902
|
iconDisable: /* @__PURE__ */ jsx(SendApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4903
|
-
action:
|
|
4903
|
+
action: handleSubmitForApproval,
|
|
4904
4904
|
name: "Gửi duyệt",
|
|
4905
4905
|
typeIcon: "info",
|
|
4906
4906
|
title: "Xác nhận gửi duyệt",
|
|
@@ -4911,7 +4911,7 @@ const BulkActions = ({
|
|
|
4911
4911
|
icon: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "white" }),
|
|
4912
4912
|
iconDropList: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "#0F1D40" }),
|
|
4913
4913
|
iconDisable: /* @__PURE__ */ jsx(CancelSendApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4914
|
-
action:
|
|
4914
|
+
action: handleCancelSubmission,
|
|
4915
4915
|
name: "Huỷ gửi duyệt",
|
|
4916
4916
|
typeIcon: "error",
|
|
4917
4917
|
title: "Xác nhận hủy gửi duyệt",
|
|
@@ -4922,7 +4922,7 @@ const BulkActions = ({
|
|
|
4922
4922
|
icon: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "white" }),
|
|
4923
4923
|
iconDropList: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "#0F1D40" }),
|
|
4924
4924
|
iconDisable: /* @__PURE__ */ jsx(RefuseApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4925
|
-
action:
|
|
4925
|
+
action: handleReject,
|
|
4926
4926
|
name: "Từ chối duyệt",
|
|
4927
4927
|
typeIcon: "error",
|
|
4928
4928
|
title: "Xác nhận từ chối duyệt",
|
|
@@ -4933,7 +4933,7 @@ const BulkActions = ({
|
|
|
4933
4933
|
icon: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "white" }),
|
|
4934
4934
|
iconDropList: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "#0F1D40" }),
|
|
4935
4935
|
iconDisable: /* @__PURE__ */ jsx(ApprovalIcon, { stroke: "#B2B7C2" }),
|
|
4936
|
-
action:
|
|
4936
|
+
action: handleApprove,
|
|
4937
4937
|
name: "Duyệt",
|
|
4938
4938
|
typeIcon: "info",
|
|
4939
4939
|
title: "Xác nhận duyệt",
|
|
@@ -4981,7 +4981,7 @@ const BulkActions = ({
|
|
|
4981
4981
|
icon: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "white" }),
|
|
4982
4982
|
iconDropList: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "#0F1D40" }),
|
|
4983
4983
|
iconDisable: /* @__PURE__ */ jsx(InActiveIcon, { stroke: "#B2B7C2" }),
|
|
4984
|
-
action:
|
|
4984
|
+
action: handleDeactivate,
|
|
4985
4985
|
name: "Vô hiệu hóa",
|
|
4986
4986
|
typeIcon: "info",
|
|
4987
4987
|
title: "Xác nhận vô hiệu hóa",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnkx-lib/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.196",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./es/index.js",
|
|
7
7
|
"module": "./es/index.js",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"@headlessui/react": "^2.2.2",
|
|
135
135
|
"@heroicons/react": "^2.2.0",
|
|
136
136
|
"@hookform/resolvers": "^5.0.1",
|
|
137
|
-
"@pnkx-lib/core": "^1.1.
|
|
137
|
+
"@pnkx-lib/core": "^1.1.66",
|
|
138
138
|
"@pnkx-lib/icon": "^0.0.35",
|
|
139
139
|
"@tailwindcss/cli": "^4.1.6",
|
|
140
140
|
"@tinymce/miniature": "^6.0.0",
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import { ConfirmModalProps } from '../ConfirmModal';
|
|
2
|
+
import { BulkActionHandlers } from '@pnkx-lib/core';
|
|
2
3
|
import { TypeBulkActions, TypeStatusTable } from '../../../constants';
|
|
3
4
|
import { CATEGORY_LIST_ENUM } from '../CategoryStatus';
|
|
4
|
-
interface IBulkActionsProps {
|
|
5
|
+
interface IBulkActionsProps extends Partial<BulkActionHandlers> {
|
|
5
6
|
quantity?: number;
|
|
6
|
-
handleRestore?: () => void;
|
|
7
|
-
handleSendApproval?: () => void;
|
|
8
|
-
handleCancelSendApproval?: () => void;
|
|
9
|
-
handleRefuseApproval?: () => void;
|
|
10
|
-
handleApproval?: () => void;
|
|
11
|
-
handleCancelApproval?: () => void;
|
|
12
|
-
handleDelete?: () => void;
|
|
13
|
-
handleActivate?: () => void;
|
|
14
|
-
handleInActivate?: () => void;
|
|
15
7
|
status?: TypeStatusTable;
|
|
16
8
|
type?: TypeBulkActions;
|
|
17
9
|
}
|
|
@@ -26,5 +18,5 @@ export type TListIcon = {
|
|
|
26
18
|
typeIcon?: ConfirmModalProps["typeIcon"];
|
|
27
19
|
name?: string;
|
|
28
20
|
};
|
|
29
|
-
export declare const BulkActions: ({ quantity,
|
|
21
|
+
export declare const BulkActions: ({ quantity, handleDelete, handleSubmitForApproval, handleCancelSubmission, handleApprove, handleCancelApproval, handleReject, handleDeactivate, handleActivate, handleRestore, status, }: IBulkActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
22
|
export {};
|
|
@@ -2,7 +2,7 @@ import { default as React, ReactNode } from 'react';
|
|
|
2
2
|
import { TableColumnsType as TableColumnsTypeAntd } from 'antd';
|
|
3
3
|
import { TableProps } from 'antd/lib/table';
|
|
4
4
|
import { SorterResult } from 'antd/es/table/interface';
|
|
5
|
-
import { InitialFiltersSearch } from '@pnkx-lib/core';
|
|
5
|
+
import { BulkActionHandlers, InitialFiltersSearch } from '@pnkx-lib/core';
|
|
6
6
|
import { MenuType } from '../Sidebar';
|
|
7
7
|
import { GroupHeadingButtonItem } from './HeadingTable/components/GroupHeadingButton';
|
|
8
8
|
import { TypeStatusTable } from '../../../constants';
|
|
@@ -15,17 +15,6 @@ export type TableColumnsType<T> = TableColumnsTypeAntd<T> & TableColumnsTypeEdit
|
|
|
15
15
|
export type TFilters = {
|
|
16
16
|
status?: TypeStatusTable;
|
|
17
17
|
};
|
|
18
|
-
export interface BulkActionHandlers {
|
|
19
|
-
handleRestore?: () => void;
|
|
20
|
-
handleSendApproval?: () => void;
|
|
21
|
-
handleCancelSendApproval?: () => void;
|
|
22
|
-
handleRefuseApproval?: () => void;
|
|
23
|
-
handleApproval?: () => void;
|
|
24
|
-
handleCancelApproval?: () => void;
|
|
25
|
-
handleDelete?: () => void;
|
|
26
|
-
handleActivate?: () => void;
|
|
27
|
-
handleInActivate?: () => void;
|
|
28
|
-
}
|
|
29
18
|
export interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
|
30
19
|
dataSource?: T[];
|
|
31
20
|
columns: TableColumnsType<T>;
|