@pnkx-lib/ui 1.9.141 → 1.9.142

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.
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports, h as Icon, _ as _extends, P as PnkxField, C as Checkbox, u as useSortable, k as CSS, t as twMerge, l as useForm, m as DndContext, n as closestCenter, o as SortableContext, v as verticalListSortingStrategy, p as arrayMove, i as className, a as Tooltip, q as lodashExports, r as distExports, s as useTabStore, w as distExports$1, I as Input, T as Typography$1 } from './index-C4SA6TOQ.js';
1
+ import { j as jsxRuntimeExports, h as Icon, _ as _extends, P as PnkxField, C as Checkbox, u as useSortable, k as CSS, t as twMerge, l as useForm, m as DndContext, n as closestCenter, o as SortableContext, v as verticalListSortingStrategy, p as arrayMove, i as className, a as Tooltip, q as lodashExports, r as distExports, s as useTabStore, w as distExports$1, I as Input, T as Typography$1 } from './index-BJTIu5Xs.js';
2
2
  import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Divider as Divider$1, Table as Table$1, Tabs as Tabs$1, Space, Card as Card$1, Skeleton as Skeleton$1, Popover as Popover$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Flex as Flex$1, Pagination as Pagination$1, Tag as Tag$1, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, Popconfirm as Popconfirm$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Typography, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse as Collapse$1, ColorPicker as ColorPicker$1, Empty as Empty$1, Image as Image$1, ConfigProvider as ConfigProvider$1 } from 'antd';
3
3
  import * as React from 'react';
4
4
  import { useState, useEffect, Component } from 'react';
