@thefreshop/tb 1.0.24 → 1.0.26

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.js CHANGED
@@ -574,7 +574,7 @@ const TbFrame = ({ setting, top, bottom, nav, top_banner, hashmode = false, }) =
574
574
  },
575
575
  ]);
576
576
  }
577
- }, [hashmode, user]);
577
+ }, [hashmode, user, top, nav, setting, top_banner, bottom]);
578
578
  return React.createElement(reactRouter.RouterProvider, { router: router });
579
579
  };
580
580
  const MainLayout = ({ errMsg, setting, top_banner, nav, user, top, bottom, }) => {
@@ -23084,7 +23084,7 @@ const useFormColumns = ({ isModify, columns, onChange, }) => {
23084
23084
  }
23085
23085
  else if (i.formatProps.type === "code") {
23086
23086
  ant_form.push(React.createElement(antd.Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
23087
- React.createElement(antd.Input, { ...i.formatProps.itemProps, placeholder: i.placeholder, defaultValue: moment$1().format("X") })));
23087
+ React.createElement(antd.Input, { ...i.formatProps.itemProps, placeholder: i.placeholder, initialValues: moment$1().format("X") })));
23088
23088
  }
23089
23089
  else if (i.formatProps.type === "switch") {
23090
23090
  ant_form.push(React.createElement(antd.Form.Item, { key: i.tableProps.dataIndex, name: i.tableProps.dataIndex, label: i.tableProps.title, tooltip: i.tooltip, rules: i.rules, hidden: i.formatProps.hidden },
@@ -23222,7 +23222,7 @@ const useFormColumns = ({ isModify, columns, onChange, }) => {
23222
23222
  * @author 송영내
23223
23223
  */
23224
23224
  const UploadImage = (props) => {
23225
- const { onChange, value } = props;
23225
+ const { onChange, value, maxWidth = 500, maxHeight = 500, compressFormat = "PNG", quality = 100, outputType = "blob" } = props;
23226
23226
  // const readfileData = (file: any) => {
23227
23227
  // return new Promise<string>((resolve, reject) => {
23228
23228
  // if (file) {
@@ -23237,17 +23237,17 @@ const UploadImage = (props) => {
23237
23237
  // })
23238
23238
  // }
23239
23239
  const resizeFile = (file) => new Promise((resolve) => {
23240
- Resizer.imageFileResizer(file, 500, 500, "PNG", 100, 0, (uri) => {
23240
+ Resizer.imageFileResizer(file, maxWidth, maxHeight, compressFormat, quality, 0, (uri) => {
23241
23241
  resolve(uri);
23242
- }, "base64");
23242
+ }, outputType);
23243
23243
  });
23244
23244
  return (React.createElement(antd.Flex, { style: { padding: 2, alignItems: "center" }, gap: 3 },
23245
23245
  React.createElement(antd.Image, { src: value ?? baseImage, width: 50, height: 50 }),
23246
- React.createElement(ImgCrop, { showGrid: true, modalWidth: 800, zoomSlider: true, quality: 1, modalClassName: "ImgCropModal", modalProps: { style: { height: 1000 } }, cropperProps: {
23247
- cropSize: { width: 500, height: 500 },
23246
+ React.createElement(ImgCrop, { showGrid: true, modalWidth: 800, zoomSlider: true, quality: 1, minZoom: 0.1, modalClassName: "ImgCropModal", modalProps: { style: { height: 600 } }, cropperProps: {
23247
+ cropSize: { width: maxWidth, height: maxHeight },
23248
23248
  style: {},
23249
23249
  mediaProps: {},
23250
- zoomSpeed: 1,
23250
+ zoomSpeed: 0.1,
23251
23251
  restrictPosition: false,
23252
23252
  keyboardStep: 1,
23253
23253
  } },