px-react-ui-components 1.1.28 → 1.1.29

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.
@@ -46,7 +46,9 @@ const MyFileUploadAcceptType = exports.MyFileUploadAcceptType = {
46
46
  IMAGE: "image",
47
47
  MEDIA: "media",
48
48
  PDF: "pdf",
49
- IMAGEPDF: "imagepdf"
49
+ IMAGEPDF: "imagepdf",
50
+ IMAGEPDFWORDEXCEL: "imagepdfwordexcel",
51
+ IMAGEVIDEOPDFWORDEXCEL: "imagevideopdfwordexcel"
50
52
  };
51
53
  Object.freeze(MyFileUploadAcceptType);
52
54
  function MyFileUpload({
@@ -77,7 +79,7 @@ function MyFileUpload({
77
79
  const [devices, setDevices] = (0, _react.useState)([]);
78
80
  const [selectedDeviceId, setSelectedDeviceId] = (0, _react.useState)("");
79
81
  const fileInputRef = (0, _react.useRef)(null);
80
- let type_files = ".pdf,.rar,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx,msword,msexcel,vnd.ms-excel,vnd.openxmlformats-officedocument.spreadsheetml.sheet,vnd.openxmlformats-officedocument.wordprocessingml.document";
82
+ let type_files = ".pdf,.rar,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx," + "msword,msexcel,vnd.ms-excel," + "vnd.openxmlformats-officedocument.wordprocessingml.document," + "vnd.openxmlformats-officedocument.wordprocessingml.template," + "vnd.ms-word.document.macroEnabled.12,vnd.ms-word.template.macroEnabled.12," + "vnd.openxmlformats-officedocument.spreadsheetml.sheet," + "vnd.openxmlformats-officedocument.spreadsheetml.template," + "vnd.ms-excel.sheet.macroEnabled.12,vnd.ms-excel.template.macroEnabled.12," + "vnd.ms-excel.sheet.binary.macroEnabled.12," + "vnd.ms-powerpoint," + "vnd.openxmlformats-officedocument.presentationml.presentation," + "vnd.ms-powerpoint.presentation.macroEnabled.12";
81
83
  let type_image = ".jpg,.jpeg,.png";
82
84
  let type_media = ".mp3,.mp4,.avi,.wav";
83
85
  (0, _react.useEffect)(() => {
@@ -106,6 +108,14 @@ function MyFileUpload({
106
108
  setMyFileUploadAcceptTypes(type_image + ",.pdf");
107
109
  setAcceptlabel("PNG, JPG, PDF");
108
110
  break;
111
+ case MyFileUploadAcceptType.IMAGEPDFWORDEXCEL:
112
+ setMyFileUploadAcceptTypes(type_image + ",.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx");
113
+ setAcceptlabel("PNG, JPG, PDF, Word-Excel");
114
+ break;
115
+ case MyFileUploadAcceptType.IMAGEVIDEOPDFWORDEXCEL:
116
+ setMyFileUploadAcceptTypes(type_image + ",.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.mp4,.avi,.wav");
117
+ setAcceptlabel("PNG, JPG, PDF, Word-Excel, MP4, AVI, WAV");
118
+ break;
109
119
  }
110
120
  navigator.mediaDevices.enumerateDevices().then(deviceInfos => {
111
121
  const videoDevices = deviceInfos.filter(device => device.kind === "videoinput");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "px-react-ui-components",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "commonjs",