linkup-lib 0.1.5 → 0.1.6

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,9 +1,7 @@
1
1
  import React from 'react';
2
- import type { ThemeConfig } from 'antd';
3
2
  export interface RootLayoutProps {
4
3
  size?: 'small' | 'middle' | 'large';
5
- theme: ThemeConfig;
6
4
  children: React.ReactNode;
7
5
  }
8
- declare const RootLayout: ({ size, theme, children }: RootLayoutProps) => import("react/jsx-runtime").JSX.Element;
6
+ declare const RootLayout: ({ size, children }: RootLayoutProps) => import("react/jsx-runtime").JSX.Element;
9
7
  export default RootLayout;
@@ -9,5 +9,39 @@ const antd_1 = require("antd");
9
9
  const nextjs_registry_1 = require("@ant-design/nextjs-registry");
10
10
  // 한국어
11
11
  const ko_KR_1 = __importDefault(require("antd/es/locale/ko_KR"));
12
- const RootLayout = ({ size = 'small', theme, children }) => ((0, jsx_runtime_1.jsx)(nextjs_registry_1.AntdRegistry, { children: (0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { componentSize: size, theme: theme, locale: ko_KR_1.default, children: children }) }));
12
+ const theme = {
13
+ token: {
14
+ fontFamily: "'NanumSquareNeo', sans-serif",
15
+ borderRadius: 4,
16
+ colorText: '#323232',
17
+ },
18
+ components: {
19
+ Table: {
20
+ headerBg: 'oklch(97.7% 0.013 236.62)',
21
+ headerSortActiveBg: '#dbeafe',
22
+ headerSortHoverBg: '#dbeafe',
23
+ bodySortBg: '#f5f5f5',
24
+ rowHoverBg: '#f9f9f9'
25
+ },
26
+ Input: {
27
+ borderRadiusSM: 0,
28
+ borderRadiusXS: 0,
29
+ borderRadiusLG: 0,
30
+ borderRadius: 0,
31
+ },
32
+ Button: {
33
+ borderRadiusSM: 0,
34
+ borderRadiusXS: 0,
35
+ borderRadiusLG: 0,
36
+ borderRadius: 0,
37
+ },
38
+ Select: {
39
+ borderRadiusSM: 0,
40
+ borderRadiusXS: 0,
41
+ borderRadiusLG: 0,
42
+ borderRadius: 0,
43
+ }
44
+ }
45
+ };
46
+ const RootLayout = ({ size = 'small', children }) => ((0, jsx_runtime_1.jsx)(nextjs_registry_1.AntdRegistry, { children: (0, jsx_runtime_1.jsx)(antd_1.ConfigProvider, { componentSize: size, theme: theme, locale: ko_KR_1.default, children: children }) }));
13
47
  exports.default = RootLayout;
@@ -0,0 +1,6 @@
1
+ export interface Props {
2
+ size?: 'small' | 'middle' | 'large';
3
+ children: React.ReactNode;
4
+ }
5
+ declare const Component: ({ size, children }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export default Component;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ "use client";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const NextAuthRegistry_1 = __importDefault(require("../registry/NextAuthRegistry"));
9
+ const ErrorRegistry_1 = __importDefault(require("../registry/ErrorRegistry"));
10
+ const AntdRegistry_1 = __importDefault(require("../registry/AntdRegistry"));
11
+ const Component = ({ size = 'small', children }) => {
12
+ return ((0, jsx_runtime_1.jsx)(NextAuthRegistry_1.default, { session: true, children: (0, jsx_runtime_1.jsx)(AntdRegistry_1.default, { size: size, children: (0, jsx_runtime_1.jsx)(ErrorRegistry_1.default, { children: children }) }) }));
13
+ };
14
+ exports.default = Component;
@@ -50,6 +50,7 @@ export interface Props<T> {
50
50
  onSearch: () => void;
51
51
  onInitFilter: () => void;
52
52
  onChangeGrid: (pagination: any, filters: any, sorter: any, extra: any) => void;
53
+ buttons?: React.ReactNode[];
53
54
  }
54
- declare const Component: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }: Props<T>) => import("react/jsx-runtime").JSX.Element;
55
+ declare const Component: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, buttons }: Props<T>) => import("react/jsx-runtime").JSX.Element;
55
56
  export default Component;
