@thefreshop/tb 1.0.7 → 1.0.8
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.
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +309 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tbpage/component/modules/antBaseTable/listview.d.ts +10 -0
- package/dist/cjs/tbpage/component/modules/index.d.ts +3 -2
- package/dist/cjs/tbpage/component/tblist.d.ts +12 -0
- package/dist/cjs/tbpage/index.d.ts +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +310 -10
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tbpage/component/modules/antBaseTable/listview.d.ts +10 -0
- package/dist/esm/tbpage/component/modules/index.d.ts +3 -2
- package/dist/esm/tbpage/component/tblist.d.ts +12 -0
- package/dist/esm/tbpage/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AntBaseTableRefProps, antBasePropsType } from "../../../../types";
|
|
3
|
+
declare module "react" {
|
|
4
|
+
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactElement | null): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: <ItemType, KEY extends keyof ItemType>(props: {
|
|
7
|
+
tableProps: antBasePropsType<ItemType>;
|
|
8
|
+
render?: (item: ItemType[], index: number) => React.ReactNode | null;
|
|
9
|
+
} & React.RefAttributes<AntBaseTableRefProps<ItemType>>) => React.ReactElement | null;
|
|
10
|
+
export default _default;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { default as AntBaseTable } from
|
|
2
|
-
export {
|
|
1
|
+
export { default as AntBaseTable } from "./antBaseTable";
|
|
2
|
+
export { default as AntBaseList } from "./antBaseTable/listview";
|
|
3
|
+
export { SearchBox } from "./searchbox";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { antBasePropsType } from "../../types";
|
|
3
|
+
export declare const Tblist: <ItemType, KEY extends keyof ItemType>({ tableProps, searchOption, searchDisabled, onSubmit, isLoading, title, decs, render, }: {
|
|
4
|
+
tableProps: antBasePropsType<ItemType>;
|
|
5
|
+
searchOption?: any;
|
|
6
|
+
searchDisabled?: boolean;
|
|
7
|
+
onSubmit?: (searchdata?: any, rowdata?: any, isReset?: boolean) => void;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
decs?: string;
|
|
11
|
+
render?: (item: ItemType[], index: number) => React.ReactNode | null;
|
|
12
|
+
}) => React.JSX.Element;
|
|
@@ -2,6 +2,7 @@ export * from "./component/authTable";
|
|
|
2
2
|
export { TbpProvider } from "./provider/provider";
|
|
3
3
|
export { ContentLayout } from "./component/content_layout";
|
|
4
4
|
export { Tbpage } from "./component/tbpage";
|
|
5
|
+
export { Tblist } from "./component/tblist";
|
|
5
6
|
export { TbpageSm } from "./component/tbpagesm";
|
|
6
7
|
export { TbpageMulti } from "./component/tbpageMulti";
|
|
7
8
|
export { default as AntBaseTable } from "./component/modules/antBaseTable";
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { TbpProvider } from "./tbpage/provider/provider";
|
|
|
7
7
|
export { ContentLayout } from "./tbpage/component/content_layout";
|
|
8
8
|
export { Tbpage } from "./tbpage/component/tbpage";
|
|
9
9
|
export { TbpageSm } from "./tbpage/component/tbpagesm";
|
|
10
|
+
export { Tblist } from "./tbpage/component/tblist";
|
|
10
11
|
export { TbpageMulti } from "./tbpage/component/tbpageMulti";
|
|
11
12
|
export { default as AntBaseTable } from "./tbpage/component/modules/antBaseTable";
|
|
12
13
|
export { default as AntBaseModalCreate } from "./tbpage/component/modules/antBaseModalCreate";
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { createContext, useState, useContext, useEffect, useCallback, useRef, forwardRef, useImperativeHandle, memo, useMemo } from 'react';
|
|
3
3
|
import Editor from '@monaco-editor/react';
|
|
4
4
|
import { DownOutlined, UpOutlined, DoubleRightOutlined, DoubleLeftOutlined, LoadingOutlined, ReloadOutlined, SearchOutlined, UploadOutlined, ExclamationCircleOutlined, RedoOutlined, TagOutlined } from '@ant-design/icons';
|
|
5
|
-
import { Typography, Row, Col, Space, Button, Input, Tag, Image as Image$1, Tooltip, Upload, Form, Select, DatePicker, Switch, InputNumber, Flex, Modal, Table, Checkbox, Tree, ConfigProvider, Result, Spin } from 'antd';
|
|
5
|
+
import { Typography, Row, Col, Space, Button, Input, Tag, Image as Image$1, Tooltip, Upload, Form, Select, DatePicker, Switch, InputNumber, Flex, Modal, Table, List, Card, Checkbox, Tree, ConfigProvider, Result, Spin } from 'antd';
|
|
6
6
|
import moment$1 from 'moment-timezone';
|
|
7
7
|
import require$$1 from 'react-dom';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
@@ -23218,8 +23218,8 @@ const AntBaseModalCreate = ({ modalProps, formProps, props }) => {
|
|
|
23218
23218
|
React__default.createElement(Button, { htmlType: "submit" }, props.buttonName ?? (isModify ? FORM_MODIFY : FORM_CREATE))))));
|
|
23219
23219
|
};
|
|
23220
23220
|
|
|
23221
|
-
const { Title } = Typography;
|
|
23222
|
-
const { confirm } = Modal;
|
|
23221
|
+
const { Title: Title$1 } = Typography;
|
|
23222
|
+
const { confirm: confirm$1 } = Modal;
|
|
23223
23223
|
const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, initData, customColumn, customValue, columns, expandable, size, onDoubleClick, onClick, selectProps, addProps, modifyProps, deleteProps, removeProps, resetProps, customProps, topProps, bottomProps, upProps, downProps, pageProps, scroll, onRefresh, isCounter, autoRefreshTime, createModalWidth = 1000, onCreateClose, }, ref) => {
|
|
23224
23224
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
23225
23225
|
const [selectedRow, setSelectedRow] = useState();
|
|
@@ -23348,7 +23348,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23348
23348
|
: typeof rowKey === "function"
|
|
23349
23349
|
? rowKey(selectedRow)
|
|
23350
23350
|
: selectedRow[rowKey]);
|
|
23351
|
-
confirm({
|
|
23351
|
+
confirm$1({
|
|
23352
23352
|
title: "삭제 하시겠습니까?",
|
|
23353
23353
|
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23354
23354
|
content: content,
|
|
@@ -23375,7 +23375,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23375
23375
|
: typeof rowKey === "function"
|
|
23376
23376
|
? rowKey(selectedRow)
|
|
23377
23377
|
: selectedRow[rowKey]);
|
|
23378
|
-
confirm({
|
|
23378
|
+
confirm$1({
|
|
23379
23379
|
title: "복구 하시겠습니까?",
|
|
23380
23380
|
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23381
23381
|
content: content,
|
|
@@ -23402,7 +23402,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23402
23402
|
: typeof rowKey === "function"
|
|
23403
23403
|
? rowKey(selectedRow)
|
|
23404
23404
|
: selectedRow[rowKey]);
|
|
23405
|
-
confirm({
|
|
23405
|
+
confirm$1({
|
|
23406
23406
|
title: "완전 삭제 하시겠습니까?",
|
|
23407
23407
|
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23408
23408
|
content: content,
|
|
@@ -23537,7 +23537,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23537
23537
|
React__default.createElement(AntBaseModalCreate, { modalProps: {
|
|
23538
23538
|
width: createModalWidth,
|
|
23539
23539
|
title: (React__default.createElement("div", { style: { marginBottom: 20, marginTop: 10 } },
|
|
23540
|
-
React__default.createElement(Title, { level: 4, style: { margin: 0 } }, popupModify ? "정보 수정" : "신규 등록"))),
|
|
23540
|
+
React__default.createElement(Title$1, { level: 4, style: { margin: 0 } }, popupModify ? "정보 수정" : "신규 등록"))),
|
|
23541
23541
|
maskClosable: false,
|
|
23542
23542
|
open: popupCreate,
|
|
23543
23543
|
onCancel: () => {
|
|
@@ -23582,6 +23582,288 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23582
23582
|
*/
|
|
23583
23583
|
var AntBaseTable = forwardRef(AntBaseTable$1);
|
|
23584
23584
|
|
|
23585
|
+
const { Title } = Typography;
|
|
23586
|
+
const { confirm } = Modal;
|
|
23587
|
+
const AntBaseList$1 = ({ tableProps, render, }, ref) => {
|
|
23588
|
+
const { bordered, className, rowKey, rowName, dataSource, initData, customColumn, customValue, columns, expandable, size, onDoubleClick, onClick, selectProps, addProps, modifyProps, deleteProps, removeProps, resetProps, customProps, topProps, bottomProps, upProps, downProps, pageProps, scroll, onRefresh, isCounter, autoRefreshTime, createModalWidth = 1000, onCreateClose, } = tableProps;
|
|
23589
|
+
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
23590
|
+
const [selectedRow, setSelectedRow] = useState();
|
|
23591
|
+
const [popupCreate, setPopupCreate] = useState(false);
|
|
23592
|
+
const [popupModify, setPopupModify] = useState(false);
|
|
23593
|
+
useEffect(() => {
|
|
23594
|
+
setSelectedRow(dataSource?.find((m) => {
|
|
23595
|
+
if (m) {
|
|
23596
|
+
let key = typeof rowKey === "function" ? rowKey(m) : m[rowKey];
|
|
23597
|
+
return key === selectedRowKeys[0];
|
|
23598
|
+
}
|
|
23599
|
+
return false;
|
|
23600
|
+
}));
|
|
23601
|
+
}, [dataSource, rowKey, selectedRowKeys]);
|
|
23602
|
+
//선택 리셋
|
|
23603
|
+
const resetSelection = () => {
|
|
23604
|
+
setSelectedRowKeys([]);
|
|
23605
|
+
setSelectedRow(undefined);
|
|
23606
|
+
};
|
|
23607
|
+
//재 선택??
|
|
23608
|
+
const reSelection = () => {
|
|
23609
|
+
if (selectProps) {
|
|
23610
|
+
if (selectedRowKeys.length !== 0 && dataSource?.length !== 0) {
|
|
23611
|
+
setSelectedRow(dataSource?.find((m) => {
|
|
23612
|
+
if (m) {
|
|
23613
|
+
let key = typeof rowKey === "function" ? rowKey(m) : m[rowKey];
|
|
23614
|
+
return key === selectedRowKeys[0];
|
|
23615
|
+
}
|
|
23616
|
+
return false;
|
|
23617
|
+
}));
|
|
23618
|
+
if (selectProps.onUpdateData) {
|
|
23619
|
+
selectProps.onUpdateData(dataSource?.find((m) => {
|
|
23620
|
+
if (m) {
|
|
23621
|
+
let key = typeof rowKey === "function" ? rowKey(m) : m[rowKey];
|
|
23622
|
+
return key === selectedRowKeys[0];
|
|
23623
|
+
}
|
|
23624
|
+
return false;
|
|
23625
|
+
}));
|
|
23626
|
+
}
|
|
23627
|
+
}
|
|
23628
|
+
}
|
|
23629
|
+
};
|
|
23630
|
+
//ref 함수
|
|
23631
|
+
useImperativeHandle(ref, () => ({
|
|
23632
|
+
resetSelection,
|
|
23633
|
+
reSelection,
|
|
23634
|
+
popupCreate,
|
|
23635
|
+
popupModify,
|
|
23636
|
+
selectedRow,
|
|
23637
|
+
}), [selectedRow, popupCreate, popupModify]);
|
|
23638
|
+
// 추가 팝업 on/off
|
|
23639
|
+
const showCreatePopup = (show) => {
|
|
23640
|
+
setPopupCreate(show);
|
|
23641
|
+
setPopupModify(false);
|
|
23642
|
+
};
|
|
23643
|
+
// 추가/수정 완료
|
|
23644
|
+
const onCreate = (value) => {
|
|
23645
|
+
setPopupCreate(false);
|
|
23646
|
+
setPopupModify(false);
|
|
23647
|
+
if (popupModify && modifyProps) {
|
|
23648
|
+
let key = typeof rowKey === "function" ? rowKey(selectedRow) : rowKey;
|
|
23649
|
+
modifyProps.onFun({ [key.toString()]: key, ...value }, selectedRow);
|
|
23650
|
+
// 키 값과 함꼐 전달
|
|
23651
|
+
}
|
|
23652
|
+
else if (addProps) {
|
|
23653
|
+
addProps.onFun(value);
|
|
23654
|
+
}
|
|
23655
|
+
setSelectedRowKeys([]);
|
|
23656
|
+
setSelectedRow(undefined);
|
|
23657
|
+
};
|
|
23658
|
+
// 수정 창 열기전 beforeModify 확인후 수정 작업
|
|
23659
|
+
const showModify = () => {
|
|
23660
|
+
if (modifyProps?.beforeCheck) {
|
|
23661
|
+
modifyProps
|
|
23662
|
+
.beforeCheck(selectedRow)
|
|
23663
|
+
.then((newValue) => {
|
|
23664
|
+
setSelectedRow(newValue);
|
|
23665
|
+
setPopupCreate(true);
|
|
23666
|
+
setPopupModify(true);
|
|
23667
|
+
})
|
|
23668
|
+
.catch();
|
|
23669
|
+
}
|
|
23670
|
+
else {
|
|
23671
|
+
setPopupCreate(true);
|
|
23672
|
+
setPopupModify(true);
|
|
23673
|
+
}
|
|
23674
|
+
};
|
|
23675
|
+
//선택 유무
|
|
23676
|
+
const isSelect = selectedRowKeys.length !== 0;
|
|
23677
|
+
return (React__default.createElement("div", { className: className, style: {
|
|
23678
|
+
display: "flex",
|
|
23679
|
+
flexDirection: "column",
|
|
23680
|
+
flex: 1,
|
|
23681
|
+
gap: 10,
|
|
23682
|
+
height: "100%",
|
|
23683
|
+
padding: "20px",
|
|
23684
|
+
} },
|
|
23685
|
+
React__default.createElement(TableTopButtonGroup, { isSelect: isSelect, isCounter: isCounter, onRefresh: onRefresh, autoRefreshTime: autoRefreshTime, addProps: addProps && {
|
|
23686
|
+
...addProps,
|
|
23687
|
+
onFun: () => {
|
|
23688
|
+
if (addProps.customModal) {
|
|
23689
|
+
addProps.onFun(selectedRow);
|
|
23690
|
+
}
|
|
23691
|
+
else {
|
|
23692
|
+
showCreatePopup(true);
|
|
23693
|
+
}
|
|
23694
|
+
},
|
|
23695
|
+
}, modifyProps: modifyProps && {
|
|
23696
|
+
...modifyProps,
|
|
23697
|
+
onFun() {
|
|
23698
|
+
if (modifyProps.customModal) {
|
|
23699
|
+
modifyProps.onFun(selectedRow);
|
|
23700
|
+
}
|
|
23701
|
+
else {
|
|
23702
|
+
showModify();
|
|
23703
|
+
}
|
|
23704
|
+
},
|
|
23705
|
+
}, deleteProps: deleteProps && {
|
|
23706
|
+
...deleteProps,
|
|
23707
|
+
onFun() {
|
|
23708
|
+
if (selectedRow) {
|
|
23709
|
+
let content = (rowName
|
|
23710
|
+
? typeof rowName === "function"
|
|
23711
|
+
? rowName(selectedRow)
|
|
23712
|
+
: selectedRow[rowName]
|
|
23713
|
+
: typeof rowKey === "function"
|
|
23714
|
+
? rowKey(selectedRow)
|
|
23715
|
+
: selectedRow[rowKey]);
|
|
23716
|
+
confirm({
|
|
23717
|
+
title: "삭제 하시겠습니까?",
|
|
23718
|
+
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23719
|
+
content: content,
|
|
23720
|
+
okText: "Yes",
|
|
23721
|
+
okType: "danger",
|
|
23722
|
+
cancelText: "No",
|
|
23723
|
+
onOk: () => {
|
|
23724
|
+
deleteProps.onFun(selectedRow);
|
|
23725
|
+
},
|
|
23726
|
+
onCancel() {
|
|
23727
|
+
console.log("Cancel");
|
|
23728
|
+
},
|
|
23729
|
+
});
|
|
23730
|
+
}
|
|
23731
|
+
},
|
|
23732
|
+
}, resetProps: resetProps && {
|
|
23733
|
+
...resetProps,
|
|
23734
|
+
onFun() {
|
|
23735
|
+
if (selectedRow) {
|
|
23736
|
+
let content = (rowName
|
|
23737
|
+
? typeof rowName === "function"
|
|
23738
|
+
? rowName(selectedRow)
|
|
23739
|
+
: selectedRow[rowName]
|
|
23740
|
+
: typeof rowKey === "function"
|
|
23741
|
+
? rowKey(selectedRow)
|
|
23742
|
+
: selectedRow[rowKey]);
|
|
23743
|
+
confirm({
|
|
23744
|
+
title: "복구 하시겠습니까?",
|
|
23745
|
+
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23746
|
+
content: content,
|
|
23747
|
+
okText: "Yes",
|
|
23748
|
+
okType: "primary",
|
|
23749
|
+
cancelText: "No",
|
|
23750
|
+
onOk: () => {
|
|
23751
|
+
resetProps.onFun(selectedRow);
|
|
23752
|
+
},
|
|
23753
|
+
onCancel() {
|
|
23754
|
+
console.log("Cancel");
|
|
23755
|
+
},
|
|
23756
|
+
});
|
|
23757
|
+
}
|
|
23758
|
+
},
|
|
23759
|
+
}, removeProps: removeProps && {
|
|
23760
|
+
...removeProps,
|
|
23761
|
+
onFun() {
|
|
23762
|
+
if (selectedRow) {
|
|
23763
|
+
let content = (rowName
|
|
23764
|
+
? typeof rowName === "function"
|
|
23765
|
+
? rowName(selectedRow)
|
|
23766
|
+
: selectedRow[rowName]
|
|
23767
|
+
: typeof rowKey === "function"
|
|
23768
|
+
? rowKey(selectedRow)
|
|
23769
|
+
: selectedRow[rowKey]);
|
|
23770
|
+
confirm({
|
|
23771
|
+
title: "완전 삭제 하시겠습니까?",
|
|
23772
|
+
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23773
|
+
content: content,
|
|
23774
|
+
okText: "Yes",
|
|
23775
|
+
okType: "danger",
|
|
23776
|
+
cancelText: "No",
|
|
23777
|
+
onOk: () => {
|
|
23778
|
+
removeProps.onFun(selectedRow);
|
|
23779
|
+
},
|
|
23780
|
+
onCancel() {
|
|
23781
|
+
console.log("Cancel");
|
|
23782
|
+
},
|
|
23783
|
+
});
|
|
23784
|
+
}
|
|
23785
|
+
},
|
|
23786
|
+
}, customProps: customProps && {
|
|
23787
|
+
...customProps,
|
|
23788
|
+
render: () => {
|
|
23789
|
+
if (customProps.render)
|
|
23790
|
+
return customProps.render(isSelect, selectedRow);
|
|
23791
|
+
else
|
|
23792
|
+
return null;
|
|
23793
|
+
},
|
|
23794
|
+
leftRender: () => {
|
|
23795
|
+
if (customProps.leftRender)
|
|
23796
|
+
return customProps.leftRender(isSelect, selectedRow);
|
|
23797
|
+
else
|
|
23798
|
+
return null;
|
|
23799
|
+
},
|
|
23800
|
+
rightRender: () => {
|
|
23801
|
+
if (customProps.rightRender)
|
|
23802
|
+
return customProps.rightRender(isSelect, selectedRow);
|
|
23803
|
+
else
|
|
23804
|
+
return null;
|
|
23805
|
+
},
|
|
23806
|
+
} }),
|
|
23807
|
+
React__default.createElement(List, { dataSource: dataSource?.map((i) => i), grid: { gutter: 1, column: 1 }, renderItem: (item, index) => (React__default.createElement(List.Item, null,
|
|
23808
|
+
React__default.createElement(Card, null, render ? render(item, index) : React__default.createElement("div", null, JSON.stringify(item))))) }),
|
|
23809
|
+
React__default.createElement(TableBottomButtonGroup, { isSelect: isSelect, topProps: topProps && {
|
|
23810
|
+
...topProps,
|
|
23811
|
+
onFun() {
|
|
23812
|
+
if (selectedRow)
|
|
23813
|
+
topProps.onFun(selectedRow);
|
|
23814
|
+
},
|
|
23815
|
+
}, bottomProps: bottomProps && {
|
|
23816
|
+
...bottomProps,
|
|
23817
|
+
onFun() {
|
|
23818
|
+
if (selectedRow)
|
|
23819
|
+
bottomProps.onFun(selectedRow);
|
|
23820
|
+
},
|
|
23821
|
+
}, upProps: upProps && {
|
|
23822
|
+
...upProps,
|
|
23823
|
+
onFun() {
|
|
23824
|
+
if (selectedRow)
|
|
23825
|
+
upProps.onFun(selectedRow);
|
|
23826
|
+
},
|
|
23827
|
+
}, downProps: downProps && {
|
|
23828
|
+
...downProps,
|
|
23829
|
+
onFun() {
|
|
23830
|
+
if (selectedRow)
|
|
23831
|
+
downProps.onFun(selectedRow);
|
|
23832
|
+
},
|
|
23833
|
+
} }),
|
|
23834
|
+
React__default.createElement(AntBaseModalCreate, { modalProps: {
|
|
23835
|
+
width: createModalWidth,
|
|
23836
|
+
title: (React__default.createElement("div", { style: { marginBottom: 20, marginTop: 10 } },
|
|
23837
|
+
React__default.createElement(Title, { level: 4, style: { margin: 0 } }, popupModify ? "정보 수정" : "신규 등록"))),
|
|
23838
|
+
maskClosable: false,
|
|
23839
|
+
open: popupCreate,
|
|
23840
|
+
onCancel: () => {
|
|
23841
|
+
if (onCreateClose)
|
|
23842
|
+
onCreateClose();
|
|
23843
|
+
showCreatePopup(false);
|
|
23844
|
+
},
|
|
23845
|
+
}, formProps: {
|
|
23846
|
+
initialValues: popupModify
|
|
23847
|
+
? convert2FormData({
|
|
23848
|
+
data: selectedRow,
|
|
23849
|
+
columns: columns,
|
|
23850
|
+
})
|
|
23851
|
+
: initData
|
|
23852
|
+
? convert2FormData({
|
|
23853
|
+
data: initData,
|
|
23854
|
+
columns: columns,
|
|
23855
|
+
})
|
|
23856
|
+
: {},
|
|
23857
|
+
onFinish: onCreate,
|
|
23858
|
+
}, props: {
|
|
23859
|
+
customColumn,
|
|
23860
|
+
customValue,
|
|
23861
|
+
columns: popupModify ? (modifyProps?.columns ? modifyProps?.columns : columns) : addProps?.columns ? addProps?.columns : columns,
|
|
23862
|
+
isModify: popupModify,
|
|
23863
|
+
} })));
|
|
23864
|
+
};
|
|
23865
|
+
var AntBaseList = forwardRef(AntBaseList$1);
|
|
23866
|
+
|
|
23585
23867
|
var css_248z$2 = ".searchbox-module_searchboxFrame__VAWWj{background:#f0f8ff;display:flex;flex-direction:row;padding-bottom:25px;padding-top:15px;width:100%}.searchbox-module_searchboxRow__wzY7N{display:flex;flex-direction:column;justify-content:center;line-height:32px;padding-left:20px;width:100%}.searchbox-module_searchboxBtn__d8Bc6{align-items:flex-end;justify-content:center;width:300px}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNlYXJjaGJveC5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLHdDQU1FLGtCQUFxQixDQUxyQixZQUFhLENBQ2Isa0JBQW1CLENBR25CLG1CQUFvQixDQURwQixnQkFBaUIsQ0FEakIsVUFJRixDQUVBLHNDQUNFLFlBQWEsQ0FDYixxQkFBc0IsQ0FHdEIsc0JBQXVCLENBRHZCLGdCQUFpQixDQUVqQixpQkFBa0IsQ0FIbEIsVUFLRixDQUNBLHNDQUVFLG9CQUFxQixDQUNyQixzQkFBdUIsQ0FGdkIsV0FHRiIsImZpbGUiOiJzZWFyY2hib3gubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5zZWFyY2hib3hGcmFtZSB7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICBmbGV4LWRpcmVjdGlvbjogcm93O1xyXG4gIHdpZHRoOiAxMDAlO1xyXG4gIHBhZGRpbmctdG9wOiAxNXB4O1xyXG4gIHBhZGRpbmctYm90dG9tOiAyNXB4O1xyXG4gIGJhY2tncm91bmQ6IGFsaWNlYmx1ZTtcclxufVxyXG5cclxuLnNlYXJjaGJveFJvdyB7XHJcbiAgZGlzcGxheTogZmxleDtcclxuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gIHdpZHRoOiAxMDAlO1xyXG4gIGxpbmUtaGVpZ2h0OiAzMnB4O1xyXG4gIGp1c3RpZnktY29udGVudDogY2VudGVyO1xyXG4gIHBhZGRpbmctbGVmdDogMjBweDtcclxuXHJcbn1cclxuLnNlYXJjaGJveEJ0biB7XHJcbiAgd2lkdGg6IDMwMHB4O1xyXG4gIGFsaWduLWl0ZW1zOiBmbGV4LWVuZDtcclxuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcclxufVxyXG4iXX0= */";
|
|
23586
23868
|
var styles$2 = {"searchboxFrame":"searchbox-module_searchboxFrame__VAWWj","searchboxRow":"searchbox-module_searchboxRow__wzY7N","searchboxBtn":"searchbox-module_searchboxBtn__d8Bc6"};
|
|
23587
23869
|
styleInject(css_248z$2);
|
|
@@ -23999,7 +24281,7 @@ const LoadingLayout = ({ tip, isLoading, error, isError, style, children, classN
|
|
|
23999
24281
|
const Tbpage = ({ tableProps, searchOption, searchDisabled = false, onSubmit, isLoading, title, decs, }) => {
|
|
24000
24282
|
const { user } = useTbState();
|
|
24001
24283
|
return (React__default.createElement("div", { className: styles$1.tableFrame },
|
|
24002
|
-
title || decs ? React__default.createElement(TitleBox$
|
|
24284
|
+
title || decs ? React__default.createElement(TitleBox$2, { title: title, decs: decs }) : null,
|
|
24003
24285
|
searchOption && (React__default.createElement(SearchBox, { searchOption: searchOption, onSubmit: onSubmit, searchDisabled: searchDisabled, onReset: () => {
|
|
24004
24286
|
if (onSubmit)
|
|
24005
24287
|
onSubmit(null, null, true);
|
|
@@ -24008,7 +24290,7 @@ const Tbpage = ({ tableProps, searchOption, searchDisabled = false, onSubmit, is
|
|
|
24008
24290
|
React__default.createElement("div", { className: styles$1.multiFrame },
|
|
24009
24291
|
React__default.createElement(AntBaseTable, { ...tableProps })))));
|
|
24010
24292
|
};
|
|
24011
|
-
const TitleBox$
|
|
24293
|
+
const TitleBox$2 = ({ title, decs }) => {
|
|
24012
24294
|
return (React__default.createElement("div", { className: styles$1.titleBox },
|
|
24013
24295
|
React__default.createElement("div", { className: styles$1.title }, title),
|
|
24014
24296
|
React__default.createElement("div", { className: styles$1.decs }, decs)));
|
|
@@ -24026,6 +24308,24 @@ const TbpageSm = ({ tableProps, searchOption, onSubmit, isLoading, title, decs,
|
|
|
24026
24308
|
React__default.createElement(AntBaseTable, { ...tableProps })))));
|
|
24027
24309
|
};
|
|
24028
24310
|
|
|
24311
|
+
const Tblist = ({ tableProps, searchOption, searchDisabled = false, onSubmit, isLoading, title, decs, render, }) => {
|
|
24312
|
+
const { user } = useTbState();
|
|
24313
|
+
return (React__default.createElement("div", { className: styles$1.tableFrame },
|
|
24314
|
+
title || decs ? React__default.createElement(TitleBox$1, { title: title, decs: decs }) : null,
|
|
24315
|
+
searchOption && (React__default.createElement(SearchBox, { searchOption: searchOption, onSubmit: onSubmit, searchDisabled: searchDisabled, onReset: () => {
|
|
24316
|
+
if (onSubmit)
|
|
24317
|
+
onSubmit(null, null, true);
|
|
24318
|
+
} })),
|
|
24319
|
+
React__default.createElement(LoadingLayout, { isLoading: isLoading },
|
|
24320
|
+
React__default.createElement("div", { className: styles$1.multiFrame },
|
|
24321
|
+
React__default.createElement(AntBaseList, { tableProps: tableProps, render: render })))));
|
|
24322
|
+
};
|
|
24323
|
+
const TitleBox$1 = ({ title, decs }) => {
|
|
24324
|
+
return (React__default.createElement("div", { className: styles$1.titleBox },
|
|
24325
|
+
React__default.createElement("div", { className: styles$1.title }, title),
|
|
24326
|
+
React__default.createElement("div", { className: styles$1.decs }, decs)));
|
|
24327
|
+
};
|
|
24328
|
+
|
|
24029
24329
|
const TbpageMulti = ({ arrtableProps, arrflex, searchOption, searchDisabled = false, onSubmit, isLoading, title, decs, direction, }) => {
|
|
24030
24330
|
const { user } = useTbState();
|
|
24031
24331
|
return (React__default.createElement("div", { className: styles$1.tableFrame, style: direction === "column" ? { flexDirection: "column" } : {} },
|
|
@@ -24056,5 +24356,5 @@ const TitleBox = ({ title, decs }) => {
|
|
|
24056
24356
|
React__default.createElement("div", { className: styles$1.decs }, decs)));
|
|
24057
24357
|
};
|
|
24058
24358
|
|
|
24059
|
-
export { AntBaseModalCreate, AntBaseTable, AuthTable, ContentLayout, TbFrame, TbProvider, TbpProvider, Tbpage, TbpageMulti, TbpageSm, tbContext, useTbState };
|
|
24359
|
+
export { AntBaseModalCreate, AntBaseTable, AuthTable, ContentLayout, TbFrame, TbProvider, Tblist, TbpProvider, Tbpage, TbpageMulti, TbpageSm, tbContext, useTbState };
|
|
24060
24360
|
//# sourceMappingURL=index.js.map
|