@apexcura/ui-components 0.0.15-Beta87 → 0.0.15-Beta88
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 +20 -15
- package/dist/index.mjs +34 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -377,14 +377,12 @@ var CkEditor = (props) => {
|
|
|
377
377
|
// src/Components/Editor.tsx
|
|
378
378
|
var import_react10 = __toESM(require("react"));
|
|
379
379
|
var import_ckeditor5_react = require("@ckeditor/ckeditor5-react");
|
|
380
|
-
var
|
|
380
|
+
var import_ckeditor5_build_classic = __toESM(require("@ckeditor/ckeditor5-build-classic"));
|
|
381
381
|
var Editor2 = (props) => {
|
|
382
|
-
const [ckEditor, setckEditor] = (0, import_react10.useState)(null);
|
|
383
|
-
console.log(ckEditor);
|
|
384
382
|
return /* @__PURE__ */ import_react10.default.createElement(
|
|
385
383
|
import_ckeditor5_react.CKEditor,
|
|
386
384
|
{
|
|
387
|
-
editor:
|
|
385
|
+
editor: import_ckeditor5_build_classic.default,
|
|
388
386
|
config: {
|
|
389
387
|
placeholder: `Enter Text`,
|
|
390
388
|
toolbar: {
|
|
@@ -415,20 +413,27 @@ var Editor2 = (props) => {
|
|
|
415
413
|
]
|
|
416
414
|
},
|
|
417
415
|
plugins: [
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
416
|
+
"advlist",
|
|
417
|
+
"autolink",
|
|
418
|
+
"lists",
|
|
419
|
+
"link",
|
|
420
|
+
"image",
|
|
421
|
+
"charmap",
|
|
422
|
+
"preview",
|
|
423
|
+
"anchor",
|
|
424
|
+
"searchreplace",
|
|
425
|
+
"visualblocks",
|
|
426
|
+
"code",
|
|
427
|
+
"fullscreen",
|
|
428
|
+
"insertdatetime",
|
|
429
|
+
"media",
|
|
430
|
+
"table",
|
|
431
|
+
"code",
|
|
432
|
+
"help",
|
|
433
|
+
"wordcount"
|
|
422
434
|
]
|
|
423
435
|
},
|
|
424
436
|
data: props.value || "",
|
|
425
|
-
onReady: (editor) => {
|
|
426
|
-
try {
|
|
427
|
-
editor.setData(props.value);
|
|
428
|
-
setckEditor(editor);
|
|
429
|
-
} catch (error) {
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
437
|
onChange: (event, editor) => {
|
|
433
438
|
props.onChange && props.onChange(editor.getData());
|
|
434
439
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -305,12 +305,10 @@ var CkEditor = (props) => {
|
|
|
305
305
|
};
|
|
306
306
|
|
|
307
307
|
// src/Components/Editor.tsx
|
|
308
|
-
import React9
|
|
308
|
+
import React9 from "react";
|
|
309
309
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
310
|
-
import
|
|
310
|
+
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
311
311
|
var Editor2 = (props) => {
|
|
312
|
-
const [ckEditor, setckEditor] = useState4(null);
|
|
313
|
-
console.log(ckEditor);
|
|
314
312
|
return /* @__PURE__ */ React9.createElement(
|
|
315
313
|
CKEditor,
|
|
316
314
|
{
|
|
@@ -345,20 +343,27 @@ var Editor2 = (props) => {
|
|
|
345
343
|
]
|
|
346
344
|
},
|
|
347
345
|
plugins: [
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
346
|
+
"advlist",
|
|
347
|
+
"autolink",
|
|
348
|
+
"lists",
|
|
349
|
+
"link",
|
|
350
|
+
"image",
|
|
351
|
+
"charmap",
|
|
352
|
+
"preview",
|
|
353
|
+
"anchor",
|
|
354
|
+
"searchreplace",
|
|
355
|
+
"visualblocks",
|
|
356
|
+
"code",
|
|
357
|
+
"fullscreen",
|
|
358
|
+
"insertdatetime",
|
|
359
|
+
"media",
|
|
360
|
+
"table",
|
|
361
|
+
"code",
|
|
362
|
+
"help",
|
|
363
|
+
"wordcount"
|
|
352
364
|
]
|
|
353
365
|
},
|
|
354
366
|
data: props.value || "",
|
|
355
|
-
onReady: (editor) => {
|
|
356
|
-
try {
|
|
357
|
-
editor.setData(props.value);
|
|
358
|
-
setckEditor(editor);
|
|
359
|
-
} catch (error) {
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
367
|
onChange: (event, editor) => {
|
|
363
368
|
props.onChange && props.onChange(editor.getData());
|
|
364
369
|
},
|
|
@@ -583,12 +588,12 @@ var ButtonElement = (props) => {
|
|
|
583
588
|
};
|
|
584
589
|
|
|
585
590
|
// src/Components/AddMoreTable.tsx
|
|
586
|
-
import React14, { useEffect, useState as
|
|
591
|
+
import React14, { useEffect, useState as useState4 } from "react";
|
|
587
592
|
import { Table, Button } from "antd";
|
|
588
593
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
589
594
|
var AddMoreTable = (props) => {
|
|
590
595
|
const { thead, tbody } = props;
|
|
591
|
-
const [rows, setRows] =
|
|
596
|
+
const [rows, setRows] = useState4(tbody || []);
|
|
592
597
|
const onHandleRows = () => {
|
|
593
598
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
594
599
|
let newRow = {
|
|
@@ -796,11 +801,11 @@ var Navbar = (props) => {
|
|
|
796
801
|
};
|
|
797
802
|
|
|
798
803
|
// src/Components/TableElement.tsx
|
|
799
|
-
import React20, { useState as
|
|
804
|
+
import React20, { useState as useState5, useEffect as useEffect2 } from "react";
|
|
800
805
|
import { Table as Table2 } from "antd";
|
|
801
806
|
var TableElement = (props) => {
|
|
802
807
|
const { thead, tbody } = props;
|
|
803
|
-
const [dataSource, setDataSource] =
|
|
808
|
+
const [dataSource, setDataSource] = useState5([]);
|
|
804
809
|
useEffect2(() => {
|
|
805
810
|
if (tbody) {
|
|
806
811
|
setDataSource(
|
|
@@ -877,13 +882,13 @@ var TableElement = (props) => {
|
|
|
877
882
|
};
|
|
878
883
|
|
|
879
884
|
// src/Components/DatePicker.tsx
|
|
880
|
-
import React21, { useState as
|
|
885
|
+
import React21, { useState as useState6 } from "react";
|
|
881
886
|
import { DatePicker } from "antd";
|
|
882
887
|
import dayjs from "dayjs";
|
|
883
888
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
884
889
|
dayjs.extend(customParseFormat);
|
|
885
890
|
var DatePickerElement = (props) => {
|
|
886
|
-
const [dateState, setDateState] =
|
|
891
|
+
const [dateState, setDateState] = useState6(props.value);
|
|
887
892
|
const handleChange = (date, dateString) => {
|
|
888
893
|
if (date) {
|
|
889
894
|
setDateState(date);
|
|
@@ -1017,10 +1022,10 @@ var SingleCheckbox = (props) => {
|
|
|
1017
1022
|
};
|
|
1018
1023
|
|
|
1019
1024
|
// src/Components/DropDownGroup.tsx
|
|
1020
|
-
import React25, { useState as
|
|
1025
|
+
import React25, { useState as useState7 } from "react";
|
|
1021
1026
|
import { Select as Select4 } from "antd";
|
|
1022
1027
|
var DropDownGroup = (props) => {
|
|
1023
|
-
const [selectedValue, setSelectedValue] =
|
|
1028
|
+
const [selectedValue, setSelectedValue] = useState7({
|
|
1024
1029
|
firstValue: props.value.firstValue,
|
|
1025
1030
|
secondValue: props.value.secondValue,
|
|
1026
1031
|
temp: ""
|
|
@@ -1086,12 +1091,12 @@ var DropDownGroup = (props) => {
|
|
|
1086
1091
|
};
|
|
1087
1092
|
|
|
1088
1093
|
// src/Components/FilesUpload.tsx
|
|
1089
|
-
import React26, { useState as
|
|
1094
|
+
import React26, { useState as useState8 } from "react";
|
|
1090
1095
|
import { Upload } from "antd";
|
|
1091
1096
|
import { InboxOutlined } from "@ant-design/icons";
|
|
1092
1097
|
var FileUpload = (props) => {
|
|
1093
1098
|
const { Dragger } = Upload;
|
|
1094
|
-
const [files, setFiles] =
|
|
1099
|
+
const [files, setFiles] = useState8(
|
|
1095
1100
|
props.value && props.value.length > 0 ? props.value : []
|
|
1096
1101
|
);
|
|
1097
1102
|
const handleChange = ({ fileList }) => {
|
|
@@ -1150,9 +1155,9 @@ var SwitchElement = (props) => {
|
|
|
1150
1155
|
};
|
|
1151
1156
|
|
|
1152
1157
|
// src/Components/Upload.tsx
|
|
1153
|
-
import React29, { useState as
|
|
1158
|
+
import React29, { useState as useState9 } from "react";
|
|
1154
1159
|
var Upload2 = (props) => {
|
|
1155
|
-
const [file, setFile] =
|
|
1160
|
+
const [file, setFile] = useState9();
|
|
1156
1161
|
const handleFileChange = (e) => {
|
|
1157
1162
|
setFile(e.target.files[0]);
|
|
1158
1163
|
if (props.onChange) {
|
|
@@ -1178,11 +1183,11 @@ var Upload2 = (props) => {
|
|
|
1178
1183
|
};
|
|
1179
1184
|
|
|
1180
1185
|
// src/Components/OtpElement.tsx
|
|
1181
|
-
import React30, { useState as
|
|
1186
|
+
import React30, { useState as useState10, useRef as useRef2, useEffect as useEffect3 } from "react";
|
|
1182
1187
|
import { Input as Input3 } from "antd";
|
|
1183
1188
|
var OtpElement = (props) => {
|
|
1184
1189
|
const length = props.length;
|
|
1185
|
-
const [otp, setOtp] =
|
|
1190
|
+
const [otp, setOtp] = useState10(Array(length).fill(""));
|
|
1186
1191
|
const inputRefs = useRef2([]);
|
|
1187
1192
|
const handleChange = (e, index) => {
|
|
1188
1193
|
const value = e.target.value;
|