linkup-lib 0.1.16 → 0.1.18

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.
@@ -109,10 +109,11 @@ const SubMenu = ({ menu, primaryColor }) => {
109
109
  if (!pathname)
110
110
  return "";
111
111
  const pathArr = pathname.split('/');
112
+ console.log(`${pathname}`, `/${menu.key}`);
112
113
  if (pathArr[1] === "")
113
114
  return false;
114
115
  else
115
- return `${pathArr[1]}/${pathArr[2]}` === menu.key;
116
+ return `${pathname}` === `/${menu.key}`;
116
117
  }, [pathname, menu.key]);
117
118
  return ((0, jsx_runtime_1.jsx)("li", { style: {
118
119
  height: 48,
@@ -55,8 +55,9 @@ export interface Props<T> {
55
55
  onSearch: () => void;
56
56
  onInitFilter: () => void;
57
57
  onChangeGrid: (pagination: any, filters: any, sorter: any, extra: any) => void;
58
- onChangeSelectedKey?: (selectedKeys: React.Key[]) => void;
58
+ selectedKeys?: React.Key[];
59
+ onChangeSelectedKey?: (selectedKeys: React.Key[], selectedRows: T[]) => void;
59
60
  buttons?: React.ReactNode[];
60
61
  }
61
- declare const Component: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, onChangeSelectedKey, buttons }: Props<T>) => import("react/jsx-runtime").JSX.Element;
62
+ declare const Component: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, selectedKeys, onChangeSelectedKey, buttons }: Props<T>) => import("react/jsx-runtime").JSX.Element;
62
63
  export default Component;
@@ -13,7 +13,7 @@ const bs_1 = require("react-icons/bs");
13
13
  const jotai_1 = require("jotai");
14
14
  const util_1 = __importDefault(require("../../util"));
15
15
  exports.hideOptionAtom = (0, jotai_1.atom)(false);
16
- const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, onChangeSelectedKey, buttons }) => {
16
+ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, selectedKeys, onChangeSelectedKey, buttons }) => {
17
17
  var _a, _b, _c;
18
18
  // 상세 검색 열기/닫기
19
19
  const [hideOption, setHideOption] = (0, jotai_1.useAtom)(exports.hideOptionAtom);
@@ -133,9 +133,10 @@ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, colu
133
133
  }, 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: {
134
134
  background: 'white',
135
135
  border: '1px solid #E3E6ED'
136
- }, 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: util_1.default.format.comma(((_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 ? {
137
- onChange: (selectedRowKeys) => {
138
- onChangeSelectedKey(selectedRowKeys);
136
+ }, 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: util_1.default.format.comma(((_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 || selectedKeys ? {
137
+ selectedRowKeys: selectedKeys,
138
+ onChange: (selectedRowKeys, selectedRows) => {
139
+ onChangeSelectedKey && onChangeSelectedKey(selectedRowKeys, selectedRows);
139
140
  },
140
141
  } : 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: {
141
142
  current: parseInt(searchParams.page || '1'),
@@ -0,0 +1,2 @@
1
+ declare const Component: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Component;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const google_1 = require("next/font/google");
6
+ const cairoPlay = (0, google_1.Cairo_Play)({ subsets: ['latin'], weight: ['400', '700', '900'], adjustFontFallback: false });
7
+ const Component = () => {
8
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("h1", { className: `text-2xl font-bold text-[#EEEEEE] cursor-pointer pl-4 ${cairoPlay.className}`, children: "DRINKiT" }) }));
9
+ };
10
+ exports.default = Component;
package/dist/index.d.ts CHANGED
@@ -102,7 +102,7 @@ declare const _default: {
102
102
  PageTitle: ({ title, section1, section2 }: import("./components/ui/PageTitle").PageTitleProps) => import("react/jsx-runtime").JSX.Element;
103
103
  LinkupProvider: ({ size, children, color, theme }: import("./components/registry/Registry").Props) => import("react/jsx-runtime").JSX.Element;
104
104
  Checkbox: ({ label, checked, primaryColor, onChange, loading }: import("./components/ui/Checkbox").Props) => import("react/jsx-runtime").JSX.Element;
105
- Grid: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, onChangeSelectedKey, buttons }: import("./components/ui/Grid").Props<T>) => import("react/jsx-runtime").JSX.Element;
105
+ Grid: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, selectedKeys, onChangeSelectedKey, buttons }: import("./components/ui/Grid").Props<T>) => import("react/jsx-runtime").JSX.Element;
106
106
  DescriptionItem: ({ title, children, required, bordered }: import("./components/ui/DescriptionItem").Props) => import("react/jsx-runtime").JSX.Element;
107
107
  DescriptionCard: ({ title, defaultOpen, children, required }: import("./components/ui/DescriptionCard").Props) => import("react/jsx-runtime").JSX.Element;
108
108
  Editor: ({ value, onChange, placeholder, readOnly, height, maxHeight, className }: import("./components/ui/Editor").EditorProps) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkup-lib",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "링크업 패키지",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",