linkup-lib 0.1.9 → 0.1.11

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.
@@ -3,6 +3,11 @@ import { ColumnsType } from "antd/es/table";
3
3
  export declare const hideOptionAtom: import("jotai").PrimitiveAtom<boolean> & {
4
4
  init: boolean;
5
5
  };
6
+ interface CustomerOption {
7
+ type: 'custom';
8
+ title: string;
9
+ component: React.ReactNode;
10
+ }
6
11
  interface SearchKeywordOption {
7
12
  type: 'search';
8
13
  title: string;
@@ -39,7 +44,7 @@ interface DateRangeOption {
39
44
  endDate: string | undefined;
40
45
  onChange: (startDate: string | undefined, endDate: string | undefined) => void;
41
46
  }
42
- type SearchFilterOption = CheckboxOption | DateRangeOption | SearchKeywordOption;
47
+ type SearchFilterOption = CheckboxOption | DateRangeOption | SearchKeywordOption | CustomerOption;
43
48
  export interface Props<T> {
44
49
  rowKey: keyof T;
45
50
  primaryColor?: string;
@@ -83,6 +83,21 @@ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, colu
83
83
  r.onChange(undefined, undefined);
84
84
  } })] }) })] }, `filter-${i}`) }, `filter-container-${i}`));
85
85
  }
86
+ // 커스텀 컴포넌트
87
+ else if (r.type === 'custom') {
88
+ return ((0, jsx_runtime_1.jsx)("div", { style: {
89
+ background: 'white',
90
+ border: '1px solid #E3E6ED',
91
+ padding: '20px 30px 16px',
92
+ display: 'flex',
93
+ flexDirection: 'column',
94
+ gap: 16,
95
+ }, children: (0, jsx_runtime_1.jsxs)("div", { style: {
96
+ display: 'flex',
97
+ flexWrap: 'wrap',
98
+ alignItems: 'center',
99
+ }, children: [(0, jsx_runtime_1.jsx)("p", { style: { fontSize: 15, flexBasis: '100px' }, children: r.title }), (0, jsx_runtime_1.jsx)("div", { children: r.component })] }, `filter-${i}`) }, `filter-container-${i}`));
100
+ }
86
101
  // 키워드 검색
87
102
  else if (r.type === 'search') {
88
103
  return ((0, jsx_runtime_1.jsx)("div", { style: {
@@ -117,11 +132,11 @@ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, colu
117
132
  }, 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: {
118
133
  background: 'white',
119
134
  border: '1px solid #E3E6ED'
120
- }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { padding: '20px 30px 16px', borderBottom: '1px solid #E3E6ED', display: 'flex', alignItems: 'center' }, 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: { flex: 1, display: 'flex', justifyContent: 'flex-end', gap: 8 }, children: buttons })] }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '20px 30px 16px' }, children: (0, jsx_runtime_1.jsx)(antd_1.Table, { rowSelection: {
121
- onChange: onChangeSelectedKey ? (selectedRowKeys) => {
135
+ }, children: [(0, jsx_runtime_1.jsxs)("div", { style: { padding: '20px 30px 16px', borderBottom: '1px solid #E3E6ED', display: 'flex', alignItems: 'center' }, 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: { flex: 1, display: 'flex', justifyContent: 'flex-end', gap: 8 }, children: buttons })] }), (0, jsx_runtime_1.jsx)("div", { style: { padding: '20px 30px 16px' }, children: (0, jsx_runtime_1.jsx)(antd_1.Table, { rowSelection: onChangeSelectedKey ? {
136
+ onChange: (selectedRowKeys) => {
122
137
  onChangeSelectedKey(selectedRowKeys);
123
- } : undefined,
124
- }, 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: {
138
+ },
139
+ } : undefined, 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: {
125
140
  current: parseInt(searchParams.page || '1'),
126
141
  pageSize: parseInt(searchParams.limit || '10'),
127
142
  total: total,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkup-lib",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "링크업 패키지",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",