@apexcura/ui-components 0.0.13-Beta63 → 0.0.13-Beta64

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 CHANGED
@@ -793,9 +793,7 @@ var UploadElement = (props) => {
793
793
  const [previewImage, setPreviewImage] = (0, import_react23.useState)(null);
794
794
  const uploadChange = (fileList) => {
795
795
  if (!fileList || fileList.length === 0) return;
796
- const existingFiles = Array.isArray(props.value) ? props.value : [];
797
- const newFileList = [...existingFiles];
798
- console.log("newFileList-------------", newFileList);
796
+ const newFileList = [];
799
797
  for (let i = 0; i < fileList.length; i++) {
800
798
  const selectedFile = fileList[i];
801
799
  const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
@@ -827,14 +825,11 @@ var UploadElement = (props) => {
827
825
  reader.readAsDataURL(selectedFile);
828
826
  newFileList.push(newFile);
829
827
  }
830
- props.onChange && props.onChange({
831
- name: props.name,
832
- value: newFileList
833
- });
834
828
  };
835
829
  const uploadChange2 = ({ file, fileList }) => {
836
830
  const existingFiles = Array.isArray(props.value) ? props.value : [];
837
831
  const newFileList = [...existingFiles, ...fileList];
832
+ console.log(newFileList);
838
833
  props.onChange && props.onChange({
839
834
  name: props.name,
840
835
  value: newFileList
package/dist/index.mjs CHANGED
@@ -737,9 +737,7 @@ var UploadElement = (props) => {
737
737
  const [previewImage, setPreviewImage] = useState7(null);
738
738
  const uploadChange = (fileList) => {
739
739
  if (!fileList || fileList.length === 0) return;
740
- const existingFiles = Array.isArray(props.value) ? props.value : [];
741
- const newFileList = [...existingFiles];
742
- console.log("newFileList-------------", newFileList);
740
+ const newFileList = [];
743
741
  for (let i = 0; i < fileList.length; i++) {
744
742
  const selectedFile = fileList[i];
745
743
  const isCorrectFile = ["image/png", "image/jpg", "image/jpeg"].includes(
@@ -771,14 +769,11 @@ var UploadElement = (props) => {
771
769
  reader.readAsDataURL(selectedFile);
772
770
  newFileList.push(newFile);
773
771
  }
774
- props.onChange && props.onChange({
775
- name: props.name,
776
- value: newFileList
777
- });
778
772
  };
779
773
  const uploadChange2 = ({ file, fileList }) => {
780
774
  const existingFiles = Array.isArray(props.value) ? props.value : [];
781
775
  const newFileList = [...existingFiles, ...fileList];
776
+ console.log(newFileList);
782
777
  props.onChange && props.onChange({
783
778
  name: props.name,
784
779
  value: newFileList
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.13-Beta63",
3
+ "version": "0.0.13-Beta64",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",