@@ -675,7 +675,7 @@ const BulkAction = ({
675
675
  "button",
676
676
  {
677
677
  className: "p-1 rounded-sm transition duration-200 cursor-pointer hover:bg-[#1B4ACB] hover:rounded-sm",
678
- onClick: item?.showConfirmModal ? () => {
678
+ onClick: () => {
679
679
  toggle();
680
680
  setNotifyContent({
681
681
  title: item?.title || "",
@@ -684,9 +684,14 @@ const BulkAction = ({
684
684
  handleCancel: () => {
685
685
  toggle();
686
686
  },
687
- handleSubmit: item?.action
687
+ handleSubmit: () => {
688
+ if (item?.action) {
689
+ item?.action();
690
+ }
691
+ toggle();
692
+ }
688
693
  });
689
- } : item?.action,
694
+ },
690
695
  children: item.icon
691
696
  },
692
697
  index
@@ -818,6 +823,43 @@ var CATEGORY_LIST_ENUM = /* @__PURE__ */ ((CATEGORY_LIST_ENUM2) => {
818
823
  CATEGORY_LIST_ENUM2[CATEGORY_LIST_ENUM2["DELETE"] = 5] = "DELETE";
819
824
  return CATEGORY_LIST_ENUM2;
820
825
  })(CATEGORY_LIST_ENUM || {});
826
+ const badgeStatusCategoryConfig = {
827
+ [0 /* DRAFT */]: { color: "bg-[#007BE5]", text: "Tạo mới" },
828
+ [1 /* WATING_APPROVAL */]: {
829
+ color: "bg-[#DA9438]",
830
+ text: "Đang chờ duyệt"
831
+ },
832
+ [2 /* ACTIVE */]: { color: "bg-[#27CD7F]", text: "Hoạt động" },
833
+ [3 /* INACTIVE */]: {
834
+ color: "bg-[#DD4338]",
835
+ text: "Dừng hoạt động"
836
+ },
837
+ [4 /* REJECT */]: {
838
+ color: "bg-[#722ED1]",
839
+ text: "Từ chối duyệt"
840
+ },
841
+ [5 /* DELETE */]: {
842
+ color: "bg-[#B2B7C2]",
843
+ text: "Đã xóa"
844
+ }
845
+ };
846
+ const CategoryStatus = ({ status }) => {
847
+ //! State
848
+ const bagde = badgeStatusCategoryConfig[status];
849
+ //! Function
850
+ const ItemStatus = ({
851
+ color,
852
+ statusName
853
+ }) => {
854
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
855
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: twMerge("w-3 h-3 rounded-sm", color || "") }),
856
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-normal", children: statusName || "" })
857
+ ] }) });
858
+ };
859
+ //! Render
860
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
861
+ };
862
+
821
863
  const BulkActions = ({
822
864
  quantity = 0,
823
865
  handleRestore,
@@ -838,9 +880,10 @@ const BulkActions = ({
838
880
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(RestoreIcon, { stroke: "#0F1D40" }),
839
881
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(RestoreIcon, { stroke: "#B2B7C2" }),
840
882
  action: handleRestore,
841
- showConfirmModal: false,
842
883
  name: "Khôi phục",
843
- title: "Khôi phục",
884
+ typeIcon: "info",
885
+ title: "Xác nhận khôi phục",
886
+ content: "Bạn có chắc chắn muốn khôi phục không?",
844
887
  arrShow: [CATEGORY_LIST_ENUM?.DELETE, CATEGORY_LIST_ENUM?.REJECT]
845
888
  },
846
889
  {
@@ -848,7 +891,6 @@ const BulkActions = ({
848
891
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(SendApprovalIcon, { stroke: "#0F1D40" }),
849
892
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(SendApprovalIcon, { stroke: "#B2B7C2" }),
850
893
  action: handleSendApproval,
851
- showConfirmModal: true,
852
894
  name: "Gửi duyệt",
853
895
  typeIcon: "info",
854
896
  title: "Xác nhận gửi duyệt",
@@ -860,7 +902,6 @@ const BulkActions = ({
860
902
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelSendApprovalIcon, { stroke: "#0F1D40" }),
861
903
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelSendApprovalIcon, { stroke: "#B2B7C2" }),
862
904
  action: handleCancelSendApproval,
863
- showConfirmModal: true,
864
905
  name: "Huỷ gửi duyệt",
865
906
  typeIcon: "error",
866
907
  title: "Xác nhận hủy gửi duyệt",
@@ -872,7 +913,6 @@ const BulkActions = ({
872
913
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(RefuseApprovalIcon, { stroke: "#0F1D40" }),
873
914
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(RefuseApprovalIcon, { stroke: "#B2B7C2" }),
874
915
  action: handleRefuseApproval,
875
- showConfirmModal: true,
876
916
  name: "Từ chối duyệt",
877
917
  typeIcon: "error",
878
918
  title: "Xác nhận từ chối duyệt",
@@ -884,7 +924,6 @@ const BulkActions = ({
884
924
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalIcon, { stroke: "#0F1D40" }),
885
925
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(ApprovalIcon, { stroke: "#B2B7C2" }),
886
926
  action: handleApproval,
887
- showConfirmModal: true,
888
927
  name: "Duyệt",
889
928
  typeIcon: "info",
890
929
  title: "Xác nhận duyệt",
@@ -896,7 +935,6 @@ const BulkActions = ({
896
935
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelApprovalIcon, { stroke: "#0F1D40" }),
897
936
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelApprovalIcon, { stroke: "#B2B7C2" }),
898
937
  action: handleCancelApproval,
899
- showConfirmModal: true,
900
938
  typeIcon: "error",
901
939
  name: "Hủy duyệt",
902
940
  title: "Xác nhận hủy duyệt",
@@ -908,7 +946,6 @@ const BulkActions = ({
908
946
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fill: "#0F1D40" }),
909
947
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fill: "#B2B7C2" }),
910
948
  action: handleDelete,
911
- showConfirmModal: true,
912
949
  typeIcon: "error",
913
950
  name: "Xoá",
914
951
  title: "Xác nhận xóa",
@@ -924,7 +961,6 @@ const BulkActions = ({
924
961
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivateIcon, { stroke: "#0F1D40" }),
925
962
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(ActivateIcon, { stroke: "#B2B7C2" }),
926
963
  action: handleActivate,
927
- showConfirmModal: true,
928
964
  typeIcon: "info",
929
965
  name: "Kích hoạt",
930
966
  title: "Xác nhận kích hoạt",
@@ -936,7 +972,6 @@ const BulkActions = ({
936
972
  iconDropList: /* @__PURE__ */ jsxRuntimeExports.jsx(InActiveIcon, { stroke: "#0F1D40" }),
937
973
  iconDisable: /* @__PURE__ */ jsxRuntimeExports.jsx(InActiveIcon, { stroke: "#B2B7C2" }),
938
974
  action: handleInActivate,
939
- showConfirmModal: true,
940
975
  name: "Vô hiệu hóa",
941
976
  typeIcon: "info",
942
977
  title: "Xác nhận vô hiệu hóa",
@@ -1004,6 +1039,7 @@ const Table = ({
1004
1039
  showIndexColumn = true,
1005
1040
  setFilters,
1006
1041
  noBreadcum,
1042
+ bulkActionHandlers,
1007
1043
  ...rest
1008
1044
  }) => {
1009
1045
  const status = filters?.isStatus;
@@ -1113,7 +1149,8 @@ const Table = ({
1113
1149
  {
1114
1150
  type: TypeBulkActions.BULKACTION,
1115
1151
  quantity: rowsSelected?.length,
1116
- status
1152
+ status,
1153
+ ...bulkActionHandlers
1117
1154
  }
1118
1155
  ) })
1119
1156
  ] });
@@ -1844,43 +1881,6 @@ const styles = {
1844
1881
  }
1845
1882
  };
1846
1883
 
1847
- const badgeStatusCategoryConfig = {
1848
- [0 /* DRAFT */]: { color: "bg-[#007BE5]", text: "Tạo mới" },
1849
- [1 /* WATING_APPROVAL */]: {
1850
- color: "bg-[#DA9438]",
1851
- text: "Đang chờ duyệt"
1852
- },
1853
- [2 /* ACTIVE */]: { color: "bg-[#27CD7F]", text: "Hoạt động" },
1854
- [3 /* INACTIVE */]: {
1855
- color: "bg-[#DD4338]",
1856
- text: "Dừng hoạt động"
1857
- },
1858
- [4 /* REJECT */]: {
1859
- color: "bg-[#722ED1]",
1860
- text: "Từ chối duyệt"
1861
- },
1862
- [5 /* DELETE */]: {
1863
- color: "bg-[#B2B7C2]",
1864
- text: "Đã xóa"
1865
- }
1866
- };
1867
- const CategoryStatus = ({ status }) => {
1868
- //! State
1869
- const bagde = badgeStatusCategoryConfig[status];
1870
- //! Function
1871
- const ItemStatus = ({
1872
- color,
1873
- statusName
1874
- }) => {
1875
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
1876
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: twMerge("w-3 h-3 rounded-sm", color || "") }),
1877
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm font-normal", children: statusName || "" })
1878
- ] }) });
1879
- };
1880
- //! Render
1881
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ItemStatus, { color: bagde?.color, statusName: bagde?.text });
1882
- };
1883
-
1884
1884
  const ActionRowTable = ({
1885
1885
  type,
1886
1886
  contentTooltip,
@@ -2515,4 +2515,4 @@ const PageNotFound = ({ path = "/" }) => {
2515
2515
  );
2516
2516
  };
2517
2517
 
2518
- export { TypeBulkActions as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Empty as E, Flex as F, ConfirmModal as G, Heading as H, Image as I, ErrorBoundary as J, badgeStatusCategoryConfig as K, CategoryStatus as L, Modal as M, ActionRowTable as N, START_PAGE as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, START_PAGE_SIZE as U, PAGE_NUMBER as V, Watermark as W, PAGE_SIZE as X, SORT_BY as Y, SORT_DESC as Z, TypeActionRowTable as _, Tabs as a, TypeStatusTable as a0, BulkActions as a1, BreadcrumbHeading as a2, Card as a3, ConfigProvider as a4, PageNotFound as a5, SearchFiltersForm as b, Container as c, Badge as d, Col as e, Breadcrumb as f, Pagination as g, Sidebar as h, Tag as i, Divider as j, Spin as k, Drawer as l, Popconfirm as m, Result as n, Rate as o, Segmented as p, Statistic as q, Timeline as r, Tour as s, typeColorMap as t, Tree as u, Anchor as v, Appfix as w, AutoComplete as x, Collapse as y, ColorPicker as z };
2518
+ export { TypeActionRowTable as $, Alert as A, Button as B, CascaderField as C, Dropdown as D, Empty as E, Flex as F, ConfirmModal as G, Heading as H, Image as I, ErrorBoundary as J, CATEGORY_LIST_ENUM as K, badgeStatusCategoryConfig as L, Modal as M, CategoryStatus as N, ActionRowTable as O, Popover as P, QRCode as Q, Row as R, Skeleton as S, Table as T, START_PAGE as U, START_PAGE_SIZE as V, Watermark as W, PAGE_NUMBER as X, PAGE_SIZE as Y, SORT_BY as Z, SORT_DESC as _, Tabs as a, TypeBulkActions as a0, TypeStatusTable as a1, BulkActions as a2, BreadcrumbHeading as a3, Card as a4, ConfigProvider as a5, PageNotFound as a6, SearchFiltersForm as b, Container as c, Badge as d, Col as e, Breadcrumb as f, Pagination as g, Sidebar as h, Tag as i, Divider as j, Spin as k, Drawer as l, Popconfirm as m, Result as n, Rate as o, Segmented as p, Statistic as q, Timeline as r, Tour as s, typeColorMap as t, Tree as u, Anchor as v, Appfix as w, AutoComplete as x, Collapse as y, ColorPicker as z };
@@ -1,4 +1,4 @@
1
- import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, h as Icon, _ as _extends, i as className } from './index-C4SA6TOQ.js';
1
+ import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, h as Icon, _ as _extends, i as className } from './index-BJTIu5Xs.js';
2
2
  import { Select as Select$1, Radio, Upload, Image, Switch as Switch$1 } from 'antd';
