@thefreshop/tb 1.0.17 → 1.0.18

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.
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  export declare const Files: (props: any) => React.JSX.Element;
3
3
  export declare const DatePickerText: (props: any) => React.JSX.Element;
package/dist/esm/index.js CHANGED
@@ -21161,7 +21161,7 @@ const readfileData = (file) => {
21161
21161
  };
21162
21162
  }
21163
21163
  else {
21164
- reject('not_file');
21164
+ reject("not_file");
21165
21165
  }
21166
21166
  });
21167
21167
  };
@@ -21174,25 +21174,25 @@ const Files = (props) => {
21174
21174
  return;
21175
21175
  let init = props.initialValues[props.id];
21176
21176
  if (init) {
21177
- if (typeof init === 'string') {
21177
+ if (typeof init === "string") {
21178
21178
  setFileList([
21179
21179
  {
21180
21180
  fileData: init,
21181
- name: '',
21182
- status: 'done',
21181
+ name: "",
21182
+ status: "done",
21183
21183
  thumbUrl: init,
21184
- uid: props.id
21185
- }
21184
+ uid: props.id,
21185
+ },
21186
21186
  ]);
21187
21187
  }
21188
21188
  else
21189
21189
  setFileList(init.map((i) => {
21190
21190
  return {
21191
21191
  fileData: i,
21192
- name: '',
21193
- status: 'done',
21192
+ name: "",
21193
+ status: "done",
21194
21194
  thumbUrl: i,
21195
- uid: props.id
21195
+ uid: props.id,
21196
21196
  };
21197
21197
  }));
21198
21198
  }
@@ -21205,8 +21205,8 @@ const Files = (props) => {
21205
21205
  onChange(fileList);
21206
21206
  }
21207
21207
  }, [fileList, props.count, onChange]);
21208
- return (React__default.createElement(Upload, { listType: props.listType, accept: props.listType === 'picture' ? 'image/*' : '', fileList: fileList, showUploadList: {
21209
- removeIcon: 'x'
21208
+ return (React__default.createElement(Upload, { listType: props.listType, accept: props.listType === "picture" ? "image/*" : "", fileList: fileList, showUploadList: {
21209
+ removeIcon: "x",
21210
21210
  }, onRemove: (file) => {
21211
21211
  const index = fileList.indexOf(file);
21212
21212
  const newFileList = fileList.slice();
@@ -21223,17 +21223,18 @@ const Files = (props) => {
21223
21223
  {
21224
21224
  uid: file.uid,
21225
21225
  name: file.name,
21226
- status: 'done',
21226
+ status: "done",
21227
21227
  fileData: fileData,
21228
- thumbUrl: fileData
21229
- }
21228
+ thumbUrl: fileData,
21229
+ file: file,
21230
+ },
21230
21231
  ]);
21231
21232
  if (props.setImgCheck)
21232
21233
  props.setImgCheck(true);
21233
21234
  return false;
21234
21235
  } }, fileList.length >= props.count ? null : (React__default.createElement(React__default.Fragment, null,
21235
21236
  React__default.createElement(Button, { icon: React__default.createElement(UploadOutlined, null) }, "\uD30C\uC77C\uC120\uD0DD"),
21236
- fileList.length === 0 ? ' 선택된 파일 없음' : null))));
21237
+ fileList.length === 0 ? " 선택된 파일 없음" : null))));
21237
21238
  };
21238
21239
 
21239
21240
  /******************************************************************************