linkup-lib 0.1.4 → 0.1.5
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.
|
@@ -45,12 +45,11 @@ export interface Props<T> {
|
|
|
45
45
|
primaryColor?: string;
|
|
46
46
|
searchParams: any;
|
|
47
47
|
fetch: UseQueryResult<any, Error>;
|
|
48
|
-
dataSet: T[];
|
|
49
48
|
columns: ColumnsType<T>;
|
|
50
49
|
searchFilter?: SearchFilterOption[];
|
|
51
50
|
onSearch: () => void;
|
|
52
51
|
onInitFilter: () => void;
|
|
53
52
|
onChangeGrid: (pagination: any, filters: any, sorter: any, extra: any) => void;
|
|
54
53
|
}
|
|
55
|
-
declare const Component: <T>({ rowKey, primaryColor, searchParams, fetch,
|
|
54
|
+
declare const Component: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }: Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
56
55
|
export default Component;
|
|
@@ -12,16 +12,8 @@ const dayjs_1 = __importDefault(require("dayjs"));
|
|
|
12
12
|
const bs_1 = require("react-icons/bs");
|
|
13
13
|
const jotai_1 = require("jotai");
|
|
14
14
|
exports.hideOptionAtom = (0, jotai_1.atom)(false);
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
return 0;
|
|
18
|
-
else if (target)
|
|
19
|
-
return target.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
20
|
-
else
|
|
21
|
-
target;
|
|
22
|
-
};
|
|
23
|
-
const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, dataSet, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }) => {
|
|
24
|
-
var _a, _b;
|
|
15
|
+
const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }) => {
|
|
16
|
+
var _a, _b, _c;
|
|
25
17
|
// 상세 검색 열기/닫기
|
|
26
18
|
const [hideOption, setHideOption] = (0, jotai_1.useAtom)(exports.hideOptionAtom);
|
|
27
19
|
// 전체 데이터 수
|
|
@@ -119,7 +111,7 @@ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, data
|
|
|
119
111
|
}, children: "\uCD08\uAE30\uD654" }), (0, jsx_runtime_1.jsx)(antd_1.Button, { loading: fetch.isFetching, type: "primary", size: "middle", style: { width: 100 }, onClick: onSearch, children: "\uAC80\uC0C9" }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1, display: 'flex', justifyContent: 'flex-end' }, children: (0, jsx_runtime_1.jsxs)(antd_1.Button, { size: "middle", onClick: () => setHideOption(!hideOption), children: [hideOption ? '상세 검색 펼치기' : '상세 검색 접기', (0, jsx_runtime_1.jsx)(bs_1.BsChevronDown, { style: { color: '#999', transform: hideOption ? 'rotate(0deg)' : 'rotate(180deg)', transition: 'transform 0.3s' } })] }) })] })] }), (0, jsx_runtime_1.jsx)("div", { style: { height: 12 } }), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
120
112
|
background: 'white',
|
|
121
113
|
border: '1px solid #E3E6ED'
|
|
122
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { style: { padding: '20px 30px 16px', borderBottom: '1px solid #E3E6ED' }, children: (0, jsx_runtime_1.jsxs)("p", { style: { fontSize: 16 }, children: ["\uBAA9\uB85D ( \uCD1D ", (0, jsx_runtime_1.jsx)("span", { style: { color: primaryColor, fontWeight: '600' }, children: ((_b = fetch.data) === null || _b === void 0 ? void 0 : _b.total) || 0 }), " \uAC1C )"] }) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '20px 30px 16px' }, children: (0, jsx_runtime_1.jsx)(antd_1.Table, { rowKey: (r) => r[rowKey], bordered: true, loading: fetch.isFetching, dataSource: dataSet, columns: columns, scroll: { x: 1024, y: 500 }, showSorterTooltip: false, sortDirections: ['descend', 'ascend'], pagination: {
|
|
114
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: { padding: '20px 30px 16px', borderBottom: '1px solid #E3E6ED' }, children: (0, jsx_runtime_1.jsxs)("p", { style: { fontSize: 16 }, children: ["\uBAA9\uB85D ( \uCD1D ", (0, jsx_runtime_1.jsx)("span", { style: { color: primaryColor, fontWeight: '600' }, children: ((_b = fetch.data) === null || _b === void 0 ? void 0 : _b.total) || 0 }), " \uAC1C )"] }) }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '20px 30px 16px' }, children: (0, jsx_runtime_1.jsx)(antd_1.Table, { rowKey: (r) => r[rowKey], bordered: true, loading: fetch.isFetching, dataSource: ((_c = fetch.data) === null || _c === void 0 ? void 0 : _c.dataSet) || [], columns: columns, scroll: { x: 1024, y: 500 }, showSorterTooltip: false, sortDirections: ['descend', 'ascend'], pagination: {
|
|
123
115
|
current: parseInt(searchParams.page || '1'),
|
|
124
116
|
pageSize: parseInt(searchParams.limit || '10'),
|
|
125
117
|
total: total,
|
package/dist/index.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ declare const _default: {
|
|
|
129
129
|
NextAuthRegistry: import("react").MemoExoticComponent<({ children }: import("./components/registry/NextAuthRegistry").Props) => import("react/jsx-runtime").JSX.Element>;
|
|
130
130
|
ErrorRegistry: ({ children }: import("./components/registry/ErrorRegistry").Props) => import("react/jsx-runtime").JSX.Element;
|
|
131
131
|
Checkbox: ({ label, checked, primaryColor, onChange }: import("./components/ui/Checkbox").Props) => import("react/jsx-runtime").JSX.Element;
|
|
132
|
-
Grid: <T>({ rowKey, primaryColor, searchParams, fetch,
|
|
132
|
+
Grid: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }: import("./components/ui/Grid").Props<T>) => import("react/jsx-runtime").JSX.Element;
|
|
133
133
|
};
|
|
134
134
|
export default _default;
|
|
135
135
|
export { util, image, Header, Header2, Aside, Page, PageTitle, ReactQueryRegistry, AntdRegistry, NextAuthRegistry, ErrorRegistry, Checkbox, Grid };
|