3
3
  import * as React from 'react';
4
4
  import { useState } from 'react';
@@ -48689,7 +48689,7 @@ const DatePickerField = (props) => {
48689
48689
  field,
48690
48690
  formState,
48691
48691
  setValue,
48692
- customStyleDatepicker = "",
48692
+ classNameDatepicker = "",
48693
48693
  disabledInputChange,
48694
48694
  dateFormat = "dd/MM/yyyy ",
48695
48695
  placeholder = "dd/mm/yyyy ",
@@ -48794,10 +48794,10 @@ const DatePickerField = (props) => {
48794
48794
  closeOnScroll: true,
48795
48795
  showTimeSelectOnly,
48796
48796
  maxDate,
48797
- className: className(
48797
+ className: twMerge(
48798
48798
  sizeStyle(size),
48799
48799
  baseStyleClass,
48800
- customStyleDatepicker
48800
+ classNameDatepicker
48801
48801
  ),
48802
48802
  ...restProps
48803
48803
  }
@@ -48864,8 +48864,8 @@ const sizeStyle = (size) => {
48864
48864
  return styles.get(size);
48865
48865
  };
48866
48866
 
48867
- const { RangePicker } = DatePicker;
48868
- const RangePickerField = (props) => {
48867
+ const { RangePicker: RangePickerPnkx } = DatePicker;
48868
+ const RangePicker = (props) => {
48869
48869
  //! State
48870
48870
  const {
48871
48871
  field,
@@ -48901,7 +48901,7 @@ const RangePickerField = (props) => {
48901
48901
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
48902
48902
  label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
48903
48903
  /* @__PURE__ */ jsxRuntimeExports.jsx(
48904
- RangePicker,
48904
+ RangePickerPnkx,
48905
48905
  {
48906
48906
  value,
48907
48907
  onChange: handleChange,
@@ -61019,4 +61019,4 @@ React keys must be passed directly to JSX without using spread:
61019
61019
 
61020
61020
  var distExports = requireDist();
61021
61021
 
61022
- export { Checkbox as C, DatePickerField as D, ErrorMessage as E, Input as I, Label as L, Menu as M, PnkxField as P, RangePickerField as R, Space as S, Typography as T, _extends as _, Tooltip as a, Layout as b, Splitter as c, Steps as d, TINY_API as e, TinyMCE as f, get$6 as g, Icon as h, className as i, jsxRuntimeExports as j, CSS as k, useForm as l, DndContext as m, closestCenter as n, SortableContext as o, arrayMove as p, lodashExports as q, distExports$1 as r, useTabStore as s, twMerge as t, useSortable as u, verticalListSortingStrategy as v, distExports as w };
61022
+ export { Checkbox as C, DatePickerField as D, ErrorMessage as E, Input as I, Label as L, Menu as M, PnkxField as P, RangePicker as R, Space as S, Typography as T, _extends as _, Tooltip as a, Layout as b, Splitter as c, Steps as d, TINY_API as e, TinyMCE as f, get$6 as g, Icon as h, className as i, jsxRuntimeExports as j, CSS as k, useForm as l, DndContext as m, closestCenter as n, SortableContext as o, arrayMove as p, lodashExports as q, distExports$1 as r, useTabStore as s, twMerge as t, useSortable as u, verticalListSortingStrategy as v, distExports as w };
@@ -1,2 +1,2 @@
1
- export { C as Checkbox, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, f as TinyMCE } from '../chunks/index-C4SA6TOQ.js';
2
- export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-DzlrxqZF.js';
1
+ export { C as Checkbox, D as DatePickerField, I as Input, P as PnkxField, R as RangePicker, f as TinyMCE } from '../chunks/index-BJTIu5Xs.js';
2
+ export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-Bzik3pas.js';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { N as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a2 as BreadcrumbHeading, a1 as BulkActions, B as Button, a3 as Card, C as CascaderField, L as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a4 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, V as PAGE_NUMBER, X as PAGE_SIZE, a5 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Y as SORT_BY, Z as SORT_DESC, O as START_PAGE, U as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, _ as TypeActionRowTable, $ as TypeBulkActions, a0 as TypeStatusTable, W as Watermark, K as badgeStatusCategoryConfig, t as typeColorMap } from './chunks/PageNotFound-BtCmLe_F.js';
2
- export { C as Checkbox, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, b as Layout, M as Menu, P as PnkxField, R as RangePickerField, S as Space, c as Splitter, d as Steps, e as TINY_API, f as TinyMCE, a as Tooltip, T as Typography } from './chunks/index-C4SA6TOQ.js';
3
- export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-DzlrxqZF.js';
1
+ export { O as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a3 as BreadcrumbHeading, a2 as BulkActions, B as Button, K as CATEGORY_LIST_ENUM, a4 as Card, C as CascaderField, N as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a5 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, X as PAGE_NUMBER, Y as PAGE_SIZE, a6 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Z as SORT_BY, _ as SORT_DESC, U as START_PAGE, V as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, $ as TypeActionRowTable, a0 as TypeBulkActions, a1 as TypeStatusTable, W as Watermark, L as badgeStatusCategoryConfig, t as typeColorMap } from './chunks/PageNotFound-_zHfY9aE.js';
2
+ export { C as Checkbox, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, b as Layout, M as Menu, P as PnkxField, R as RangePicker, S as Space, c as Splitter, d as Steps, e as TINY_API, f as TinyMCE, a as Tooltip, T as Typography } from './chunks/index-BJTIu5Xs.js';
3
+ export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-Bzik3pas.js';
4
4
  export { a as useMessage, u as useToast } from './chunks/useMessage-CUPcOtIS.js';
package/es/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { N as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a2 as BreadcrumbHeading, a1 as BulkActions, B as Button, a3 as Card, C as CascaderField, L as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a4 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, V as PAGE_NUMBER, X as PAGE_SIZE, a5 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Y as SORT_BY, Z as SORT_DESC, O as START_PAGE, U as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, _ as TypeActionRowTable, $ as TypeBulkActions, a0 as TypeStatusTable, W as Watermark, K as badgeStatusCategoryConfig, t as typeColorMap } from '../chunks/PageNotFound-BtCmLe_F.js';
2
- export { E as ErrorMessage, L as Label, b as Layout, M as Menu, S as Space, c as Splitter, d as Steps, e as TINY_API, a as Tooltip, T as Typography } from '../chunks/index-C4SA6TOQ.js';
1
+ export { O as ActionRowTable, A as Alert, v as Anchor, w as Appfix, x as AutoComplete, d as Badge, f as Breadcrumb, a3 as BreadcrumbHeading, a2 as BulkActions, B as Button, K as CATEGORY_LIST_ENUM, a4 as Card, C as CascaderField, N as CategoryStatus, e as Col, y as Collapse, z as ColorPicker, a5 as ConfigProvider, G as ConfirmModal, c as Container, j as Divider, l as Drawer, D as Dropdown, E as Empty, J as ErrorBoundary, F as Flex, H as Heading, I as Image, M as Modal, X as PAGE_NUMBER, Y as PAGE_SIZE, a6 as PageNotFound, g as Pagination, m as Popconfirm, P as Popover, Q as QRCode, o as Rate, n as Result, R as Row, Z as SORT_BY, _ as SORT_DESC, U as START_PAGE, V as START_PAGE_SIZE, b as SearchFiltersForm, p as Segmented, h as Sidebar, S as Skeleton, k as Spin, q as Statistic, T as Table, a as Tabs, i as Tag, r as Timeline, s as Tour, u as Tree, $ as TypeActionRowTable, a0 as TypeBulkActions, a1 as TypeStatusTable, W as Watermark, L as badgeStatusCategoryConfig, t as typeColorMap } from '../chunks/PageNotFound-_zHfY9aE.js';
2
+ export { E as ErrorMessage, L as Label, b as Layout, M as Menu, S as Space, c as Splitter, d as Steps, e as TINY_API, a as Tooltip, T as Typography } from '../chunks/index-BJTIu5Xs.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.141",
4
+ "version": "1.9.142",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -6,7 +6,7 @@ export interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange
6
6
  field?: ControllerRenderProps<any, any>;
7
7
  formState?: UseFormStateReturn<any>;
8
8
  setValue?: UseFormSetValue<any>;
9
- customStyleDatepicker?: string;
9
+ classNameDatepicker?: string;
10
10
  disabledInputChange?: boolean;
11
11
  required?: boolean;
12
12
  dateFormat?: string | string[];
@@ -10,4 +10,4 @@ export interface RangePickerFieldProps extends Omit<RangePickerProps, "value" |
10
10
  customStyleContainer?: string;
11
11
  customStyleDatePicker?: string;
12
12
  }
13
- export declare const RangePickerField: (props: RangePickerFieldProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const RangePicker: (props: RangePickerFieldProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,6 @@
1
1
  import { ConfirmModalProps } from '../ConfirmModal';
2
2
  import { TypeBulkActions, TypeStatusTable } from '../../../../../../../../../../../src/constants';
3
- export declare enum CATEGORY_LIST_ENUM {
4
- DRAFT = 0,// tạo mới
5
- WATING_APPROVAL = 1,// đang chờ duyệt
6
- ACTIVE = 2,// hoạt động
7
- INACTIVE = 3,// dừng hoạt động
8
- REJECT = 4,// từ chối duyệt
9
- DELETE = 5
10
- }
3
+ import { CATEGORY_LIST_ENUM } from '../CategoryStatus';
11
4
  interface IBulkActionsProps {
12
5
  quantity?: number;
13
6
  handleRestore?: () => void;
@@ -27,7 +20,6 @@ export type TListIcon = {
27
20
  iconDisable: React.ReactNode;
28
21
  iconDropList: React.ReactNode;
29
22
  action?: () => void;
30
- showConfirmModal: boolean;
31
23
  title: string;
32
24
  arrShow: CATEGORY_LIST_ENUM[];
33
25
  content?: string;
@@ -14,6 +14,17 @@ export type TableColumnsType<T> = TableColumnsTypeAntd<T> & TableColumnsTypeEdit
14
14
  export type TFilters = {
15
15
  isStatus?: TypeStatusTable;
16
16
  };
17
+ export interface BulkActionHandlers {
18
+ handleRestore?: () => void;
19
+ handleSendApproval?: () => void;
20
+ handleCancelSendApproval?: () => void;
21
+ handleRefuseApproval?: () => void;
22
+ handleApproval?: () => void;
23
+ handleCancelApproval?: () => void;
24
+ handleDelete?: () => void;
25
+ handleActivate?: () => void;
26
+ handleInActivate?: () => void;
27
+ }
17
28
  export interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
18
29
  dataSource?: T[];
19
30
  columns: TableColumnsType<T>;
@@ -37,6 +48,7 @@ export interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
37
48
  showIndexColumn?: boolean;
38
49
  setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
39
50
  noBreadcum?: boolean;
51
+ bulkActionHandlers?: BulkActionHandlers;
40
52
  }
41
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, groupHeadingButtonItems, showIndexColumn, setFilters, noBreadcum, ...rest }: TableCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
53
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, groupHeadingButtonItems, showIndexColumn, setFilters, noBreadcum, bulkActionHandlers, ...rest }: TableCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
42
54
  export {};