@apexcura/ui-components 0.0.16-Beta18 → 0.0.16-Beta19
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 -15
- package/dist/index.mjs +25 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -278,22 +278,25 @@ var RadioElement = (props) => {
|
|
|
278
278
|
var import_react7 = __toESM(require("react"));
|
|
279
279
|
var import_antd7 = require("antd");
|
|
280
280
|
var CheckboxGroup = import_antd7.Checkbox.Group;
|
|
281
|
-
var defaultCheckedList = [];
|
|
282
281
|
var CheckboxElement = (props) => {
|
|
283
|
-
const [checkedList, setCheckedList] = (0, import_react7.useState)(
|
|
284
|
-
const options = props.options || []
|
|
285
|
-
|
|
282
|
+
const [checkedList, setCheckedList] = (0, import_react7.useState)([]);
|
|
283
|
+
const options = (props.options || []).map((option) => ({
|
|
284
|
+
key: option.key,
|
|
285
|
+
label: option.label ?? "",
|
|
286
|
+
value: option.value
|
|
287
|
+
}));
|
|
288
|
+
const checkAll = options.length > 0 && options.length === (checkedList && checkedList.length);
|
|
286
289
|
const handleChange = (list) => {
|
|
287
290
|
setCheckedList(list);
|
|
288
291
|
if (props.onChange) {
|
|
289
292
|
const selectedOptions = options.filter(
|
|
290
|
-
(option) => list.includes(option.value)
|
|
293
|
+
(option) => option.value && list.includes(option.value)
|
|
291
294
|
);
|
|
292
295
|
props.onChange(selectedOptions);
|
|
293
296
|
}
|
|
294
297
|
};
|
|
295
298
|
const onHandleAllChanges = (e) => {
|
|
296
|
-
const newList = e.target.checked ? options.map((option) => option.value) : [];
|
|
299
|
+
const newList = e.target.checked ? options.map((option) => option.value).filter((value) => value !== void 0) : [];
|
|
297
300
|
setCheckedList(newList);
|
|
298
301
|
if (props.onChange) {
|
|
299
302
|
const selectedOptions = e.target.checked ? options : [];
|
|
@@ -381,12 +384,12 @@ var import_react10 = __toESM(require("react"));
|
|
|
381
384
|
var import_ckeditor5_react = require("@ckeditor/ckeditor5-react");
|
|
382
385
|
var import_ckeditor5_build_classic = __toESM(require("@ckeditor/ckeditor5-build-classic"));
|
|
383
386
|
var Editor2 = (props) => {
|
|
384
|
-
return /* @__PURE__ */ import_react10.default.createElement("div", {
|
|
387
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react10.default.createElement(
|
|
385
388
|
import_ckeditor5_react.CKEditor,
|
|
386
389
|
{
|
|
387
390
|
editor: import_ckeditor5_build_classic.default,
|
|
388
391
|
config: {
|
|
389
|
-
removePlugins: ["CKEditorInspector"
|
|
392
|
+
removePlugins: ["CKEditorInspector"],
|
|
390
393
|
placeholder: `Enter Text`,
|
|
391
394
|
toolbar: {
|
|
392
395
|
items: [
|
|
@@ -407,6 +410,7 @@ var Editor2 = (props) => {
|
|
|
407
410
|
"|",
|
|
408
411
|
"insertTable",
|
|
409
412
|
"blockQuote",
|
|
413
|
+
"pageBreak",
|
|
410
414
|
"|",
|
|
411
415
|
"selectAll"
|
|
412
416
|
]
|
|
@@ -416,6 +420,10 @@ var Editor2 = (props) => {
|
|
|
416
420
|
onChange: (event, editor) => {
|
|
417
421
|
console.log(editor.getData());
|
|
418
422
|
props.onChange && props.onChange(editor.getData());
|
|
423
|
+
},
|
|
424
|
+
onBlur: (event, editor) => {
|
|
425
|
+
},
|
|
426
|
+
onFocus: (event, editor) => {
|
|
419
427
|
}
|
|
420
428
|
}
|
|
421
429
|
));
|
|
@@ -608,7 +616,8 @@ var icons = {
|
|
|
608
616
|
d: "M7.75254 21.4868C7.213 21.4868 6.75128 21.2948 6.36738 20.9109C5.98284 20.5264 5.79056 20.0643 5.79056 19.5248V6.77189C5.51261 6.77189 5.27947 6.67804 5.09111 6.49035C4.90342 6.302 4.80957 6.06885 4.80957 5.7909C4.80957 5.51295 4.90342 5.2798 5.09111 5.09145C5.27947 4.90376 5.51261 4.80991 5.79056 4.80991H9.71453C9.71453 4.53196 9.8087 4.29881 9.99705 4.11046C10.1847 3.92277 10.4176 3.82892 10.6955 3.82892H14.6195C14.8974 3.82892 15.1306 3.92277 15.3189 4.11046C15.5066 4.29881 15.6005 4.53196 15.6005 4.80991H19.5244C19.8024 4.80991 20.0352 4.90376 20.2229 5.09145C20.4113 5.2798 20.5054 5.51295 20.5054 5.7909C20.5054 6.06885 20.4113 6.302 20.2229 6.49035C20.0352 6.67804 19.8024 6.77189 19.5244 6.77189V19.5248C19.5244 20.0643 19.3325 20.5264 18.9486 20.9109C18.564 21.2948 18.102 21.4868 17.5625 21.4868H7.75254ZM9.71453 16.5818C9.71453 16.8597 9.8087 17.0926 9.99705 17.2803C10.1847 17.4686 10.4176 17.5628 10.6955 17.5628C10.9735 17.5628 11.2066 17.4686 11.395 17.2803C11.5827 17.0926 11.6765 16.8597 11.6765 16.5818V9.71486C11.6765 9.43692 11.5827 9.20377 11.395 9.01542C11.2066 8.82772 10.9735 8.73387 10.6955 8.73387C10.4176 8.73387 10.1847 8.82772 9.99705 9.01542C9.8087 9.20377 9.71453 9.43692 9.71453 9.71486V16.5818ZM13.6385 16.5818C13.6385 16.8597 13.7327 17.0926 13.921 17.2803C14.1087 17.4686 14.3415 17.5628 14.6195 17.5628C14.8974 17.5628 15.1306 17.4686 15.3189 17.2803C15.5066 17.0926 15.6005 16.8597 15.6005 16.5818V9.71486C15.6005 9.43692 15.5066 9.20377 15.3189 9.01542C15.1306 8.82772 14.8974 8.73387 14.6195 8.73387C14.3415 8.73387 14.1087 8.82772 13.921 9.01542C13.7327 9.20377 13.6385 9.43692 13.6385 9.71486V16.5818Z",
|
|
609
617
|
fill: "#D9363E"
|
|
610
618
|
}
|
|
611
|
-
))
|
|
619
|
+
)),
|
|
620
|
+
profile: /* @__PURE__ */ import_react13.default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react13.default.createElement("path", { d: "M17 19.5C18.3411 19.5 19.5979 18.3735 19.2664 16.9062C19.1476 16.3806 18.9841 15.8647 18.7769 15.3645C18.2994 14.2119 17.5997 13.1646 16.7175 12.2825C15.8354 11.4003 14.7881 10.7006 13.6355 10.2231C12.4829 9.74572 11.2476 9.5 10 9.5C8.75244 9.5 7.5171 9.74572 6.36451 10.2231C5.21191 10.7006 4.16464 11.4003 3.28249 12.2825C2.40033 13.1646 1.70056 14.2119 1.22314 15.3645C1.01594 15.8647 0.852378 16.3806 0.733607 16.9062C0.402069 18.3735 1.65891 19.5 3 19.5L10 19.5H17Z", fill: "#505050", stroke: "white" }), /* @__PURE__ */ import_react13.default.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050", stroke: "white" }))
|
|
612
621
|
};
|
|
613
622
|
|
|
614
623
|
// src/Components/Button.tsx
|
|
@@ -1010,22 +1019,23 @@ var DateRangePickerElement = (props) => {
|
|
|
1010
1019
|
const { RangePicker } = import_antd15.DatePicker;
|
|
1011
1020
|
const dateValues = value ? value.map((date) => (0, import_dayjs2.default)(date, "DD-MM-YYYY")) : null;
|
|
1012
1021
|
const today = (0, import_dayjs2.default)();
|
|
1013
|
-
const handleChange = (dates
|
|
1022
|
+
const handleChange = (dates) => {
|
|
1014
1023
|
if (dates) {
|
|
1015
|
-
let
|
|
1024
|
+
let end;
|
|
1025
|
+
const [start, initialEnd] = dates;
|
|
1026
|
+
end = initialEnd;
|
|
1016
1027
|
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
1017
1028
|
end = today;
|
|
1018
1029
|
}
|
|
1019
1030
|
const adjustedDates = [start, end].map(
|
|
1020
1031
|
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
1021
1032
|
);
|
|
1022
|
-
console.log("1", adjustedDates);
|
|
1023
1033
|
props.onChange && props.onChange(adjustedDates);
|
|
1024
1034
|
} else {
|
|
1025
1035
|
props.onChange && props.onChange("");
|
|
1026
1036
|
}
|
|
1027
1037
|
};
|
|
1028
|
-
|
|
1038
|
+
const rangePresets = [
|
|
1029
1039
|
{ label: "Last 7 Days", value: [(0, import_dayjs2.default)().subtract(6, "d"), today] },
|
|
1030
1040
|
{ label: "Last 14 Days", value: [(0, import_dayjs2.default)().subtract(13, "d"), today] },
|
|
1031
1041
|
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().subtract(29, "d"), today] },
|
|
@@ -1121,7 +1131,7 @@ var DropDownGroup = (props) => {
|
|
|
1121
1131
|
value: props.value.firstValue,
|
|
1122
1132
|
showSearch: true
|
|
1123
1133
|
}
|
|
1124
|
-
), /* @__PURE__ */ import_react26.default.createElement("div", { style: { borderLeft: "1px solid gray"
|
|
1134
|
+
), /* @__PURE__ */ import_react26.default.createElement("div", { style: { borderLeft: "1px solid gray" } }), /* @__PURE__ */ import_react26.default.createElement(
|
|
1125
1135
|
import_antd17.Select,
|
|
1126
1136
|
{
|
|
1127
1137
|
onChange: handleSecondChange,
|
|
@@ -1779,7 +1789,7 @@ var NotificationAlert = (props) => {
|
|
|
1779
1789
|
// src/Components/TooltipElement.tsx
|
|
1780
1790
|
var import_react41 = __toESM(require("react"));
|
|
1781
1791
|
var import_antd24 = require("antd");
|
|
1782
|
-
var TooltipElement = (props) => /* @__PURE__ */ import_react41.default.createElement(import_antd24.Tooltip, { title: props.title }, /* @__PURE__ */ import_react41.default.createElement("span",
|
|
1792
|
+
var TooltipElement = (props) => /* @__PURE__ */ import_react41.default.createElement(import_antd24.Tooltip, { title: props.title }, /* @__PURE__ */ import_react41.default.createElement("span", { className: props.className }, props.description));
|
|
1783
1793
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1784
1794
|
0 && (module.exports = {
|
|
1785
1795
|
AddMoreTable,
|
package/dist/index.mjs
CHANGED
|
@@ -207,22 +207,25 @@ var RadioElement = (props) => {
|
|
|
207
207
|
import React7, { useState as useState3 } from "react";
|
|
208
208
|
import { Checkbox } from "antd";
|
|
209
209
|
var CheckboxGroup = Checkbox.Group;
|
|
210
|
-
var defaultCheckedList = [];
|
|
211
210
|
var CheckboxElement = (props) => {
|
|
212
|
-
const [checkedList, setCheckedList] = useState3(
|
|
213
|
-
const options = props.options || []
|
|
214
|
-
|
|
211
|
+
const [checkedList, setCheckedList] = useState3([]);
|
|
212
|
+
const options = (props.options || []).map((option) => ({
|
|
213
|
+
key: option.key,
|
|
214
|
+
label: option.label ?? "",
|
|
215
|
+
value: option.value
|
|
216
|
+
}));
|
|
217
|
+
const checkAll = options.length > 0 && options.length === (checkedList && checkedList.length);
|
|
215
218
|
const handleChange = (list) => {
|
|
216
219
|
setCheckedList(list);
|
|
217
220
|
if (props.onChange) {
|
|
218
221
|
const selectedOptions = options.filter(
|
|
219
|
-
(option) => list.includes(option.value)
|
|
222
|
+
(option) => option.value && list.includes(option.value)
|
|
220
223
|
);
|
|
221
224
|
props.onChange(selectedOptions);
|
|
222
225
|
}
|
|
223
226
|
};
|
|
224
227
|
const onHandleAllChanges = (e) => {
|
|
225
|
-
const newList = e.target.checked ? options.map((option) => option.value) : [];
|
|
228
|
+
const newList = e.target.checked ? options.map((option) => option.value).filter((value) => value !== void 0) : [];
|
|
226
229
|
setCheckedList(newList);
|
|
227
230
|
if (props.onChange) {
|
|
228
231
|
const selectedOptions = e.target.checked ? options : [];
|
|
@@ -310,12 +313,12 @@ import React9 from "react";
|
|
|
310
313
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
311
314
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
312
315
|
var Editor2 = (props) => {
|
|
313
|
-
return /* @__PURE__ */ React9.createElement("div", {
|
|
316
|
+
return /* @__PURE__ */ React9.createElement("div", { className: props.className }, /* @__PURE__ */ React9.createElement(
|
|
314
317
|
CKEditor,
|
|
315
318
|
{
|
|
316
319
|
editor: ClassicEditor,
|
|
317
320
|
config: {
|
|
318
|
-
removePlugins: ["CKEditorInspector"
|
|
321
|
+
removePlugins: ["CKEditorInspector"],
|
|
319
322
|
placeholder: `Enter Text`,
|
|
320
323
|
toolbar: {
|
|
321
324
|
items: [
|
|
@@ -336,6 +339,7 @@ var Editor2 = (props) => {
|
|
|
336
339
|
"|",
|
|
337
340
|
"insertTable",
|
|
338
341
|
"blockQuote",
|
|
342
|
+
"pageBreak",
|
|
339
343
|
"|",
|
|
340
344
|
"selectAll"
|
|
341
345
|
]
|
|
@@ -345,6 +349,10 @@ var Editor2 = (props) => {
|
|
|
345
349
|
onChange: (event, editor) => {
|
|
346
350
|
console.log(editor.getData());
|
|
347
351
|
props.onChange && props.onChange(editor.getData());
|
|
352
|
+
},
|
|
353
|
+
onBlur: (event, editor) => {
|
|
354
|
+
},
|
|
355
|
+
onFocus: (event, editor) => {
|
|
348
356
|
}
|
|
349
357
|
}
|
|
350
358
|
));
|
|
@@ -537,7 +545,8 @@ var icons = {
|
|
|
537
545
|
d: "M7.75254 21.4868C7.213 21.4868 6.75128 21.2948 6.36738 20.9109C5.98284 20.5264 5.79056 20.0643 5.79056 19.5248V6.77189C5.51261 6.77189 5.27947 6.67804 5.09111 6.49035C4.90342 6.302 4.80957 6.06885 4.80957 5.7909C4.80957 5.51295 4.90342 5.2798 5.09111 5.09145C5.27947 4.90376 5.51261 4.80991 5.79056 4.80991H9.71453C9.71453 4.53196 9.8087 4.29881 9.99705 4.11046C10.1847 3.92277 10.4176 3.82892 10.6955 3.82892H14.6195C14.8974 3.82892 15.1306 3.92277 15.3189 4.11046C15.5066 4.29881 15.6005 4.53196 15.6005 4.80991H19.5244C19.8024 4.80991 20.0352 4.90376 20.2229 5.09145C20.4113 5.2798 20.5054 5.51295 20.5054 5.7909C20.5054 6.06885 20.4113 6.302 20.2229 6.49035C20.0352 6.67804 19.8024 6.77189 19.5244 6.77189V19.5248C19.5244 20.0643 19.3325 20.5264 18.9486 20.9109C18.564 21.2948 18.102 21.4868 17.5625 21.4868H7.75254ZM9.71453 16.5818C9.71453 16.8597 9.8087 17.0926 9.99705 17.2803C10.1847 17.4686 10.4176 17.5628 10.6955 17.5628C10.9735 17.5628 11.2066 17.4686 11.395 17.2803C11.5827 17.0926 11.6765 16.8597 11.6765 16.5818V9.71486C11.6765 9.43692 11.5827 9.20377 11.395 9.01542C11.2066 8.82772 10.9735 8.73387 10.6955 8.73387C10.4176 8.73387 10.1847 8.82772 9.99705 9.01542C9.8087 9.20377 9.71453 9.43692 9.71453 9.71486V16.5818ZM13.6385 16.5818C13.6385 16.8597 13.7327 17.0926 13.921 17.2803C14.1087 17.4686 14.3415 17.5628 14.6195 17.5628C14.8974 17.5628 15.1306 17.4686 15.3189 17.2803C15.5066 17.0926 15.6005 16.8597 15.6005 16.5818V9.71486C15.6005 9.43692 15.5066 9.20377 15.3189 9.01542C15.1306 8.82772 14.8974 8.73387 14.6195 8.73387C14.3415 8.73387 14.1087 8.82772 13.921 9.01542C13.7327 9.20377 13.6385 9.43692 13.6385 9.71486V16.5818Z",
|
|
538
546
|
fill: "#D9363E"
|
|
539
547
|
}
|
|
540
|
-
))
|
|
548
|
+
)),
|
|
549
|
+
profile: /* @__PURE__ */ React12.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ React12.createElement("path", { d: "M17 19.5C18.3411 19.5 19.5979 18.3735 19.2664 16.9062C19.1476 16.3806 18.9841 15.8647 18.7769 15.3645C18.2994 14.2119 17.5997 13.1646 16.7175 12.2825C15.8354 11.4003 14.7881 10.7006 13.6355 10.2231C12.4829 9.74572 11.2476 9.5 10 9.5C8.75244 9.5 7.5171 9.74572 6.36451 10.2231C5.21191 10.7006 4.16464 11.4003 3.28249 12.2825C2.40033 13.1646 1.70056 14.2119 1.22314 15.3645C1.01594 15.8647 0.852378 16.3806 0.733607 16.9062C0.402069 18.3735 1.65891 19.5 3 19.5L10 19.5H17Z", fill: "#505050", stroke: "white" }), /* @__PURE__ */ React12.createElement("circle", { cx: "10", cy: "6", r: "5.5", fill: "#505050", stroke: "white" }))
|
|
541
550
|
};
|
|
542
551
|
|
|
543
552
|
// src/Components/Button.tsx
|
|
@@ -939,22 +948,23 @@ var DateRangePickerElement = (props) => {
|
|
|
939
948
|
const { RangePicker } = DatePicker2;
|
|
940
949
|
const dateValues = value ? value.map((date) => dayjs2(date, "DD-MM-YYYY")) : null;
|
|
941
950
|
const today = dayjs2();
|
|
942
|
-
const handleChange = (dates
|
|
951
|
+
const handleChange = (dates) => {
|
|
943
952
|
if (dates) {
|
|
944
|
-
let
|
|
953
|
+
let end;
|
|
954
|
+
const [start, initialEnd] = dates;
|
|
955
|
+
end = initialEnd;
|
|
945
956
|
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
946
957
|
end = today;
|
|
947
958
|
}
|
|
948
959
|
const adjustedDates = [start, end].map(
|
|
949
960
|
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
950
961
|
);
|
|
951
|
-
console.log("1", adjustedDates);
|
|
952
962
|
props.onChange && props.onChange(adjustedDates);
|
|
953
963
|
} else {
|
|
954
964
|
props.onChange && props.onChange("");
|
|
955
965
|
}
|
|
956
966
|
};
|
|
957
|
-
|
|
967
|
+
const rangePresets = [
|
|
958
968
|
{ label: "Last 7 Days", value: [dayjs2().subtract(6, "d"), today] },
|
|
959
969
|
{ label: "Last 14 Days", value: [dayjs2().subtract(13, "d"), today] },
|
|
960
970
|
{ label: "Last 30 Days", value: [dayjs2().subtract(29, "d"), today] },
|
|
@@ -1050,7 +1060,7 @@ var DropDownGroup = (props) => {
|
|
|
1050
1060
|
value: props.value.firstValue,
|
|
1051
1061
|
showSearch: true
|
|
1052
1062
|
}
|
|
1053
|
-
), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray"
|
|
1063
|
+
), /* @__PURE__ */ React25.createElement("div", { style: { borderLeft: "1px solid gray" } }), /* @__PURE__ */ React25.createElement(
|
|
1054
1064
|
Select4,
|
|
1055
1065
|
{
|
|
1056
1066
|
onChange: handleSecondChange,
|
|
@@ -1732,7 +1742,7 @@ var NotificationAlert = (props) => {
|
|
|
1732
1742
|
// src/Components/TooltipElement.tsx
|
|
1733
1743
|
import React40 from "react";
|
|
1734
1744
|
import { Tooltip as Tooltip5 } from "antd";
|
|
1735
|
-
var TooltipElement = (props) => /* @__PURE__ */ React40.createElement(Tooltip5, { title: props.title }, /* @__PURE__ */ React40.createElement("span",
|
|
1745
|
+
var TooltipElement = (props) => /* @__PURE__ */ React40.createElement(Tooltip5, { title: props.title }, /* @__PURE__ */ React40.createElement("span", { className: props.className }, props.description));
|
|
1736
1746
|
export {
|
|
1737
1747
|
AddMoreTable,
|
|
1738
1748
|
BarChart,
|