@apexcura/ui-components 0.0.14-Beta33 → 0.0.14-Beta35
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.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -1
- package/dist/index.mjs +30 -17
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -85,7 +85,7 @@ declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
85
85
|
|
|
86
86
|
declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
87
87
|
|
|
88
|
-
declare const ButtonElement: React$1.
|
|
88
|
+
declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
|
|
89
89
|
|
|
90
90
|
declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
|
|
91
91
|
|
package/dist/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
85
85
|
|
|
86
86
|
declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
|
|
87
87
|
|
|
88
|
-
declare const ButtonElement: React$1.
|
|
88
|
+
declare const ButtonElement: (props: ElementType) => React$1.JSX.Element;
|
|
89
89
|
|
|
90
90
|
declare const AddMoreTable: (props: ElementType) => React$1.JSX.Element;
|
|
91
91
|
|
package/dist/index.js
CHANGED
|
@@ -377,13 +377,26 @@ var MultipleSelectElement = (props) => {
|
|
|
377
377
|
// src/Components/Button.tsx
|
|
378
378
|
var import_react11 = __toESM(require("react"));
|
|
379
379
|
var ButtonElement = (props) => {
|
|
380
|
+
const [svgContent, setSvgContent] = (0, import_react11.useState)(null);
|
|
381
|
+
(0, import_react11.useEffect)(() => {
|
|
382
|
+
if (props.icon) {
|
|
383
|
+
fetch(props.icon).then((response) => response.text()).then((data) => setSvgContent(data)).catch((error) => console.error("Error fetching SVG:", error));
|
|
384
|
+
}
|
|
385
|
+
}, [props.icon]);
|
|
386
|
+
console.log(svgContent);
|
|
380
387
|
return /* @__PURE__ */ import_react11.default.createElement(
|
|
381
388
|
"button",
|
|
382
389
|
{
|
|
383
390
|
onClick: () => props.onClick && props.onClick(),
|
|
384
391
|
className: `${props.className ? props.className : ""}`
|
|
385
392
|
},
|
|
386
|
-
|
|
393
|
+
svgContent ? (
|
|
394
|
+
// <span
|
|
395
|
+
// className={props.iconsClassName}
|
|
396
|
+
// dangerouslySetInnerHTML={{ __html: svgContent }}
|
|
397
|
+
// />
|
|
398
|
+
/* @__PURE__ */ import_react11.default.createElement("h1", null, "hijdwe")
|
|
399
|
+
) : props.icon && /* @__PURE__ */ import_react11.default.createElement("img", { className: props.iconsClassName, src: props.icon }),
|
|
387
400
|
props.label
|
|
388
401
|
);
|
|
389
402
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -316,26 +316,39 @@ var MultipleSelectElement = (props) => {
|
|
|
316
316
|
};
|
|
317
317
|
|
|
318
318
|
// src/Components/Button.tsx
|
|
319
|
-
import React11 from "react";
|
|
319
|
+
import React11, { useEffect, useState as useState4 } from "react";
|
|
320
320
|
var ButtonElement = (props) => {
|
|
321
|
+
const [svgContent, setSvgContent] = useState4(null);
|
|
322
|
+
useEffect(() => {
|
|
323
|
+
if (props.icon) {
|
|
324
|
+
fetch(props.icon).then((response) => response.text()).then((data) => setSvgContent(data)).catch((error) => console.error("Error fetching SVG:", error));
|
|
325
|
+
}
|
|
326
|
+
}, [props.icon]);
|
|
327
|
+
console.log(svgContent);
|
|
321
328
|
return /* @__PURE__ */ React11.createElement(
|
|
322
329
|
"button",
|
|
323
330
|
{
|
|
324
331
|
onClick: () => props.onClick && props.onClick(),
|
|
325
332
|
className: `${props.className ? props.className : ""}`
|
|
326
333
|
},
|
|
327
|
-
|
|
334
|
+
svgContent ? (
|
|
335
|
+
// <span
|
|
336
|
+
// className={props.iconsClassName}
|
|
337
|
+
// dangerouslySetInnerHTML={{ __html: svgContent }}
|
|
338
|
+
// />
|
|
339
|
+
/* @__PURE__ */ React11.createElement("h1", null, "hijdwe")
|
|
340
|
+
) : props.icon && /* @__PURE__ */ React11.createElement("img", { className: props.iconsClassName, src: props.icon }),
|
|
328
341
|
props.label
|
|
329
342
|
);
|
|
330
343
|
};
|
|
331
344
|
|
|
332
345
|
// src/Components/AddMoreTable.tsx
|
|
333
|
-
import React12, { useEffect, useState as
|
|
346
|
+
import React12, { useEffect as useEffect2, useState as useState5 } from "react";
|
|
334
347
|
import { Table, Button } from "antd";
|
|
335
348
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
336
349
|
var AddMoreTable = (props) => {
|
|
337
350
|
const { thead, tbody } = props;
|
|
338
|
-
const [rows, setRows] =
|
|
351
|
+
const [rows, setRows] = useState5(tbody || []);
|
|
339
352
|
const onHandleRows = () => {
|
|
340
353
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
341
354
|
let newRow = {
|
|
@@ -400,7 +413,7 @@ var AddMoreTable = (props) => {
|
|
|
400
413
|
});
|
|
401
414
|
});
|
|
402
415
|
};
|
|
403
|
-
|
|
416
|
+
useEffect2(() => {
|
|
404
417
|
console.log(rows);
|
|
405
418
|
}, [rows]);
|
|
406
419
|
const renderInputElement = (element, value) => {
|
|
@@ -535,7 +548,7 @@ var Navbar = (props) => {
|
|
|
535
548
|
};
|
|
536
549
|
|
|
537
550
|
// src/Components/TableElement.tsx
|
|
538
|
-
import React20, { useState as
|
|
551
|
+
import React20, { useState as useState6 } from "react";
|
|
539
552
|
import { Table as Table2 } from "antd";
|
|
540
553
|
|
|
541
554
|
// src/Components/Model.tsx
|
|
@@ -593,9 +606,9 @@ var ModelElement = (props) => {
|
|
|
593
606
|
// src/Components/TableElement.tsx
|
|
594
607
|
var TableElement = (props) => {
|
|
595
608
|
const { thead, tbody } = props;
|
|
596
|
-
const [selectedRecord, setSelectedRecord] =
|
|
597
|
-
const [model, setModel] =
|
|
598
|
-
const [selectedRowKeys, setSelectedRowKeys] =
|
|
609
|
+
const [selectedRecord, setSelectedRecord] = useState6({});
|
|
610
|
+
const [model, setModel] = useState6(false);
|
|
611
|
+
const [selectedRowKeys, setSelectedRowKeys] = useState6([]);
|
|
599
612
|
const handleChange = (record) => {
|
|
600
613
|
console.log("record", record);
|
|
601
614
|
if (props.onChange) {
|
|
@@ -682,13 +695,13 @@ var TableElement = (props) => {
|
|
|
682
695
|
};
|
|
683
696
|
|
|
684
697
|
// src/Components/DatePicker.tsx
|
|
685
|
-
import React21, { useState as
|
|
698
|
+
import React21, { useState as useState7 } from "react";
|
|
686
699
|
import { DatePicker } from "antd";
|
|
687
700
|
import dayjs from "dayjs";
|
|
688
701
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
689
702
|
dayjs.extend(customParseFormat);
|
|
690
703
|
var DatePickerElement = (props) => {
|
|
691
|
-
const [dateState, setDateState] =
|
|
704
|
+
const [dateState, setDateState] = useState7("");
|
|
692
705
|
const handleChange = (date, dateString) => {
|
|
693
706
|
if (date) {
|
|
694
707
|
const formattedDate = date;
|
|
@@ -755,10 +768,10 @@ var SingleCheckbox = (props) => {
|
|
|
755
768
|
};
|
|
756
769
|
|
|
757
770
|
// src/Components/DropDownGroup.tsx
|
|
758
|
-
import React25, { useState as
|
|
771
|
+
import React25, { useState as useState8 } from "react";
|
|
759
772
|
import { Select as Select4 } from "antd";
|
|
760
773
|
var DropDownGroup = (props) => {
|
|
761
|
-
const [selectedValue, setSelectedValue] =
|
|
774
|
+
const [selectedValue, setSelectedValue] = useState8({
|
|
762
775
|
firstValue: {},
|
|
763
776
|
secondValue: {},
|
|
764
777
|
temp: ""
|
|
@@ -810,12 +823,12 @@ var DropDownGroup = (props) => {
|
|
|
810
823
|
};
|
|
811
824
|
|
|
812
825
|
// src/Components/FilesUpload.tsx
|
|
813
|
-
import React26, { useState as
|
|
826
|
+
import React26, { useState as useState9 } from "react";
|
|
814
827
|
import { Upload } from "antd";
|
|
815
828
|
import { InboxOutlined } from "@ant-design/icons";
|
|
816
829
|
var FileUpload = (props) => {
|
|
817
830
|
const { Dragger } = Upload;
|
|
818
|
-
const [files, setFiles] =
|
|
831
|
+
const [files, setFiles] = useState9([]);
|
|
819
832
|
const handleChange = ({ fileList }) => {
|
|
820
833
|
setFiles(fileList);
|
|
821
834
|
if (props.onChange) {
|
|
@@ -869,9 +882,9 @@ var onChange = (checked) => {
|
|
|
869
882
|
var SwitchElement = () => /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: true, onChange });
|
|
870
883
|
|
|
871
884
|
// src/Components/Upload.tsx
|
|
872
|
-
import React29, { useState as
|
|
885
|
+
import React29, { useState as useState10 } from "react";
|
|
873
886
|
var Upload2 = (props) => {
|
|
874
|
-
const [file, setFile] =
|
|
887
|
+
const [file, setFile] = useState10();
|
|
875
888
|
const handleFileChange = (e) => {
|
|
876
889
|
setFile(e.target.files[0]);
|
|
877
890
|
if (props.onChange) {
|