@apexcura/ui-components 0.0.14-Beta31 → 0.0.14-Beta33

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,9 @@ type ElementType = {
26
26
  fields?: any[];
27
27
  schema?: any[];
28
28
  options?: any[];
29
- firstOptions: any[];
30
- secondOptions: any[];
29
+ firstOptions?: any[];
30
+ secondOptions?: any[];
31
+ view?: boolean;
31
32
  onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
32
33
  onClick?: () => void;
33
34
  dropDownOptions?: any[];
package/dist/index.d.ts CHANGED
@@ -26,8 +26,9 @@ type ElementType = {
26
26
  fields?: any[];
27
27
  schema?: any[];
28
28
  options?: any[];
29
- firstOptions: any[];
30
- secondOptions: any[];
29
+ firstOptions?: any[];
30
+ secondOptions?: any[];
31
+ view?: boolean;
31
32
  onChange?: (value: string | number | boolean | object | any[] | undefined) => void;
32
33
  onClick?: () => void;
33
34
  dropDownOptions?: any[];
package/dist/index.js CHANGED
@@ -683,8 +683,10 @@ var TableElement = (props) => {
683
683
  }
684
684
  }
685
685
  }
686
- })),
687
- {
686
+ }))
687
+ ];
688
+ if (props.view) {
689
+ columns.push({
688
690
  title: "View",
689
691
  dataIndex: "View",
690
692
  key: "View",
@@ -699,8 +701,8 @@ var TableElement = (props) => {
699
701
  },
700
702
  "View"
701
703
  )
702
- }
703
- ];
704
+ });
705
+ }
704
706
  }
705
707
  const dataSource = tbody && tbody.map((row, index) => ({
706
708
  ...row,
@@ -746,10 +748,9 @@ var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.j
746
748
  import_dayjs.default.extend(import_customParseFormat.default);
747
749
  var DatePickerElement = (props) => {
748
750
  const [dateState, setDateState] = (0, import_react21.useState)("");
749
- const dateFormat = "DD/MM/YYYY";
750
751
  const handleChange = (date, dateString) => {
751
752
  if (date) {
752
- const formattedDate = date.format(dateFormat);
753
+ const formattedDate = date;
753
754
  setDateState(date);
754
755
  if (props.onChange) {
755
756
  props.onChange(formattedDate);
@@ -766,7 +767,7 @@ var DatePickerElement = (props) => {
766
767
  {
767
768
  placeholder: props.placeholder,
768
769
  value: dateState,
769
- variant: "borderless",
770
+ format: { format: "DD-MM-YYYY" },
770
771
  onChange: handleChange
771
772
  }
772
773
  ));
package/dist/index.mjs CHANGED
@@ -624,8 +624,10 @@ var TableElement = (props) => {
624
624
  }
625
625
  }
626
626
  }
627
- })),
628
- {
627
+ }))
628
+ ];
629
+ if (props.view) {
630
+ columns.push({
629
631
  title: "View",
630
632
  dataIndex: "View",
631
633
  key: "View",
@@ -640,8 +642,8 @@ var TableElement = (props) => {
640
642
  },
641
643
  "View"
642
644
  )
643
- }
644
- ];
645
+ });
646
+ }
645
647
  }
646
648
  const dataSource = tbody && tbody.map((row, index) => ({
647
649
  ...row,
@@ -687,10 +689,9 @@ import customParseFormat from "dayjs/plugin/customParseFormat.js";
687
689
  dayjs.extend(customParseFormat);
688
690
  var DatePickerElement = (props) => {
689
691
  const [dateState, setDateState] = useState6("");
690
- const dateFormat = "DD/MM/YYYY";
691
692
  const handleChange = (date, dateString) => {
692
693
  if (date) {
693
- const formattedDate = date.format(dateFormat);
694
+ const formattedDate = date;
694
695
  setDateState(date);
695
696
  if (props.onChange) {
696
697
  props.onChange(formattedDate);
@@ -707,7 +708,7 @@ var DatePickerElement = (props) => {
707
708
  {
708
709
  placeholder: props.placeholder,
709
710
  value: dateState,
710
- variant: "borderless",
711
+ format: { format: "DD-MM-YYYY" },
711
712
  onChange: handleChange
712
713
  }
713
714
  ));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta31",
3
+ "version": "0.0.14-Beta33",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",