@apexcura/ui-components 0.0.11-Beta151 → 0.0.11-Beta153

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
@@ -626,17 +626,27 @@ var TableElement = (props) => {
626
626
  var import_react20 = __toESM(require("react"));
627
627
  var import_antd15 = require("antd");
628
628
  var import_icons4 = require("@ant-design/icons");
629
+ var import_addDays = require("date-fns/addDays");
629
630
  var DatePickerElement = (props) => {
630
631
  const [date, setDate] = (0, import_react20.useState)(void 0);
631
632
  const handleChange = (value, datestring) => {
632
- setDate(value);
633
+ setDate(datestring);
633
634
  if (props.onChange) {
634
635
  props.onChange(date);
635
636
  }
636
637
  console.log("value", value);
637
638
  console.log("datestring", datestring);
638
639
  };
639
- return /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("button", null, /* @__PURE__ */ import_react20.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react20.default.createElement(import_antd15.DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ import_react20.default.createElement("button", null, /* @__PURE__ */ import_react20.default.createElement(import_icons4.RightOutlined, null)));
640
+ const onHandleDecrement = () => {
641
+ setDate(
642
+ (prev) => console.log("prev", prev)
643
+ );
644
+ };
645
+ const onHandleIncrement = () => {
646
+ console.log("--------");
647
+ setDate((prevDate) => prevDate ? (0, import_addDays.addDays)(prevDate, 1) : void 0);
648
+ };
649
+ return /* @__PURE__ */ import_react20.default.createElement("div", null, /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.LeftOutlined, null)), /* @__PURE__ */ import_react20.default.createElement(import_antd15.DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.RightOutlined, null)));
640
650
  };
641
651
  // Annotate the CommonJS export names for ESM import in node:
642
652
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -575,17 +575,27 @@ var TableElement = (props) => {
575
575
  import React19, { useState as useState5 } from "react";
576
576
  import { DatePicker } from "antd";
577
577
  import { LeftOutlined, RightOutlined } from "@ant-design/icons";
578
+ import { addDays } from "date-fns/addDays";
578
579
  var DatePickerElement = (props) => {
579
580
  const [date, setDate] = useState5(void 0);
580
581
  const handleChange = (value, datestring) => {
581
- setDate(value);
582
+ setDate(datestring);
582
583
  if (props.onChange) {
583
584
  props.onChange(date);
584
585
  }
585
586
  console.log("value", value);
586
587
  console.log("datestring", datestring);
587
588
  };
588
- return /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("button", null, /* @__PURE__ */ React19.createElement(LeftOutlined, null)), /* @__PURE__ */ React19.createElement(DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ React19.createElement("button", null, /* @__PURE__ */ React19.createElement(RightOutlined, null)));
589
+ const onHandleDecrement = () => {
590
+ setDate(
591
+ (prev) => console.log("prev", prev)
592
+ );
593
+ };
594
+ const onHandleIncrement = () => {
595
+ console.log("--------");
596
+ setDate((prevDate) => prevDate ? addDays(prevDate, 1) : void 0);
597
+ };
598
+ return /* @__PURE__ */ React19.createElement("div", null, /* @__PURE__ */ React19.createElement("button", { onClick: onHandleDecrement }, /* @__PURE__ */ React19.createElement(LeftOutlined, null)), /* @__PURE__ */ React19.createElement(DatePicker, { placeholder: props.placeholder, variant: "borderless", value: props.value, defaultValue: true, onChange: handleChange }), /* @__PURE__ */ React19.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ React19.createElement(RightOutlined, null)));
589
599
  };
590
600
  export {
591
601
  AddMoreTable,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.11-Beta151",
3
+ "version": "0.0.11-Beta153",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",