@thefreshop/tb 1.0.0

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.
Files changed (87) hide show
  1. package/dist/cjs/index.d.ts +4 -0
  2. package/dist/cjs/index.js +18361 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/tbframe/index.d.ts +3 -0
  5. package/dist/cjs/tbframe/layout/bottom.d.ts +6 -0
  6. package/dist/cjs/tbframe/layout/frame.d.ts +10 -0
  7. package/dist/cjs/tbframe/layout/main.d.ts +3 -0
  8. package/dist/cjs/tbframe/layout/nav.d.ts +6 -0
  9. package/dist/cjs/tbframe/layout/tabs.d.ts +3 -0
  10. package/dist/cjs/tbframe/layout/top.d.ts +7 -0
  11. package/dist/cjs/tbframe/page/loginpage.d.ts +3 -0
  12. package/dist/cjs/tbframe/page/nullpage.d.ts +3 -0
  13. package/dist/cjs/tbframe/provider/provider.d.ts +7 -0
  14. package/dist/cjs/tbframe/types/index.d.ts +13 -0
  15. package/dist/cjs/tbframe/types/provider.types.d.ts +37 -0
  16. package/dist/cjs/tbframe/types/tbframe.types.d.ts +46 -0
  17. package/dist/cjs/tbframe/types/user.types.d.ts +21 -0
  18. package/dist/cjs/tbpage/component/authTable.d.ts +6 -0
  19. package/dist/cjs/tbpage/component/content_layout.d.ts +10 -0
  20. package/dist/cjs/tbpage/component/modules/antBaseModalCreate/index.d.ts +17 -0
  21. package/dist/cjs/tbpage/component/modules/antBaseModalCreate/modal_props.d.ts +8 -0
  22. package/dist/cjs/tbpage/component/modules/antBaseModalCreate/wiget.d.ts +3 -0
  23. package/dist/cjs/tbpage/component/modules/antBaseTable/btn_widget.d.ts +38 -0
  24. package/dist/cjs/tbpage/component/modules/antBaseTable/index.d.ts +23 -0
  25. package/dist/cjs/tbpage/component/modules/antBaseTable/table_props.d.ts +20 -0
  26. package/dist/cjs/tbpage/component/modules/error.d.ts +16 -0
  27. package/dist/cjs/tbpage/component/modules/index.d.ts +2 -0
  28. package/dist/cjs/tbpage/component/modules/loading_layout.d.ts +16 -0
  29. package/dist/cjs/tbpage/component/modules/searchbox.d.ts +3 -0
  30. package/dist/cjs/tbpage/component/modules/useComponentSize.d.ts +6 -0
  31. package/dist/cjs/tbpage/component/modules/util.d.ts +6 -0
  32. package/dist/cjs/tbpage/component/modules/utils/common.d.ts +61 -0
  33. package/dist/cjs/tbpage/component/modules/utils/index.d.ts +2 -0
  34. package/dist/cjs/tbpage/component/modules/utils/word.d.ts +12 -0
  35. package/dist/cjs/tbpage/component/tbpage.d.ts +10 -0
  36. package/dist/cjs/tbpage/component/tbpageMulti.d.ts +19 -0
  37. package/dist/cjs/tbpage/component/tbpagesm.d.ts +9 -0
  38. package/dist/cjs/tbpage/component/useComponentSize.d.ts +6 -0
  39. package/dist/cjs/tbpage/index.d.ts +9 -0
  40. package/dist/cjs/tbpage/provider/provider.d.ts +9 -0
  41. package/dist/cjs/tbpage/types/antBaseTable.types.d.ts +112 -0
  42. package/dist/cjs/tbpage/types/index.d.ts +2 -0
  43. package/dist/cjs/tbpage/types/searchbox.type.d.ts +33 -0
  44. package/dist/esm/index.d.ts +4 -0
  45. package/dist/esm/index.js +18330 -0
  46. package/dist/esm/index.js.map +1 -0
  47. package/dist/esm/tbframe/index.d.ts +3 -0
  48. package/dist/esm/tbframe/layout/bottom.d.ts +6 -0
  49. package/dist/esm/tbframe/layout/frame.d.ts +10 -0
  50. package/dist/esm/tbframe/layout/main.d.ts +3 -0
  51. package/dist/esm/tbframe/layout/nav.d.ts +6 -0
  52. package/dist/esm/tbframe/layout/tabs.d.ts +3 -0
  53. package/dist/esm/tbframe/layout/top.d.ts +7 -0
  54. package/dist/esm/tbframe/page/loginpage.d.ts +3 -0
  55. package/dist/esm/tbframe/page/nullpage.d.ts +3 -0
  56. package/dist/esm/tbframe/provider/provider.d.ts +7 -0
  57. package/dist/esm/tbframe/types/index.d.ts +13 -0
  58. package/dist/esm/tbframe/types/provider.types.d.ts +37 -0
  59. package/dist/esm/tbframe/types/tbframe.types.d.ts +46 -0
  60. package/dist/esm/tbframe/types/user.types.d.ts +21 -0
  61. package/dist/esm/tbpage/component/authTable.d.ts +6 -0
  62. package/dist/esm/tbpage/component/content_layout.d.ts +10 -0
  63. package/dist/esm/tbpage/component/modules/antBaseModalCreate/index.d.ts +17 -0
  64. package/dist/esm/tbpage/component/modules/antBaseModalCreate/modal_props.d.ts +8 -0
  65. package/dist/esm/tbpage/component/modules/antBaseModalCreate/wiget.d.ts +3 -0
  66. package/dist/esm/tbpage/component/modules/antBaseTable/btn_widget.d.ts +38 -0
  67. package/dist/esm/tbpage/component/modules/antBaseTable/index.d.ts +23 -0
  68. package/dist/esm/tbpage/component/modules/antBaseTable/table_props.d.ts +20 -0
  69. package/dist/esm/tbpage/component/modules/error.d.ts +16 -0
  70. package/dist/esm/tbpage/component/modules/index.d.ts +2 -0
  71. package/dist/esm/tbpage/component/modules/loading_layout.d.ts +16 -0
  72. package/dist/esm/tbpage/component/modules/searchbox.d.ts +3 -0
  73. package/dist/esm/tbpage/component/modules/useComponentSize.d.ts +6 -0
  74. package/dist/esm/tbpage/component/modules/util.d.ts +6 -0
  75. package/dist/esm/tbpage/component/modules/utils/common.d.ts +61 -0
  76. package/dist/esm/tbpage/component/modules/utils/index.d.ts +2 -0
  77. package/dist/esm/tbpage/component/modules/utils/word.d.ts +12 -0
  78. package/dist/esm/tbpage/component/tbpage.d.ts +10 -0
  79. package/dist/esm/tbpage/component/tbpageMulti.d.ts +19 -0
  80. package/dist/esm/tbpage/component/tbpagesm.d.ts +9 -0
  81. package/dist/esm/tbpage/component/useComponentSize.d.ts +6 -0
  82. package/dist/esm/tbpage/index.d.ts +9 -0
  83. package/dist/esm/tbpage/provider/provider.d.ts +9 -0
  84. package/dist/esm/tbpage/types/antBaseTable.types.d.ts +112 -0
  85. package/dist/esm/tbpage/types/index.d.ts +2 -0
  86. package/dist/esm/tbpage/types/searchbox.type.d.ts +33 -0
  87. package/package.json +64 -0
