@apexcura/ui-components 0.0.14-Beta20 → 0.0.14-Beta22

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
@@ -741,18 +741,19 @@ var TableElement = (props) => {
741
741
  var import_react21 = __toESM(require("react"));
742
742
  var import_antd15 = require("antd");
743
743
  var DatePickerElement = (props) => {
744
- const [date, setDate] = (0, import_react21.useState)(null);
744
+ const [date, setDate] = (0, import_react21.useState)("");
745
745
  const dateFormat = "DD/MM/YYYY";
746
746
  const handleChange = (date2, dateString) => {
747
- console.log(dateString);
747
+ console.log("date==========", date2);
748
748
  if (date2) {
749
+ console.log("date==", date2);
749
750
  const formattedDate = date2.format(dateFormat);
750
751
  setDate(date2);
751
752
  if (props.onChange) {
752
753
  props.onChange(formattedDate);
753
754
  }
754
755
  } else {
755
- setDate(null);
756
+ setDate("");
756
757
  if (props.onChange) {
757
758
  props.onChange("");
758
759
  }
@@ -762,7 +763,7 @@ var DatePickerElement = (props) => {
762
763
  import_antd15.DatePicker,
763
764
  {
764
765
  placeholder: props.placeholder,
765
- value: date?.format(dateFormat),
766
+ value: date.format(dateFormat),
766
767
  variant: "borderless",
767
768
  onChange: handleChange
768
769
  }
@@ -814,6 +815,7 @@ var import_react25 = __toESM(require("react"));
814
815
  var import_antd18 = require("antd");
815
816
  var DropDownGroup = (props) => {
816
817
  const [selectedValue, setSelectedValue] = (0, import_react25.useState)({ firstValue: {}, secondValue: {} });
818
+ console.log(selectedValue);
817
819
  const handleFirstChange = (value) => {
818
820
  const filterOption2 = props.firstOptions?.find((eachOption) => eachOption.value === value);
819
821
  setSelectedValue((prev) => {
@@ -821,7 +823,7 @@ var DropDownGroup = (props) => {
821
823
  if (newValue.firstValue) {
822
824
  props.onChange?.(newValue);
823
825
  }
824
- return selectedValue;
826
+ return newValue;
825
827
  });
826
828
  };
827
829
  const handleSecondChange = (value) => {
@@ -831,10 +833,9 @@ var DropDownGroup = (props) => {
831
833
  if (newValue.secondValue) {
832
834
  props.onChange?.(newValue);
833
835
  }
834
- return selectedValue;
836
+ return newValue;
835
837
  });
836
838
  };
837
- console.log("selectedValue", selectedValue);
838
839
  return /* @__PURE__ */ import_react25.default.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ import_react25.default.createElement(
839
840
  import_antd18.Select,
840
841
  {
package/dist/index.mjs CHANGED
@@ -683,18 +683,19 @@ var TableElement = (props) => {
683
683
  import React21, { useState as useState6 } from "react";
684
684
  import { DatePicker } from "antd";
685
685
  var DatePickerElement = (props) => {
686
- const [date, setDate] = useState6(null);
686
+ const [date, setDate] = useState6("");
687
687
  const dateFormat = "DD/MM/YYYY";
688
688
  const handleChange = (date2, dateString) => {
689
- console.log(dateString);
689
+ console.log("date==========", date2);
690
690
  if (date2) {
691
+ console.log("date==", date2);
691
692
  const formattedDate = date2.format(dateFormat);
692
693
  setDate(date2);
693
694
  if (props.onChange) {
694
695
  props.onChange(formattedDate);
695
696
  }
696
697
  } else {
697
- setDate(null);
698
+ setDate("");
698
699
  if (props.onChange) {
699
700
  props.onChange("");
700
701
  }
@@ -704,7 +705,7 @@ var DatePickerElement = (props) => {
704
705
  DatePicker,
705
706
  {
706
707
  placeholder: props.placeholder,
707
- value: date?.format(dateFormat),
708
+ value: date.format(dateFormat),
708
709
  variant: "borderless",
709
710
  onChange: handleChange
710
711
  }
@@ -756,6 +757,7 @@ import React25, { useState as useState7 } from "react";
756
757
  import { Select as Select4 } from "antd";
757
758
  var DropDownGroup = (props) => {
758
759
  const [selectedValue, setSelectedValue] = useState7({ firstValue: {}, secondValue: {} });
760
+ console.log(selectedValue);
759
761
  const handleFirstChange = (value) => {
760
762
  const filterOption2 = props.firstOptions?.find((eachOption) => eachOption.value === value);
761
763
  setSelectedValue((prev) => {
@@ -763,7 +765,7 @@ var DropDownGroup = (props) => {
763
765
  if (newValue.firstValue) {
764
766
  props.onChange?.(newValue);
765
767
  }
766
- return selectedValue;
768
+ return newValue;
767
769
  });
768
770
  };
769
771
  const handleSecondChange = (value) => {
@@ -773,10 +775,9 @@ var DropDownGroup = (props) => {
773
775
  if (newValue.secondValue) {
774
776
  props.onChange?.(newValue);
775
777
  }
776
- return selectedValue;
778
+ return newValue;
777
779
  });
778
780
  };
779
- console.log("selectedValue", selectedValue);
780
781
  return /* @__PURE__ */ React25.createElement("div", { className: props.className, style: { display: "flex", flexDirection: "row", backgroundColor: "white", borderRadius: 10, border: "1px solid gray" } }, /* @__PURE__ */ React25.createElement(
781
782
  Select4,
782
783
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta20",
3
+ "version": "0.0.14-Beta22",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",