@apexcura/ui-components 0.0.13-Beta72 → 0.0.13-Beta73
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/index.js +3 -2
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -909,7 +909,7 @@ var import_icons6 = require("@ant-design/icons");
|
|
|
909
909
|
var FileUpload = (props) => {
|
|
910
910
|
const [files, setFiles] = (0, import_react27.useState)([]);
|
|
911
911
|
const beforeUpload = (file) => {
|
|
912
|
-
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(file.type);
|
|
912
|
+
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "file/pdf"].includes(file.type);
|
|
913
913
|
if (!isCorrectFile) {
|
|
914
914
|
import_antd20.message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg)`);
|
|
915
915
|
return import_antd20.Upload.LIST_IGNORE;
|
|
@@ -929,6 +929,7 @@ var FileUpload = (props) => {
|
|
|
929
929
|
return /* @__PURE__ */ import_react27.default.createElement("div", null, /* @__PURE__ */ import_react27.default.createElement(
|
|
930
930
|
import_antd20.Upload,
|
|
931
931
|
{
|
|
932
|
+
action: "",
|
|
932
933
|
accept: props.accept,
|
|
933
934
|
listType: props.list_type,
|
|
934
935
|
maxCount: props.max_count,
|
|
@@ -938,7 +939,7 @@ var FileUpload = (props) => {
|
|
|
938
939
|
onChange: handleChange,
|
|
939
940
|
showUploadList: true
|
|
940
941
|
},
|
|
941
|
-
/* @__PURE__ */ import_react27.default.createElement(
|
|
942
|
+
/* @__PURE__ */ import_react27.default.createElement(import_antd20.Button, { icon: /* @__PURE__ */ import_react27.default.createElement(import_icons6.UploadOutlined, null) }, "Click to Upload")
|
|
942
943
|
));
|
|
943
944
|
};
|
|
944
945
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -847,12 +847,12 @@ var MultiSelect = (props) => {
|
|
|
847
847
|
|
|
848
848
|
// src/Components/FilesUpload.tsx
|
|
849
849
|
import React27, { useState as useState9 } from "react";
|
|
850
|
-
import { Upload as Upload2, message } from "antd";
|
|
851
|
-
import {
|
|
850
|
+
import { Button as Button3, Upload as Upload2, message } from "antd";
|
|
851
|
+
import { UploadOutlined } from "@ant-design/icons";
|
|
852
852
|
var FileUpload = (props) => {
|
|
853
853
|
const [files, setFiles] = useState9([]);
|
|
854
854
|
const beforeUpload = (file) => {
|
|
855
|
-
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(file.type);
|
|
855
|
+
const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "file/pdf"].includes(file.type);
|
|
856
856
|
if (!isCorrectFile) {
|
|
857
857
|
message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg)`);
|
|
858
858
|
return Upload2.LIST_IGNORE;
|
|
@@ -872,6 +872,7 @@ var FileUpload = (props) => {
|
|
|
872
872
|
return /* @__PURE__ */ React27.createElement("div", null, /* @__PURE__ */ React27.createElement(
|
|
873
873
|
Upload2,
|
|
874
874
|
{
|
|
875
|
+
action: "",
|
|
875
876
|
accept: props.accept,
|
|
876
877
|
listType: props.list_type,
|
|
877
878
|
maxCount: props.max_count,
|
|
@@ -881,7 +882,7 @@ var FileUpload = (props) => {
|
|
|
881
882
|
onChange: handleChange,
|
|
882
883
|
showUploadList: true
|
|
883
884
|
},
|
|
884
|
-
/* @__PURE__ */ React27.createElement(
|
|
885
|
+
/* @__PURE__ */ React27.createElement(Button3, { icon: /* @__PURE__ */ React27.createElement(UploadOutlined, null) }, "Click to Upload")
|
|
885
886
|
));
|
|
886
887
|
};
|
|
887
888
|
export {
|