@pnkx-lib/ui 1.9.72 → 1.9.74
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/chunks/{AntdIcon-C_gQ5ue_.js → AntdIcon-BhLLkfpo.js} +1 -1
- package/es/chunks/{Switch-B6W4c5eS.js → Switch-BL4ntIVa.js} +1 -1
- package/es/chunks/{index-DRDtVCc7.js → index-B-QCre16.js} +31 -187
- 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/index.d.ts +2 -10
- package/types/ui.d.ts +2 -10
@@ -42186,4 +42186,4 @@ Icon.displayName = 'AntdIcon';
|
|
42186
42186
|
Icon.getTwoToneColor = getTwoToneColor;
|
42187
42187
|
Icon.setTwoToneColor = setTwoToneColor;
|
42188
42188
|
|
42189
|
-
export {
|
42189
|
+
export { presetPrimaryColors as A, presetPalettes as B, CheckboxField as C, DatePickerField as D, ErrorMessage as E, FastColor as F, _inherits as G, _createSuper as H, Input as I, _assertThisInitialized$1 as J, _objectWithoutProperties as K, Label as L, IconContext as M, PnkxField as P, RangePickerField as R, Typography as T, _extends as _, TINY_API as a, TinyMCE as b, Icon as c, classNames as d, _typeof as e, _arrayLikeToArray as f, get as g, _unsupportedIterableToArray as h, _createClass as i, jsxRuntimeExports as j, _classCallCheck as k, lodashExports as l, _defineProperty as m, _slicedToArray as n, warning$1 as o, canUseDom as p, _objectSpread2 as q, updateCSS as r, removeCSS as s, twMerge as t, useForm as u, _arrayWithHoles as v, warningOnce as w, _nonIterableRest as x, resetWarned as y, generate$1 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, c as Icon, _ as _extends, d as classNames } from './AntdIcon-
|
1
|
+
import { g as get, j as jsxRuntimeExports, L as Label, t as twMerge, E as ErrorMessage, T as Typography, c as Icon, _ as _extends, d as classNames } from './AntdIcon-BhLLkfpo.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';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { j as jsxRuntimeExports,
|
2
|
-
import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2,
|
1
|
+
import { j as jsxRuntimeExports, c as Icon, _ as _extends, e as _typeof, P as PnkxField, C as CheckboxField, t as twMerge, u as useForm, d as classNames, l as lodashExports, f as _arrayLikeToArray, h as _unsupportedIterableToArray, w as warningOnce, i as _createClass, k as _classCallCheck, m as _defineProperty, n as _slicedToArray, o as warning$1, p as canUseDom, q as _objectSpread2, r as updateCSS, s as removeCSS, v as _arrayWithHoles, x as _nonIterableRest, y as resetWarned$1, F as FastColor, z as generate, A as presetPrimaryColors, B as presetPalettes, G as _inherits, H as _createSuper, J as _assertThisInitialized, K as _objectWithoutProperties, M as IconContext, I as Input } from './AntdIcon-BhLLkfpo.js';
|
2
|
+
import { Button as Button$1, Cascader, Modal as Modal$1, Badge as Badge$1, Breadcrumb as Breadcrumb$1, Tooltip as Tooltip$1, Divider as Divider$2, Table as Table$1, Tabs as Tabs$1, Space as Space$1, Card, Skeleton as Skeleton$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, 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, 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';
|
@@ -27,9 +27,9 @@ const CascaderField = (props) => {
|
|
27
27
|
) });
|
28
28
|
};
|
29
29
|
|
30
|
-
const
|
31
|
-
|
32
|
-
|
30
|
+
const Modal = ({ children, ...rest }) => {
|
31
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal$1, { ...rest, children });
|
32
|
+
};
|
33
33
|
|
34
34
|
// This icon file is generated automatically.
|
35
35
|
var ArrowLeftOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
|
@@ -541,10 +541,6 @@ var getNodeRef = function getNodeRef(node) {
|
|
541
541
|
return null;
|
542
542
|
};
|
543
543
|
|
544
|
-
const Modal = ({ children, ...rest }) => {
|
545
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Modal$1, { ...rest, children });
|
546
|
-
};
|
547
|
-
|
548
544
|
const SettingColumnItem = ({ lable, name, control }) => {
|
549
545
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-full pt-2 pb-2 inline-flex", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
550
546
|
PnkxField,
|
@@ -5041,17 +5037,6 @@ const InActiveIcon = ({ stroke, fill }) => /* @__PURE__ */ jsxRuntimeExports.jsx
|
|
5041
5037
|
}
|
5042
5038
|
);
|
5043
5039
|
|
5044
|
-
const PlusIcon = ({ fill = "#fff", stroke }) => /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, fill: "none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5045
|
-
"path",
|
5046
|
-
{
|
5047
|
-
fill,
|
5048
|
-
fillRule: "evenodd",
|
5049
|
-
d: "M12 12V6h-1v6H5v1h6v6h1v-6h6v-1h-6Z",
|
5050
|
-
clipRule: "evenodd",
|
5051
|
-
stroke
|
5052
|
-
}
|
5053
|
-
) });
|
5054
|
-
|
5055
5040
|
const EditIcon = ({ stroke, fill = "#007BE5" }) => /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 14, height: 15, fill: "none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5056
5041
|
"path",
|
5057
5042
|
{
|
@@ -5334,16 +5319,8 @@ const HeadingTable = (props) => {
|
|
5334
5319
|
showSetting,
|
5335
5320
|
renderHeadingSearch,
|
5336
5321
|
rightHeadingContent,
|
5337
|
-
breadCrumb
|
5338
|
-
editable,
|
5339
|
-
setData,
|
5340
|
-
initialValue
|
5322
|
+
breadCrumb
|
5341
5323
|
} = props;
|
5342
|
-
const addRow = () => {
|
5343
|
-
if (initialValue) {
|
5344
|
-
setData((prev) => [...prev, initialValue]);
|
5345
|
-
}
|
5346
|
-
};
|
5347
5324
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
5348
5325
|
Heading,
|
5349
5326
|
{
|
@@ -5355,25 +5332,13 @@ const HeadingTable = (props) => {
|
|
5355
5332
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, { className: "!my-5 !mb-4" }),
|
5356
5333
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
|
5357
5334
|
/* @__PURE__ */ jsxRuntimeExports.jsx(GroupHeadingButton, {}),
|
5358
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
5359
|
-
|
5360
|
-
|
5361
|
-
|
5362
|
-
|
5363
|
-
|
5364
|
-
|
5365
|
-
),
|
5366
|
-
editable && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5367
|
-
Button$1,
|
5368
|
-
{
|
5369
|
-
shape: "circle",
|
5370
|
-
className: "cursor-pointer ",
|
5371
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(PlusIcon, {}),
|
5372
|
-
type: "primary",
|
5373
|
-
onClick: addRow
|
5374
|
-
}
|
5375
|
-
)
|
5376
|
-
] })
|
5335
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5336
|
+
IconSettingTable,
|
5337
|
+
{
|
5338
|
+
setOpenStting,
|
5339
|
+
showSetting
|
5340
|
+
}
|
5341
|
+
) })
|
5377
5342
|
] })
|
5378
5343
|
]
|
5379
5344
|
}
|
@@ -5650,24 +5615,6 @@ const BulkAction = ({
|
|
5650
5615
|
] }) });
|
5651
5616
|
};
|
5652
5617
|
|
5653
|
-
const EditableCell = ({
|
5654
|
-
editing,
|
5655
|
-
dataIndex,
|
5656
|
-
inputType,
|
5657
|
-
children,
|
5658
|
-
control,
|
5659
|
-
...restProps
|
5660
|
-
}) => {
|
5661
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("td", { ...restProps, children: editing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5662
|
-
PnkxField,
|
5663
|
-
{
|
5664
|
-
name: dataIndex,
|
5665
|
-
control,
|
5666
|
-
component: Input,
|
5667
|
-
type: inputType
|
5668
|
-
}
|
5669
|
-
) : children });
|
5670
|
-
};
|
5671
5618
|
const Table = ({
|
5672
5619
|
dataSource,
|
5673
5620
|
columns,
|
@@ -5681,21 +5628,18 @@ const Table = ({
|
|
5681
5628
|
onSelect,
|
5682
5629
|
onRowClick,
|
5683
5630
|
rowKey = "id",
|
5684
|
-
editable,
|
5685
|
-
onSave,
|
5686
5631
|
titleSettingTableModal,
|
5687
5632
|
showSetting,
|
5688
5633
|
setColumns,
|
5689
5634
|
renderHeadingSearch,
|
5690
5635
|
rightHeadingContent,
|
5691
|
-
status,
|
5692
|
-
schema,
|
5693
5636
|
menu,
|
5694
|
-
initialValueForm,
|
5695
5637
|
...rest
|
5696
5638
|
}) => {
|
5639
|
+
//! State
|
5697
5640
|
const location = useLocation();
|
5698
5641
|
const pathUrl = location.pathname;
|
5642
|
+
const status = filters?.status;
|
5699
5643
|
let dataBreakcrum;
|
5700
5644
|
for (const item of menu) {
|
5701
5645
|
if (!item.subMenu) continue;
|
@@ -5764,7 +5708,8 @@ const Table = ({
|
|
5764
5708
|
}
|
5765
5709
|
}
|
5766
5710
|
}
|
5767
|
-
|
5711
|
+
const [data, setData] = useState([]);
|
5712
|
+
const [openSetting, setOpenStting] = useState(false);
|
5768
5713
|
const paginationConfig = {
|
5769
5714
|
current: filters.page_number,
|
5770
5715
|
pageSize: filters.page_size,
|
@@ -5777,106 +5722,17 @@ const Table = ({
|
|
5777
5722
|
if (pageSize !== filters.page_size) onChangePageSize(pageSize);
|
5778
5723
|
}
|
5779
5724
|
};
|
5780
|
-
const [openSetting, setOpenStting] = useState(false);
|
5781
5725
|
const rowSelection = {
|
5782
5726
|
selectedRowKeys: rowsSelected,
|
5783
5727
|
onChange: onSelect,
|
5784
5728
|
getCheckboxProps: () => ({
|
5785
|
-
disabled: !
|
5729
|
+
disabled: !status
|
5786
5730
|
})
|
5787
5731
|
};
|
5788
|
-
const { control, handleSubmit, reset } = useForm(
|
5789
|
-
schema ? { resolver: o(schema) } : void 0
|
5790
|
-
);
|
5791
|
-
const [data, setData] = useState([]);
|
5792
|
-
const [editingKey, setEditingKey] = useState("");
|
5793
|
-
const isEditing = (record) => getRowKeyValue(record) === editingKey;
|
5794
5732
|
//! Function
|
5795
5733
|
useEffect(() => {
|
5796
5734
|
setData(Array.isArray(dataSource) ? dataSource : []);
|
5797
5735
|
}, [JSON.stringify(dataSource)]);
|
5798
|
-
const getRowKeyValue = (record) => typeof rowKey === "function" ? rowKey(record) : record[rowKey];
|
5799
|
-
const edit = (record) => {
|
5800
|
-
reset(record);
|
5801
|
-
setEditingKey(getRowKeyValue(record));
|
5802
|
-
};
|
5803
|
-
const save = (formValues) => {
|
5804
|
-
const key = editingKey;
|
5805
|
-
const newData = [...data];
|
5806
|
-
const index = newData.findIndex((item) => getRowKeyValue(item) === key);
|
5807
|
-
if (onSave) {
|
5808
|
-
onSave(formValues);
|
5809
|
-
}
|
5810
|
-
if (index > -1) {
|
5811
|
-
newData[index] = { ...newData[index], ...formValues };
|
5812
|
-
setData(newData);
|
5813
|
-
setEditingKey("");
|
5814
|
-
}
|
5815
|
-
};
|
5816
|
-
const cancel = (e) => {
|
5817
|
-
e?.stopPropagation();
|
5818
|
-
setEditingKey("");
|
5819
|
-
};
|
5820
|
-
const columnsEditable = [
|
5821
|
-
...columns,
|
5822
|
-
{
|
5823
|
-
title: "Thao tác",
|
5824
|
-
dataIndex: "action",
|
5825
|
-
render: (_, record) => {
|
5826
|
-
const editable2 = isEditing(record);
|
5827
|
-
return editable2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
5828
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5829
|
-
Popconfirm$1,
|
5830
|
-
{
|
5831
|
-
title: "Bạn có chắc chắn muốn huỷ chỉnh sửa?",
|
5832
|
-
onConfirm: (e) => cancel(e),
|
5833
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { color: "danger", variant: "filled", children: "Huỷ bỏ" })
|
5834
|
-
}
|
5835
|
-
),
|
5836
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { htmlType: "submit", variant: "text", color: "blue", children: "Lưu" })
|
5837
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
5838
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5839
|
-
Button,
|
5840
|
-
{
|
5841
|
-
disabled: editingKey !== "",
|
5842
|
-
onClick: () => edit(record),
|
5843
|
-
className: "cursor-pointer",
|
5844
|
-
shape: "circle",
|
5845
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {}),
|
5846
|
-
type: "text"
|
5847
|
-
}
|
5848
|
-
),
|
5849
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Popconfirm$1, { title: "Bạn có muốn xoá ?", onConfirm: () => {
|
5850
|
-
}, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5851
|
-
Button,
|
5852
|
-
{
|
5853
|
-
disabled: editingKey !== "",
|
5854
|
-
shape: "circle",
|
5855
|
-
className: "cursor-pointer ",
|
5856
|
-
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, {}),
|
5857
|
-
type: "text"
|
5858
|
-
}
|
5859
|
-
) })
|
5860
|
-
] });
|
5861
|
-
}
|
5862
|
-
}
|
5863
|
-
];
|
5864
|
-
const mergedColumns = columnsEditable.map(
|
5865
|
-
(col) => {
|
5866
|
-
if (!col.editable) return col;
|
5867
|
-
return {
|
5868
|
-
...col,
|
5869
|
-
onCell: (record) => ({
|
5870
|
-
record,
|
5871
|
-
inputType: "text",
|
5872
|
-
dataIndex: "dataIndex" in col ? col.dataIndex : void 0,
|
5873
|
-
title: col.title,
|
5874
|
-
editing: isEditing(record),
|
5875
|
-
control
|
5876
|
-
})
|
5877
|
-
};
|
5878
|
-
}
|
5879
|
-
);
|
5880
5736
|
const handleTableChange = (sorter) => {
|
5881
5737
|
if (sorter && sorter.field && onSort) {
|
5882
5738
|
onSort(sorter.field);
|
@@ -5893,14 +5749,8 @@ const Table = ({
|
|
5893
5749
|
}
|
5894
5750
|
onRowClick2?.(record);
|
5895
5751
|
};
|
5896
|
-
|
5897
|
-
|
5898
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: "https://i.ibb.co/39C3x4LZ/Component-1.png", alt: "no data" }),
|
5899
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-lg font-bold text-black", children: "Không có dữ liệu nào phù hợp" }),
|
5900
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500", children: "Kiểm tra lại bộ lọc hoặc thêm mới dữ liệu" })
|
5901
|
-
] });
|
5902
|
-
};
|
5903
|
-
const tableContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: twMerge(showSetting ? "relative" : ""), children: [
|
5752
|
+
//! Render
|
5753
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: twMerge(showSetting ? "relative" : ""), children: [
|
5904
5754
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5905
5755
|
HeadingTable,
|
5906
5756
|
{
|
@@ -5908,10 +5758,7 @@ const Table = ({
|
|
5908
5758
|
renderHeadingSearch,
|
5909
5759
|
setOpenStting,
|
5910
5760
|
showSetting,
|
5911
|
-
breadCrumb: generateBreadcrumb
|
5912
|
-
editable,
|
5913
|
-
initialValue: initialValueForm,
|
5914
|
-
setData
|
5761
|
+
breadCrumb: generateBreadcrumb
|
5915
5762
|
}
|
5916
5763
|
),
|
5917
5764
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -5919,7 +5766,7 @@ const Table = ({
|
|
5919
5766
|
{
|
5920
5767
|
rowKey,
|
5921
5768
|
dataSource: data,
|
5922
|
-
columns
|
5769
|
+
columns,
|
5923
5770
|
pagination: !lodashExports.isEmpty(data) ? paginationConfig : false,
|
5924
5771
|
loading,
|
5925
5772
|
rowSelection: rowsSelected ? rowSelection : void 0,
|
@@ -5931,9 +5778,7 @@ const Table = ({
|
|
5931
5778
|
emptyText: /* @__PURE__ */ jsxRuntimeExports.jsx(EmptyTable, {})
|
5932
5779
|
},
|
5933
5780
|
rowClassName: (_, index) => `table-row-${index % 2 === 0 ? "even" : "odd"}`,
|
5934
|
-
|
5935
|
-
body: { cell: EditableCell }
|
5936
|
-
} : void 0,
|
5781
|
+
scroll: { x: "max-content", y: 90 * 8 },
|
5937
5782
|
...rest
|
5938
5783
|
}
|
5939
5784
|
),
|
@@ -5944,20 +5789,19 @@ const Table = ({
|
|
5944
5789
|
setOpen: setOpenStting,
|
5945
5790
|
title: titleSettingTableModal,
|
5946
5791
|
showSetting,
|
5947
|
-
defaultSettingColumnItems:
|
5792
|
+
defaultSettingColumnItems: columns,
|
5948
5793
|
setDefaultSettingColumnItems: setColumns
|
5949
5794
|
}
|
5950
5795
|
),
|
5951
5796
|
rowsSelected && !lodashExports.isEmpty(rowsSelected) && /* @__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, status }) })
|
5952
5797
|
] });
|
5953
|
-
|
5954
|
-
|
5955
|
-
|
5956
|
-
}
|
5957
|
-
|
5958
|
-
|
5959
|
-
|
5960
|
-
return renderTableContent();
|
5798
|
+
};
|
5799
|
+
const EmptyTable = () => {
|
5800
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center text-center", children: [
|
5801
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: "https://i.ibb.co/39C3x4LZ/Component-1.png", alt: "no data" }),
|
5802
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-lg font-bold text-black", children: "Không có dữ liệu nào phù hợp" }),
|
5803
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500", children: "Kiểm tra lại bộ lọc hoặc thêm mới dữ liệu" })
|
5804
|
+
] });
|
5961
5805
|
};
|
5962
5806
|
|
5963
5807
|
const createStoreImpl = (createState) => {
|
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, b as TinyMCE } from '../chunks/AntdIcon-
|
2
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-
|
1
|
+
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, b as TinyMCE } from '../chunks/AntdIcon-BhLLkfpo.js';
|
2
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from '../chunks/Switch-BL4ntIVa.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, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/AntdIcon-
|
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-B-QCre16.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/AntdIcon-BhLLkfpo.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-mj-07ZtC.js';
|
5
|
-
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-
|
5
|
+
export { R as RadioGroup, S as Select, a as Switch, U as UploadField } from './chunks/Switch-BL4ntIVa.js';
|
6
6
|
export { u as useFiltersHandler, a as useMessage, b as useToggle } from './chunks/useToggle-D5cWDHvT.js';
|
package/es/ui/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
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 { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-
|
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-B-QCre16.js';
|
2
|
+
export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/AntdIcon-BhLLkfpo.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 } from '../chunks/table-mj-07ZtC.js';
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
@@ -101,7 +101,6 @@ import { UseFormReturn } from 'react-hook-form';
|
|
101
101
|
import { UseFormSetValue } from 'react-hook-form';
|
102
102
|
import { UseFormStateReturn } from 'react-hook-form';
|
103
103
|
import { WatermarkProps } from 'antd';
|
104
|
-
import * as yup from 'yup';
|
105
104
|
|
106
105
|
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
|
107
106
|
|
@@ -724,13 +723,11 @@ declare type TabItem = {
|
|
724
723
|
disabled?: boolean;
|
725
724
|
};
|
726
725
|
|
727
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey,
|
726
|
+
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, ...rest }: TableCommonProps<T>) => JSX.Element;
|
728
727
|
|
729
728
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
730
729
|
|
731
|
-
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
732
|
-
editable?: boolean;
|
733
|
-
})[];
|
730
|
+
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {})[];
|
734
731
|
|
735
732
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
736
733
|
dataSource: T[];
|
@@ -747,17 +744,12 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
747
744
|
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
748
745
|
onRowClick?: (record: T) => void;
|
749
746
|
rowKey?: string | ((record: T) => string);
|
750
|
-
editable?: boolean;
|
751
|
-
onSave?: (data: T) => void;
|
752
747
|
titleSettingTableModal?: string;
|
753
748
|
showSetting?: boolean;
|
754
749
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
755
750
|
renderHeadingSearch: () => ReactNode;
|
756
751
|
rightHeadingContent: ReactNode;
|
757
|
-
status?: number;
|
758
|
-
schema?: yup.AnyObjectSchema;
|
759
752
|
menu: Array<MenuProps>;
|
760
|
-
initialValueForm?: T;
|
761
753
|
}
|
762
754
|
|
763
755
|
export declare const Tabs: default_2.FC<TabsProps>;
|
package/types/ui.d.ts
CHANGED
@@ -82,7 +82,6 @@ import { UseFormReset } from 'react-hook-form';
|
|
82
82
|
import { UseFormReturn } from 'react-hook-form';
|
83
83
|
import { UseFormSetValue } from 'react-hook-form';
|
84
84
|
import { WatermarkProps } from 'antd';
|
85
|
-
import * as yup from 'yup';
|
86
85
|
|
87
86
|
export declare const ActionRowTable: ({ type, contentTooltip, handleClick, }: ActionRowTableProps) => JSX.Element;
|
88
87
|
|
@@ -565,13 +564,11 @@ declare type TabItem = {
|
|
565
564
|
disabled?: boolean;
|
566
565
|
};
|
567
566
|
|
568
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey,
|
567
|
+
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, ...rest }: TableCommonProps<T>) => JSX.Element;
|
569
568
|
|
570
569
|
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
571
570
|
|
572
|
-
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
573
|
-
editable?: boolean;
|
574
|
-
})[];
|
571
|
+
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {})[];
|
575
572
|
|
576
573
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
577
574
|
dataSource: T[];
|
@@ -588,17 +585,12 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
588
585
|
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
589
586
|
onRowClick?: (record: T) => void;
|
590
587
|
rowKey?: string | ((record: T) => string);
|
591
|
-
editable?: boolean;
|
592
|
-
onSave?: (data: T) => void;
|
593
588
|
titleSettingTableModal?: string;
|
594
589
|
showSetting?: boolean;
|
595
590
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
596
591
|
renderHeadingSearch: () => ReactNode;
|
597
592
|
rightHeadingContent: ReactNode;
|
598
|
-
status?: number;
|
599
|
-
schema?: yup.AnyObjectSchema;
|
600
593
|
menu: Array<MenuProps>;
|
601
|
-
initialValueForm?: T;
|
602
594
|
}
|
603
595
|
|
604
596
|
export declare const Tabs: default_2.FC<TabsProps>;
|