@apexcura/ui-components 0.0.11-Beta147 → 0.0.11-Beta149
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 +5 -6
- package/dist/index.mjs +6 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -634,20 +634,19 @@ var DatePickerElement = (props) => {
|
|
|
634
634
|
const handleChange = (value) => {
|
|
635
635
|
setDate(value);
|
|
636
636
|
if (props.onChange) {
|
|
637
|
-
props.onChange(
|
|
637
|
+
props.onChange(date);
|
|
638
638
|
}
|
|
639
639
|
};
|
|
640
640
|
console.log(date);
|
|
641
641
|
const onHandleDecrement = () => {
|
|
642
|
-
setDate(
|
|
642
|
+
setDate(
|
|
643
|
+
(prev) => console.log("prev", prev)
|
|
644
|
+
);
|
|
643
645
|
};
|
|
644
646
|
const onHandleIncrement = () => {
|
|
645
|
-
console.log("----------------------------");
|
|
646
|
-
const val = (prevDate) => prevDate ? (0, import_date_fns.addDays)(prevDate, 1) : void 0;
|
|
647
647
|
setDate((prevDate) => prevDate ? (0, import_date_fns.addDays)(prevDate, 1) : void 0);
|
|
648
|
-
console.log(val);
|
|
649
648
|
};
|
|
650
|
-
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)));
|
|
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, prevIcon: true, nextIcon: true }), /* @__PURE__ */ import_react20.default.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ import_react20.default.createElement(import_icons4.RightOutlined, null)));
|
|
651
650
|
};
|
|
652
651
|
// Annotate the CommonJS export names for ESM import in node:
|
|
653
652
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -577,26 +577,25 @@ var TableElement = (props) => {
|
|
|
577
577
|
import React19, { useState as useState5 } from "react";
|
|
578
578
|
import { DatePicker } from "antd";
|
|
579
579
|
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
580
|
-
import { addDays
|
|
580
|
+
import { addDays } from "date-fns";
|
|
581
581
|
var DatePickerElement = (props) => {
|
|
582
582
|
const [date, setDate] = useState5(void 0);
|
|
583
583
|
const handleChange = (value) => {
|
|
584
584
|
setDate(value);
|
|
585
585
|
if (props.onChange) {
|
|
586
|
-
props.onChange(
|
|
586
|
+
props.onChange(date);
|
|
587
587
|
}
|
|
588
588
|
};
|
|
589
589
|
console.log(date);
|
|
590
590
|
const onHandleDecrement = () => {
|
|
591
|
-
setDate(
|
|
591
|
+
setDate(
|
|
592
|
+
(prev) => console.log("prev", prev)
|
|
593
|
+
);
|
|
592
594
|
};
|
|
593
595
|
const onHandleIncrement = () => {
|
|
594
|
-
console.log("----------------------------");
|
|
595
|
-
const val = (prevDate) => prevDate ? addDays(prevDate, 1) : void 0;
|
|
596
596
|
setDate((prevDate) => prevDate ? addDays(prevDate, 1) : void 0);
|
|
597
|
-
console.log(val);
|
|
598
597
|
};
|
|
599
|
-
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)));
|
|
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, prevIcon: true, nextIcon: true }), /* @__PURE__ */ React19.createElement("button", { onClick: onHandleIncrement }, /* @__PURE__ */ React19.createElement(RightOutlined, null)));
|
|
600
599
|
};
|
|
601
600
|
export {
|
|
602
601
|
AddMoreTable,
|