@thefreshop/tb 1.0.1 → 1.0.3
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 +12 -4
- package/dist/cjs/index.js +376 -416
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tbframe/index.d.ts +3 -3
- package/dist/cjs/tbframe/layout/bottom.d.ts +1 -1
- package/dist/cjs/tbframe/layout/frame.d.ts +3 -3
- package/dist/cjs/tbframe/layout/nav.d.ts +4 -3
- package/dist/cjs/tbframe/layout/top.d.ts +3 -3
- package/dist/cjs/tbframe/page/loginpage.d.ts +1 -1
- package/dist/cjs/tbframe/provider/provider.d.ts +2 -3
- package/dist/cjs/tbframe/provider/tbContext.d.ts +3 -0
- package/dist/cjs/tbpage/component/authTable.d.ts +1 -1
- package/dist/cjs/tbpage/component/modules/antBaseModalCreate/index.d.ts +3 -3
- package/dist/cjs/tbpage/component/modules/antBaseModalCreate/modal_props.d.ts +4 -4
- package/dist/cjs/tbpage/component/modules/antBaseTable/btn_widget.d.ts +4 -4
- package/dist/cjs/tbpage/component/modules/antBaseTable/index.d.ts +4 -4
- package/dist/cjs/tbpage/component/modules/antBaseTable/table_props.d.ts +5 -5
- package/dist/cjs/tbpage/component/modules/loading_layout.d.ts +2 -2
- package/dist/cjs/tbpage/component/modules/searchbox.d.ts +2 -2
- package/dist/cjs/tbpage/component/modules/util.d.ts +2 -2
- package/dist/cjs/tbpage/index.d.ts +0 -1
- package/dist/cjs/{tbframe/types → types}/index.d.ts +6 -4
- package/dist/cjs/{tbframe/types → types}/provider.types.d.ts +2 -2
- package/dist/esm/index.d.ts +12 -4
- package/dist/esm/index.js +376 -416
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tbframe/index.d.ts +3 -3
- package/dist/esm/tbframe/layout/bottom.d.ts +1 -1
- package/dist/esm/tbframe/layout/frame.d.ts +3 -3
- package/dist/esm/tbframe/layout/nav.d.ts +4 -3
- package/dist/esm/tbframe/layout/top.d.ts +3 -3
- package/dist/esm/tbframe/page/loginpage.d.ts +1 -1
- package/dist/esm/tbframe/provider/provider.d.ts +2 -3
- package/dist/esm/tbframe/provider/tbContext.d.ts +3 -0
- package/dist/esm/tbpage/component/authTable.d.ts +1 -1
- package/dist/esm/tbpage/component/modules/antBaseModalCreate/index.d.ts +3 -3
- package/dist/esm/tbpage/component/modules/antBaseModalCreate/modal_props.d.ts +4 -4
- package/dist/esm/tbpage/component/modules/antBaseTable/btn_widget.d.ts +4 -4
- package/dist/esm/tbpage/component/modules/antBaseTable/index.d.ts +4 -4
- package/dist/esm/tbpage/component/modules/antBaseTable/table_props.d.ts +5 -5
- package/dist/esm/tbpage/component/modules/loading_layout.d.ts +2 -2
- package/dist/esm/tbpage/component/modules/searchbox.d.ts +2 -2
- package/dist/esm/tbpage/component/modules/util.d.ts +2 -2
- package/dist/esm/tbpage/index.d.ts +0 -1
- package/dist/esm/{tbframe/types → types}/index.d.ts +6 -4
- package/dist/esm/{tbframe/types → types}/provider.types.d.ts +2 -2
- package/dist/index.d.ts +265 -0
- package/package.json +6 -5
- package/dist/cjs/tbpage/types/index.d.ts +0 -2
- package/dist/esm/tbpage/types/index.d.ts +0 -2
- /package/dist/cjs/{tbpage/types → types}/antBaseTable.types.d.ts +0 -0
- /package/dist/cjs/{tbpage/types → types}/searchbox.type.d.ts +0 -0
- /package/dist/cjs/{tbframe/types → types}/tbframe.types.d.ts +0 -0
- /package/dist/cjs/{tbframe/types → types}/user.types.d.ts +0 -0
- /package/dist/esm/{tbpage/types → types}/antBaseTable.types.d.ts +0 -0
- /package/dist/esm/{tbpage/types → types}/searchbox.type.d.ts +0 -0
- /package/dist/esm/{tbframe/types → types}/tbframe.types.d.ts +0 -0
- /package/dist/esm/{tbframe/types → types}/user.types.d.ts +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -16,10 +16,11 @@ import localeData from 'dayjs/plugin/localeData';
|
|
|
16
16
|
import ko_KR from 'antd/locale/ko_KR';
|
|
17
17
|
import 'dayjs/locale/ko';
|
|
18
18
|
|
|
19
|
+
const tbContext = createContext(undefined);
|
|
20
|
+
|
|
19
21
|
// export const TbBase = createContext<TbBaseProviderType>({})
|
|
20
|
-
const TbContext = createContext(undefined);
|
|
21
22
|
const TbProvider = ({ children }) => {
|
|
22
|
-
const [topkey, setTopkey] = useState(
|
|
23
|
+
const [topkey, setTopkey] = useState("");
|
|
23
24
|
const [currentTab, setCurrentTab] = useState();
|
|
24
25
|
const [user, setloginUser] = useState();
|
|
25
26
|
const [tabs, setTabs] = useState([]);
|
|
@@ -53,15 +54,15 @@ const TbProvider = ({ children }) => {
|
|
|
53
54
|
if (user !== null) {
|
|
54
55
|
if (startpage) {
|
|
55
56
|
addTabs({
|
|
56
|
-
title:
|
|
57
|
-
key:
|
|
57
|
+
title: "HOME",
|
|
58
|
+
key: "HOME",
|
|
58
59
|
page: startpage,
|
|
59
|
-
noremove: true
|
|
60
|
+
noremove: true,
|
|
60
61
|
});
|
|
61
62
|
setCurrentTab({
|
|
62
|
-
title:
|
|
63
|
-
key:
|
|
64
|
-
page: startpage
|
|
63
|
+
title: "HOME",
|
|
64
|
+
key: "HOME",
|
|
65
|
+
page: startpage,
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
if (user?.user_group?.group_section_start) {
|
|
@@ -77,7 +78,7 @@ const TbProvider = ({ children }) => {
|
|
|
77
78
|
setloginUser(undefined);
|
|
78
79
|
setCurrentTab(undefined);
|
|
79
80
|
setTabs([]);
|
|
80
|
-
setTopkey(
|
|
81
|
+
setTopkey("");
|
|
81
82
|
if (force)
|
|
82
83
|
window.location.reload();
|
|
83
84
|
};
|
|
@@ -112,7 +113,7 @@ const TbProvider = ({ children }) => {
|
|
|
112
113
|
addTabs(newtab);
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
|
-
return (React__default.createElement(
|
|
116
|
+
return (React__default.createElement(tbContext.Provider, { value: {
|
|
116
117
|
topkey,
|
|
117
118
|
setTopkey,
|
|
118
119
|
tabs,
|
|
@@ -132,13 +133,13 @@ const TbProvider = ({ children }) => {
|
|
|
132
133
|
setGlobalpages,
|
|
133
134
|
addGlobalTabs,
|
|
134
135
|
setMenupages,
|
|
135
|
-
goTabs
|
|
136
|
+
goTabs,
|
|
136
137
|
} }, children));
|
|
137
138
|
};
|
|
138
139
|
const useTbState = () => {
|
|
139
|
-
const value = useContext(
|
|
140
|
+
const value = useContext(tbContext);
|
|
140
141
|
if (value === undefined) {
|
|
141
|
-
throw new Error(
|
|
142
|
+
throw new Error("useTopkeyState should be used within TbProvider");
|
|
142
143
|
}
|
|
143
144
|
return value;
|
|
144
145
|
};
|
|
@@ -177,15 +178,15 @@ styleInject(css_248z$b);
|
|
|
177
178
|
const topbase = {
|
|
178
179
|
title: 'title'};
|
|
179
180
|
|
|
180
|
-
var css_248z$a = ".top-module_topframe__LhKDg{align-items:center;border-bottom:1px solid #aaa;display:flex;height:80px;justify-content:left;text-align:center}.top-module_top_left__MBLyP{align-items:center;display:flex;gap:4px}.top-module_toplogo__lQMPi{background-color:#eee;height:70px}.top-module_top_menu__vOqqG{display:flex;flex-direction:row}.top-module_top_menu_item__pHknH{display:flex;flex-direction:column;width:120px}.top-module_top_menu_item_icon__-Ckvh{font-size:30px}.top-module_top_menu_item_text__SmZnj{font-size:20px}.top-module_menu_nomal__n4Rl-{color:#ccc}.top-module_menu_hover__KmK0A,.top-module_menu_select__w3Jdd{background-color:#fff;color:#333;cursor:pointer}\n/*# sourceMappingURL=data:application/json;base64,
|
|
181
|
+
var css_248z$a = ".top-module_topframe__LhKDg{align-items:center;border-bottom:1px solid #aaa;color:#ccc;display:flex;height:80px;justify-content:left;text-align:center}.top-module_top_left__MBLyP{align-items:center;color:#333;display:flex;gap:4px}.top-module_toplogo__lQMPi{background-color:#eee;height:70px}.top-module_top_menu__vOqqG{display:flex;flex-direction:row}.top-module_top_menu_item__pHknH{display:flex;flex-direction:column;width:120px}.top-module_top_menu_item_icon__-Ckvh{font-size:30px}.top-module_top_menu_item_text__SmZnj{font-size:20px}.top-module_menu_nomal__n4Rl-{color:#ccc}.top-module_menu_hover__KmK0A,.top-module_menu_select__w3Jdd{background-color:#fff;color:#333;cursor:pointer}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRvcC5tb2R1bGUuY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDRCQUdJLGtCQUFtQixDQUVuQiw0QkFBNkIsQ0FFN0IsVUFBVyxDQU5YLFlBQWEsQ0FHYixXQUFZLENBRlosb0JBQXFCLENBSXJCLGlCQUVKLENBRUEsNEJBR0ksa0JBQW1CLENBQ25CLFVBQVcsQ0FIWCxZQUFhLENBQ2IsT0FHSixDQUVBLDJCQUVJLHFCQUFzQixDQUR0QixXQUVKLENBRUEsNEJBQ0ksWUFBYSxDQUNiLGtCQUNKLENBQ0EsaUNBQ0ksWUFBYSxDQUNiLHFCQUFzQixDQUN0QixXQUNKLENBRUEsc0NBQ0ksY0FDSixDQUVBLHNDQUNJLGNBQ0osQ0FFQSw4QkFDSSxVQUNKLENBT0EsNkRBQ0kscUJBQXNCLENBQ3RCLFVBQVcsQ0FDWCxjQUNKIiwiZmlsZSI6InRvcC5tb2R1bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnRvcGZyYW1lIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBqdXN0aWZ5LWNvbnRlbnQ6IGxlZnQ7XHJcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xyXG4gICAgaGVpZ2h0OiA4MHB4O1xyXG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkICNhYWE7XHJcbiAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcbiAgICBjb2xvcjogI2NjYztcclxufVxyXG5cclxuLnRvcF9sZWZ0IHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBnYXA6IDRweDtcclxuICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XHJcbiAgICBjb2xvcjogIzMzMztcclxufVxyXG5cclxuLnRvcGxvZ28ge1xyXG4gICAgaGVpZ2h0OiA3MHB4O1xyXG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2VlZTtcclxufVxyXG5cclxuLnRvcF9tZW51IHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBmbGV4LWRpcmVjdGlvbjogcm93O1xyXG59XHJcbi50b3BfbWVudV9pdGVtIHtcclxuICAgIGRpc3BsYXk6IGZsZXg7XHJcbiAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xyXG4gICAgd2lkdGg6IDEyMHB4O1xyXG59XHJcblxyXG4udG9wX21lbnVfaXRlbV9pY29uIHtcclxuICAgIGZvbnQtc2l6ZTogMzBweDtcclxufVxyXG5cclxuLnRvcF9tZW51X2l0ZW1fdGV4dCB7XHJcbiAgICBmb250LXNpemU6IDIwcHg7XHJcbn1cclxuXHJcbi5tZW51X25vbWFsIHtcclxuICAgIGNvbG9yOiAjY2NjO1xyXG59XHJcbi5tZW51X2hvdmVyIHtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XHJcbiAgICBjb2xvcjogIzMzMztcclxuICAgIGN1cnNvcjogcG9pbnRlcjtcclxufVxyXG5cclxuLm1lbnVfc2VsZWN0IHtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XHJcbiAgICBjb2xvcjogIzMzMztcclxuICAgIGN1cnNvcjogcG9pbnRlcjtcclxufVxyXG4iXX0= */";
|
|
181
182
|
var styles$8 = {"topframe":"top-module_topframe__LhKDg","top_left":"top-module_top_left__MBLyP","toplogo":"top-module_toplogo__lQMPi","top_menu":"top-module_top_menu__vOqqG","top_menu_item":"top-module_top_menu_item__pHknH","top_menu_item_icon":"top-module_top_menu_item_icon__-Ckvh","top_menu_item_text":"top-module_top_menu_item_text__SmZnj","menu_nomal":"top-module_menu_nomal__n4Rl-","menu_hover":"top-module_menu_hover__KmK0A"};
|
|
182
183
|
styleInject(css_248z$a);
|
|
183
184
|
|
|
184
|
-
const Top = ({ setting, top: { title = topbase.title, titleimage, topMenuSetting, menuStyle, imgstyle, titleStyle, topRight } }) => {
|
|
185
|
+
const Top = ({ setting, top: { title = topbase.title, titleimage, topMenuSetting, menuStyle, imgstyle, titleStyle, topRight }, }) => {
|
|
185
186
|
const { logout, user, setCurrentTab, startpage } = useTbState();
|
|
186
187
|
const userTop = () => {
|
|
187
188
|
let topmenutable = [];
|
|
188
|
-
if (user?.user_group?.group_key ===
|
|
189
|
+
if (user?.user_group?.group_key === "master" || setting.islogin === false) {
|
|
189
190
|
topMenuSetting.forEach((m, index) => {
|
|
190
191
|
topmenutable.push(React__default.createElement(TopMenu, { key: index, topMenuSetting: m, menuStyle: menuStyle }));
|
|
191
192
|
});
|
|
@@ -201,21 +202,21 @@ const Top = ({ setting, top: { title = topbase.title, titleimage, topMenuSetting
|
|
|
201
202
|
return topmenutable;
|
|
202
203
|
};
|
|
203
204
|
return (React__default.createElement("div", { className: styles$8.topframe },
|
|
204
|
-
React__default.createElement("div", { className: styles$8.top_left, style: { cursor:
|
|
205
|
+
React__default.createElement("div", { className: styles$8.top_left, style: { cursor: "pointer" }, onClick: () => {
|
|
205
206
|
if (startpage)
|
|
206
207
|
setCurrentTab({
|
|
207
|
-
title:
|
|
208
|
-
key:
|
|
209
|
-
page: startpage
|
|
208
|
+
title: "startpage",
|
|
209
|
+
key: "startpage",
|
|
210
|
+
page: startpage,
|
|
210
211
|
});
|
|
211
|
-
console.log(
|
|
212
|
+
console.log("home");
|
|
212
213
|
} },
|
|
213
|
-
titleimage ?
|
|
214
|
-
React__default.createElement("div", { style: titleStyle }, title)),
|
|
214
|
+
titleimage ? React__default.createElement("img", { src: titleimage, className: styles$8.toplogo, alt: "logo", style: imgstyle }) : null,
|
|
215
|
+
React__default.createElement("div", { style: { padding: 10, fontWeight: "bold", ...titleStyle } }, title)),
|
|
215
216
|
React__default.createElement("div", { className: styles$8.top_menu }, userTop()),
|
|
216
217
|
topRight ? (topRight) : setting?.islogin && setting?.logoutComponent ? (setting?.logoutComponent) : (React__default.createElement("button", { onClick: () => logout() }, "\uB85C\uADF8\uC544\uC6C3"))));
|
|
217
218
|
};
|
|
218
|
-
const TopMenu = ({ topMenuSetting: { title, icon, key }, menuStyle }) => {
|
|
219
|
+
const TopMenu = ({ topMenuSetting: { title, icon, key }, menuStyle = {} }) => {
|
|
219
220
|
const [hover, setHover] = useState(false);
|
|
220
221
|
const { topkey, setTopkey } = useTbState();
|
|
221
222
|
return (React__default.createElement("div", { className: `${styles$8.top_menu_item} ${hover ? styles$8.menu_hover : styles$8.menu_nomal}`, style: menuStyle.menuWidth ? { width: menuStyle.menuWidth } : {}, onMouseEnter: () => {
|
|
@@ -229,14 +230,15 @@ const TopMenu = ({ topMenuSetting: { title, icon, key }, menuStyle }) => {
|
|
|
229
230
|
React__default.createElement("div", { className: `${styles$8.top_menu_item_text} ${topkey === key ? styles$8.menu_hover : styles$8.menu_nomal}`, style: menuStyle.fontSize ? { fontSize: menuStyle.fontSize } : {} }, title)));
|
|
230
231
|
};
|
|
231
232
|
|
|
232
|
-
const Nav = ({ nav: { menuSet, openIcon, closeIcon } }) => {
|
|
233
|
+
const Nav = ({ nav: { menuSet, openIcon, closeIcon }, islogin }) => {
|
|
233
234
|
const { topkey, user } = useTbState();
|
|
234
235
|
const currentMenu = menuSet.find((m) => m.parentkey === topkey);
|
|
235
236
|
const userMenu = () => {
|
|
236
237
|
let usermenutable = [];
|
|
237
|
-
if (user?.user_group?.group_key ===
|
|
238
|
+
if (user?.user_group?.group_key === "master" || islogin === false) {
|
|
239
|
+
console.log(menuSet);
|
|
238
240
|
currentMenu?.menuSetting.forEach((m, index) => {
|
|
239
|
-
usermenutable.push(React__default.createElement(Menu, { key: index, menu_setting: m, openIcon: openIcon, closeIcon: closeIcon }));
|
|
241
|
+
usermenutable.push(React__default.createElement(Menu, { key: index, menu_setting: m, openIcon: openIcon, closeIcon: closeIcon, islogin: islogin }));
|
|
240
242
|
});
|
|
241
243
|
}
|
|
242
244
|
else {
|
|
@@ -244,14 +246,14 @@ const Nav = ({ nav: { menuSet, openIcon, closeIcon } }) => {
|
|
|
244
246
|
return user?.user_group?.group_menu_auth.includes(m.key);
|
|
245
247
|
});
|
|
246
248
|
userCurrentMenu?.forEach((m, index) => {
|
|
247
|
-
usermenutable.push(React__default.createElement(Menu, { key: index, menu_setting: m, openIcon: openIcon, closeIcon: closeIcon }));
|
|
249
|
+
usermenutable.push(React__default.createElement(Menu, { key: index, menu_setting: m, openIcon: openIcon, closeIcon: closeIcon, islogin: islogin }));
|
|
248
250
|
});
|
|
249
251
|
}
|
|
250
252
|
return usermenutable;
|
|
251
253
|
};
|
|
252
254
|
return React__default.createElement("div", { className: styles$9.naviFrame }, userMenu());
|
|
253
255
|
};
|
|
254
|
-
const Menu = ({ menu_setting: { title, icon, key, children, hasPage, page, defalultOpen }, openIcon, closeIcon }) => {
|
|
256
|
+
const Menu = ({ menu_setting: { title, icon, key, children, hasPage, page, defalultOpen }, openIcon, closeIcon, islogin, }) => {
|
|
255
257
|
const [hover, setHover] = useState(false);
|
|
256
258
|
const [subOpen, setSubOpen] = useState(false);
|
|
257
259
|
const { addTabs, currentTab, user } = useTbState();
|
|
@@ -264,7 +266,7 @@ const Menu = ({ menu_setting: { title, icon, key, children, hasPage, page, defal
|
|
|
264
266
|
}, [defalultOpen, setSubOpen]); //데이터 빈 화면 깜박임 방지
|
|
265
267
|
const userSubMenu = () => {
|
|
266
268
|
let usersubmenutable = [];
|
|
267
|
-
if (user?.user_group?.group_key ===
|
|
269
|
+
if (user?.user_group?.group_key === "master" || islogin === false) {
|
|
268
270
|
children?.forEach((m, index) => {
|
|
269
271
|
usersubmenutable.push(React__default.createElement(SubMenu, { key: index, menu_setting: m }));
|
|
270
272
|
});
|
|
@@ -280,11 +282,7 @@ const Menu = ({ menu_setting: { title, icon, key, children, hasPage, page, defal
|
|
|
280
282
|
return usersubmenutable;
|
|
281
283
|
};
|
|
282
284
|
return (React__default.createElement("div", null,
|
|
283
|
-
React__default.createElement("div", { className: `${styles$9.nav_item} ${currentTab?.key === key
|
|
284
|
-
? styles$9.menu_select
|
|
285
|
-
: hover
|
|
286
|
-
? styles$9.menu_hover
|
|
287
|
-
: styles$9.menu_nomal}`, onMouseEnter: () => {
|
|
285
|
+
React__default.createElement("div", { className: `${styles$9.nav_item} ${currentTab?.key === key ? styles$9.menu_select : hover ? styles$9.menu_hover : styles$9.menu_nomal}`, onMouseEnter: () => {
|
|
288
286
|
setHover(true);
|
|
289
287
|
}, onMouseLeave: () => {
|
|
290
288
|
setHover(false);
|
|
@@ -294,24 +292,19 @@ const Menu = ({ menu_setting: { title, icon, key, children, hasPage, page, defal
|
|
|
294
292
|
addTabs({
|
|
295
293
|
title,
|
|
296
294
|
key,
|
|
297
|
-
page
|
|
295
|
+
page,
|
|
298
296
|
});
|
|
299
297
|
// console.log(tabs)
|
|
300
298
|
} },
|
|
301
299
|
React__default.createElement("div", { className: styles$9.nav_icon }, icon),
|
|
302
300
|
React__default.createElement("div", { className: styles$9.nav_text }, title),
|
|
303
|
-
React__default.createElement("div", { className: styles$9.nav_open }, children &&
|
|
304
|
-
(subOpen ? React__default.createElement("div", null, openIcon) : React__default.createElement("div", null, closeIcon)))),
|
|
301
|
+
React__default.createElement("div", { className: styles$9.nav_open }, children && (subOpen ? React__default.createElement("div", null, openIcon) : React__default.createElement("div", null, closeIcon)))),
|
|
305
302
|
children && subOpen && userSubMenu()));
|
|
306
303
|
};
|
|
307
304
|
const SubMenu = ({ menu_setting: { title, icon, key, page, hasPage } }) => {
|
|
308
305
|
const [hover, setHover] = useState(false);
|
|
309
306
|
const { addTabs, currentTab } = useTbState();
|
|
310
|
-
return (React__default.createElement("div", { className: `${styles$9.sub_item} ${currentTab?.key === key
|
|
311
|
-
? styles$9.menu_select
|
|
312
|
-
: hover
|
|
313
|
-
? styles$9.menu_hover
|
|
314
|
-
: styles$9.menu_nomal}`, onMouseEnter: () => {
|
|
307
|
+
return (React__default.createElement("div", { className: `${styles$9.sub_item} ${currentTab?.key === key ? styles$9.menu_select : hover ? styles$9.menu_hover : styles$9.menu_nomal}`, onMouseEnter: () => {
|
|
315
308
|
setHover(true);
|
|
316
309
|
}, onMouseLeave: () => {
|
|
317
310
|
setHover(false);
|
|
@@ -320,7 +313,7 @@ const SubMenu = ({ menu_setting: { title, icon, key, page, hasPage } }) => {
|
|
|
320
313
|
addTabs({
|
|
321
314
|
title,
|
|
322
315
|
key,
|
|
323
|
-
page
|
|
316
|
+
page,
|
|
324
317
|
});
|
|
325
318
|
// console.log(tabs)
|
|
326
319
|
} },
|
|
@@ -391,7 +384,7 @@ const LoginPage = () => {
|
|
|
391
384
|
const [isTypeCheck, setTypeCheck] = useState(true);
|
|
392
385
|
const [editorValue, setEditorValue] = useState(JSON.stringify(defaultuser, null, 2));
|
|
393
386
|
return (React__default.createElement("div", { className: styles$3.loginpage },
|
|
394
|
-
React__default.createElement("div", { style: { display:
|
|
387
|
+
React__default.createElement("div", { style: { display: "flex" } },
|
|
395
388
|
React__default.createElement("button", { onClick: () => {
|
|
396
389
|
setEditorValue(JSON.stringify(alluser, null, 2));
|
|
397
390
|
setUser(alluser);
|
|
@@ -404,7 +397,7 @@ const LoginPage = () => {
|
|
|
404
397
|
setEditorValue(JSON.stringify(defaultuser, null, 2));
|
|
405
398
|
setUser(defaultuser);
|
|
406
399
|
} }, "Test2")),
|
|
407
|
-
React__default.createElement(Editor, { theme:
|
|
400
|
+
React__default.createElement(Editor, { theme: "vs-dark", width: 500, height: 500, defaultLanguage: "json", value: editorValue, onChange: (value) => {
|
|
408
401
|
if (value !== undefined) {
|
|
409
402
|
setEditorValue(value);
|
|
410
403
|
try {
|
|
@@ -414,7 +407,7 @@ const LoginPage = () => {
|
|
|
414
407
|
}
|
|
415
408
|
catch (e) {
|
|
416
409
|
setTypeCheck(false);
|
|
417
|
-
console.log(
|
|
410
|
+
console.log("JSON err");
|
|
418
411
|
}
|
|
419
412
|
}
|
|
420
413
|
else
|
|
@@ -426,43 +419,43 @@ const LoginPage = () => {
|
|
|
426
419
|
} }, "\uB85C\uADF8\uC778")));
|
|
427
420
|
};
|
|
428
421
|
const defaultuser = {
|
|
429
|
-
user_id:
|
|
430
|
-
user_name:
|
|
422
|
+
user_id: "defaultuser",
|
|
423
|
+
user_name: "기본유저",
|
|
431
424
|
user_profile: {},
|
|
432
425
|
user_group: {
|
|
433
426
|
group_id: 0,
|
|
434
|
-
group_key:
|
|
435
|
-
group_name:
|
|
436
|
-
group_section_auth: [
|
|
437
|
-
group_menu_auth: [
|
|
438
|
-
}
|
|
427
|
+
group_key: "master",
|
|
428
|
+
group_name: "기본그룹",
|
|
429
|
+
group_section_auth: ["top1", "top2"],
|
|
430
|
+
group_menu_auth: ["key1", "sub1", "key2"],
|
|
431
|
+
},
|
|
439
432
|
};
|
|
440
433
|
const alluser = {
|
|
441
|
-
user_id:
|
|
442
|
-
user_name:
|
|
434
|
+
user_id: "masteruser",
|
|
435
|
+
user_name: "마스터유저",
|
|
443
436
|
user_profile: {},
|
|
444
437
|
user_group: {
|
|
445
438
|
group_id: 0,
|
|
446
|
-
group_key:
|
|
447
|
-
group_name:
|
|
448
|
-
group_section_auth:
|
|
449
|
-
group_menu_auth:
|
|
450
|
-
}
|
|
439
|
+
group_key: "master",
|
|
440
|
+
group_name: "마스터그룹",
|
|
441
|
+
group_section_auth: "all",
|
|
442
|
+
group_menu_auth: "all",
|
|
443
|
+
},
|
|
451
444
|
};
|
|
452
445
|
const testuser = {
|
|
453
|
-
user_id:
|
|
454
|
-
user_name:
|
|
446
|
+
user_id: "testuser",
|
|
447
|
+
user_name: "테스트유저",
|
|
455
448
|
user_profile: {},
|
|
456
449
|
user_group: {
|
|
457
450
|
group_id: 0,
|
|
458
|
-
group_key:
|
|
459
|
-
group_name:
|
|
460
|
-
group_section_auth: [
|
|
461
|
-
group_menu_auth: [
|
|
462
|
-
}
|
|
451
|
+
group_key: "master",
|
|
452
|
+
group_name: "테스트그룹",
|
|
453
|
+
group_section_auth: ["top1", "top2", "top3"],
|
|
454
|
+
group_menu_auth: ["key1", "sub1", "key2", "sub2"],
|
|
455
|
+
},
|
|
463
456
|
};
|
|
464
457
|
|
|
465
|
-
const TbFrame = ({ setting, top, bottom, nav, top_banner }) => {
|
|
458
|
+
const TbFrame = ({ setting, top, bottom, nav, top_banner, }) => {
|
|
466
459
|
const { user, startpage, setStartpage, errMsg, isBanner, setIsBanner, setGlobalpages, setMenupages } = useTbState();
|
|
467
460
|
useEffect(() => {
|
|
468
461
|
if (setting.startpage) {
|
|
@@ -496,42 +489,40 @@ const TbFrame = ({ setting, top, bottom, nav, top_banner }) => {
|
|
|
496
489
|
}, [top_banner]);
|
|
497
490
|
const ErrWarning = () => {
|
|
498
491
|
return (React__default.createElement("div", { style: {
|
|
499
|
-
width:
|
|
500
|
-
height:
|
|
501
|
-
background:
|
|
502
|
-
display:
|
|
503
|
-
justifyContent:
|
|
492
|
+
width: "100vw",
|
|
493
|
+
height: "100vh",
|
|
494
|
+
background: "#1A1C20FF",
|
|
495
|
+
display: "flex",
|
|
496
|
+
justifyContent: "center",
|
|
504
497
|
} },
|
|
505
498
|
React__default.createElement("div", { style: {
|
|
506
|
-
marginTop:
|
|
507
|
-
display:
|
|
508
|
-
flexDirection:
|
|
509
|
-
height:
|
|
510
|
-
width:
|
|
511
|
-
border:
|
|
512
|
-
background:
|
|
499
|
+
marginTop: "100px",
|
|
500
|
+
display: "flex",
|
|
501
|
+
flexDirection: "column",
|
|
502
|
+
height: "200px",
|
|
503
|
+
width: " 400px",
|
|
504
|
+
border: "2px solid #6F5E5EFF",
|
|
505
|
+
background: "#C2C2C2FF",
|
|
513
506
|
} },
|
|
514
507
|
React__default.createElement("div", { style: {
|
|
515
|
-
marginTop:
|
|
516
|
-
marginBottom:
|
|
508
|
+
marginTop: "10px",
|
|
509
|
+
marginBottom: "20px",
|
|
517
510
|
fontSize: 24,
|
|
518
|
-
textAlign:
|
|
519
|
-
} }, errMsg?.notiTitle ? errMsg?.notiTitle :
|
|
520
|
-
React__default.createElement("div", { style: { textAlign:
|
|
511
|
+
textAlign: "center",
|
|
512
|
+
} }, errMsg?.notiTitle ? errMsg?.notiTitle : "오류가 발생하였습니다."),
|
|
513
|
+
React__default.createElement("div", { style: { textAlign: "left", padding: "10px" } }, errMsg?.notimessage),
|
|
521
514
|
React__default.createElement("div", { style: {
|
|
522
|
-
textAlign:
|
|
523
|
-
padding:
|
|
524
|
-
color:
|
|
525
|
-
fontSize:
|
|
515
|
+
textAlign: "left",
|
|
516
|
+
padding: "10px",
|
|
517
|
+
color: "#760707FF",
|
|
518
|
+
fontSize: "10px",
|
|
526
519
|
} }, errMsg?.err))));
|
|
527
520
|
};
|
|
528
521
|
return (React__default.createElement("div", { className: styles$9.main }, errMsg ? (errMsg.isPopup ? (React__default.createElement(ErrWarning, null)) : null) : setting?.islogin && !user ? (React__default.createElement(LOGIN, null)) : (React__default.createElement("div", { className: styles$9.mainframe },
|
|
529
522
|
React__default.createElement(Top, { setting: setting, top: top }),
|
|
530
523
|
isBanner && React__default.createElement(TOPBANNER, null),
|
|
531
|
-
React__default.createElement("div", { className: styles$9.centerFrame, style: isBanner
|
|
532
|
-
|
|
533
|
-
: { height: 'calc(100vh - 80px)' } },
|
|
534
|
-
React__default.createElement(Nav, { nav: nav }),
|
|
524
|
+
React__default.createElement("div", { className: styles$9.centerFrame, style: isBanner ? { height: "calc(100vh - 120px)" } : { height: "calc(100vh - 80px)" } },
|
|
525
|
+
React__default.createElement(Nav, { nav: nav, islogin: setting.islogin ?? false }),
|
|
535
526
|
React__default.createElement("div", { className: styles$9.contentsFrame },
|
|
536
527
|
React__default.createElement(Tabs, null),
|
|
537
528
|
React__default.createElement(Main, null))),
|
|
@@ -603,14 +594,8 @@ const FORM_CREATE = "등록";
|
|
|
603
594
|
|
|
604
595
|
* @todo
|
|
605
596
|
*/
|
|
606
|
-
const TableTopButtonGroup = ({ isSelect, onRefresh, isCounter, autoRefreshTime, addProps, modifyProps, deleteProps, removeProps, resetProps, customProps }) => {
|
|
607
|
-
if (!addProps &&
|
|
608
|
-
!modifyProps &&
|
|
609
|
-
!deleteProps &&
|
|
610
|
-
!removeProps &&
|
|
611
|
-
!resetProps &&
|
|
612
|
-
!customProps &&
|
|
613
|
-
!onRefresh) {
|
|
597
|
+
const TableTopButtonGroup = ({ isSelect, onRefresh, isCounter, autoRefreshTime, addProps, modifyProps, deleteProps, removeProps, resetProps, customProps, }) => {
|
|
598
|
+
if (!addProps && !modifyProps && !deleteProps && !removeProps && !resetProps && !customProps && !onRefresh) {
|
|
614
599
|
return null;
|
|
615
600
|
}
|
|
616
601
|
const [count, setCount] = useState(1); // 카운트다운 시작 값
|
|
@@ -633,10 +618,10 @@ const TableTopButtonGroup = ({ isSelect, onRefresh, isCounter, autoRefreshTime,
|
|
|
633
618
|
}, 1000);
|
|
634
619
|
return () => clearInterval(interval); // 정리
|
|
635
620
|
}, [isCounter, autoRefreshTime]);
|
|
636
|
-
return (React__default.createElement(Row, { justify:
|
|
621
|
+
return (React__default.createElement(Row, { justify: "space-between" },
|
|
637
622
|
React__default.createElement(Col, { span: 8, style: {
|
|
638
|
-
display:
|
|
639
|
-
justifyContent:
|
|
623
|
+
display: "flex",
|
|
624
|
+
justifyContent: "left",
|
|
640
625
|
} },
|
|
641
626
|
React__default.createElement(Space, null,
|
|
642
627
|
onRefresh !== undefined ? (autoRefreshTime && isCounter ? (React__default.createElement(Button, { icon: React__default.createElement(LoadingOutlined, null), onClick: () => {
|
|
@@ -645,24 +630,24 @@ const TableTopButtonGroup = ({ isSelect, onRefresh, isCounter, autoRefreshTime,
|
|
|
645
630
|
} }, isCounter && autoRefreshTime - count + 1)) : (React__default.createElement(Button, { icon: React__default.createElement(ReloadOutlined, null), onClick: onRefresh }))) : null,
|
|
646
631
|
customProps?.render && customProps?.render(),
|
|
647
632
|
addProps ? (React__default.createElement(Button, { disabled: addProps.disable, onClick: addProps.onFun }, addProps.title ? addProps.title : TABLE_CREATE)) : null,
|
|
648
|
-
addProps && modifyProps &&
|
|
633
|
+
addProps && modifyProps && "|",
|
|
649
634
|
modifyProps ? (React__default.createElement(Button, { disabled: !isSelect || modifyProps.disable, onClick: modifyProps.onFun }, modifyProps.title ? modifyProps.title : TABLE_MODIFY)) : null,
|
|
650
635
|
customProps?.leftRender && customProps?.leftRender())),
|
|
651
636
|
React__default.createElement(Col, { span: 8, style: {
|
|
652
|
-
display:
|
|
653
|
-
justifyContent:
|
|
637
|
+
display: "flex",
|
|
638
|
+
justifyContent: "right",
|
|
654
639
|
} },
|
|
655
640
|
React__default.createElement(Space, null,
|
|
656
641
|
deleteProps ? (React__default.createElement(Button, { danger: true, disabled: !isSelect || deleteProps.disable, onClick: deleteProps.onFun }, deleteProps.title ? deleteProps.title : TABLE_DELETE)) : null,
|
|
657
642
|
resetProps ? (React__default.createElement(Button, { disabled: !isSelect || resetProps.disable, onClick: resetProps.onFun }, resetProps.title ? resetProps.title : TABLE_RESET)) : null,
|
|
658
|
-
removeProps ? (React__default.createElement(Button, { danger: true, type:
|
|
643
|
+
removeProps ? (React__default.createElement(Button, { danger: true, type: "primary", disabled: !isSelect || removeProps.disable, onClick: removeProps.onFun }, removeProps.title ? removeProps.title : TABLE_REMOVE)) : null,
|
|
659
644
|
customProps?.rightRender && customProps?.rightRender()))));
|
|
660
645
|
};
|
|
661
|
-
const TableBottomButtonGroup = ({ isSelect, topProps, bottomProps, upProps, downProps }) => {
|
|
662
|
-
return (React__default.createElement(Row, { justify:
|
|
646
|
+
const TableBottomButtonGroup = ({ isSelect, topProps, bottomProps, upProps, downProps, }) => {
|
|
647
|
+
return (React__default.createElement(Row, { justify: "space-between" },
|
|
663
648
|
React__default.createElement(Col, { span: 24, style: {
|
|
664
|
-
display:
|
|
665
|
-
justifyContent:
|
|
649
|
+
display: "flex",
|
|
650
|
+
justifyContent: "right",
|
|
666
651
|
} },
|
|
667
652
|
React__default.createElement(Space, null,
|
|
668
653
|
topProps ? (React__default.createElement(Button, { disabled: !isSelect || topProps.disable, onClick: topProps.onFun }, TABLE_TOP)) : null,
|
|
@@ -6461,22 +6446,18 @@ const tableColumns = (columns) => {
|
|
|
6461
6446
|
if (!i.hidden) {
|
|
6462
6447
|
if (i.sort) {
|
|
6463
6448
|
item.sorter = (a, b) => {
|
|
6464
|
-
return a[i.tableProps.dataIndex] < b[i.tableProps.dataIndex]
|
|
6465
|
-
? -1
|
|
6466
|
-
: a[i.tableProps.dataIndex] > b[i.tableProps.dataIndex]
|
|
6467
|
-
? 1
|
|
6468
|
-
: 0;
|
|
6449
|
+
return a[i.tableProps.dataIndex] < b[i.tableProps.dataIndex] ? -1 : a[i.tableProps.dataIndex] > b[i.tableProps.dataIndex] ? 1 : 0;
|
|
6469
6450
|
};
|
|
6470
6451
|
}
|
|
6471
6452
|
if (item.filters) {
|
|
6472
6453
|
item.onFilter = (value, record) => record[i.tableProps.dataIndex].includes(value);
|
|
6473
6454
|
}
|
|
6474
6455
|
if (i.formatProps) {
|
|
6475
|
-
if (i.formatProps.type.toLowerCase() ===
|
|
6456
|
+
if (i.formatProps.type.toLowerCase() === "tag") {
|
|
6476
6457
|
item.render = (text, record, index) => {
|
|
6477
|
-
let asText =
|
|
6478
|
-
let Tcolor =
|
|
6479
|
-
let fdefault = i.formatProps?.formatter?.find((m) => m.text ===
|
|
6458
|
+
let asText = "";
|
|
6459
|
+
let Tcolor = "default";
|
|
6460
|
+
let fdefault = i.formatProps?.formatter?.find((m) => m.text === "default");
|
|
6480
6461
|
if (fdefault) {
|
|
6481
6462
|
Tcolor = fdefault.color;
|
|
6482
6463
|
asText = fdefault.asText;
|
|
@@ -6490,15 +6471,13 @@ const tableColumns = (columns) => {
|
|
|
6490
6471
|
React__default.createElement(Tag, { color: Tcolor, key: text }, !asText ? text : asText)));
|
|
6491
6472
|
};
|
|
6492
6473
|
}
|
|
6493
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6474
|
+
else if (i.formatProps.type.toLowerCase() === "json_tags") {
|
|
6494
6475
|
item.render = (text, record, index) => {
|
|
6495
6476
|
let table = [];
|
|
6496
6477
|
text.forEach((textItem, index) => {
|
|
6497
6478
|
if (textItem) {
|
|
6498
|
-
let asText = i.formatProps?.itemProps?.text_id
|
|
6499
|
-
|
|
6500
|
-
: textItem ?? '';
|
|
6501
|
-
let Tcolor = 'default';
|
|
6479
|
+
let asText = i.formatProps?.itemProps?.text_id ? textItem[i.formatProps.itemProps.text_id] : textItem ?? "";
|
|
6480
|
+
let Tcolor = "default";
|
|
6502
6481
|
let fcol = i.formatProps?.formatter?.find((m) => m.text === asText);
|
|
6503
6482
|
if (fcol) {
|
|
6504
6483
|
Tcolor = fcol.color;
|
|
@@ -6511,7 +6490,7 @@ const tableColumns = (columns) => {
|
|
|
6511
6490
|
return React__default.createElement("span", null, table);
|
|
6512
6491
|
};
|
|
6513
6492
|
}
|
|
6514
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6493
|
+
else if (i.formatProps.type.toLowerCase() === "tagarr") {
|
|
6515
6494
|
item.render = (text, record, index) => {
|
|
6516
6495
|
let textarr = [];
|
|
6517
6496
|
if (text !== undefined)
|
|
@@ -6519,8 +6498,8 @@ const tableColumns = (columns) => {
|
|
|
6519
6498
|
let table = [];
|
|
6520
6499
|
textarr.forEach((textItem, index) => {
|
|
6521
6500
|
if (textItem) {
|
|
6522
|
-
let asText =
|
|
6523
|
-
let Tcolor =
|
|
6501
|
+
let asText = "";
|
|
6502
|
+
let Tcolor = "default";
|
|
6524
6503
|
let fcol = i.formatProps?.formatter?.find((m) => m.text === textItem);
|
|
6525
6504
|
if (fcol) {
|
|
6526
6505
|
Tcolor = fcol.color;
|
|
@@ -6532,10 +6511,10 @@ const tableColumns = (columns) => {
|
|
|
6532
6511
|
return React__default.createElement("span", null, table);
|
|
6533
6512
|
};
|
|
6534
6513
|
}
|
|
6535
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6514
|
+
else if (i.formatProps.type.toLowerCase() === "switch") {
|
|
6536
6515
|
item.render = (text, record, index) => {
|
|
6537
|
-
let asText =
|
|
6538
|
-
let Tcolor =
|
|
6516
|
+
let asText = "";
|
|
6517
|
+
let Tcolor = "default";
|
|
6539
6518
|
let fcol = i.formatProps?.formatter?.find((m) => m.text === text);
|
|
6540
6519
|
if (fcol) {
|
|
6541
6520
|
asText = fcol.asText;
|
|
@@ -6544,7 +6523,7 @@ const tableColumns = (columns) => {
|
|
|
6544
6523
|
return (React__default.createElement(Tag, { color: Tcolor, key: index }, !asText ? text : asText));
|
|
6545
6524
|
};
|
|
6546
6525
|
}
|
|
6547
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6526
|
+
else if (i.formatProps.type.toLowerCase() === "price") {
|
|
6548
6527
|
item.render = (text, record, index) => {
|
|
6549
6528
|
if (text)
|
|
6550
6529
|
return React__default.createElement("span", null, commaFormat(text));
|
|
@@ -6552,64 +6531,63 @@ const tableColumns = (columns) => {
|
|
|
6552
6531
|
return null;
|
|
6553
6532
|
};
|
|
6554
6533
|
}
|
|
6555
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6534
|
+
else if (i.formatProps.type.toLowerCase() === "length") {
|
|
6556
6535
|
item.render = (text, record, index) => {
|
|
6557
6536
|
return React__default.createElement("span", null, text.length);
|
|
6558
6537
|
};
|
|
6559
6538
|
}
|
|
6560
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6539
|
+
else if (i.formatProps.type.toLowerCase() === "tel") {
|
|
6561
6540
|
item.render = (text, record, index) => {
|
|
6562
|
-
return
|
|
6541
|
+
return React__default.createElement("span", null, phoneFormat(text.replaceAll("-", "").replaceAll(" ", "")));
|
|
6563
6542
|
};
|
|
6564
6543
|
}
|
|
6565
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6544
|
+
else if (i.formatProps.type.toLowerCase() === "file") {
|
|
6566
6545
|
item.render = (text, record, index) => {
|
|
6567
6546
|
return React__default.createElement("span", null, text);
|
|
6568
6547
|
};
|
|
6569
6548
|
}
|
|
6570
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6549
|
+
else if (i.formatProps.type.toLowerCase() === "copy") {
|
|
6571
6550
|
item.render = (text, record, index) => {
|
|
6572
6551
|
return (React__default.createElement(Paragraph, { copyable: true, style: { marginBottom: 0 } }, text));
|
|
6573
6552
|
};
|
|
6574
6553
|
}
|
|
6575
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6554
|
+
else if (i.formatProps.type.toLowerCase() === "email") {
|
|
6576
6555
|
item.render = (text, record, index) => {
|
|
6577
|
-
return (React__default.createElement("a", { href:
|
|
6556
|
+
return (React__default.createElement("a", { href: "https://mail.naver.com/write/ext?srvid=note&to=" + text, target: "_blank", rel: "noreferrer" }, text));
|
|
6578
6557
|
};
|
|
6579
6558
|
}
|
|
6580
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6581
|
-
i.formatProps.type.toLowerCase() === 'imagecrop') {
|
|
6559
|
+
else if (i.formatProps.type.toLowerCase() === "image" || i.formatProps.type.toLowerCase() === "imagecrop") {
|
|
6582
6560
|
item.render = (text, record, index) => {
|
|
6583
6561
|
if (text !== undefined && text !== null) {
|
|
6584
6562
|
if (text.length > 0)
|
|
6585
6563
|
return (React__default.createElement(Image$1, { width: i.formatProps?.image_width, height: i.formatProps?.image_height, src: text, preview: {
|
|
6586
|
-
src:
|
|
6587
|
-
}, alt:
|
|
6564
|
+
src: "/api/getImage/" + record[i.formatProps?.imagesId ?? ""],
|
|
6565
|
+
}, alt: "img" }));
|
|
6588
6566
|
}
|
|
6589
6567
|
return React__default.createElement("span", null, text);
|
|
6590
6568
|
};
|
|
6591
6569
|
}
|
|
6592
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6570
|
+
else if (i.formatProps.type.toLowerCase() === "addcount") {
|
|
6593
6571
|
item.render = (text, record, index) => {
|
|
6594
6572
|
return (React__default.createElement("span", null,
|
|
6595
6573
|
text,
|
|
6596
6574
|
" ",
|
|
6597
|
-
i.countIndex ? `(${record[i.countIndex]})` :
|
|
6575
|
+
i.countIndex ? `(${record[i.countIndex]})` : ""));
|
|
6598
6576
|
};
|
|
6599
6577
|
}
|
|
6600
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6578
|
+
else if (i.formatProps.type.toLowerCase() === "tostring") {
|
|
6601
6579
|
item.render = (text, record, index) => {
|
|
6602
6580
|
return React__default.createElement("span", null, text?.toString());
|
|
6603
6581
|
};
|
|
6604
6582
|
}
|
|
6605
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6583
|
+
else if (i.formatProps.type.toLowerCase() === "jsonarr") {
|
|
6606
6584
|
item.render = (text, record, index) => {
|
|
6607
6585
|
let textarr = [];
|
|
6608
6586
|
if (!text)
|
|
6609
6587
|
textarr = JSON.parse(text);
|
|
6610
6588
|
let table = [];
|
|
6611
6589
|
textarr.forEach((textItem, index) => {
|
|
6612
|
-
let Tcolor =
|
|
6590
|
+
let Tcolor = "default";
|
|
6613
6591
|
let fcol = i.formatProps?.formatter?.find((m) => m.text === textItem);
|
|
6614
6592
|
if (fcol) {
|
|
6615
6593
|
Tcolor = fcol.color;
|
|
@@ -6620,14 +6598,14 @@ const tableColumns = (columns) => {
|
|
|
6620
6598
|
return React__default.createElement("span", null, table);
|
|
6621
6599
|
};
|
|
6622
6600
|
}
|
|
6623
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6601
|
+
else if (i.formatProps.type.toLowerCase() === "arr") {
|
|
6624
6602
|
item.render = (text, record, index) => {
|
|
6625
|
-
let textarr = text.split(
|
|
6603
|
+
let textarr = text.split(",");
|
|
6626
6604
|
if (textarr === null)
|
|
6627
6605
|
textarr = [];
|
|
6628
6606
|
let table = [];
|
|
6629
6607
|
textarr.forEach((item, index) => {
|
|
6630
|
-
let Tcolor =
|
|
6608
|
+
let Tcolor = "default";
|
|
6631
6609
|
let fcol = i.formatProps?.formatter?.find((m) => m.text === item);
|
|
6632
6610
|
if (fcol)
|
|
6633
6611
|
Tcolor = fcol.color;
|
|
@@ -6636,7 +6614,7 @@ const tableColumns = (columns) => {
|
|
|
6636
6614
|
return React__default.createElement("span", null, table);
|
|
6637
6615
|
};
|
|
6638
6616
|
}
|
|
6639
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6617
|
+
else if (i.formatProps.type.toLowerCase() === "remainingtime") {
|
|
6640
6618
|
item.render = (text, record, index) => {
|
|
6641
6619
|
const input_time = moment$1(text);
|
|
6642
6620
|
const now_time = moment$1();
|
|
@@ -6647,22 +6625,22 @@ const tableColumns = (columns) => {
|
|
|
6647
6625
|
const hours = minutes / 60;
|
|
6648
6626
|
const days = hours / 24;
|
|
6649
6627
|
if (seconds < 60)
|
|
6650
|
-
output =
|
|
6628
|
+
output = "방금 전";
|
|
6651
6629
|
else if (minutes < 60)
|
|
6652
6630
|
output = `${Math.floor(minutes)}분 전`;
|
|
6653
6631
|
else if (hours < 24)
|
|
6654
6632
|
output = `${Math.floor(hours)}시간 전`;
|
|
6655
6633
|
else if (days < 1)
|
|
6656
|
-
output = moment$1(text).format(
|
|
6634
|
+
output = moment$1(text).format("a hh:mm");
|
|
6657
6635
|
else if (input_time.year() === now_time.year())
|
|
6658
|
-
output = moment$1(text).format(
|
|
6636
|
+
output = moment$1(text).format("MM.DD HH:mm");
|
|
6659
6637
|
else {
|
|
6660
|
-
output = moment$1(text).format(
|
|
6638
|
+
output = moment$1(text).format("YYYY-MM-DD HH:mm:ss");
|
|
6661
6639
|
}
|
|
6662
|
-
return (React__default.createElement(Tooltip, { title: moment$1(text).format(
|
|
6640
|
+
return (React__default.createElement(Tooltip, { title: moment$1(text).format("YYYY년 MM월 DD일 HH시 mm분 ss초"), color: "#108ee9" }, output));
|
|
6663
6641
|
};
|
|
6664
6642
|
}
|
|
6665
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6643
|
+
else if (i.formatProps.type.toLowerCase() === "sleeptime") {
|
|
6666
6644
|
item.render = (text, record, index) => {
|
|
6667
6645
|
return (React__default.createElement("span", null,
|
|
6668
6646
|
text[0],
|
|
@@ -6673,7 +6651,7 @@ const tableColumns = (columns) => {
|
|
|
6673
6651
|
"\uBD84"));
|
|
6674
6652
|
};
|
|
6675
6653
|
}
|
|
6676
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6654
|
+
else if (i.formatProps.type.toLowerCase() === "sleeptimes") {
|
|
6677
6655
|
item.render = (text, record, index) => {
|
|
6678
6656
|
return (React__default.createElement("span", null,
|
|
6679
6657
|
text[0],
|
|
@@ -6682,7 +6660,7 @@ const tableColumns = (columns) => {
|
|
|
6682
6660
|
"\uBD84"));
|
|
6683
6661
|
};
|
|
6684
6662
|
}
|
|
6685
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6663
|
+
else if (i.formatProps.type.toLowerCase() === "compute") {
|
|
6686
6664
|
item.render = (text, record, index) => {
|
|
6687
6665
|
return (React__default.createElement(Space, null,
|
|
6688
6666
|
React__default.createElement(Text$2, null,
|
|
@@ -6691,10 +6669,10 @@ const tableColumns = (columns) => {
|
|
|
6691
6669
|
React__default.createElement(Button, { onClick: () => { } }, "\uACC4\uC0B0")));
|
|
6692
6670
|
};
|
|
6693
6671
|
}
|
|
6694
|
-
else if (i.formatProps.type.toLowerCase() ===
|
|
6672
|
+
else if (i.formatProps.type.toLowerCase() === "answer") {
|
|
6695
6673
|
item.render = (text, record, index) => {
|
|
6696
|
-
return (React__default.createElement(Space, { direction:
|
|
6697
|
-
if (m.type ===
|
|
6674
|
+
return (React__default.createElement(Space, { direction: "vertical" }, text.map((m) => {
|
|
6675
|
+
if (m.type === "radio")
|
|
6698
6676
|
return (React__default.createElement(Space, { key: m.key },
|
|
6699
6677
|
React__default.createElement(Tag, null,
|
|
6700
6678
|
m.key,
|
|
@@ -6702,21 +6680,21 @@ const tableColumns = (columns) => {
|
|
|
6702
6680
|
React__default.createElement(Text$2, null,
|
|
6703
6681
|
m.decs,
|
|
6704
6682
|
" ")));
|
|
6705
|
-
else if (m.type ===
|
|
6706
|
-
return (React__default.createElement(Tag, { key: m.key, color:
|
|
6683
|
+
else if (m.type === "input_number") {
|
|
6684
|
+
return (React__default.createElement(Tag, { key: m.key, color: "green" },
|
|
6707
6685
|
m.left,
|
|
6708
6686
|
" \uC22B\uC790\uAC12 \uC785\uB825",
|
|
6709
|
-
|
|
6687
|
+
" "));
|
|
6710
6688
|
}
|
|
6711
|
-
else if (m.type ===
|
|
6712
|
-
return (React__default.createElement(Tag, { key: m.key, color:
|
|
6689
|
+
else if (m.type === "input_roll") {
|
|
6690
|
+
return (React__default.createElement(Tag, { key: m.key, color: "red" },
|
|
6713
6691
|
m.right,
|
|
6714
6692
|
" \uC785\uB825",
|
|
6715
|
-
|
|
6693
|
+
" "));
|
|
6716
6694
|
}
|
|
6717
|
-
else if (m.type ===
|
|
6695
|
+
else if (m.type === "checkbox") {
|
|
6718
6696
|
return (React__default.createElement(Space, { key: m.key },
|
|
6719
|
-
React__default.createElement(Tag, { color:
|
|
6697
|
+
React__default.createElement(Tag, { color: "blue" },
|
|
6720
6698
|
" \uCCB4\uD06C",
|
|
6721
6699
|
m.key,
|
|
6722
6700
|
" "),
|
|
@@ -6734,7 +6712,7 @@ const tableColumns = (columns) => {
|
|
|
6734
6712
|
}
|
|
6735
6713
|
item = {
|
|
6736
6714
|
...item,
|
|
6737
|
-
...i.tableProps
|
|
6715
|
+
...i.tableProps,
|
|
6738
6716
|
};
|
|
6739
6717
|
if (i.search) {
|
|
6740
6718
|
const search = useColumnSearchProps(i.tableProps.dataIndex);
|
|
@@ -6752,21 +6730,21 @@ const convert2FormData = ({ data, columns }) => {
|
|
|
6752
6730
|
let ant_data = { ...data };
|
|
6753
6731
|
let columns_arr = Object.values(columns);
|
|
6754
6732
|
columns_arr.forEach((item) => {
|
|
6755
|
-
if (item.formatProps?.type ===
|
|
6733
|
+
if (item.formatProps?.type === "DateTime") {
|
|
6756
6734
|
ant_data[item.tableProps.dataIndex] = moment$1(ant_data[item.tableProps.dataIndex]);
|
|
6757
6735
|
}
|
|
6758
6736
|
});
|
|
6759
6737
|
return ant_data;
|
|
6760
6738
|
};
|
|
6761
|
-
const tableRowSelection = ({ selectedRowKeys, radioProps, checkboxProps }) => {
|
|
6739
|
+
const tableRowSelection = ({ selectedRowKeys, radioProps, checkboxProps, }) => {
|
|
6762
6740
|
if (radioProps) {
|
|
6763
6741
|
// console.log(selectedRowKeys)
|
|
6764
6742
|
return {
|
|
6765
|
-
type:
|
|
6743
|
+
type: "radio",
|
|
6766
6744
|
selectedRowKeys: selectedRowKeys,
|
|
6767
6745
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
6768
|
-
console.log(`selectedRowKeys: ${selectedRowKeys}`,
|
|
6769
|
-
}
|
|
6746
|
+
console.log(`selectedRowKeys: ${selectedRowKeys}`, "selectedRows: ", selectedRows);
|
|
6747
|
+
},
|
|
6770
6748
|
// onSelect: (record, rowIndex) => {
|
|
6771
6749
|
// radioProps.onFun(record)
|
|
6772
6750
|
// }
|
|
@@ -6774,12 +6752,12 @@ const tableRowSelection = ({ selectedRowKeys, radioProps, checkboxProps }) => {
|
|
|
6774
6752
|
}
|
|
6775
6753
|
else if (checkboxProps) {
|
|
6776
6754
|
return {
|
|
6777
|
-
type:
|
|
6755
|
+
type: "checkbox",
|
|
6778
6756
|
selectedRowKeys: selectedRowKeys,
|
|
6779
6757
|
onChange: (newSelectedRowKeys) => {
|
|
6780
6758
|
checkboxProps.onFun(newSelectedRowKeys);
|
|
6781
6759
|
},
|
|
6782
|
-
getCheckboxProps: checkboxProps.props
|
|
6760
|
+
getCheckboxProps: checkboxProps.props,
|
|
6783
6761
|
};
|
|
6784
6762
|
}
|
|
6785
6763
|
else
|
|
@@ -6788,8 +6766,8 @@ const tableRowSelection = ({ selectedRowKeys, radioProps, checkboxProps }) => {
|
|
|
6788
6766
|
// 컬럼 검색 props
|
|
6789
6767
|
const useColumnSearchProps = (dataIndex) => {
|
|
6790
6768
|
const searchInput = useRef(null);
|
|
6791
|
-
const [searchText, setSearchText] = useState(
|
|
6792
|
-
const [searchedColumn, setSearchedColumn] = useState(
|
|
6769
|
+
const [searchText, setSearchText] = useState("");
|
|
6770
|
+
const [searchedColumn, setSearchedColumn] = useState("");
|
|
6793
6771
|
//검색
|
|
6794
6772
|
const handleSearch = (selectedKeys, confirm, dataIndex) => {
|
|
6795
6773
|
confirm();
|
|
@@ -6799,39 +6777,36 @@ const useColumnSearchProps = (dataIndex) => {
|
|
|
6799
6777
|
//검색 필터 리셋
|
|
6800
6778
|
const handleReset = (clearFilters) => {
|
|
6801
6779
|
clearFilters();
|
|
6802
|
-
setSearchText(
|
|
6780
|
+
setSearchText("");
|
|
6803
6781
|
};
|
|
6804
6782
|
return {
|
|
6805
6783
|
filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => (React__default.createElement("div", { style: {
|
|
6806
|
-
padding: 8
|
|
6784
|
+
padding: 8,
|
|
6807
6785
|
}, onKeyDown: (e) => e.stopPropagation() },
|
|
6808
6786
|
React__default.createElement(Input, { ref: searchInput, placeholder: `Search ${dataIndex}`, value: selectedKeys[0], onChange: (e) => setSelectedKeys(e.target.value ? [e.target.value] : []), onPressEnter: () => handleSearch(selectedKeys, confirm, dataIndex), style: {
|
|
6809
6787
|
marginBottom: 8,
|
|
6810
|
-
display:
|
|
6788
|
+
display: "block",
|
|
6811
6789
|
} }),
|
|
6812
6790
|
React__default.createElement(Space, null,
|
|
6813
|
-
React__default.createElement(Button, { type:
|
|
6814
|
-
width: 90
|
|
6791
|
+
React__default.createElement(Button, { type: "primary", onClick: () => handleSearch(selectedKeys, confirm, dataIndex), icon: React__default.createElement(SearchOutlined, null), size: "small", style: {
|
|
6792
|
+
width: 90,
|
|
6815
6793
|
} }, "Search"),
|
|
6816
|
-
React__default.createElement(Button, { onClick: () => clearFilters && handleReset(clearFilters), size:
|
|
6817
|
-
width: 90
|
|
6794
|
+
React__default.createElement(Button, { onClick: () => clearFilters && handleReset(clearFilters), size: "small", style: {
|
|
6795
|
+
width: 90,
|
|
6818
6796
|
} }, "Reset")))),
|
|
6819
6797
|
filterIcon: (filtered) => (React__default.createElement(SearchOutlined, { style: {
|
|
6820
|
-
color: filtered ?
|
|
6798
|
+
color: filtered ? "#1890ff" : undefined,
|
|
6821
6799
|
} })),
|
|
6822
6800
|
onFilter: (value, record) => {
|
|
6823
6801
|
if (dataIndex)
|
|
6824
|
-
return record[dataIndex]
|
|
6825
|
-
.toString()
|
|
6826
|
-
.toLowerCase()
|
|
6827
|
-
.includes(value.toString().toLowerCase());
|
|
6802
|
+
return record[dataIndex].toString().toLowerCase().includes(value.toString().toLowerCase());
|
|
6828
6803
|
},
|
|
6829
6804
|
onFilterDropdownOpenChange: (visible) => {
|
|
6830
6805
|
if (visible) {
|
|
6831
6806
|
setTimeout(() => searchInput.current?.select(), 100);
|
|
6832
6807
|
}
|
|
6833
6808
|
},
|
|
6834
|
-
render: (text) => searchedColumn === dataIndex ? React__default.createElement("strong", null, text) : text
|
|
6809
|
+
render: (text) => (searchedColumn === dataIndex ? React__default.createElement("strong", null, text) : text),
|
|
6835
6810
|
};
|
|
6836
6811
|
};
|
|
6837
6812
|
|
|
@@ -22990,58 +22965,58 @@ var build = {exports: {}};
|
|
|
22990
22965
|
var buildExports = build.exports;
|
|
22991
22966
|
var Resizer = /*@__PURE__*/getDefaultExportFromCjs(buildExports);
|
|
22992
22967
|
|
|
22993
|
-
const useFormColumns = ({ isModify, columns, onChange }) => {
|
|
22994
|
-
const [valueTextEditer, setValueTextEditer] = useState(
|
|
22968
|
+
const useFormColumns = ({ isModify, columns, onChange, }) => {
|
|
22969
|
+
const [valueTextEditer, setValueTextEditer] = useState("");
|
|
22995
22970
|
let ant_form = [];
|
|
22996
22971
|
columns?.forEach((i) => {
|
|
22997
22972
|
if ((!isModify && i.create !== false) || (isModify && i.modify !== false)) {
|
|
22998
22973
|
if (i.formatProps) {
|
|
22999
|
-
if (i.formatProps.type ===
|
|
22974
|
+
if (i.formatProps.type === "select") {
|
|
23000
22975
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23001
22976
|
React__default.createElement(Select, { ...i.formatProps.itemProps, placeholder: i.placeholder, options: i.formatProps.formatData?.map((i) => {
|
|
23002
22977
|
return {
|
|
23003
22978
|
value: i.key,
|
|
23004
|
-
label: i.name
|
|
22979
|
+
label: i.name,
|
|
23005
22980
|
};
|
|
23006
22981
|
}) })));
|
|
23007
22982
|
}
|
|
23008
|
-
else if (i.formatProps.type ===
|
|
22983
|
+
else if (i.formatProps.type === "DateTime") {
|
|
23009
22984
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23010
|
-
React__default.createElement(DatePicker, { ...i.formatProps.itemProps, format:
|
|
22985
|
+
React__default.createElement(DatePicker, { ...i.formatProps.itemProps, format: "YYYY-MM-DD" })));
|
|
23011
22986
|
}
|
|
23012
|
-
else if (i.formatProps.type ===
|
|
22987
|
+
else if (i.formatProps.type === "code") {
|
|
23013
22988
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23014
|
-
React__default.createElement(Input, { ...i.formatProps.itemProps, placeholder: i.placeholder, defaultValue: moment$1().format(
|
|
22989
|
+
React__default.createElement(Input, { ...i.formatProps.itemProps, placeholder: i.placeholder, defaultValue: moment$1().format("X") })));
|
|
23015
22990
|
}
|
|
23016
|
-
else if (i.formatProps.type ===
|
|
22991
|
+
else if (i.formatProps.type === "switch") {
|
|
23017
22992
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23018
22993
|
React__default.createElement(Switch, { ...i.formatProps.itemProps })));
|
|
23019
22994
|
}
|
|
23020
|
-
else if (i.formatProps.type ===
|
|
22995
|
+
else if (i.formatProps.type === "number") {
|
|
23021
22996
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23022
|
-
React__default.createElement(Input, { ...i.formatProps.itemProps, placeholder: i.placeholder, type:
|
|
22997
|
+
React__default.createElement(Input, { ...i.formatProps.itemProps, placeholder: i.placeholder, type: "number" })));
|
|
23023
22998
|
}
|
|
23024
|
-
else if (i.formatProps.type ===
|
|
22999
|
+
else if (i.formatProps.type === "password") {
|
|
23025
23000
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23026
23001
|
React__default.createElement(Input.Password, { ...i.formatProps.itemProps, placeholder: i.placeholder })));
|
|
23027
23002
|
}
|
|
23028
|
-
else if (i.formatProps.type ===
|
|
23003
|
+
else if (i.formatProps.type === "textEditer") {
|
|
23029
23004
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23030
23005
|
React__default.createElement(ReactQuill, { ...i.formatProps.itemProps, style: {
|
|
23031
23006
|
height: 500,
|
|
23032
|
-
background:
|
|
23033
|
-
color:
|
|
23034
|
-
}, theme:
|
|
23007
|
+
background: "#fff",
|
|
23008
|
+
color: "#000",
|
|
23009
|
+
}, theme: "snow", value: valueTextEditer, modules: {
|
|
23035
23010
|
toolbar: {
|
|
23036
23011
|
container: [
|
|
23037
23012
|
[
|
|
23038
23013
|
{
|
|
23039
|
-
header: [1, 2, 3, 4, 5, false]
|
|
23040
|
-
}
|
|
23014
|
+
header: [1, 2, 3, 4, 5, false],
|
|
23015
|
+
},
|
|
23041
23016
|
],
|
|
23042
|
-
[
|
|
23043
|
-
]
|
|
23044
|
-
}
|
|
23017
|
+
["bold", "underline"],
|
|
23018
|
+
],
|
|
23019
|
+
},
|
|
23045
23020
|
// toolbar: [
|
|
23046
23021
|
// ['bold', 'italic', 'underline', 'strike'], // toggled buttons
|
|
23047
23022
|
// ['blockquote', 'code-block'],
|
|
@@ -23067,10 +23042,10 @@ const useFormColumns = ({ isModify, columns, onChange }) => {
|
|
|
23067
23042
|
// ]
|
|
23068
23043
|
}, onChange: (value, delta, source, editor) => setValueTextEditer(editor.getHTML()) })));
|
|
23069
23044
|
}
|
|
23070
|
-
else if (i.formatProps.type ===
|
|
23071
|
-
i.formatProps.type ===
|
|
23072
|
-
i.formatProps.type ===
|
|
23073
|
-
i.formatProps.type ===
|
|
23045
|
+
else if (i.formatProps.type === "file" ||
|
|
23046
|
+
i.formatProps.type === "files" ||
|
|
23047
|
+
i.formatProps.type === "images" ||
|
|
23048
|
+
i.formatProps.type === "image") {
|
|
23074
23049
|
// console.log(i)
|
|
23075
23050
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23076
23051
|
React__default.createElement(Files, { ...i.formatProps.itemProps,
|
|
@@ -23078,45 +23053,44 @@ const useFormColumns = ({ isModify, columns, onChange }) => {
|
|
|
23078
23053
|
// i.formatProps.type === 'images' ||
|
|
23079
23054
|
// (i.formatProps.type === 'image' && 'picture')
|
|
23080
23055
|
// }
|
|
23081
|
-
count: i.formatProps.type ===
|
|
23056
|
+
count: i.formatProps.type === "files" ? 10 : 1 })));
|
|
23082
23057
|
}
|
|
23083
|
-
else if (i.formatProps.type ===
|
|
23058
|
+
else if (i.formatProps.type === "imageCrop") {
|
|
23084
23059
|
ant_form = ant_form.concat([
|
|
23085
23060
|
React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23086
23061
|
React__default.createElement(UploadImage, { ...i.formatProps.itemProps, onChange: (e) => {
|
|
23087
23062
|
onChange({
|
|
23088
|
-
[i.tableProps.dataIndex +
|
|
23089
|
-
[i.tableProps.dataIndex]: e
|
|
23063
|
+
[i.tableProps.dataIndex + "_changeCheck"]: true,
|
|
23064
|
+
[i.tableProps.dataIndex]: e,
|
|
23090
23065
|
});
|
|
23091
23066
|
} })),
|
|
23092
|
-
React__default.createElement(Form.Item, { key: i.tableProps.dataIndex +
|
|
23093
|
-
React__default.createElement(Input, null))
|
|
23067
|
+
React__default.createElement(Form.Item, { key: i.tableProps.dataIndex + "_changeCheck", label: i.tableProps.title + "변경 유무", name: i.tableProps.dataIndex + "_changeCheck", hidden: true },
|
|
23068
|
+
React__default.createElement(Input, null)),
|
|
23094
23069
|
]);
|
|
23095
23070
|
}
|
|
23096
|
-
else if (i.formatProps.type ===
|
|
23071
|
+
else if (i.formatProps.type === "sleeptime") {
|
|
23097
23072
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden, required: true },
|
|
23098
23073
|
React__default.createElement(Space, { size: 10 },
|
|
23099
|
-
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex +
|
|
23100
|
-
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter:
|
|
23101
|
-
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex +
|
|
23102
|
-
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter:
|
|
23074
|
+
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex + "_hour", rules: i.rules },
|
|
23075
|
+
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter: "\uC2DC", type: "number" })),
|
|
23076
|
+
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex + "_min", rules: i.rules },
|
|
23077
|
+
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter: "\uBD84", type: "number" })))));
|
|
23103
23078
|
}
|
|
23104
|
-
else if (i.formatProps.type ===
|
|
23079
|
+
else if (i.formatProps.type === "sleeptimes") {
|
|
23105
23080
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, hidden: i.formatProps.hidden, required: true },
|
|
23106
23081
|
React__default.createElement(Space, { size: 10 },
|
|
23107
|
-
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex +
|
|
23108
|
-
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter:
|
|
23109
|
-
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex +
|
|
23110
|
-
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter:
|
|
23082
|
+
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex + "_hour", rules: i.rules },
|
|
23083
|
+
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter: "\uC2DC\uAC04", type: "number" })),
|
|
23084
|
+
React__default.createElement(Form.Item, { name: i.tableProps.dataIndex + "_min", rules: i.rules },
|
|
23085
|
+
React__default.createElement(Input, { placeholder: i.placeholder, addonAfter: "\uBD84", type: "number" })))));
|
|
23111
23086
|
}
|
|
23112
|
-
else if (i.formatProps.type ===
|
|
23113
|
-
i.formatProps.customRender) {
|
|
23087
|
+
else if (i.formatProps.type === "custom" && i.formatProps.customRender) {
|
|
23114
23088
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden }, i.formatProps.customRender({
|
|
23115
23089
|
dataIndex: i.tableProps.dataIndex,
|
|
23116
23090
|
title: i.tableProps.title,
|
|
23117
23091
|
onChange(data) {
|
|
23118
23092
|
onChange(data);
|
|
23119
|
-
}
|
|
23093
|
+
},
|
|
23120
23094
|
})));
|
|
23121
23095
|
// ant_form.push(
|
|
23122
23096
|
// i.formatProps.customRender({
|
|
@@ -23128,9 +23102,9 @@ const useFormColumns = ({ isModify, columns, onChange }) => {
|
|
|
23128
23102
|
// })
|
|
23129
23103
|
// )
|
|
23130
23104
|
}
|
|
23131
|
-
else if (i.formatProps.type ===
|
|
23105
|
+
else if (i.formatProps.type === "price") {
|
|
23132
23106
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
23133
|
-
React__default.createElement(InputNumber, { ...i.formatProps.itemProps, style: { width:
|
|
23107
|
+
React__default.createElement(InputNumber, { ...i.formatProps.itemProps, style: { width: "100%", ...i.formatProps.itemProps.style }, placeholder: i.placeholder, formatter: (value) => `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ",") })));
|
|
23134
23108
|
}
|
|
23135
23109
|
else {
|
|
23136
23110
|
ant_form.push(React__default.createElement(Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
|
|
@@ -23165,21 +23139,21 @@ const UploadImage = (props) => {
|
|
|
23165
23139
|
// })
|
|
23166
23140
|
// }
|
|
23167
23141
|
const resizeFile = (file) => new Promise((resolve) => {
|
|
23168
|
-
Resizer.imageFileResizer(file, 500, 500,
|
|
23142
|
+
Resizer.imageFileResizer(file, 500, 500, "PNG", 100, 0, (uri) => {
|
|
23169
23143
|
resolve(uri);
|
|
23170
|
-
},
|
|
23144
|
+
}, "base64");
|
|
23171
23145
|
});
|
|
23172
|
-
return (React__default.createElement(Flex, { style: { padding: 2, alignItems:
|
|
23146
|
+
return (React__default.createElement(Flex, { style: { padding: 2, alignItems: "center" }, gap: 3 },
|
|
23173
23147
|
React__default.createElement(Image$1, { src: value ?? baseImage, width: 50, height: 50 }),
|
|
23174
|
-
React__default.createElement(ImgCrop, { showGrid: true, modalWidth: 800, zoomSlider: true, quality: 1, modalClassName:
|
|
23148
|
+
React__default.createElement(ImgCrop, { showGrid: true, modalWidth: 800, zoomSlider: true, quality: 1, modalClassName: "ImgCropModal", modalProps: { style: { height: 1000 } }, cropperProps: {
|
|
23175
23149
|
cropSize: { width: 500, height: 500 },
|
|
23176
23150
|
style: {},
|
|
23177
23151
|
mediaProps: {},
|
|
23178
23152
|
zoomSpeed: 1,
|
|
23179
23153
|
restrictPosition: false,
|
|
23180
|
-
keyboardStep: 1
|
|
23154
|
+
keyboardStep: 1,
|
|
23181
23155
|
} },
|
|
23182
|
-
React__default.createElement(Upload, { accept:
|
|
23156
|
+
React__default.createElement(Upload, { accept: "image/*", listType: "picture", showUploadList: false, beforeUpload: async (file) => {
|
|
23183
23157
|
try {
|
|
23184
23158
|
const image = await resizeFile(file);
|
|
23185
23159
|
onChange(image);
|
|
@@ -23192,17 +23166,17 @@ const UploadImage = (props) => {
|
|
|
23192
23166
|
} },
|
|
23193
23167
|
React__default.createElement(Button, { icon: React__default.createElement(UploadOutlined, null) }, "\uD30C\uC77C\uC120\uD0DD")))));
|
|
23194
23168
|
};
|
|
23195
|
-
const baseImage =
|
|
23169
|
+
const baseImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==";
|
|
23196
23170
|
|
|
23197
23171
|
const formItemLayout = {
|
|
23198
23172
|
labelCol: {
|
|
23199
23173
|
xs: { span: 6 },
|
|
23200
|
-
sm: { span: 6 }
|
|
23174
|
+
sm: { span: 6 },
|
|
23201
23175
|
},
|
|
23202
23176
|
wrapperCol: {
|
|
23203
23177
|
xs: { span: 15 },
|
|
23204
|
-
sm: { span: 15 }
|
|
23205
|
-
}
|
|
23178
|
+
sm: { span: 15 },
|
|
23179
|
+
},
|
|
23206
23180
|
};
|
|
23207
23181
|
const AntBaseModalCreate = ({ modalProps, formProps, props }) => {
|
|
23208
23182
|
const [form] = Form.useForm();
|
|
@@ -23215,7 +23189,7 @@ const AntBaseModalCreate = ({ modalProps, formProps, props }) => {
|
|
|
23215
23189
|
columns,
|
|
23216
23190
|
onChange: (data) => {
|
|
23217
23191
|
form.setFieldsValue(data);
|
|
23218
|
-
}
|
|
23192
|
+
},
|
|
23219
23193
|
});
|
|
23220
23194
|
useEffect(() => {
|
|
23221
23195
|
if (open && isModify && initialValues) {
|
|
@@ -23225,11 +23199,11 @@ const AntBaseModalCreate = ({ modalProps, formProps, props }) => {
|
|
|
23225
23199
|
form.setFieldsValue(value);
|
|
23226
23200
|
}
|
|
23227
23201
|
}, [open, isModify]);
|
|
23228
|
-
if (type ===
|
|
23202
|
+
if (type === "not_modal") {
|
|
23229
23203
|
return (React__default.createElement(Form, { ...formItemLayout, form: form, onFinish: onFinish },
|
|
23230
23204
|
column,
|
|
23231
23205
|
React__default.createElement(Form.Item, { wrapperCol: { span: 1, offset: 20 } },
|
|
23232
|
-
React__default.createElement(Button, { htmlType:
|
|
23206
|
+
React__default.createElement(Button, { htmlType: "submit" }, props.buttonName ?? (isModify ? FORM_MODIFY : FORM_CREATE)))));
|
|
23233
23207
|
}
|
|
23234
23208
|
return (React__default.createElement(Modal, { ...modalProps, footer: null, destroyOnClose: true, onCancel: () => {
|
|
23235
23209
|
form.resetFields();
|
|
@@ -23245,12 +23219,12 @@ const AntBaseModalCreate = ({ modalProps, formProps, props }) => {
|
|
|
23245
23219
|
column,
|
|
23246
23220
|
customColumn,
|
|
23247
23221
|
React__default.createElement(Form.Item, { wrapperCol: { span: 1, offset: 20 } },
|
|
23248
|
-
React__default.createElement(Button, { htmlType:
|
|
23222
|
+
React__default.createElement(Button, { htmlType: "submit" }, props.buttonName ?? (isModify ? FORM_MODIFY : FORM_CREATE))))));
|
|
23249
23223
|
};
|
|
23250
23224
|
|
|
23251
23225
|
const { Title } = Typography;
|
|
23252
23226
|
const { confirm } = Modal;
|
|
23253
|
-
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) => {
|
|
23227
|
+
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) => {
|
|
23254
23228
|
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
|
23255
23229
|
const [selectedRow, setSelectedRow] = useState();
|
|
23256
23230
|
const [popupCreate, setPopupCreate] = useState(false);
|
|
@@ -23258,7 +23232,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23258
23232
|
useEffect(() => {
|
|
23259
23233
|
setSelectedRow(dataSource?.find((m) => {
|
|
23260
23234
|
if (m) {
|
|
23261
|
-
let key = typeof rowKey ===
|
|
23235
|
+
let key = typeof rowKey === "function" ? rowKey(m) : m[rowKey];
|
|
23262
23236
|
return key === selectedRowKeys[0];
|
|
23263
23237
|
}
|
|
23264
23238
|
return false;
|
|
@@ -23275,7 +23249,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23275
23249
|
if (selectedRowKeys.length !== 0 && dataSource?.length !== 0) {
|
|
23276
23250
|
setSelectedRow(dataSource?.find((m) => {
|
|
23277
23251
|
if (m) {
|
|
23278
|
-
let key = typeof rowKey ===
|
|
23252
|
+
let key = typeof rowKey === "function" ? rowKey(m) : m[rowKey];
|
|
23279
23253
|
return key === selectedRowKeys[0];
|
|
23280
23254
|
}
|
|
23281
23255
|
return false;
|
|
@@ -23283,7 +23257,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23283
23257
|
if (selectProps.onUpdateData) {
|
|
23284
23258
|
selectProps.onUpdateData(dataSource?.find((m) => {
|
|
23285
23259
|
if (m) {
|
|
23286
|
-
let key = typeof rowKey ===
|
|
23260
|
+
let key = typeof rowKey === "function" ? rowKey(m) : m[rowKey];
|
|
23287
23261
|
return key === selectedRowKeys[0];
|
|
23288
23262
|
}
|
|
23289
23263
|
return false;
|
|
@@ -23298,7 +23272,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23298
23272
|
reSelection,
|
|
23299
23273
|
popupCreate,
|
|
23300
23274
|
popupModify,
|
|
23301
|
-
selectedRow
|
|
23275
|
+
selectedRow,
|
|
23302
23276
|
}), [selectedRow, popupCreate, popupModify]);
|
|
23303
23277
|
// 추가 팝업 on/off
|
|
23304
23278
|
const showCreatePopup = (show) => {
|
|
@@ -23310,7 +23284,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23310
23284
|
setPopupCreate(false);
|
|
23311
23285
|
setPopupModify(false);
|
|
23312
23286
|
if (popupModify && modifyProps) {
|
|
23313
|
-
let key = typeof rowKey ===
|
|
23287
|
+
let key = typeof rowKey === "function" ? rowKey(selectedRow) : rowKey;
|
|
23314
23288
|
modifyProps.onFun({ [key.toString()]: key, ...value }, selectedRow);
|
|
23315
23289
|
// 키 값과 함꼐 전달
|
|
23316
23290
|
}
|
|
@@ -23340,12 +23314,12 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23340
23314
|
//선택 유무
|
|
23341
23315
|
const isSelect = selectedRowKeys.length !== 0;
|
|
23342
23316
|
return (React__default.createElement("div", { className: className, style: {
|
|
23343
|
-
display:
|
|
23344
|
-
flexDirection:
|
|
23317
|
+
display: "flex",
|
|
23318
|
+
flexDirection: "column",
|
|
23345
23319
|
flex: 1,
|
|
23346
23320
|
gap: 10,
|
|
23347
|
-
height:
|
|
23348
|
-
padding:
|
|
23321
|
+
height: "100%",
|
|
23322
|
+
padding: "20px",
|
|
23349
23323
|
} },
|
|
23350
23324
|
React__default.createElement(TableTopButtonGroup, { isSelect: isSelect, isCounter: isCounter, onRefresh: onRefresh, autoRefreshTime: autoRefreshTime, addProps: addProps && {
|
|
23351
23325
|
...addProps,
|
|
@@ -23356,7 +23330,7 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23356
23330
|
else {
|
|
23357
23331
|
showCreatePopup(true);
|
|
23358
23332
|
}
|
|
23359
|
-
}
|
|
23333
|
+
},
|
|
23360
23334
|
}, modifyProps: modifyProps && {
|
|
23361
23335
|
...modifyProps,
|
|
23362
23336
|
onFun() {
|
|
@@ -23366,88 +23340,88 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23366
23340
|
else {
|
|
23367
23341
|
showModify();
|
|
23368
23342
|
}
|
|
23369
|
-
}
|
|
23343
|
+
},
|
|
23370
23344
|
}, deleteProps: deleteProps && {
|
|
23371
23345
|
...deleteProps,
|
|
23372
23346
|
onFun() {
|
|
23373
23347
|
if (selectedRow) {
|
|
23374
23348
|
let content = (rowName
|
|
23375
|
-
? typeof rowName ===
|
|
23349
|
+
? typeof rowName === "function"
|
|
23376
23350
|
? rowName(selectedRow)
|
|
23377
23351
|
: selectedRow[rowName]
|
|
23378
|
-
: typeof rowKey ===
|
|
23352
|
+
: typeof rowKey === "function"
|
|
23379
23353
|
? rowKey(selectedRow)
|
|
23380
23354
|
: selectedRow[rowKey]);
|
|
23381
23355
|
confirm({
|
|
23382
|
-
title:
|
|
23356
|
+
title: "삭제 하시겠습니까?",
|
|
23383
23357
|
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23384
23358
|
content: content,
|
|
23385
|
-
okText:
|
|
23386
|
-
okType:
|
|
23387
|
-
cancelText:
|
|
23359
|
+
okText: "Yes",
|
|
23360
|
+
okType: "danger",
|
|
23361
|
+
cancelText: "No",
|
|
23388
23362
|
onOk: () => {
|
|
23389
23363
|
deleteProps.onFun(selectedRow);
|
|
23390
23364
|
},
|
|
23391
23365
|
onCancel() {
|
|
23392
|
-
console.log(
|
|
23393
|
-
}
|
|
23366
|
+
console.log("Cancel");
|
|
23367
|
+
},
|
|
23394
23368
|
});
|
|
23395
23369
|
}
|
|
23396
|
-
}
|
|
23370
|
+
},
|
|
23397
23371
|
}, resetProps: resetProps && {
|
|
23398
23372
|
...resetProps,
|
|
23399
23373
|
onFun() {
|
|
23400
23374
|
if (selectedRow) {
|
|
23401
23375
|
let content = (rowName
|
|
23402
|
-
? typeof rowName ===
|
|
23376
|
+
? typeof rowName === "function"
|
|
23403
23377
|
? rowName(selectedRow)
|
|
23404
23378
|
: selectedRow[rowName]
|
|
23405
|
-
: typeof rowKey ===
|
|
23379
|
+
: typeof rowKey === "function"
|
|
23406
23380
|
? rowKey(selectedRow)
|
|
23407
23381
|
: selectedRow[rowKey]);
|
|
23408
23382
|
confirm({
|
|
23409
|
-
title:
|
|
23383
|
+
title: "복구 하시겠습니까?",
|
|
23410
23384
|
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23411
23385
|
content: content,
|
|
23412
|
-
okText:
|
|
23413
|
-
okType:
|
|
23414
|
-
cancelText:
|
|
23386
|
+
okText: "Yes",
|
|
23387
|
+
okType: "primary",
|
|
23388
|
+
cancelText: "No",
|
|
23415
23389
|
onOk: () => {
|
|
23416
23390
|
resetProps.onFun(selectedRow);
|
|
23417
23391
|
},
|
|
23418
23392
|
onCancel() {
|
|
23419
|
-
console.log(
|
|
23420
|
-
}
|
|
23393
|
+
console.log("Cancel");
|
|
23394
|
+
},
|
|
23421
23395
|
});
|
|
23422
23396
|
}
|
|
23423
|
-
}
|
|
23397
|
+
},
|
|
23424
23398
|
}, removeProps: removeProps && {
|
|
23425
23399
|
...removeProps,
|
|
23426
23400
|
onFun() {
|
|
23427
23401
|
if (selectedRow) {
|
|
23428
23402
|
let content = (rowName
|
|
23429
|
-
? typeof rowName ===
|
|
23403
|
+
? typeof rowName === "function"
|
|
23430
23404
|
? rowName(selectedRow)
|
|
23431
23405
|
: selectedRow[rowName]
|
|
23432
|
-
: typeof rowKey ===
|
|
23406
|
+
: typeof rowKey === "function"
|
|
23433
23407
|
? rowKey(selectedRow)
|
|
23434
23408
|
: selectedRow[rowKey]);
|
|
23435
23409
|
confirm({
|
|
23436
|
-
title:
|
|
23410
|
+
title: "완전 삭제 하시겠습니까?",
|
|
23437
23411
|
icon: React__default.createElement(ExclamationCircleOutlined, null),
|
|
23438
23412
|
content: content,
|
|
23439
|
-
okText:
|
|
23440
|
-
okType:
|
|
23441
|
-
cancelText:
|
|
23413
|
+
okText: "Yes",
|
|
23414
|
+
okType: "danger",
|
|
23415
|
+
cancelText: "No",
|
|
23442
23416
|
onOk: () => {
|
|
23443
23417
|
removeProps.onFun(selectedRow);
|
|
23444
23418
|
},
|
|
23445
23419
|
onCancel() {
|
|
23446
|
-
console.log(
|
|
23447
|
-
}
|
|
23420
|
+
console.log("Cancel");
|
|
23421
|
+
},
|
|
23448
23422
|
});
|
|
23449
23423
|
}
|
|
23450
|
-
}
|
|
23424
|
+
},
|
|
23451
23425
|
}, customProps: customProps && {
|
|
23452
23426
|
...customProps,
|
|
23453
23427
|
render: () => {
|
|
@@ -23467,38 +23441,38 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23467
23441
|
return customProps.rightRender(isSelect, selectedRow);
|
|
23468
23442
|
else
|
|
23469
23443
|
return null;
|
|
23470
|
-
}
|
|
23444
|
+
},
|
|
23471
23445
|
} }),
|
|
23472
23446
|
React__default.createElement(Table, { bordered: true, rowKey: rowKey, scroll: scroll, pagination: pageProps === false
|
|
23473
23447
|
? pageProps
|
|
23474
23448
|
: pageProps && {
|
|
23475
23449
|
showSizeChanger: false,
|
|
23476
23450
|
defaultPageSize: 20,
|
|
23477
|
-
...pageProps
|
|
23451
|
+
...pageProps,
|
|
23478
23452
|
},
|
|
23479
23453
|
// rowSelection={{ type: 'radio' }}
|
|
23480
23454
|
rowSelection: tableRowSelection({
|
|
23481
23455
|
selectedRowKeys,
|
|
23482
|
-
radioProps: selectProps?.type ===
|
|
23456
|
+
radioProps: selectProps?.type === "radio" && {
|
|
23483
23457
|
},
|
|
23484
|
-
checkboxProps: selectProps?.type ===
|
|
23458
|
+
checkboxProps: selectProps?.type === "checkbox" && {
|
|
23485
23459
|
onFun: (keys) => {
|
|
23486
23460
|
setSelectedRowKeys(keys);
|
|
23487
23461
|
if (selectProps.onFun) {
|
|
23488
23462
|
selectProps.onFun(keys);
|
|
23489
23463
|
}
|
|
23490
23464
|
},
|
|
23491
|
-
props: selectProps.checkboxProps
|
|
23492
|
-
}
|
|
23493
|
-
}), size: size ??
|
|
23465
|
+
props: selectProps.checkboxProps,
|
|
23466
|
+
},
|
|
23467
|
+
}), size: size ?? "small", onRow: (record, rowIndex) => {
|
|
23494
23468
|
return {
|
|
23495
23469
|
onClick: () => {
|
|
23496
|
-
if (selectProps?.type ===
|
|
23470
|
+
if (selectProps?.type === "radio") {
|
|
23497
23471
|
// console.log(typeof rowKey)
|
|
23498
23472
|
// console.log(
|
|
23499
23473
|
// typeof rowKey === 'function' ? rowKey(record) : rowKey
|
|
23500
23474
|
// )
|
|
23501
|
-
if (typeof rowKey ===
|
|
23475
|
+
if (typeof rowKey === "function") {
|
|
23502
23476
|
setSelectedRowKeys([rowKey(record)]);
|
|
23503
23477
|
}
|
|
23504
23478
|
else {
|
|
@@ -23522,11 +23496,11 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23522
23496
|
}, // double click row
|
|
23523
23497
|
onContextMenu: () => { }, // right button click row
|
|
23524
23498
|
onMouseEnter: () => { }, // mouse enter row
|
|
23525
|
-
onMouseLeave: () => { } // mouse leave row
|
|
23499
|
+
onMouseLeave: () => { }, // mouse leave row
|
|
23526
23500
|
};
|
|
23527
23501
|
}, onHeaderRow: () => {
|
|
23528
23502
|
return {
|
|
23529
|
-
onClick: () => { } // click header row
|
|
23503
|
+
onClick: () => { }, // click header row
|
|
23530
23504
|
};
|
|
23531
23505
|
}, dataSource: dataSource?.map((i) => i),
|
|
23532
23506
|
// columns={tableColumns(
|
|
@@ -23544,61 +23518,55 @@ const AntBaseTable$1 = ({ bordered, className, rowKey, rowName, dataSource, init
|
|
|
23544
23518
|
onFun() {
|
|
23545
23519
|
if (selectedRow)
|
|
23546
23520
|
topProps.onFun(selectedRow);
|
|
23547
|
-
}
|
|
23521
|
+
},
|
|
23548
23522
|
}, bottomProps: bottomProps && {
|
|
23549
23523
|
...bottomProps,
|
|
23550
23524
|
onFun() {
|
|
23551
23525
|
if (selectedRow)
|
|
23552
23526
|
bottomProps.onFun(selectedRow);
|
|
23553
|
-
}
|
|
23527
|
+
},
|
|
23554
23528
|
}, upProps: upProps && {
|
|
23555
23529
|
...upProps,
|
|
23556
23530
|
onFun() {
|
|
23557
23531
|
if (selectedRow)
|
|
23558
23532
|
upProps.onFun(selectedRow);
|
|
23559
|
-
}
|
|
23533
|
+
},
|
|
23560
23534
|
}, downProps: downProps && {
|
|
23561
23535
|
...downProps,
|
|
23562
23536
|
onFun() {
|
|
23563
23537
|
if (selectedRow)
|
|
23564
23538
|
downProps.onFun(selectedRow);
|
|
23565
|
-
}
|
|
23539
|
+
},
|
|
23566
23540
|
} }),
|
|
23567
23541
|
React__default.createElement(AntBaseModalCreate, { modalProps: {
|
|
23568
23542
|
width: createModalWidth,
|
|
23569
23543
|
title: (React__default.createElement("div", { style: { marginBottom: 20, marginTop: 10 } },
|
|
23570
|
-
React__default.createElement(Title, { level: 4, style: { margin: 0 } }, popupModify ?
|
|
23544
|
+
React__default.createElement(Title, { level: 4, style: { margin: 0 } }, popupModify ? "정보 수정" : "신규 등록"))),
|
|
23571
23545
|
maskClosable: false,
|
|
23572
23546
|
open: popupCreate,
|
|
23573
23547
|
onCancel: () => {
|
|
23574
23548
|
if (onCreateClose)
|
|
23575
23549
|
onCreateClose();
|
|
23576
23550
|
showCreatePopup(false);
|
|
23577
|
-
}
|
|
23551
|
+
},
|
|
23578
23552
|
}, formProps: {
|
|
23579
23553
|
initialValues: popupModify
|
|
23580
23554
|
? convert2FormData({
|
|
23581
23555
|
data: selectedRow,
|
|
23582
|
-
columns: columns
|
|
23556
|
+
columns: columns,
|
|
23583
23557
|
})
|
|
23584
23558
|
: initData
|
|
23585
23559
|
? convert2FormData({
|
|
23586
23560
|
data: initData,
|
|
23587
|
-
columns: columns
|
|
23561
|
+
columns: columns,
|
|
23588
23562
|
})
|
|
23589
23563
|
: {},
|
|
23590
|
-
onFinish: onCreate
|
|
23564
|
+
onFinish: onCreate,
|
|
23591
23565
|
}, props: {
|
|
23592
23566
|
customColumn,
|
|
23593
23567
|
customValue,
|
|
23594
|
-
columns: popupModify
|
|
23595
|
-
|
|
23596
|
-
? modifyProps?.columns
|
|
23597
|
-
: columns
|
|
23598
|
-
: addProps?.columns
|
|
23599
|
-
? addProps?.columns
|
|
23600
|
-
: columns,
|
|
23601
|
-
isModify: popupModify
|
|
23568
|
+
columns: popupModify ? (modifyProps?.columns ? modifyProps?.columns : columns) : addProps?.columns ? addProps?.columns : columns,
|
|
23569
|
+
isModify: popupModify,
|
|
23602
23570
|
} })));
|
|
23603
23571
|
};
|
|
23604
23572
|
/**
|
|
@@ -23634,7 +23602,7 @@ const SearchBox = ({ searchOption = [], searchDisabled = false, onSubmit, onRese
|
|
|
23634
23602
|
searchOption.forEach((item) => {
|
|
23635
23603
|
item.items.forEach((item2) => {
|
|
23636
23604
|
if (item2.value) {
|
|
23637
|
-
if (item2.type ===
|
|
23605
|
+
if (item2.type === "date") {
|
|
23638
23606
|
a = { ...a, ...item2.value };
|
|
23639
23607
|
}
|
|
23640
23608
|
else {
|
|
@@ -23651,17 +23619,17 @@ const SearchBox = ({ searchOption = [], searchDisabled = false, onSubmit, onRese
|
|
|
23651
23619
|
setData(null);
|
|
23652
23620
|
};
|
|
23653
23621
|
const activeEnter = (e) => {
|
|
23654
|
-
if (e.key ===
|
|
23622
|
+
if (e.key === "Enter") ;
|
|
23655
23623
|
};
|
|
23656
23624
|
return (React__default.createElement("div", { className: styles$2.searchboxFrame },
|
|
23657
23625
|
React__default.createElement("div", { className: styles$2.searchboxRow }, searchOption.map((item) => {
|
|
23658
|
-
return (React__default.createElement("div", { style: { marginBottom:
|
|
23626
|
+
return (React__default.createElement("div", { style: { marginBottom: "5px" }, key: item.key },
|
|
23659
23627
|
React__default.createElement(Row, null,
|
|
23660
23628
|
React__default.createElement(Col, { span: item.title ? 1 : 0 },
|
|
23661
|
-
React__default.createElement(Text$1, { style: { fontWeight:
|
|
23662
|
-
React__default.createElement(Col, { span: item.title ? 23 : 24, style: { textAlign:
|
|
23663
|
-
React__default.createElement(Space, { size:
|
|
23664
|
-
if (item2.type ===
|
|
23629
|
+
React__default.createElement(Text$1, { style: { fontWeight: "bold" } }, item.title)),
|
|
23630
|
+
React__default.createElement(Col, { span: item.title ? 23 : 24, style: { textAlign: "left", paddingLeft: "10px" } },
|
|
23631
|
+
React__default.createElement(Space, { size: "large", wrap: true }, item.items?.map((item2) => {
|
|
23632
|
+
if (item2.type === "select") {
|
|
23665
23633
|
return (React__default.createElement(SelectSearch, { key: item2.key, title: item2.title, options: item2.options, value: data ? data[item2.key] : item2.value, disabled: item2.disabled, onChange: (value) => {
|
|
23666
23634
|
if (item2.onChange) {
|
|
23667
23635
|
let db = item2.options?.find((i) => i.value === value);
|
|
@@ -23669,54 +23637,53 @@ const SearchBox = ({ searchOption = [], searchDisabled = false, onSubmit, onRese
|
|
|
23669
23637
|
}
|
|
23670
23638
|
setData({
|
|
23671
23639
|
...data,
|
|
23672
|
-
[item2.key]: value
|
|
23640
|
+
[item2.key]: value,
|
|
23673
23641
|
});
|
|
23674
23642
|
} }));
|
|
23675
23643
|
}
|
|
23676
|
-
else if (item2.type ===
|
|
23644
|
+
else if (item2.type === "date") {
|
|
23677
23645
|
return (React__default.createElement(DateSearch, { key: item2.key, type: item2.dateType, title: item2.title, single: item2.single, disabled: item2.disabled, value: {
|
|
23678
|
-
start: data?.[item2.key +
|
|
23679
|
-
|
|
23680
|
-
end: data?.[item2.key + '_end'] ?? null
|
|
23646
|
+
start: data?.[item2.key + "_start"] ?? null,
|
|
23647
|
+
end: data?.[item2.key + "_end"] ?? null,
|
|
23681
23648
|
}, onChange: (value) => {
|
|
23682
23649
|
setData({
|
|
23683
23650
|
...data,
|
|
23684
|
-
[item2.key +
|
|
23685
|
-
[item2.key +
|
|
23651
|
+
[item2.key + "_start"]: value.start ?? "",
|
|
23652
|
+
[item2.key + "_end"]: value.end ?? "",
|
|
23686
23653
|
});
|
|
23687
23654
|
} }));
|
|
23688
23655
|
}
|
|
23689
|
-
else if (item2.type ===
|
|
23690
|
-
return (React__default.createElement(InputSearch, { key: item2.key, title: item2.title, value: data ? data[item2.key]?.toString() :
|
|
23656
|
+
else if (item2.type === "input") {
|
|
23657
|
+
return (React__default.createElement(InputSearch, { key: item2.key, title: item2.title, value: data ? data[item2.key]?.toString() : "", disabled: item2.disabled, onChange: (value) => {
|
|
23691
23658
|
if (item2.onChange) {
|
|
23692
23659
|
let db = item2.options?.find((i) => i.value === value);
|
|
23693
23660
|
item2.onChange(db);
|
|
23694
23661
|
}
|
|
23695
23662
|
setData({
|
|
23696
23663
|
...data,
|
|
23697
|
-
[item2.key]: value
|
|
23664
|
+
[item2.key]: value,
|
|
23698
23665
|
});
|
|
23699
23666
|
}, activeEnter: activeEnter }));
|
|
23700
23667
|
}
|
|
23701
|
-
else if (item2.type ===
|
|
23668
|
+
else if (item2.type === "switch") {
|
|
23702
23669
|
return (React__default.createElement(SwitchSearch, { key: item2.key, title: item2.title, value: data ? Boolean(data[item2.key]) : false, disabled: item2.disabled, onChange: (value) => {
|
|
23703
23670
|
if (item2.onChange) {
|
|
23704
23671
|
item2.onChange(value);
|
|
23705
23672
|
}
|
|
23706
23673
|
setData({
|
|
23707
23674
|
...data,
|
|
23708
|
-
[item2.key]: value
|
|
23675
|
+
[item2.key]: value,
|
|
23709
23676
|
});
|
|
23710
23677
|
} }));
|
|
23711
23678
|
}
|
|
23712
|
-
else if (item2.type ===
|
|
23679
|
+
else if (item2.type === "check") {
|
|
23713
23680
|
return (React__default.createElement(CheckSearch, { key: item2.key, title: item2.title, value: data ? Boolean(data[item2.key]) : false, disabled: item2.disabled, onChange: (value) => {
|
|
23714
23681
|
if (item2.onChange) {
|
|
23715
23682
|
item2.onChange(value);
|
|
23716
23683
|
}
|
|
23717
23684
|
setData({
|
|
23718
23685
|
...data,
|
|
23719
|
-
[item2.key]: value
|
|
23686
|
+
[item2.key]: value,
|
|
23720
23687
|
});
|
|
23721
23688
|
} }));
|
|
23722
23689
|
}
|
|
@@ -23725,36 +23692,34 @@ const SearchBox = ({ searchOption = [], searchDisabled = false, onSubmit, onRese
|
|
|
23725
23692
|
}
|
|
23726
23693
|
}))))));
|
|
23727
23694
|
})),
|
|
23728
|
-
React__default.createElement(Space, { size:
|
|
23729
|
-
React__default.createElement(Button, { disabled: searchDisabled, type:
|
|
23730
|
-
React__default.createElement(Button, { disabled: searchDisabled, style: { width: 100 }, type:
|
|
23695
|
+
React__default.createElement(Space, { size: "small", className: styles$2.searchboxBtn },
|
|
23696
|
+
React__default.createElement(Button, { disabled: searchDisabled, type: "text", icon: React__default.createElement(RedoOutlined, null), onClick: resetSubmit }, "\uC120\uD0DD\uCD08\uAE30\uD654"),
|
|
23697
|
+
React__default.createElement(Button, { disabled: searchDisabled, style: { width: 100 }, type: "primary", onClick: (e) => {
|
|
23731
23698
|
let id = [];
|
|
23732
23699
|
searchOption.forEach((item) => {
|
|
23733
23700
|
item.items.forEach((item2) => {
|
|
23734
23701
|
if (data) {
|
|
23735
|
-
if (item2.type ===
|
|
23736
|
-
data[item2.key + '_start'] &&
|
|
23737
|
-
data[item2.key + '_end']) {
|
|
23702
|
+
if (item2.type === "date" && data[item2.key + "_start"] && data[item2.key + "_end"]) {
|
|
23738
23703
|
id = id.concat([
|
|
23739
23704
|
{
|
|
23740
|
-
key: item2.key +
|
|
23741
|
-
id: data[item2.key +
|
|
23705
|
+
key: item2.key + "_start",
|
|
23706
|
+
id: data[item2.key + "_start"],
|
|
23742
23707
|
},
|
|
23743
|
-
{ key: item2.key +
|
|
23708
|
+
{ key: item2.key + "_end", id: data[item2.key + "_end"] },
|
|
23744
23709
|
]);
|
|
23745
23710
|
}
|
|
23746
23711
|
else {
|
|
23747
23712
|
if (data[item2.key]) {
|
|
23748
23713
|
id.push({
|
|
23749
23714
|
key: item2.key,
|
|
23750
|
-
id: data[item2.key]
|
|
23715
|
+
id: data[item2.key],
|
|
23751
23716
|
});
|
|
23752
23717
|
}
|
|
23753
23718
|
}
|
|
23754
23719
|
}
|
|
23755
23720
|
});
|
|
23756
23721
|
});
|
|
23757
|
-
var searchQuery =
|
|
23722
|
+
var searchQuery = "";
|
|
23758
23723
|
id.forEach((item, index) => {
|
|
23759
23724
|
let txt = `${item.key}=${item.id}`;
|
|
23760
23725
|
if (index == 0)
|
|
@@ -23765,14 +23730,14 @@ const SearchBox = ({ searchOption = [], searchDisabled = false, onSubmit, onRese
|
|
|
23765
23730
|
onSubmit && onSubmit(searchQuery, data);
|
|
23766
23731
|
} }, "\uC870\uD68C"))));
|
|
23767
23732
|
};
|
|
23768
|
-
const SwitchSearch = ({ title, value, disabled = false, onChange }) => {
|
|
23733
|
+
const SwitchSearch = ({ title, value, disabled = false, onChange, }) => {
|
|
23769
23734
|
return (React__default.createElement(Space, null,
|
|
23770
23735
|
title && React__default.createElement(Text$1, null, title),
|
|
23771
23736
|
React__default.createElement(Switch, { disabled: disabled, onChange: (value) => {
|
|
23772
23737
|
onChange(value);
|
|
23773
23738
|
}, value: value })));
|
|
23774
23739
|
};
|
|
23775
|
-
const CheckSearch = ({ title, value, disabled = false, onChange }) => {
|
|
23740
|
+
const CheckSearch = ({ title, value, disabled = false, onChange, }) => {
|
|
23776
23741
|
return (React__default.createElement(Space, null,
|
|
23777
23742
|
title && React__default.createElement(Text$1, null, title),
|
|
23778
23743
|
React__default.createElement(Checkbox, { disabled: disabled, onChange: (value) => {
|
|
@@ -23780,48 +23745,48 @@ const CheckSearch = ({ title, value, disabled = false, onChange }) => {
|
|
|
23780
23745
|
onChange(value.target.checked);
|
|
23781
23746
|
}, checked: value })));
|
|
23782
23747
|
};
|
|
23783
|
-
const SelectSearch = ({ title, options, value, disabled = false, onChange }) => {
|
|
23748
|
+
const SelectSearch = ({ title, options, value, disabled = false, onChange, }) => {
|
|
23784
23749
|
return (React__default.createElement(Space, null,
|
|
23785
23750
|
title && React__default.createElement(Text$1, null, title),
|
|
23786
|
-
React__default.createElement(Select, { disabled: disabled, style: { minWidth:
|
|
23751
|
+
React__default.createElement(Select, { disabled: disabled, style: { minWidth: "120px" }, options: options, onChange: (value) => {
|
|
23787
23752
|
onChange(value);
|
|
23788
23753
|
}, value: value })));
|
|
23789
23754
|
};
|
|
23790
|
-
const DateSearch = ({ single = false, type, title, value, disabled = false, onChange }) => {
|
|
23755
|
+
const DateSearch = ({ single = false, type, title, value, disabled = false, onChange, }) => {
|
|
23791
23756
|
if (single) {
|
|
23792
23757
|
return (React__default.createElement(Space, null,
|
|
23793
23758
|
title && React__default.createElement(Text$1, null, title),
|
|
23794
|
-
React__default.createElement(DatePicker, { picker: type ??
|
|
23759
|
+
React__default.createElement(DatePicker, { picker: type ?? "date",
|
|
23795
23760
|
// disabledDate={disabledDate}
|
|
23796
|
-
value: value.start ? dayjs(value.start) : undefined, placeholder:
|
|
23761
|
+
value: value.start ? dayjs(value.start) : undefined, placeholder: "", disabled: disabled, onChange: (e) => {
|
|
23797
23762
|
if (e) {
|
|
23798
|
-
let format =
|
|
23799
|
-
if (type ===
|
|
23800
|
-
format =
|
|
23763
|
+
let format = "YYYY-MM-DD 00:00:00";
|
|
23764
|
+
if (type === "year") {
|
|
23765
|
+
format = "YYYY";
|
|
23801
23766
|
onChange({
|
|
23802
23767
|
start: e?.format(format) ?? null,
|
|
23803
|
-
end: null
|
|
23768
|
+
end: null,
|
|
23804
23769
|
});
|
|
23805
23770
|
}
|
|
23806
|
-
else if (type ===
|
|
23807
|
-
format =
|
|
23771
|
+
else if (type === "month") {
|
|
23772
|
+
format = "YYYY-MM";
|
|
23808
23773
|
onChange({
|
|
23809
23774
|
start: e?.format(format) ?? null,
|
|
23810
|
-
end: null
|
|
23775
|
+
end: null,
|
|
23811
23776
|
});
|
|
23812
23777
|
}
|
|
23813
|
-
else if (type ===
|
|
23814
|
-
format =
|
|
23778
|
+
else if (type === "date") {
|
|
23779
|
+
format = "YYYY-MM-DD HH:mm:ss";
|
|
23815
23780
|
onChange({
|
|
23816
23781
|
start: e?.format(format) ?? null,
|
|
23817
|
-
end: null
|
|
23782
|
+
end: null,
|
|
23818
23783
|
});
|
|
23819
23784
|
}
|
|
23820
|
-
else if (type ===
|
|
23821
|
-
format =
|
|
23785
|
+
else if (type === "time") {
|
|
23786
|
+
format = "YYYY-MM-DD HH:mm:ss";
|
|
23822
23787
|
onChange({
|
|
23823
23788
|
start: e?.format(format) ?? null,
|
|
23824
|
-
end: null
|
|
23789
|
+
end: null,
|
|
23825
23790
|
});
|
|
23826
23791
|
}
|
|
23827
23792
|
}
|
|
@@ -23832,42 +23797,37 @@ const DateSearch = ({ single = false, type, title, value, disabled = false, onCh
|
|
|
23832
23797
|
}
|
|
23833
23798
|
return (React__default.createElement(Space, null,
|
|
23834
23799
|
title && React__default.createElement(Text$1, null, title),
|
|
23835
|
-
React__default.createElement(RangePicker, { picker: type ??
|
|
23800
|
+
React__default.createElement(RangePicker, { picker: type ?? "date",
|
|
23836
23801
|
// disabledDate={disabledDate}
|
|
23837
|
-
disabled: disabled, value: value
|
|
23838
|
-
? [
|
|
23839
|
-
value.start ? dayjs(value.start) : undefined,
|
|
23840
|
-
value.end ? dayjs(value.end) : undefined
|
|
23841
|
-
]
|
|
23842
|
-
: null, placeholder: ['', ''], onChange: (e) => {
|
|
23802
|
+
disabled: disabled, value: value ? [value.start ? dayjs(value.start) : undefined, value.end ? dayjs(value.end) : undefined] : null, placeholder: ["", ""], onChange: (e) => {
|
|
23843
23803
|
if (e) {
|
|
23844
|
-
let format =
|
|
23845
|
-
if (type ===
|
|
23846
|
-
format =
|
|
23804
|
+
let format = "YYYY-MM-DD 00:00:00";
|
|
23805
|
+
if (type === "year") {
|
|
23806
|
+
format = "YYYY";
|
|
23847
23807
|
onChange({
|
|
23848
23808
|
start: e[0]?.format(format) ?? null,
|
|
23849
|
-
end: e[1]?.format(format) ?? null
|
|
23809
|
+
end: e[1]?.format(format) ?? null,
|
|
23850
23810
|
});
|
|
23851
23811
|
}
|
|
23852
|
-
else if (type ===
|
|
23853
|
-
format =
|
|
23812
|
+
else if (type === "month") {
|
|
23813
|
+
format = "YYYY-MM";
|
|
23854
23814
|
onChange({
|
|
23855
23815
|
start: e[0]?.format(format) ?? null,
|
|
23856
|
-
end: e[1]?.format(format) ?? null
|
|
23816
|
+
end: e[1]?.format(format) ?? null,
|
|
23857
23817
|
});
|
|
23858
23818
|
}
|
|
23859
|
-
else if (type ===
|
|
23860
|
-
format =
|
|
23819
|
+
else if (type === "date") {
|
|
23820
|
+
format = "YYYY-MM-DD HH:mm:ss";
|
|
23861
23821
|
onChange({
|
|
23862
|
-
start: e[0]?.startOf(
|
|
23863
|
-
end: e[1]?.endOf(
|
|
23822
|
+
start: e[0]?.startOf("date").format(format) ?? null,
|
|
23823
|
+
end: e[1]?.endOf("date").format(format) ?? null,
|
|
23864
23824
|
});
|
|
23865
23825
|
}
|
|
23866
|
-
else if (type ===
|
|
23867
|
-
format =
|
|
23826
|
+
else if (type === "time") {
|
|
23827
|
+
format = "YYYY-MM-DD HH:mm:ss";
|
|
23868
23828
|
onChange({
|
|
23869
23829
|
start: e[0]?.format(format) ?? null,
|
|
23870
|
-
end: e[1]?.format(format) ?? null
|
|
23830
|
+
end: e[1]?.format(format) ?? null,
|
|
23871
23831
|
});
|
|
23872
23832
|
}
|
|
23873
23833
|
}
|
|
@@ -23876,10 +23836,10 @@ const DateSearch = ({ single = false, type, title, value, disabled = false, onCh
|
|
|
23876
23836
|
}
|
|
23877
23837
|
} })));
|
|
23878
23838
|
};
|
|
23879
|
-
const InputSearch = ({ title, value, disabled = false, onChange, activeEnter }) => {
|
|
23839
|
+
const InputSearch = ({ title, value, disabled = false, onChange, activeEnter, }) => {
|
|
23880
23840
|
return (React__default.createElement(Space, null,
|
|
23881
23841
|
title && React__default.createElement(Text$1, null, title),
|
|
23882
|
-
React__default.createElement(Input, { style: { width:
|
|
23842
|
+
React__default.createElement(Input, { style: { width: "170px" }, disabled: disabled, onChange: (e) => {
|
|
23883
23843
|
onChange(e.target.value);
|
|
23884
23844
|
}, value: value, onKeyDown: (e) => activeEnter(e) })));
|
|
23885
23845
|
};
|
|
@@ -24011,32 +23971,32 @@ const ErrorPage = ({ name, message, onHome }) => {
|
|
|
24011
23971
|
* 로딩 레이아웃
|
|
24012
23972
|
* @author 신민우
|
|
24013
23973
|
*/
|
|
24014
|
-
const LoadingLayout = ({ tip, isLoading, error, isError, style, children, className, notFullScreen }) => {
|
|
23974
|
+
const LoadingLayout = ({ tip, isLoading, error, isError, style, children, className, notFullScreen, }) => {
|
|
24015
23975
|
if (isError && error) {
|
|
24016
|
-
return (React__default.createElement(Flex, { flex: 1, style: { alignItems:
|
|
23976
|
+
return (React__default.createElement(Flex, { flex: 1, style: { alignItems: "center", justifyContent: "center" } },
|
|
24017
23977
|
React__default.createElement(ErrorPage, { name: error.name, message: error.message })));
|
|
24018
23978
|
}
|
|
24019
23979
|
return (React__default.createElement(Flex, { className: className, flex: 1, style: {
|
|
24020
23980
|
...style,
|
|
24021
|
-
alignItems:
|
|
24022
|
-
height:
|
|
24023
|
-
overflowY:
|
|
24024
|
-
overflowX:
|
|
24025
|
-
marginBottom:
|
|
24026
|
-
width:
|
|
23981
|
+
alignItems: "flex-start",
|
|
23982
|
+
height: "100%",
|
|
23983
|
+
overflowY: "auto",
|
|
23984
|
+
overflowX: "hidden",
|
|
23985
|
+
marginBottom: "60px",
|
|
23986
|
+
width: "100%",
|
|
24027
23987
|
}, vertical: true },
|
|
24028
23988
|
React__default.createElement("div", { style: {
|
|
24029
|
-
position:
|
|
24030
|
-
width:
|
|
24031
|
-
height:
|
|
24032
|
-
background:
|
|
23989
|
+
position: "absolute",
|
|
23990
|
+
width: "calc(100vw - 350px)",
|
|
23991
|
+
height: "calc(100vh - 350px)",
|
|
23992
|
+
background: "#ffffffcc",
|
|
24033
23993
|
zIndex: isLoading ? 1001 : -1,
|
|
24034
|
-
display:
|
|
24035
|
-
justifyContent:
|
|
24036
|
-
alignItems:
|
|
23994
|
+
display: "flex",
|
|
23995
|
+
justifyContent: "center",
|
|
23996
|
+
alignItems: "center",
|
|
24037
23997
|
opacity: isLoading ? 1 : 0,
|
|
24038
|
-
transition:
|
|
24039
|
-
} }, isLoading && (React__default.createElement(Spin, { fullscreen: notFullScreen === undefined ? false : true, tip: notFullScreen === undefined ? undefined : tip ??
|
|
23998
|
+
transition: "opacity 0.5s",
|
|
23999
|
+
} }, isLoading && (React__default.createElement(Spin, { fullscreen: notFullScreen === undefined ? false : true, tip: notFullScreen === undefined ? undefined : tip ?? "목록 불러오는중", size: "large", indicator: React__default.createElement(LoadingOutlined, { style: { fontSize: 48 }, spin: true }) }))),
|
|
24040
24000
|
children));
|
|
24041
24001
|
};
|
|
24042
24002
|
|
|
@@ -24100,5 +24060,5 @@ const TitleBox = ({ title, decs }) => {
|
|
|
24100
24060
|
React__default.createElement("div", { className: styles$1.decs }, decs)));
|
|
24101
24061
|
};
|
|
24102
24062
|
|
|
24103
|
-
export { AntBaseModalCreate, AntBaseTable, AuthTable, ContentLayout,
|
|
24063
|
+
export { AntBaseModalCreate, AntBaseTable, AuthTable, ContentLayout, TbFrame, TbProvider, TbpProvider, Tbpage, TbpageMulti, TbpageSm, tbContext, useTbState };
|
|
24104
24064
|
//# sourceMappingURL=index.js.map
|