@@ -12,7 +12,7 @@ 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 Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }) => {
15
+ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, buttons }) => {
16
16
  var _a, _b, _c;
17
17
  // 상세 검색 열기/닫기
18
18
  const [hideOption, setHideOption] = (0, jotai_1.useAtom)(exports.hideOptionAtom);
@@ -111,7 +111,7 @@ const Component = ({ rowKey, primaryColor = '#3875F7', searchParams, fetch, colu
111
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: {
112
112
  background: 'white',
113
113
  border: '1px solid #E3E6ED'
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: {
114
+ }, 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, { 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: {
115
115
  current: parseInt(searchParams.page || '1'),
116
116
  pageSize: parseInt(searchParams.limit || '10'),
117
117
  total: total,
package/dist/index.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  import util from './util';
2
2
  import image from './image';
3
- import ReactQueryRegistry from './components/registry/ReactQueryRegistry';
4
- import AntdRegistry from "./components/registry/AntdRegistry";
5
- import NextAuthRegistry from './components/registry/NextAuthRegistry';
6
- import ErrorRegistry from './components/registry/ErrorRegistry';
3
+ import LinkupProvider from './components/registry/Registry';
7
4
  import PageTitle from './components/ui/PageTitle';
8
5
  import Header from './components/ui/Header';
9
6
  import Header2 from './components/ui/Header2';
@@ -124,12 +121,9 @@ declare const _default: {
124
121
  Aside: ({ primaryColor, menus }: import("./components/ui/Aside").AsideProps) => import("react/jsx-runtime").JSX.Element;
125
122
  Page: ({ children }: import("./components/ui/Page").PageProps) => import("react/jsx-runtime").JSX.Element;
126
123
  PageTitle: ({ title, section1, section2 }: import("./components/ui/PageTitle").PageTitleProps) => import("react/jsx-runtime").JSX.Element;
127
- ReactQueryRegistry: import("react").MemoExoticComponent<({ children }: import("./components/registry/ReactQueryRegistry").Props) => import("react/jsx-runtime").JSX.Element>;
128
- AntdRegistry: ({ size, theme, children }: import("./components/registry/AntdRegistry").RootLayoutProps) => import("react/jsx-runtime").JSX.Element;
129
- NextAuthRegistry: import("react").MemoExoticComponent<({ children }: import("./components/registry/NextAuthRegistry").Props) => import("react/jsx-runtime").JSX.Element>;
130
- ErrorRegistry: ({ children }: import("./components/registry/ErrorRegistry").Props) => import("react/jsx-runtime").JSX.Element;
124
+ LinkupProvider: ({ size, children }: import("./components/registry/Registry").Props) => import("react/jsx-runtime").JSX.Element;
131
125
  Checkbox: ({ label, checked, primaryColor, onChange }: import("./components/ui/Checkbox").Props) => import("react/jsx-runtime").JSX.Element;
132
- Grid: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid }: import("./components/ui/Grid").Props<T>) => import("react/jsx-runtime").JSX.Element;
126
+ Grid: <T>({ rowKey, primaryColor, searchParams, fetch, columns, searchFilter, onSearch, onInitFilter, onChangeGrid, buttons }: import("./components/ui/Grid").Props<T>) => import("react/jsx-runtime").JSX.Element;
133
127
  };
134
128
  export default _default;
135
- export { util, image, Header, Header2, Aside, Page, PageTitle, ReactQueryRegistry, AntdRegistry, NextAuthRegistry, ErrorRegistry, Checkbox, Grid };
129
+ export { util, image, Header, Header2, Aside, Page, PageTitle, LinkupProvider, Checkbox, Grid };
package/dist/index.js CHANGED
@@ -3,19 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Grid = exports.Checkbox = exports.ErrorRegistry = exports.NextAuthRegistry = exports.AntdRegistry = exports.ReactQueryRegistry = exports.PageTitle = exports.Page = exports.Aside = exports.Header2 = exports.Header = exports.image = exports.util = void 0;
6
+ exports.Grid = exports.Checkbox = exports.LinkupProvider = exports.PageTitle = exports.Page = exports.Aside = exports.Header2 = exports.Header = exports.image = exports.util = void 0;
7
7
  const util_1 = __importDefault(require("./util"));
8
8
  exports.util = util_1.default;
9
9
  const image_1 = __importDefault(require("./image"));
10
10
  exports.image = image_1.default;
11
- const ReactQueryRegistry_1 = __importDefault(require("./components/registry/ReactQueryRegistry"));
12
- exports.ReactQueryRegistry = ReactQueryRegistry_1.default;
13
- const AntdRegistry_1 = __importDefault(require("./components/registry/AntdRegistry"));
14
- exports.AntdRegistry = AntdRegistry_1.default;
15
- const NextAuthRegistry_1 = __importDefault(require("./components/registry/NextAuthRegistry"));
16
- exports.NextAuthRegistry = NextAuthRegistry_1.default;
17
- const ErrorRegistry_1 = __importDefault(require("./components/registry/ErrorRegistry"));
18
- exports.ErrorRegistry = ErrorRegistry_1.default;
11
+ // import db from './db';
12
+ const Registry_1 = __importDefault(require("./components/registry/Registry"));
13
+ exports.LinkupProvider = Registry_1.default;
19
14
  const PageTitle_1 = __importDefault(require("./components/ui/PageTitle"));
20
15
  exports.PageTitle = PageTitle_1.default;
21
16
  const Header_1 = __importDefault(require("./components/ui/Header"));
@@ -30,4 +25,4 @@ const Checkbox_1 = __importDefault(require("./components/ui/Checkbox"));
30
25
  exports.Checkbox = Checkbox_1.default;
31
26
  const Grid_1 = __importDefault(require("./components/ui/Grid"));
32
27
  exports.Grid = Grid_1.default;
33
- exports.default = { util: util_1.default, image: image_1.default, Header: Header_1.default, Header2: Header2_1.default, Aside: Aside_1.default, Page: Page_1.default, PageTitle: PageTitle_1.default, ReactQueryRegistry: ReactQueryRegistry_1.default, AntdRegistry: AntdRegistry_1.default, NextAuthRegistry: NextAuthRegistry_1.default, ErrorRegistry: ErrorRegistry_1.default, Checkbox: Checkbox_1.default, Grid: Grid_1.default };
28
+ exports.default = { util: util_1.default, image: image_1.default, Header: Header_1.default, Header2: Header2_1.default, Aside: Aside_1.default, Page: Page_1.default, PageTitle: PageTitle_1.default, LinkupProvider: Registry_1.default, Checkbox: Checkbox_1.default, Grid: Grid_1.default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkup-lib",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "링크업 패키지",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,10 @@
8
8
  ".": {
9
9
  "types": "./dist/index.d.ts",
10
10
  "default": "./dist/index.js"
11
+ },
12
+ "./db": {
13
+ "types": "./dist/db.d.ts",
14
+ "default": "./dist/db.js"
11
15
  }
12
16
  },
13
17
  "files": [