sti-antd-package 0.0.51 → 0.0.52

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.
@@ -16,6 +16,7 @@ interface UploadDragger {
16
16
  customRequest?: (options: UploadRequestOption<any>) => void;
17
17
  onChange?: (info: UploadChangeParam<UploadFile<any>>) => void;
18
18
  onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
19
+ onPreview?: (file: UploadFile<any>) => void;
19
20
  defaultFileList?: UploadFile<any>[];
20
21
  }
21
22
  export type UploadDraggerComponentProps = FormItemUploadDragger & UploadDragger;
package/dist/index.d.ts CHANGED
@@ -1104,6 +1104,7 @@ interface UploadDragger {
1104
1104
  customRequest?: (options: UploadRequestOption<any>) => void;
1105
1105
  onChange?: (info: UploadChangeParam<UploadFile<any>>) => void;
1106
1106
  onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
1107
+ onPreview?: (file: UploadFile<any>) => void;
1107
1108
  defaultFileList?: UploadFile<any>[];
1108
1109
  }
1109
1110
  type UploadDraggerComponentProps = FormItemUploadDragger & UploadDragger;
package/dist/index.esm.js CHANGED
@@ -23339,7 +23339,7 @@ const normFile = (event) => {
23339
23339
  return event;
23340
23340
  return event && event['fileList'];
23341
23341
  };
23342
- const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onDrop, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
23342
+ const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onDrop, onPreview, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
23343
23343
  const handleChange = (info) => {
23344
23344
  removeError === null || removeError === void 0 ? void 0 : removeError(name);
23345
23345
  onChange === null || onChange === void 0 ? void 0 : onChange(info);
@@ -23349,7 +23349,7 @@ const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled,
23349
23349
  const classDragger = [];
23350
23350
  classNames && classDragger.push(...classNames);
23351
23351
  readOnly && classDragger.push(style['readonly']);
23352
- const dragger = !loading ? (jsxRuntimeExports.jsxs(Dragger, { multiple: multiple, disabled: disabled || readOnly, listType: listType, rootClassName: rootClassDragger.join(' '), className: classDragger.join(' '), accept: accept === null || accept === void 0 ? void 0 : accept.map(accept => acceptFormat(accept)).join(', '), action: action, withCredentials: withCredentials, beforeUpload: beforeUpload, customRequest: customRequest, onChange: handleChange, onDrop: onDrop, defaultFileList: defaultFileList, children: [jsxRuntimeExports.jsx("p", { className: "ant-upload-drag-icon", children: jsxRuntimeExports.jsx(RefIcon$6, {}) }), jsxRuntimeExports.jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), jsxRuntimeExports.jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
23352
+ const dragger = !loading ? (jsxRuntimeExports.jsxs(Dragger, { multiple: multiple, disabled: disabled || readOnly, listType: listType, rootClassName: rootClassDragger.join(' '), className: classDragger.join(' '), accept: accept === null || accept === void 0 ? void 0 : accept.map(accept => acceptFormat(accept)).join(', '), action: action, withCredentials: withCredentials, beforeUpload: beforeUpload, customRequest: customRequest, onChange: handleChange, onDrop: onDrop, onPreview: onPreview, defaultFileList: defaultFileList, children: [jsxRuntimeExports.jsx("p", { className: "ant-upload-drag-icon", children: jsxRuntimeExports.jsx(RefIcon$6, {}) }), jsxRuntimeExports.jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), jsxRuntimeExports.jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
23353
23353
  return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: validateStatus, help: help, children: dragger })))
23354
23354
  : dragger }));
23355
23355
  };
package/dist/index.js CHANGED
@@ -23358,7 +23358,7 @@ const normFile = (event) => {
23358
23358
  return event;
23359
23359
  return event && event['fileList'];
23360
23360
  };
23361
- const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onDrop, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
23361
+ const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled, listType, formClassNames, rootClassNames, classNames, accept, action, withCredentials, beforeUpload, customRequest, removeError, onChange, onDrop, onPreview, defaultFileList, formColLayout, name, label, required, rules, ruleType, ruleMessage, validateStatus, help, }) => {
23362
23362
  const handleChange = (info) => {
23363
23363
  removeError === null || removeError === void 0 ? void 0 : removeError(name);
23364
23364
  onChange === null || onChange === void 0 ? void 0 : onChange(info);
@@ -23368,7 +23368,7 @@ const UploadDraggerComponent = ({ noItem, readOnly, multiple, loading, disabled,
23368
23368
  const classDragger = [];
23369
23369
  classNames && classDragger.push(...classNames);
23370
23370
  readOnly && classDragger.push(style['readonly']);
23371
- const dragger = !loading ? (jsxRuntimeExports.jsxs(Dragger, { multiple: multiple, disabled: disabled || readOnly, listType: listType, rootClassName: rootClassDragger.join(' '), className: classDragger.join(' '), accept: accept === null || accept === void 0 ? void 0 : accept.map(accept => acceptFormat(accept)).join(', '), action: action, withCredentials: withCredentials, beforeUpload: beforeUpload, customRequest: customRequest, onChange: handleChange, onDrop: onDrop, defaultFileList: defaultFileList, children: [jsxRuntimeExports.jsx("p", { className: "ant-upload-drag-icon", children: jsxRuntimeExports.jsx(RefIcon$6, {}) }), jsxRuntimeExports.jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), jsxRuntimeExports.jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) : jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
23371
+ const dragger = !loading ? (jsxRuntimeExports.jsxs(Dragger, { multiple: multiple, disabled: disabled || readOnly, listType: listType, rootClassName: rootClassDragger.join(' '), className: classDragger.join(' '), accept: accept === null || accept === void 0 ? void 0 : accept.map(accept => acceptFormat(accept)).join(', '), action: action, withCredentials: withCredentials, beforeUpload: beforeUpload, customRequest: customRequest, onChange: handleChange, onDrop: onDrop, onPreview: onPreview, defaultFileList: defaultFileList, children: [jsxRuntimeExports.jsx("p", { className: "ant-upload-drag-icon", children: jsxRuntimeExports.jsx(RefIcon$6, {}) }), jsxRuntimeExports.jsx("p", { className: "ant-upload-text", children: "Click or drag file to this area to upload" }), jsxRuntimeExports.jsx("p", { className: "ant-upload-hint", children: "Support for a single or bulk upload. Strictly prohibited from uploading company data or other banned files." })] })) : jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
23372
23372
  return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent$1, Object.assign({}, formColLayout, { name: name, label: label, classNames: formClassNames, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, valuePropName: "fileList", getValueFromEvent: normFile, validateStatus: validateStatus, help: help, children: dragger })))
23373
23373
  : dragger }));
23374
23374
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sti-antd-package",
3
3
  "description": "STI ANT Design",
4
- "version": "0.0.51",
4
+ "version": "0.0.52",
5
5
  "type": "module",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",