@apexcura/ui-components 0.0.14-Beta13 → 0.0.14-Beta15

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.d.mts CHANGED
@@ -26,8 +26,8 @@ type ElementType = {
26
26
  fields?: any[];
27
27
  schema?: any[];
28
28
  options?: any[];
29
- options1: any[];
30
- options2: any[];
29
+ firstOptions: any[];
30
+ secondOptions: any[];
31
31
  onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
32
32
  onClick?: () => void;
33
33
  dropDownOptions?: any[];
package/dist/index.d.ts CHANGED
@@ -26,8 +26,8 @@ type ElementType = {
26
26
  fields?: any[];
27
27
  schema?: any[];
28
28
  options?: any[];
29
- options1: any[];
30
- options2: any[];
29
+ firstOptions: any[];
30
+ secondOptions: any[];
31
31
  onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
32
32
  onClick?: () => void;
33
33
  dropDownOptions?: any[];
package/dist/index.js CHANGED
@@ -464,9 +464,9 @@ var AddMoreTable = (props) => {
464
464
  if (!element) return null;
465
465
  const { element: type, label } = element;
466
466
  if (type === "single-select") {
467
- return /* @__PURE__ */ import_react12.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
467
+ return /* @__PURE__ */ import_react12.default.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
468
468
  } else if (type === "textarea") {
469
- return /* @__PURE__ */ import_react12.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
469
+ return /* @__PURE__ */ import_react12.default.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
470
470
  } else {
471
471
  return null;
472
472
  }
@@ -761,7 +761,7 @@ var DatePickerElement = (props) => {
761
761
  import_antd15.DatePicker,
762
762
  {
763
763
  placeholder: props.placeholder,
764
- value: date,
764
+ value: date.format(dateFormat),
765
765
  variant: "borderless",
766
766
  onChange: handleChange
767
767
  }
@@ -817,7 +817,7 @@ var DropDownGroup = (props) => {
817
817
  secondValue: {}
818
818
  });
819
819
  const handleFirstChange = (value) => {
820
- const filterOption2 = props.options?.find(
820
+ const filterOption2 = props.firstOptions?.find(
821
821
  (eachOption) => eachOption.value === value
822
822
  );
823
823
  setSelectedValue((prev) => {
@@ -829,7 +829,7 @@ var DropDownGroup = (props) => {
829
829
  });
830
830
  };
831
831
  const handleSecondChange = (value) => {
832
- const filterOption2 = props.options?.find(
832
+ const filterOption2 = props.secondOptions?.find(
833
833
  (eachOption) => eachOption.value === value
834
834
  );
835
835
  setSelectedValue((prev) => {
@@ -845,7 +845,7 @@ var DropDownGroup = (props) => {
845
845
  {
846
846
  onChange: handleFirstChange,
847
847
  variant: props.variant,
848
- options: props.options1,
848
+ options: props.firstOptions,
849
849
  className: props.className
850
850
  }
851
851
  ), /* @__PURE__ */ import_react25.default.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ import_react25.default.createElement(
@@ -853,7 +853,7 @@ var DropDownGroup = (props) => {
853
853
  {
854
854
  onChange: handleSecondChange,
855
855
  variant: props.variant,
856
- options: props.options2,
856
+ options: props.secondOptions,
857
857
  className: props.className
858
858
  }
859
859
  )));
@@ -867,7 +867,7 @@ var FileUpload = (props) => {
867
867
  const { Dragger } = import_antd19.Upload;
868
868
  const [files, setFiles] = (0, import_react26.useState)([]);
869
869
  const beforeUpload = (file) => {
870
- const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "application/pdf"].includes(file.type);
870
+ const isCorrectFile = ["image/*", "video/*", "application/*"].includes(file.type);
871
871
  if (!isCorrectFile) {
872
872
  import_antd19.message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg/.pdf)`);
873
873
  return import_antd19.Upload.LIST_IGNORE;
package/dist/index.mjs CHANGED
@@ -407,9 +407,9 @@ var AddMoreTable = (props) => {
407
407
  if (!element) return null;
408
408
  const { element: type, label } = element;
409
409
  if (type === "single-select") {
410
- return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
410
+ return /* @__PURE__ */ React12.createElement(SingleSelectElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
411
411
  } else if (type === "textarea") {
412
- return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [] });
412
+ return /* @__PURE__ */ React12.createElement(TextareaElement, { onChange: (value2) => console.log(label, value2), optionType: "", className: void 0, selectedStyle: false, style: false, options1: [], options2: [], firstOptions: [], secondOptions: [] });
413
413
  } else {
414
414
  return null;
415
415
  }
@@ -704,7 +704,7 @@ var DatePickerElement = (props) => {
704
704
  DatePicker,
705
705
  {
706
706
  placeholder: props.placeholder,
707
- value: date,
707
+ value: date.format(dateFormat),
708
708
  variant: "borderless",
709
709
  onChange: handleChange
710
710
  }
@@ -760,7 +760,7 @@ var DropDownGroup = (props) => {
760
760
  secondValue: {}
761
761
  });
762
762
  const handleFirstChange = (value) => {
763
- const filterOption2 = props.options?.find(
763
+ const filterOption2 = props.firstOptions?.find(
764
764
  (eachOption) => eachOption.value === value
765
765
  );
766
766
  setSelectedValue((prev) => {
@@ -772,7 +772,7 @@ var DropDownGroup = (props) => {
772
772
  });
773
773
  };
774
774
  const handleSecondChange = (value) => {
775
- const filterOption2 = props.options?.find(
775
+ const filterOption2 = props.secondOptions?.find(
776
776
  (eachOption) => eachOption.value === value
777
777
  );
778
778
  setSelectedValue((prev) => {
@@ -788,7 +788,7 @@ var DropDownGroup = (props) => {
788
788
  {
789
789
  onChange: handleFirstChange,
790
790
  variant: props.variant,
791
- options: props.options1,
791
+ options: props.firstOptions,
792
792
  className: props.className
793
793
  }
794
794
  ), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray", height: "33px" } }), /* @__PURE__ */ React25.createElement(
@@ -796,7 +796,7 @@ var DropDownGroup = (props) => {
796
796
  {
797
797
  onChange: handleSecondChange,
798
798
  variant: props.variant,
799
- options: props.options2,
799
+ options: props.secondOptions,
800
800
  className: props.className
801
801
  }
802
802
  )));
@@ -810,7 +810,7 @@ var FileUpload = (props) => {
810
810
  const { Dragger } = Upload;
811
811
  const [files, setFiles] = useState8([]);
812
812
  const beforeUpload = (file) => {
813
- const isCorrectFile = ["image/png", "image/jpg", "image/jpeg", "application/pdf"].includes(file.type);
813
+ const isCorrectFile = ["image/*", "video/*", "application/*"].includes(file.type);
814
814
  if (!isCorrectFile) {
815
815
  message.error(`(${file.name}) is an invalid file. Please upload files with the following extensions only (.png/.jpg/.jpeg/.pdf)`);
816
816
  return Upload.LIST_IGNORE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta13",
3
+ "version": "0.0.14-Beta15",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",