@thefreshop/tb 1.0.24 → 1.0.25
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 +7 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/antBaseTable.types.d.ts +13 -13
- package/dist/esm/index.js +7 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/antBaseTable.types.d.ts +13 -13
- package/dist/index.d.ts +10 -10
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -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,
|
|
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,
|
|
23240
|
+
Resizer.imageFileResizer(file, maxWidth, maxHeight, compressFormat, quality, 0, (uri) => {
|
|
23241
23241
|
resolve(uri);
|
|
23242
|
-
},
|
|
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:
|
|
23247
|
-
cropSize: { width:
|
|
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
|
} },
|