@@ -0,0 +1,3 @@
1
+ export * from './provider/provider';
2
+ export type * from './types';
3
+ export { default as TbFrame } from './layout/frame';
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import { bottomType } from "../types";
3
+ declare const Bottom: ({ bottom }: {
4
+ bottom: bottomType;
5
+ }) => React.JSX.Element;
6
+ export default Bottom;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { tbframeType, topType, navType, bottomType } from '../types';
3
+ declare const TbFrame: ({ setting, top, bottom, nav, top_banner }: {
4
+ setting: tbframeType;
5
+ top: topType;
6
+ bottom?: bottomType;
7
+ nav: navType;
8
+ top_banner?: React.ReactNode;
9
+ }) => React.JSX.Element;
10
+ export default TbFrame;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Main: () => React.JSX.Element;
3
+ export default Main;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { navType } from '../types';
3
+ declare const Nav: ({ nav: { menuSet, openIcon, closeIcon } }: {
4
+ nav: navType;
5
+ }) => React.JSX.Element;
6
+ export default Nav;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Tabs: () => React.JSX.Element;
3
+ export default Tabs;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { tbframeType, topType } from '../types';
3
+ declare const Top: ({ setting, top: { title, titleimage, topMenuSetting, menuStyle, imgstyle, titleStyle, topRight } }: {
4
+ setting: tbframeType;
5
+ top: topType;
6
+ }) => React.JSX.Element;
7
+ export default Top;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const LoginPage: () => React.JSX.Element;
3
+ export default LoginPage;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const NullPage: () => React.JSX.Element;
3
+ export default NullPage;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { ProviderType } from '../types';
3
+ export declare const TbContext: React.Context<ProviderType | undefined>;
4
+ export declare const TbProvider: ({ children }: {
5
+ children: React.ReactNode;
6
+ }) => React.JSX.Element;
7
+ export declare const useTbState: () => ProviderType;
@@ -0,0 +1,13 @@
1
+ export * from './user.types';
2
+ export * from './tbframe.types';
3
+ export * from './provider.types';
4
+ import { tabType } from './provider.types';
5
+ export interface tbframeType {
6
+ islogin?: boolean;
7
+ isgroup?: boolean;
8
+ isgroupauth?: boolean;
9
+ startpage?: React.ReactNode;
10
+ loginpage?: React.ReactNode;
11
+ logoutComponent?: React.ReactNode;
12
+ globalpages?: tabType[];
13
+ }
@@ -0,0 +1,37 @@
1
+ import { userType } from './user.types';
2
+ import { navType } from './tbframe.types';
3
+ export type ProviderType = {
4
+ topkey: string;
5
+ setTopkey: (value: string) => void;
6
+ tabs: tabType[];
7
+ currentTab?: tabType;
8
+ setCurrentTab: (value: tabType) => void;
9
+ addTabs: (value: tabType) => void;
10
+ removeTabs: (value: tabType) => void;
11
+ loginUser: (value: userType | null) => void;
12
+ logout: (force?: boolean) => void;
13
+ user?: userType;
14
+ startpage?: React.ReactNode;
15
+ setStartpage: (value: React.ReactNode) => void;
16
+ SetWarning: (value: ErrMsgType) => void;
17
+ errMsg?: ErrMsgType;
18
+ isBanner: boolean;
19
+ setIsBanner: (value: boolean) => void;
20
+ setGlobalpages: (value: tabType[]) => void;
21
+ addGlobalTabs: (key: string) => void;
22
+ setMenupages: (value: navType) => void;
23
+ goTabs: (key: string) => void;
24
+ };
25
+ export type tabType = {
26
+ title: string;
27
+ key: string;
28
+ page?: React.ReactNode;
29
+ noremove?: boolean;
30
+ };
31
+ export type ErrMsgType = {
32
+ err?: string;
33
+ errType?: string;
34
+ notiTitle?: string;
35
+ notimessage?: string;
36
+ isPopup?: boolean;
37
+ };
@@ -0,0 +1,46 @@
1
+ export declare const baseAdminDat: TbFrameType;
2
+ export type TbFrameType = {
3
+ admin_account_id: number;
4
+ admin_profile_id: number;
5
+ admin_name: string;
6
+ admin_id?: string;
7
+ admin_pw?: string;
8
+ admin_profile_create_time: string;
9
+ admin_profile_update_time: string;
10
+ };
11
+ export type topMenuType = {
12
+ title: string;
13
+ icon?: React.ReactElement | JSX.Element;
14
+ key: string;
15
+ };
16
+ export declare const topbase: topType;
17
+ export type topType = {
18
+ title?: string;
19
+ titleimage?: string;
20
+ topMenuSetting: topMenuType[];
21
+ menuStyle?: any;
22
+ imgstyle?: any;
23
+ titleStyle?: any;
24
+ topRight?: React.ReactNode;
25
+ };
26
+ export type bottomType = {
27
+ bottomRight?: React.ReactNode;
28
+ };
29
+ export type menuType = {
30
+ title: string;
31
+ icon?: React.ReactElement | JSX.Element;
32
+ key: string;
33
+ children?: menuType[];
34
+ page?: React.ReactNode;
35
+ hasPage?: boolean;
36
+ defalultOpen?: boolean;
37
+ };
38
+ export type navType = {
39
+ menuSet: menuSet[];
40
+ openIcon?: React.ReactElement | JSX.Element;
41
+ closeIcon?: React.ReactElement | JSX.Element;
42
+ };
43
+ export type menuSet = {
44
+ parentkey?: string;
45
+ menuSetting: menuType[];
46
+ };
@@ -0,0 +1,21 @@
1
+ export type AnyObject = Record<PropertyKey, any>;
2
+ export interface userType<T = AnyObject> {
3
+ user_id: string;
4
+ user_name?: string;
5
+ user_profile?: T;
6
+ user_group?: groupType;
7
+ }
8
+ export interface groupType {
9
+ group_id: number;
10
+ group_key: string;
11
+ group_name: string;
12
+ group_section_start?: string;
13
+ group_section_auth: string[] | string;
14
+ group_menu_auth: string[] | string;
15
+ }
16
+ export interface authType {
17
+ auth_key: string;
18
+ }
19
+ export interface authMenuType {
20
+ menu_key: string[];
21
+ }
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { topType, menuType } from "../../tbframe";
3
+ export declare const AuthTable: ({ top, menuSetting }: {
4
+ top: topType;
5
+ menuSetting: menuType[];
6
+ }) => React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { ComponentSize } from './useComponentSize';
2
+ import React from 'react';
3
+ export declare const ContentLayout: ({ Icon, title, children, contentStyle, flex }: {
4
+ Icon?: any;
5
+ title?: string;
6
+ decs?: string;
7
+ children?: JSX.Element | JSX.Element[] | ((size: ComponentSize) => JSX.Element);
8
+ contentStyle?: React.CSSProperties;
9
+ flex?: any;
10
+ }) => React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { ModalFuncProps, FormProps } from 'antd';
3
+ import { antBaseColumnType } from '../../../types';
4
+ type propsType = {
5
+ type?: string;
6
+ customColumn?: any[];
7
+ columns: antBaseColumnType[];
8
+ isModify?: boolean;
9
+ customValue?: (data: any) => any;
10
+ buttonName?: string;
11
+ };
12
+ declare const AntBaseModalCreate: ({ modalProps, formProps, props }: {
13
+ modalProps: ModalFuncProps;
14
+ formProps: FormProps;
15
+ props: propsType;
16
+ }) => React.JSX.Element;
17
+ export default AntBaseModalCreate;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import 'moment/locale/ko';
3
+ import { antBaseColumnType } from '../../../types';
4
+ export declare const useFormColumns: ({ isModify, columns, onChange }: {
5
+ isModify: boolean;
6
+ columns?: antBaseColumnType[];
7
+ onChange: (data: any) => void;
8
+ }) => React.ReactNode[];
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const Files: (props: any) => React.JSX.Element;
3
+ export declare const DatePickerText: (props: any) => React.JSX.Element;
@@ -0,0 +1,38 @@
1
+ import React from 'react';
2
+ import { btnReturnFType, customBtnReturnFType } from '../../../types';
3
+ /**
4
+ * 테이블 상단 버튼 그룹
5
+ * @author 신민우
6
+
7
+ * @constructor
8
+ * @param {boolean} isSelect - 테이블 row 선택 유무
9
+ * @param {btnReturnFType} addProps - 추가 버튼 props
10
+ * @param {btnReturnFType} modifyProps - 수정 버튼 props
11
+ * @param {btnReturnFType} deleteProps - 삭제 버튼 props
12
+ * @param {customBtnReturnFType} customProps - 커스텀 버튼 props
13
+ *
14
+ * @version 1.0.0
15
+ * @see
16
+ * @return 컴포넌트
17
+
18
+ * @todo
19
+ */
20
+ export declare const TableTopButtonGroup: ({ isSelect, onRefresh, isCounter, autoRefreshTime, addProps, modifyProps, deleteProps, removeProps, resetProps, customProps }: {
21
+ isSelect: boolean;
22
+ onRefresh?: () => void;
23
+ isCounter?: boolean;
24
+ autoRefreshTime?: number;
25
+ addProps?: btnReturnFType;
26
+ modifyProps?: btnReturnFType;
27
+ deleteProps?: btnReturnFType;
28
+ removeProps?: btnReturnFType;
29
+ resetProps?: btnReturnFType;
30
+ customProps?: customBtnReturnFType;
31
+ }) => React.JSX.Element | null;
32
+ export declare const TableBottomButtonGroup: ({ isSelect, topProps, bottomProps, upProps, downProps }: {
33
+ isSelect: boolean;
34
+ topProps?: btnReturnFType;
35
+ bottomProps?: btnReturnFType;
36
+ upProps?: btnReturnFType;
37
+ downProps?: btnReturnFType;
38
+ }) => React.JSX.Element;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { AntBaseTableRefProps, antBasePropsType } from '../../../types';
3
+ import { GetRowKey } from 'antd/es/table/interface';
4
+ declare module 'react' {
5
+ function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
6
+ }
7
+ /**
8
+ * antd 테이블
9
+ * @author 신민우
10
+
11
+ * @constructor
12
+ * @param {boolean} rowRadio - row radio 활성화
13
+ * @param {boolean} rowCheckBox - row checkbox 활성화
14
+ * @param {Function} onSelect - 라디오 체크된 키와 index 받는 함수
15
+ * @param {Function} onCheck - 체크박스 체크된 키들 받는 함수
16
+ * @version 1.0.0
17
+ * @see
18
+ * @return 컴포넌트
19
+
20
+ * @todo
21
+ */
22
+ declare const _default: <ItemType, KEY extends keyof ItemType>(props: antBasePropsType<ItemType, KEY | GetRowKey<ItemType>> & React.RefAttributes<AntBaseTableRefProps<ItemType>>) => React.ReactElement | null;
23
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { TableColumnProps, TableProps, CheckboxProps } from 'antd/';
3
+ import { antBaseColumnType } from '../../../types';
4
+ import 'moment/locale/ko';
5
+ export declare const tableColumns: (columns?: antBaseColumnType[]) => import("antd").TableColumnsType<import("antd/es/_util/type").AnyObject>;
6
+ export declare const convert2FormData: <ItemType, KEY extends keyof ItemType>({ data, columns }: {
7
+ data?: ItemType;
8
+ columns: antBaseColumnType[];
9
+ }) => any;
10
+ export declare const tableRowSelection: ({ selectedRowKeys, radioProps, checkboxProps }: {
11
+ selectedRowKeys: React.Key[];
12
+ radioProps?: {
13
+ onFun: (data: any) => void;
14
+ } | false;
15
+ checkboxProps?: {
16
+ onFun: (data: React.Key[]) => void;
17
+ props?: (record: any) => Partial<Omit<CheckboxProps, "checked" | "defaultChecked">>;
18
+ } | false;
19
+ }) => TableProps["rowSelection"];
20
+ export declare const useColumnSearchProps: (dataIndex: string) => TableColumnProps;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ /**
3
+ * error 페이지
4
+ * @author 신민우
5
+
6
+ * @constructor
7
+ * @param {string} name - 제목
8
+ * @param {string} message - 내용
9
+ * @param {Function} onHome - 홈으로 이동
10
+ */
11
+ export declare const ErrorPage: ({ name, message, onHome }: {
12
+ name: string;
13
+ message: string;
14
+ onHome?: string;
15
+ }) => React.JSX.Element;
16
+ export default ErrorPage;
@@ -0,0 +1,2 @@
1
+ export { default as AntBaseTable } from './antBaseTable';
2
+ export { SearchBox } from './searchbox';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ /**
3
+ * 로딩 레이아웃
4
+ * @author 신민우
5
+ */
6
+ export declare const LoadingLayout: ({ tip, isLoading, error, isError, style, children, className, notFullScreen }: {
7
+ tip?: string;
8
+ isLoading?: boolean;
9
+ isError?: boolean;
10
+ error?: Error | null;
11
+ style?: React.CSSProperties;
12
+ children?: JSX.Element | JSX.Element[];
13
+ className?: string;
14
+ notFullScreen?: any;
15
+ }) => React.JSX.Element;
16
+ export default LoadingLayout;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { searchBoxType } from '../../types';
3
+ export declare const SearchBox: ({ searchOption, searchDisabled, onSubmit, onReset }: searchBoxType) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface ComponentSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ declare function useComponentSize(): [React.RefObject<HTMLDivElement>, ComponentSize];
6
+ export default useComponentSize;
@@ -0,0 +1,6 @@
1
+ import { antBaseColumnType } from '../../types';
2
+ export declare const deleteCol: ({ key, onRemove, onReset }: {
3
+ key: string;
4
+ onRemove?: (data: any) => void;
5
+ onReset?: (data: any) => void;
6
+ }) => antBaseColumnType;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * 숫자만 추출
3
+ * @author 신민우
4
+
5
+ * @constructor
6
+ * @param {string} - 문자열
7
+ */
8
+ export declare const stringToNumber: (src?: string) => string;
9
+ /**
10
+ * 휴대폰 하이픈
11
+ * @author 신민우
12
+
13
+ * @constructor
14
+ * @param {string} - 휴대폰번호
15
+ */
16
+ export declare const phoneFormat: (src?: string) => string;
17
+ /**
18
+ * 오토? 하이픈
19
+ * @author 신민우
20
+
21
+ * @constructor
22
+ * @param {string} - 타겟
23
+ */
24
+ export declare const autoHyphen: (target: string) => string;
25
+ /**
26
+ * 콤마 적용
27
+ * @author 신민우
28
+
29
+ * @constructor
30
+ * @param {string} - 타겟
31
+ */
32
+ export declare const commaFormat: (num: string) => string;
33
+ /**
34
+ * 수량 옵션 list
35
+ * @author 신민우
36
+
37
+ * @constructor
38
+ * @param {number} max - 맥스 갯수
39
+ * @param {number} gap - 갯수 단위
40
+ */
41
+ export declare const valueList: ({ max, gap }: {
42
+ max?: number;
43
+ gap?: number;
44
+ }) => {
45
+ value: string;
46
+ label: string;
47
+ }[];
48
+ /**
49
+ * 사업자번호 양식 체크
50
+ * @author 신민우
51
+
52
+ * @constructor
53
+ * @param {number} number - 번호
54
+ */
55
+ export declare const ruleBusinessNumber: (number: string) => boolean;
56
+ /**
57
+ * 숫자앞에 0 채우기
58
+ * @param date string
59
+ */
60
+ export declare const fillZero: (width: number, str: string) => string;
61
+ export declare const postMessage: (type: string, data: any) => void;
@@ -0,0 +1,2 @@
1
+ export * from "./common";
2
+ export * from "./word";
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export declare const TABLE_MODIFY = "\uC815\uBCF4 \uC218\uC815";
3
+ export declare const TABLE_CREATE = "\uC2E0\uADDC \uB4F1\uB85D";
4
+ export declare const TABLE_RESET = "\uC120\uD0DD \uBCF5\uAD6C";
5
+ export declare const TABLE_DELETE = "\uC120\uD0DD \uC0AD\uC81C";
6
+ export declare const TABLE_REMOVE = "\uC644\uC804 \uC0AD\uC81C";
7
+ export declare const TABLE_DOWN: React.JSX.Element;
8
+ export declare const TABLE_UP: React.JSX.Element;
9
+ export declare const TABLE_BOTTOM: React.JSX.Element;
10
+ export declare const TABLE_TOP: React.JSX.Element;
11
+ export declare const FORM_MODIFY = "\uC218\uC815";
12
+ export declare const FORM_CREATE = "\uB4F1\uB85D";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export declare const Tbpage: ({ tableProps, searchOption, searchDisabled, onSubmit, isLoading, title, decs, }: {
3
+ tableProps: any;
4
+ searchOption?: any;
5
+ searchDisabled?: boolean;
6
+ onSubmit?: (searchdata?: any, rowdata?: any, isReset?: boolean) => void;
7
+ isLoading?: boolean;
8
+ title?: string;
9
+ decs?: string;
10
+ }) => React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ type arrtable = {
3
+ title?: string;
4
+ type: "table" | "module";
5
+ tableprops?: any;
6
+ module?: React.ReactNode;
7
+ };
8
+ export declare const TbpageMulti: ({ arrtableProps, arrflex, searchOption, searchDisabled, onSubmit, isLoading, title, decs, direction, }: {
9
+ arrtableProps: arrtable[];
10
+ arrflex?: any[];
11
+ searchOption?: any;
12
+ searchDisabled?: boolean;
13
+ onSubmit?: (searchdata?: any, rowdata?: any, isReset?: boolean) => void;
14
+ isLoading?: boolean;
15
+ title?: string;
16
+ decs?: string;
17
+ direction?: string;
18
+ }) => React.JSX.Element;
19
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export declare const TbpageSm: ({ tableProps, searchOption, onSubmit, isLoading, title, decs, }: {
3
+ tableProps: any;
4
+ searchOption?: any;
5
+ onSubmit?: (searchdata?: any, rowdata?: any, isReset?: true) => void;
6
+ isLoading?: boolean;
7
+ title?: string;
8
+ decs?: string;
9
+ }) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface ComponentSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ declare function useComponentSize(): [React.RefObject<HTMLDivElement>, ComponentSize];
6
+ export default useComponentSize;
@@ -0,0 +1,9 @@
1
+ export * from "./component/authTable";
2
+ export { TbpProvider } from "./provider/provider";
3
+ export { ContentLayout } from "./component/content_layout";
4
+ export { Tbpage } from "./component/tbpage";
5
+ export { TbpageSm } from "./component/tbpagesm";
6
+ export { TbpageMulti } from "./component/tbpageMulti";
7
+ export { default as AntBaseTable } from "./component/modules/antBaseTable";
8
+ export { default as AntBaseModalCreate } from "./component/modules/antBaseModalCreate";
9
+ export type * from "./types";
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import 'moment/locale/ko';
3
+ import type { Locale } from 'antd/es/locale';
4
+ import 'moment/locale/ko';
5
+ import 'dayjs/locale/ko';
6
+ export declare const TbpProvider: ({ locale, children }: {
7
+ locale?: Locale;
8
+ children: React.ReactNode;
9
+ }) => React.JSX.Element;
@@ -0,0 +1,112 @@
1
+ import type { AnyObject } from 'antd/es/_util/type';
2
+ import type { ExpandableConfig, GetRowKey, TablePaginationConfig, TableRowSelection } from 'antd/es/table/interface';
3
+ import type { ColumnGroupType, ColumnType, TableProps } from 'antd/es/table';
4
+ export interface AntBaseTableRefProps<ItemType> {
5
+ resetSelection: () => void;
6
+ reSelection: () => void;
7
+ popupCreate: boolean;
8
+ popupModify: boolean;
9
+ selectedRow?: ItemType;
10
+ }
11
+ export type antBasePropsType<T = AnyObject, K = string | GetRowKey<T>> = {
12
+ bordered?: boolean;
13
+ className?: string;
14
+ rowKey: K;
15
+ rowName?: K;
16
+ dataSource: T[];
17
+ initData?: T;
18
+ customColumn?: any[];
19
+ customValue?: (data: any) => any;
20
+ columns: antBaseColumnType[];
21
+ expandable?: ExpandableConfig<AnyObject>;
22
+ size?: 'large' | 'middle' | 'small';
23
+ onClick?: (record: T, index?: number) => void;
24
+ onDoubleClick?: (record: T, index?: number) => void;
25
+ selectProps?: selectType<T>;
26
+ addProps?: btnReturnTType<T> & {
27
+ columns?: antBaseColumnType[];
28
+ };
29
+ modifyProps?: btnReturnTType<T> & {
30
+ beforeCheck?: (data?: T) => Promise<T>;
31
+ columns?: antBaseColumnType[];
32
+ };
33
+ deleteProps?: btnReturnTType<T>;
34
+ removeProps?: btnReturnTType<T>;
35
+ resetProps?: btnReturnTType<T>;
36
+ customProps?: customBtnReturnTType<T>;
37
+ topProps?: btnReturnTType<T>;
38
+ bottomProps?: btnReturnTType<T>;
39
+ upProps?: btnReturnTType<T>;
40
+ downProps?: btnReturnTType<T>;
41
+ pageProps?: TablePaginationConfig | false;
42
+ scroll?: TableProps<AnyObject>['scroll'];
43
+ onRefresh?: () => void;
44
+ isCounter?: boolean;
45
+ autoRefreshTime?: number;
46
+ createModalWidth?: React.CSSProperties['width'];
47
+ onCreateClose?: () => void;
48
+ };
49
+ export type antBaseColumnType = {
50
+ tableProps: (ColumnType<AnyObject> | ColumnGroupType<AnyObject>) & {
51
+ dataIndex: string;
52
+ };
53
+ formatProps?: {
54
+ hidden?: boolean;
55
+ type: 'tag' | 'json_tags' | 'tagarr' | 'switch' | 'price' | 'length' | 'tel' | 'file' | 'files' | 'copy' | 'email' | 'image' | 'images' | 'addcount' | 'tostring' | 'jsonarr' | 'arr' | 'sleeptime' | 'sleeptimes' | 'compute' | 'answer' | 'number' | 'select' | 'DateTime' | 'imageCrop' | 'password' | 'code' | 'textEditer' | 'string' | 'custom' | 'remainingtime';
56
+ formatter?: {
57
+ text: 'default' | string | undefined | null;
58
+ asText: string;
59
+ color: string;
60
+ }[];
61
+ formatData?: {
62
+ key: string;
63
+ name: string;
64
+ }[];
65
+ itemProps?: any;
66
+ customRender?: ({ dataIndex, title, onChange }: {
67
+ dataIndex: string;
68
+ title: any;
69
+ onChange: (data: any) => void;
70
+ }) => any;
71
+ image_width?: React.CSSProperties['width'];
72
+ image_height?: React.CSSProperties['height'];
73
+ imagesId?: string;
74
+ };
75
+ sort?: boolean;
76
+ hidden?: boolean;
77
+ search?: boolean;
78
+ create?: boolean;
79
+ modify?: boolean;
80
+ countIndex?: string;
81
+ tooltip?: any;
82
+ placeholder?: any;
83
+ defaultValue?: any;
84
+ rules?: any[];
85
+ };
86
+ export type btnReturnTType<T> = {
87
+ title?: string;
88
+ disable?: boolean;
89
+ customModal?: boolean;
90
+ onFun: (data: T, selectedRow?: any) => void;
91
+ };
92
+ export type btnReturnFType = {
93
+ title?: string;
94
+ disable?: boolean;
95
+ onFun: () => void;
96
+ };
97
+ export type customBtnReturnTType<T> = {
98
+ render?: (isSelect: boolean, data?: T) => React.ReactNode;
99
+ leftRender?: (isSelect: boolean, data?: T) => React.ReactNode;
100
+ rightRender?: (isSelect: boolean, data?: T) => React.ReactNode;
101
+ };
102
+ export type customBtnReturnFType = {
103
+ render?: () => React.ReactNode;
104
+ leftRender?: () => React.ReactNode;
105
+ rightRender?: () => React.ReactNode;
106
+ };
107
+ export type selectType<T> = {
108
+ type: 'radio' | 'checkbox';
109
+ onFun?: (key: T | React.Key[]) => void;
110
+ checkboxProps?: TableRowSelection<AnyObject>['getCheckboxProps'];
111
+ onUpdateData?: (data?: T) => void;
112
+ };
@@ -0,0 +1,2 @@
1
+ export * from './antBaseTable.types';
2
+ export * from './searchbox.type';