@apexcura/ui-components 0.0.15-Beta86 → 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 +46 -11
- package/dist/index.mjs +61 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -379,8 +379,6 @@ var import_react10 = __toESM(require("react"));
|
|
|
379
379
|
var import_ckeditor5_react = require("@ckeditor/ckeditor5-react");
|
|
380
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
|
{
|
|
@@ -388,17 +386,54 @@ var Editor2 = (props) => {
|
|
|
388
386
|
config: {
|
|
389
387
|
placeholder: `Enter Text`,
|
|
390
388
|
toolbar: {
|
|
391
|
-
items: [
|
|
392
|
-
|
|
389
|
+
items: [
|
|
390
|
+
"undo",
|
|
391
|
+
"redo",
|
|
392
|
+
"|",
|
|
393
|
+
"blocks",
|
|
394
|
+
"|",
|
|
395
|
+
"bold",
|
|
396
|
+
"italic",
|
|
397
|
+
"forecolor",
|
|
398
|
+
"|",
|
|
399
|
+
"alignleft",
|
|
400
|
+
"aligncenter",
|
|
401
|
+
"|",
|
|
402
|
+
"alignright",
|
|
403
|
+
"alignjustify",
|
|
404
|
+
"|",
|
|
405
|
+
"bullist",
|
|
406
|
+
"numlist",
|
|
407
|
+
"outdent",
|
|
408
|
+
"indent",
|
|
409
|
+
"|",
|
|
410
|
+
"removeformat",
|
|
411
|
+
"|",
|
|
412
|
+
"help"
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
plugins: [
|
|
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"
|
|
434
|
+
]
|
|
393
435
|
},
|
|
394
436
|
data: props.value || "",
|
|
395
|
-
onReady: (editor) => {
|
|
396
|
-
try {
|
|
397
|
-
editor.setData(props.value);
|
|
398
|
-
setckEditor(editor);
|
|
399
|
-
} catch (error) {
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
437
|
onChange: (event, editor) => {
|
|
403
438
|
props.onChange && props.onChange(editor.getData());
|
|
404
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
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
|
{
|
|
@@ -318,17 +316,54 @@ var Editor2 = (props) => {
|
|
|
318
316
|
config: {
|
|
319
317
|
placeholder: `Enter Text`,
|
|
320
318
|
toolbar: {
|
|
321
|
-
items: [
|
|
322
|
-
|
|
319
|
+
items: [
|
|
320
|
+
"undo",
|
|
321
|
+
"redo",
|
|
322
|
+
"|",
|
|
323
|
+
"blocks",
|
|
324
|
+
"|",
|
|
325
|
+
"bold",
|
|
326
|
+
"italic",
|
|
327
|
+
"forecolor",
|
|
328
|
+
"|",
|
|
329
|
+
"alignleft",
|
|
330
|
+
"aligncenter",
|
|
331
|
+
"|",
|
|
332
|
+
"alignright",
|
|
333
|
+
"alignjustify",
|
|
334
|
+
"|",
|
|
335
|
+
"bullist",
|
|
336
|
+
"numlist",
|
|
337
|
+
"outdent",
|
|
338
|
+
"indent",
|
|
339
|
+
"|",
|
|
340
|
+
"removeformat",
|
|
341
|
+
"|",
|
|
342
|
+
"help"
|
|
343
|
+
]
|
|
344
|
+
},
|
|
345
|
+
plugins: [
|
|
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"
|
|
364
|
+
]
|
|
323
365
|
},
|
|
324
366
|
data: props.value || "",
|
|
325
|
-
onReady: (editor) => {
|
|
326
|
-
try {
|
|
327
|
-
editor.setData(props.value);
|
|
328
|
-
setckEditor(editor);
|
|
329
|
-
} catch (error) {
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
367
|
onChange: (event, editor) => {
|
|
333
368
|
props.onChange && props.onChange(editor.getData());
|
|
334
369
|
},
|
|
@@ -553,12 +588,12 @@ var ButtonElement = (props) => {
|
|
|
553
588
|
};
|
|
554
589
|
|
|
555
590
|
// src/Components/AddMoreTable.tsx
|
|
556
|
-
import React14, { useEffect, useState as
|
|
591
|
+
import React14, { useEffect, useState as useState4 } from "react";
|
|
557
592
|
import { Table, Button } from "antd";
|
|
558
593
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
559
594
|
var AddMoreTable = (props) => {
|
|
560
595
|
const { thead, tbody } = props;
|
|
561
|
-
const [rows, setRows] =
|
|
596
|
+
const [rows, setRows] = useState4(tbody || []);
|
|
562
597
|
const onHandleRows = () => {
|
|
563
598
|
const newId = rows.length > 0 ? rows[rows.length - 1].id + 1 : 1;
|
|
564
599
|
let newRow = {
|
|
@@ -766,11 +801,11 @@ var Navbar = (props) => {
|
|
|
766
801
|
};
|
|
767
802
|
|
|
768
803
|
// src/Components/TableElement.tsx
|
|
769
|
-
import React20, { useState as
|
|
804
|
+
import React20, { useState as useState5, useEffect as useEffect2 } from "react";
|
|
770
805
|
import { Table as Table2 } from "antd";
|
|
771
806
|
var TableElement = (props) => {
|
|
772
807
|
const { thead, tbody } = props;
|
|
773
|
-
const [dataSource, setDataSource] =
|
|
808
|
+
const [dataSource, setDataSource] = useState5([]);
|
|
774
809
|
useEffect2(() => {
|
|
775
810
|
if (tbody) {
|
|
776
811
|
setDataSource(
|
|
@@ -847,13 +882,13 @@ var TableElement = (props) => {
|
|
|
847
882
|
};
|
|
848
883
|
|
|
849
884
|
// src/Components/DatePicker.tsx
|
|
850
|
-
import React21, { useState as
|
|
885
|
+
import React21, { useState as useState6 } from "react";
|
|
851
886
|
import { DatePicker } from "antd";
|
|
852
887
|
import dayjs from "dayjs";
|
|
853
888
|
import customParseFormat from "dayjs/plugin/customParseFormat.js";
|
|
854
889
|
dayjs.extend(customParseFormat);
|
|
855
890
|
var DatePickerElement = (props) => {
|
|
856
|
-
const [dateState, setDateState] =
|
|
891
|
+
const [dateState, setDateState] = useState6(props.value);
|
|
857
892
|
const handleChange = (date, dateString) => {
|
|
858
893
|
if (date) {
|
|
859
894
|
setDateState(date);
|
|
@@ -987,10 +1022,10 @@ var SingleCheckbox = (props) => {
|
|
|
987
1022
|
};
|
|
988
1023
|
|
|
989
1024
|
// src/Components/DropDownGroup.tsx
|
|
990
|
-
import React25, { useState as
|
|
1025
|
+
import React25, { useState as useState7 } from "react";
|
|
991
1026
|
import { Select as Select4 } from "antd";
|
|
992
1027
|
var DropDownGroup = (props) => {
|
|
993
|
-
const [selectedValue, setSelectedValue] =
|
|
1028
|
+
const [selectedValue, setSelectedValue] = useState7({
|
|
994
1029
|
firstValue: props.value.firstValue,
|
|
995
1030
|
secondValue: props.value.secondValue,
|
|
996
1031
|
temp: ""
|
|
@@ -1056,12 +1091,12 @@ var DropDownGroup = (props) => {
|
|
|
1056
1091
|
};
|
|
1057
1092
|
|
|
1058
1093
|
// src/Components/FilesUpload.tsx
|
|
1059
|
-
import React26, { useState as
|
|
1094
|
+
import React26, { useState as useState8 } from "react";
|
|
1060
1095
|
import { Upload } from "antd";
|
|
1061
1096
|
import { InboxOutlined } from "@ant-design/icons";
|
|
1062
1097
|
var FileUpload = (props) => {
|
|
1063
1098
|
const { Dragger } = Upload;
|
|
1064
|
-
const [files, setFiles] =
|
|
1099
|
+
const [files, setFiles] = useState8(
|
|
1065
1100
|
props.value && props.value.length > 0 ? props.value : []
|
|
1066
1101
|
);
|
|
1067
1102
|
const handleChange = ({ fileList }) => {
|
|
@@ -1120,9 +1155,9 @@ var SwitchElement = (props) => {
|
|
|
1120
1155
|
};
|
|
1121
1156
|
|
|
1122
1157
|
// src/Components/Upload.tsx
|
|
1123
|
-
import React29, { useState as
|
|
1158
|
+
import React29, { useState as useState9 } from "react";
|
|
1124
1159
|
var Upload2 = (props) => {
|
|
1125
|
-
const [file, setFile] =
|
|
1160
|
+
const [file, setFile] = useState9();
|
|
1126
1161
|
const handleFileChange = (e) => {
|
|
1127
1162
|
setFile(e.target.files[0]);
|
|
1128
1163
|
if (props.onChange) {
|
|
@@ -1148,11 +1183,11 @@ var Upload2 = (props) => {
|
|
|
1148
1183
|
};
|
|
1149
1184
|
|
|
1150
1185
|
// src/Components/OtpElement.tsx
|
|
1151
|
-
import React30, { useState as
|
|
1186
|
+
import React30, { useState as useState10, useRef as useRef2, useEffect as useEffect3 } from "react";
|
|
1152
1187
|
import { Input as Input3 } from "antd";
|
|
1153
1188
|
var OtpElement = (props) => {
|
|
1154
1189
|
const length = props.length;
|
|
1155
|
-
const [otp, setOtp] =
|
|
1190
|
+
const [otp, setOtp] = useState10(Array(length).fill(""));
|
|
1156
1191
|
const inputRefs = useRef2([]);
|
|
1157
1192
|
const handleChange = (e, index) => {
|
|
1158
1193
|
const value = e.target.value;
|