@apexcura/ui-components 0.0.11-Beta163 → 0.0.11-Beta164
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 +26 -43
- package/dist/index.mjs +14 -31
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -387,14 +387,13 @@ var MultipleSelectElement = (props) => {
|
|
|
387
387
|
|
|
388
388
|
// src/Components/Button.tsx
|
|
389
389
|
var import_react12 = __toESM(require("react"));
|
|
390
|
-
var import_antd10 = require("antd");
|
|
391
390
|
var defaultClassName = "w-[126px] h-[40px] bg-purple-800 text-white rounded-full shadow-lg submit border-none";
|
|
392
391
|
var ButtonElement = (props) => {
|
|
393
392
|
const handleClick = typeof props.action === "string" ? () => {
|
|
394
393
|
console.log("Performing action:", props.action);
|
|
395
394
|
} : props.action;
|
|
396
395
|
return /* @__PURE__ */ import_react12.default.createElement(
|
|
397
|
-
|
|
396
|
+
"button",
|
|
398
397
|
{
|
|
399
398
|
onClick: handleClick,
|
|
400
399
|
className: `${defaultClassName} ${props.className ? props.className : ""}`
|
|
@@ -405,7 +404,7 @@ var ButtonElement = (props) => {
|
|
|
405
404
|
|
|
406
405
|
// src/Components/AddMoreTable.tsx
|
|
407
406
|
var import_react13 = __toESM(require("react"));
|
|
408
|
-
var
|
|
407
|
+
var import_antd10 = require("antd");
|
|
409
408
|
var import_icons2 = require("@ant-design/icons");
|
|
410
409
|
var AddMoreTable = (props) => {
|
|
411
410
|
const { thead, tbody } = props;
|
|
@@ -500,13 +499,13 @@ var AddMoreTable = (props) => {
|
|
|
500
499
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
501
500
|
Object.keys(variable).forEach((key) => {
|
|
502
501
|
if (key === "SubRows") {
|
|
503
|
-
rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(
|
|
502
|
+
rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
504
503
|
} else {
|
|
505
504
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
506
505
|
}
|
|
507
506
|
});
|
|
508
507
|
});
|
|
509
|
-
rowData.actions = /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(
|
|
508
|
+
rowData.actions = /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ import_react13.default.createElement(import_antd10.Button, { onClick: onHandleRows }, /* @__PURE__ */ import_react13.default.createElement(import_icons2.PlusOutlined, null)));
|
|
510
509
|
console.log("=====rowdata", rowData);
|
|
511
510
|
return rowData;
|
|
512
511
|
});
|
|
@@ -523,7 +522,7 @@ var AddMoreTable = (props) => {
|
|
|
523
522
|
});
|
|
524
523
|
}
|
|
525
524
|
return /* @__PURE__ */ import_react13.default.createElement(
|
|
526
|
-
|
|
525
|
+
import_antd10.Table,
|
|
527
526
|
{
|
|
528
527
|
columns,
|
|
529
528
|
dataSource,
|
|
@@ -553,25 +552,25 @@ var import_react18 = __toESM(require("react"));
|
|
|
553
552
|
|
|
554
553
|
// src/Components/Notification.tsx
|
|
555
554
|
var import_react15 = __toESM(require("react"));
|
|
556
|
-
var
|
|
555
|
+
var import_antd11 = require("antd");
|
|
557
556
|
var import_io = require("react-icons/io");
|
|
558
557
|
var popoverContentStyle = {
|
|
559
558
|
minWidth: "300px",
|
|
560
559
|
maxWidth: "100%"
|
|
561
560
|
};
|
|
562
561
|
var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
|
|
563
|
-
|
|
562
|
+
import_antd11.Popover,
|
|
564
563
|
{
|
|
565
564
|
className: props.className,
|
|
566
565
|
content: /* @__PURE__ */ import_react15.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react15.default.createElement(
|
|
567
|
-
|
|
566
|
+
import_antd11.List,
|
|
568
567
|
{
|
|
569
568
|
itemLayout: "horizontal",
|
|
570
569
|
dataSource: props.items,
|
|
571
|
-
renderItem: (item, index) => /* @__PURE__ */ import_react15.default.createElement(
|
|
572
|
-
|
|
570
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react15.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react15.default.createElement(
|
|
571
|
+
import_antd11.List.Item.Meta,
|
|
573
572
|
{
|
|
574
|
-
avatar: /* @__PURE__ */ import_react15.default.createElement(
|
|
573
|
+
avatar: /* @__PURE__ */ import_react15.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
575
574
|
title: item.text,
|
|
576
575
|
description: item.time
|
|
577
576
|
}
|
|
@@ -581,7 +580,7 @@ var Notification = (props) => /* @__PURE__ */ import_react15.default.createEleme
|
|
|
581
580
|
trigger: "focus",
|
|
582
581
|
placement: "bottomRight"
|
|
583
582
|
},
|
|
584
|
-
/* @__PURE__ */ import_react15.default.createElement(
|
|
583
|
+
/* @__PURE__ */ import_react15.default.createElement(import_antd11.Button, { className: props.buttonClassName }, /* @__PURE__ */ import_react15.default.createElement(import_antd11.Badge, { size: "small", count: props.count }, /* @__PURE__ */ import_react15.default.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ import_react15.default.createElement(import_io.IoIosNotifications, null))))
|
|
585
584
|
);
|
|
586
585
|
|
|
587
586
|
// src/Components/SpanElement.tsx
|
|
@@ -590,9 +589,9 @@ var SpanElement = (props) => /* @__PURE__ */ import_react16.default.createElemen
|
|
|
590
589
|
|
|
591
590
|
// src/Components/Profile.tsx
|
|
592
591
|
var import_react17 = __toESM(require("react"));
|
|
593
|
-
var
|
|
592
|
+
var import_antd12 = require("antd");
|
|
594
593
|
var import_icons3 = require("@ant-design/icons");
|
|
595
|
-
var Profile = (props) => /* @__PURE__ */ import_react17.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react17.default.createElement(
|
|
594
|
+
var Profile = (props) => /* @__PURE__ */ import_react17.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react17.default.createElement(import_antd12.Avatar, { style: { backgroundColor: "#87d068", marginRight: "10px" }, icon: /* @__PURE__ */ import_react17.default.createElement(import_icons3.UserOutlined, null) }), /* @__PURE__ */ import_react17.default.createElement("div", { className: props.profileSubClassName }, /* @__PURE__ */ import_react17.default.createElement("p", null, props.primaryText), /* @__PURE__ */ import_react17.default.createElement("p", { className: props.secondTextClassName }, " ", props.secondaryText)));
|
|
596
595
|
|
|
597
596
|
// src/Components/Navbar.tsx
|
|
598
597
|
var Navbar = (props) => {
|
|
@@ -610,7 +609,7 @@ var Navbar = (props) => {
|
|
|
610
609
|
|
|
611
610
|
// src/Components/TableElement.tsx
|
|
612
611
|
var import_react19 = __toESM(require("react"));
|
|
613
|
-
var
|
|
612
|
+
var import_antd13 = require("antd");
|
|
614
613
|
var TableElement = (props) => {
|
|
615
614
|
const { thead, tbody } = props;
|
|
616
615
|
let columns = [];
|
|
@@ -633,7 +632,7 @@ var TableElement = (props) => {
|
|
|
633
632
|
[columns[0].key]: index + 1
|
|
634
633
|
}));
|
|
635
634
|
return /* @__PURE__ */ import_react19.default.createElement(
|
|
636
|
-
|
|
635
|
+
import_antd13.Table,
|
|
637
636
|
{
|
|
638
637
|
dataSource,
|
|
639
638
|
columns,
|
|
@@ -646,41 +645,25 @@ var TableElement = (props) => {
|
|
|
646
645
|
|
|
647
646
|
// src/Components/DatePicker.tsx
|
|
648
647
|
var import_react20 = __toESM(require("react"));
|
|
649
|
-
var
|
|
648
|
+
var import_antd14 = require("antd");
|
|
650
649
|
var import_icons4 = require("@ant-design/icons");
|
|
651
650
|
var import_moment = __toESM(require("moment"));
|
|
652
651
|
var DatePickerElement = (props) => {
|
|
653
|
-
const [date, setDate] = (0, import_react20.useState)();
|
|
654
|
-
const handleChange = (
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
props.onChange(formattedDate);
|
|
660
|
-
}
|
|
661
|
-
} else {
|
|
662
|
-
setDate("");
|
|
652
|
+
const [date, setDate] = (0, import_react20.useState)("");
|
|
653
|
+
const handleChange = (datestring) => {
|
|
654
|
+
console.log("datestring--------", datestring);
|
|
655
|
+
const formatedData = (0, import_moment.default)(datestring).format("lll");
|
|
656
|
+
if (props.onChange) {
|
|
657
|
+
props.onChange(formatedData);
|
|
663
658
|
}
|
|
659
|
+
setDate(formatedData);
|
|
660
|
+
console.log("date--------", date);
|
|
664
661
|
};
|
|
665
662
|
const onHandleDecrement = () => {
|
|
666
|
-
if (date) {
|
|
667
|
-
const newDate = (0, import_moment.default)(date).subtract(1, "days");
|
|
668
|
-
setDate(newDate.format("lll"));
|
|
669
|
-
if (props.onChange) {
|
|
670
|
-
props.onChange(newDate.format("lll"));
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
663
|
};
|
|
674
664
|
const onHandleIncrement = () => {
|
|
675
|
-
if (date) {
|
|
676
|
-
const newDate = (0, import_moment.default)(date).add(1, "days");
|
|
677
|
-
setDate(newDate.format("lll"));
|
|
678
|
-
if (props.onChange) {
|
|
679
|
-
props.onChange(newDate.format("lll"));
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
665
|
};
|
|
683
|
-
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(
|
|
666
|
+
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_antd14.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)));
|
|
684
667
|
};
|
|
685
668
|
// Annotate the CommonJS export names for ESM import in node:
|
|
686
669
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -336,14 +336,13 @@ var MultipleSelectElement = (props) => {
|
|
|
336
336
|
|
|
337
337
|
// src/Components/Button.tsx
|
|
338
338
|
import React11 from "react";
|
|
339
|
-
import { Button as Button2 } from "antd";
|
|
340
339
|
var defaultClassName = "w-[126px] h-[40px] bg-purple-800 text-white rounded-full shadow-lg submit border-none";
|
|
341
340
|
var ButtonElement = (props) => {
|
|
342
341
|
const handleClick = typeof props.action === "string" ? () => {
|
|
343
342
|
console.log("Performing action:", props.action);
|
|
344
343
|
} : props.action;
|
|
345
344
|
return /* @__PURE__ */ React11.createElement(
|
|
346
|
-
|
|
345
|
+
"button",
|
|
347
346
|
{
|
|
348
347
|
onClick: handleClick,
|
|
349
348
|
className: `${defaultClassName} ${props.className ? props.className : ""}`
|
|
@@ -354,7 +353,7 @@ var ButtonElement = (props) => {
|
|
|
354
353
|
|
|
355
354
|
// src/Components/AddMoreTable.tsx
|
|
356
355
|
import React12, { useEffect, useState as useState4 } from "react";
|
|
357
|
-
import { Table, Button as
|
|
356
|
+
import { Table, Button as Button2 } from "antd";
|
|
358
357
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
359
358
|
var AddMoreTable = (props) => {
|
|
360
359
|
const { thead, tbody } = props;
|
|
@@ -449,13 +448,13 @@ var AddMoreTable = (props) => {
|
|
|
449
448
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
450
449
|
Object.keys(variable).forEach((key) => {
|
|
451
450
|
if (key === "SubRows") {
|
|
452
|
-
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(
|
|
451
|
+
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(Button2, { onClick: () => onHandleSubRowsDelete(rowIndex, subIndex) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), subIndex === eachRow.variable_data.length - 1 && /* @__PURE__ */ React12.createElement(Button2, { onClick: () => onHandleSubRowsAdd(rowIndex) }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
453
452
|
} else {
|
|
454
453
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
455
454
|
}
|
|
456
455
|
});
|
|
457
456
|
});
|
|
458
|
-
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(
|
|
457
|
+
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(Button2, { onClick: () => onHandleDelete(eachRow.id) }, /* @__PURE__ */ React12.createElement(DeleteOutlined, null)), rowIndex === rows.length - 1 && /* @__PURE__ */ React12.createElement(Button2, { onClick: onHandleRows }, /* @__PURE__ */ React12.createElement(PlusOutlined, null)));
|
|
459
458
|
console.log("=====rowdata", rowData);
|
|
460
459
|
return rowData;
|
|
461
460
|
});
|
|
@@ -502,7 +501,7 @@ import React17 from "react";
|
|
|
502
501
|
|
|
503
502
|
// src/Components/Notification.tsx
|
|
504
503
|
import React14 from "react";
|
|
505
|
-
import { Popover, Badge, Button as
|
|
504
|
+
import { Popover, Badge, Button as Button3, Avatar, List } from "antd";
|
|
506
505
|
import { IoIosNotifications } from "react-icons/io";
|
|
507
506
|
var popoverContentStyle = {
|
|
508
507
|
minWidth: "300px",
|
|
@@ -530,7 +529,7 @@ var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
|
530
529
|
trigger: "focus",
|
|
531
530
|
placement: "bottomRight"
|
|
532
531
|
},
|
|
533
|
-
/* @__PURE__ */ React14.createElement(
|
|
532
|
+
/* @__PURE__ */ React14.createElement(Button3, { className: props.buttonClassName }, /* @__PURE__ */ React14.createElement(Badge, { size: "small", count: props.count }, /* @__PURE__ */ React14.createElement("span", { className: props.iconsClassName }, /* @__PURE__ */ React14.createElement(IoIosNotifications, null))))
|
|
534
533
|
);
|
|
535
534
|
|
|
536
535
|
// src/Components/SpanElement.tsx
|
|
@@ -599,35 +598,19 @@ import { DatePicker } from "antd";
|
|
|
599
598
|
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
600
599
|
import moment from "moment";
|
|
601
600
|
var DatePickerElement = (props) => {
|
|
602
|
-
const [date, setDate] = useState5();
|
|
603
|
-
const handleChange = (
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
props.onChange(formattedDate);
|
|
609
|
-
}
|
|
610
|
-
} else {
|
|
611
|
-
setDate("");
|
|
601
|
+
const [date, setDate] = useState5("");
|
|
602
|
+
const handleChange = (datestring) => {
|
|
603
|
+
console.log("datestring--------", datestring);
|
|
604
|
+
const formatedData = moment(datestring).format("lll");
|
|
605
|
+
if (props.onChange) {
|
|
606
|
+
props.onChange(formatedData);
|
|
612
607
|
}
|
|
608
|
+
setDate(formatedData);
|
|
609
|
+
console.log("date--------", date);
|
|
613
610
|
};
|
|
614
611
|
const onHandleDecrement = () => {
|
|
615
|
-
if (date) {
|
|
616
|
-
const newDate = moment(date).subtract(1, "days");
|
|
617
|
-
setDate(newDate.format("lll"));
|
|
618
|
-
if (props.onChange) {
|
|
619
|
-
props.onChange(newDate.format("lll"));
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
612
|
};
|
|
623
613
|
const onHandleIncrement = () => {
|
|
624
|
-
if (date) {
|
|
625
|
-
const newDate = moment(date).add(1, "days");
|
|
626
|
-
setDate(newDate.format("lll"));
|
|
627
|
-
if (props.onChange) {
|
|
628
|
-
props.onChange(newDate.format("lll"));
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
614
|
};
|
|
632
615
|
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)));
|
|
633
616
|
};
|