@apexcura/ui-components 0.0.11-Beta163 → 0.0.11-Beta165
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 +25 -44
- package/dist/index.mjs +13 -32
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -387,25 +387,25 @@ 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 : ""}`
|
|
401
400
|
},
|
|
401
|
+
props.icon && /* @__PURE__ */ import_react12.default.createElement("span", { className: props.iconsClassName }, props.icon),
|
|
402
402
|
props.label
|
|
403
403
|
);
|
|
404
404
|
};
|
|
405
405
|
|
|
406
406
|
// src/Components/AddMoreTable.tsx
|
|
407
407
|
var import_react13 = __toESM(require("react"));
|
|
408
|
-
var
|
|
408
|
+
var import_antd10 = require("antd");
|
|
409
409
|
var import_icons2 = require("@ant-design/icons");
|
|
410
410
|
var AddMoreTable = (props) => {
|
|
411
411
|
const { thead, tbody } = props;
|
|
@@ -500,13 +500,13 @@ var AddMoreTable = (props) => {
|
|
|
500
500
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
501
501
|
Object.keys(variable).forEach((key) => {
|
|
502
502
|
if (key === "SubRows") {
|
|
503
|
-
rowData[`${key}`] = /* @__PURE__ */ import_react13.default.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ import_react13.default.createElement(
|
|
503
|
+
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
504
|
} else {
|
|
505
505
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
506
506
|
}
|
|
507
507
|
});
|
|
508
508
|
});
|
|
509
|
-
rowData.actions = /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(
|
|
509
|
+
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
510
|
console.log("=====rowdata", rowData);
|
|
511
511
|
return rowData;
|
|
512
512
|
});
|
|
@@ -523,7 +523,7 @@ var AddMoreTable = (props) => {
|
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
return /* @__PURE__ */ import_react13.default.createElement(
|
|
526
|
-
|
|
526
|
+
import_antd10.Table,
|
|
527
527
|
{
|
|
528
528
|
columns,
|
|
529
529
|
dataSource,
|
|
@@ -553,25 +553,25 @@ var import_react18 = __toESM(require("react"));
|
|
|
553
553
|
|
|
554
554
|
// src/Components/Notification.tsx
|
|
555
555
|
var import_react15 = __toESM(require("react"));
|
|
556
|
-
var
|
|
556
|
+
var import_antd11 = require("antd");
|
|
557
557
|
var import_io = require("react-icons/io");
|
|
558
558
|
var popoverContentStyle = {
|
|
559
559
|
minWidth: "300px",
|
|
560
560
|
maxWidth: "100%"
|
|
561
561
|
};
|
|
562
562
|
var Notification = (props) => /* @__PURE__ */ import_react15.default.createElement(
|
|
563
|
-
|
|
563
|
+
import_antd11.Popover,
|
|
564
564
|
{
|
|
565
565
|
className: props.className,
|
|
566
566
|
content: /* @__PURE__ */ import_react15.default.createElement("div", { style: popoverContentStyle }, " ", /* @__PURE__ */ import_react15.default.createElement(
|
|
567
|
-
|
|
567
|
+
import_antd11.List,
|
|
568
568
|
{
|
|
569
569
|
itemLayout: "horizontal",
|
|
570
570
|
dataSource: props.items,
|
|
571
|
-
renderItem: (item, index) => /* @__PURE__ */ import_react15.default.createElement(
|
|
572
|
-
|
|
571
|
+
renderItem: (item, index) => /* @__PURE__ */ import_react15.default.createElement(import_antd11.List.Item, { key: item.text }, /* @__PURE__ */ import_react15.default.createElement(
|
|
572
|
+
import_antd11.List.Item.Meta,
|
|
573
573
|
{
|
|
574
|
-
avatar: /* @__PURE__ */ import_react15.default.createElement(
|
|
574
|
+
avatar: /* @__PURE__ */ import_react15.default.createElement(import_antd11.Avatar, { src: `https://api.dicebear.com/7.x/miniavs/svg?seed=${index}` }),
|
|
575
575
|
title: item.text,
|
|
576
576
|
description: item.time
|
|
577
577
|
}
|
|
@@ -581,7 +581,7 @@ var Notification = (props) => /* @__PURE__ */ import_react15.default.createEleme
|
|
|
581
581
|
trigger: "focus",
|
|
582
582
|
placement: "bottomRight"
|
|
583
583
|
},
|
|
584
|
-
/* @__PURE__ */ import_react15.default.createElement(
|
|
584
|
+
/* @__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
585
|
);
|
|
586
586
|
|
|
587
587
|
// src/Components/SpanElement.tsx
|
|
@@ -590,9 +590,9 @@ var SpanElement = (props) => /* @__PURE__ */ import_react16.default.createElemen
|
|
|
590
590
|
|
|
591
591
|
// src/Components/Profile.tsx
|
|
592
592
|
var import_react17 = __toESM(require("react"));
|
|
593
|
-
var
|
|
593
|
+
var import_antd12 = require("antd");
|
|
594
594
|
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(
|
|
595
|
+
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
596
|
|
|
597
597
|
// src/Components/Navbar.tsx
|
|
598
598
|
var Navbar = (props) => {
|
|
@@ -610,7 +610,7 @@ var Navbar = (props) => {
|
|
|
610
610
|
|
|
611
611
|
// src/Components/TableElement.tsx
|
|
612
612
|
var import_react19 = __toESM(require("react"));
|
|
613
|
-
var
|
|
613
|
+
var import_antd13 = require("antd");
|
|
614
614
|
var TableElement = (props) => {
|
|
615
615
|
const { thead, tbody } = props;
|
|
616
616
|
let columns = [];
|
|
@@ -633,7 +633,7 @@ var TableElement = (props) => {
|
|
|
633
633
|
[columns[0].key]: index + 1
|
|
634
634
|
}));
|
|
635
635
|
return /* @__PURE__ */ import_react19.default.createElement(
|
|
636
|
-
|
|
636
|
+
import_antd13.Table,
|
|
637
637
|
{
|
|
638
638
|
dataSource,
|
|
639
639
|
columns,
|
|
@@ -646,41 +646,22 @@ var TableElement = (props) => {
|
|
|
646
646
|
|
|
647
647
|
// src/Components/DatePicker.tsx
|
|
648
648
|
var import_react20 = __toESM(require("react"));
|
|
649
|
-
var
|
|
649
|
+
var import_antd14 = require("antd");
|
|
650
650
|
var import_icons4 = require("@ant-design/icons");
|
|
651
651
|
var import_moment = __toESM(require("moment"));
|
|
652
652
|
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("");
|
|
663
|
-
}
|
|
653
|
+
const [date, setDate] = (0, import_react20.useState)("");
|
|
654
|
+
const handleChange = (datestring) => {
|
|
655
|
+
console.log("datestring--------", datestring);
|
|
656
|
+
const formatedData = (0, import_moment.default)(datestring).format("lll");
|
|
657
|
+
setDate(formatedData);
|
|
658
|
+
console.log("date--------", date);
|
|
664
659
|
};
|
|
665
660
|
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
661
|
};
|
|
674
662
|
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
663
|
};
|
|
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(
|
|
664
|
+
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
665
|
};
|
|
685
666
|
// Annotate the CommonJS export names for ESM import in node:
|
|
686
667
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -336,25 +336,25 @@ 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 : ""}`
|
|
350
349
|
},
|
|
350
|
+
props.icon && /* @__PURE__ */ React11.createElement("span", { className: props.iconsClassName }, props.icon),
|
|
351
351
|
props.label
|
|
352
352
|
);
|
|
353
353
|
};
|
|
354
354
|
|
|
355
355
|
// src/Components/AddMoreTable.tsx
|
|
356
356
|
import React12, { useEffect, useState as useState4 } from "react";
|
|
357
|
-
import { Table, Button as
|
|
357
|
+
import { Table, Button as Button2 } from "antd";
|
|
358
358
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
359
359
|
var AddMoreTable = (props) => {
|
|
360
360
|
const { thead, tbody } = props;
|
|
@@ -449,13 +449,13 @@ var AddMoreTable = (props) => {
|
|
|
449
449
|
eachRow.variable_data.forEach((variable, subIndex) => {
|
|
450
450
|
Object.keys(variable).forEach((key) => {
|
|
451
451
|
if (key === "SubRows") {
|
|
452
|
-
rowData[`${key}`] = /* @__PURE__ */ React12.createElement("div", { key: subIndex }, eachRow.variable_data.length > 1 && /* @__PURE__ */ React12.createElement(
|
|
452
|
+
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
453
|
} else {
|
|
454
454
|
rowData[`${key}`] = renderInputElement(variable[key]);
|
|
455
455
|
}
|
|
456
456
|
});
|
|
457
457
|
});
|
|
458
|
-
rowData.actions = /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement(
|
|
458
|
+
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
459
|
console.log("=====rowdata", rowData);
|
|
460
460
|
return rowData;
|
|
461
461
|
});
|
|
@@ -502,7 +502,7 @@ import React17 from "react";
|
|
|
502
502
|
|
|
503
503
|
// src/Components/Notification.tsx
|
|
504
504
|
import React14 from "react";
|
|
505
|
-
import { Popover, Badge, Button as
|
|
505
|
+
import { Popover, Badge, Button as Button3, Avatar, List } from "antd";
|
|
506
506
|
import { IoIosNotifications } from "react-icons/io";
|
|
507
507
|
var popoverContentStyle = {
|
|
508
508
|
minWidth: "300px",
|
|
@@ -530,7 +530,7 @@ var Notification = (props) => /* @__PURE__ */ React14.createElement(
|
|
|
530
530
|
trigger: "focus",
|
|
531
531
|
placement: "bottomRight"
|
|
532
532
|
},
|
|
533
|
-
/* @__PURE__ */ React14.createElement(
|
|
533
|
+
/* @__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
534
|
);
|
|
535
535
|
|
|
536
536
|
// src/Components/SpanElement.tsx
|
|
@@ -599,35 +599,16 @@ import { DatePicker } from "antd";
|
|
|
599
599
|
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
|
|
600
600
|
import moment from "moment";
|
|
601
601
|
var DatePickerElement = (props) => {
|
|
602
|
-
const [date, setDate] = useState5();
|
|
603
|
-
const handleChange = (
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
props.onChange(formattedDate);
|
|
609
|
-
}
|
|
610
|
-
} else {
|
|
611
|
-
setDate("");
|
|
612
|
-
}
|
|
602
|
+
const [date, setDate] = useState5("");
|
|
603
|
+
const handleChange = (datestring) => {
|
|
604
|
+
console.log("datestring--------", datestring);
|
|
605
|
+
const formatedData = moment(datestring).format("lll");
|
|
606
|
+
setDate(formatedData);
|
|
607
|
+
console.log("date--------", date);
|
|
613
608
|
};
|
|
614
609
|
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
610
|
};
|
|
623
611
|
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
612
|
};
|
|
632
613
|
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
614
|
};
|