@apexcura/ui-components 0.0.15-Beta82 → 0.0.15-Beta84
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 +19 -59
- package/dist/index.mjs +30 -70
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -328,10 +328,9 @@ var import_tinymce_react = require("@tinymce/tinymce-react");
|
|
|
328
328
|
var import_react9 = __toESM(require("react"));
|
|
329
329
|
var CkEditor = (props) => {
|
|
330
330
|
const editorRef = (0, import_react8.useRef)(null);
|
|
331
|
-
const
|
|
331
|
+
const log = () => {
|
|
332
332
|
if (editorRef.current) {
|
|
333
333
|
let content = editorRef.current.getContent();
|
|
334
|
-
console.log(content);
|
|
335
334
|
if (props.onChange) {
|
|
336
335
|
props.onChange(content);
|
|
337
336
|
}
|
|
@@ -370,10 +369,9 @@ var CkEditor = (props) => {
|
|
|
370
369
|
],
|
|
371
370
|
toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
|
|
372
371
|
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
|
|
373
|
-
}
|
|
374
|
-
onChange: onHandleChange
|
|
372
|
+
}
|
|
375
373
|
}
|
|
376
|
-
));
|
|
374
|
+
), /* @__PURE__ */ import_react9.default.createElement("button", { onClick: log }, "Log editor content"));
|
|
377
375
|
};
|
|
378
376
|
|
|
379
377
|
// src/Components/Editor.tsx
|
|
@@ -382,60 +380,22 @@ var import_ckeditor5_react = require("@ckeditor/ckeditor5-react");
|
|
|
382
380
|
var import_ckeditor5_build_classic = __toESM(require("@ckeditor/ckeditor5-build-classic"));
|
|
383
381
|
var Editor2 = (props) => {
|
|
384
382
|
const [ckEditor, setckEditor] = (0, import_react10.useState)(null);
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}, [props.value, ckEditor]);
|
|
383
|
+
console.log(ckEditor);
|
|
384
|
+
const onHandleData = (event2, ckEditor2) => {
|
|
385
|
+
props.onChange && props.onChange(ckEditor2.getData());
|
|
386
|
+
};
|
|
390
387
|
return /* @__PURE__ */ import_react10.default.createElement(
|
|
391
388
|
import_ckeditor5_react.CKEditor,
|
|
392
389
|
{
|
|
393
390
|
editor: import_ckeditor5_build_classic.default,
|
|
394
391
|
config: {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
"
|
|
398
|
-
"
|
|
399
|
-
"
|
|
400
|
-
"
|
|
401
|
-
|
|
402
|
-
"preview",
|
|
403
|
-
"anchor",
|
|
404
|
-
"searchreplace",
|
|
405
|
-
"visualblocks",
|
|
406
|
-
"code",
|
|
407
|
-
"fullscreen",
|
|
408
|
-
"insertdatetime",
|
|
409
|
-
"media",
|
|
410
|
-
"table",
|
|
411
|
-
"code",
|
|
412
|
-
"help",
|
|
413
|
-
"wordcount"
|
|
414
|
-
],
|
|
415
|
-
toolbar: {
|
|
416
|
-
items: [
|
|
417
|
-
"undo",
|
|
418
|
-
"redo",
|
|
419
|
-
"|",
|
|
420
|
-
"bold",
|
|
421
|
-
"italic",
|
|
422
|
-
"foreColor",
|
|
423
|
-
"|",
|
|
424
|
-
"alignLeft",
|
|
425
|
-
"alignCenter",
|
|
426
|
-
"alignRight",
|
|
427
|
-
"alignJustify",
|
|
428
|
-
"|",
|
|
429
|
-
"bulletedList",
|
|
430
|
-
"numberedList",
|
|
431
|
-
"outdent",
|
|
432
|
-
"indent",
|
|
433
|
-
"|",
|
|
434
|
-
"removeFormat",
|
|
435
|
-
"|",
|
|
436
|
-
"help"
|
|
437
|
-
]
|
|
438
|
-
}
|
|
392
|
+
placeholder: `Enter Text`,
|
|
393
|
+
toolbar: [
|
|
394
|
+
"bold",
|
|
395
|
+
"bulletedList",
|
|
396
|
+
"numberedList",
|
|
397
|
+
"undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help"
|
|
398
|
+
]
|
|
439
399
|
},
|
|
440
400
|
data: props.value || "",
|
|
441
401
|
onReady: (editor) => {
|
|
@@ -443,12 +403,12 @@ var Editor2 = (props) => {
|
|
|
443
403
|
editor.setData(props.value);
|
|
444
404
|
setckEditor(editor);
|
|
445
405
|
} catch (error) {
|
|
446
|
-
console.error("Error setting CKEditor data:", error);
|
|
447
406
|
}
|
|
448
407
|
},
|
|
449
|
-
onChange: (event,
|
|
450
|
-
|
|
451
|
-
|
|
408
|
+
onChange: () => onHandleData(event, ckEditor),
|
|
409
|
+
onBlur: (event2, editor) => {
|
|
410
|
+
},
|
|
411
|
+
onFocus: (event2, editor) => {
|
|
452
412
|
}
|
|
453
413
|
}
|
|
454
414
|
);
|
|
@@ -1230,7 +1190,7 @@ var SwitchElement = (props) => {
|
|
|
1230
1190
|
const onChange = (checked) => {
|
|
1231
1191
|
props.onChange && props.onChange(checked);
|
|
1232
1192
|
};
|
|
1233
|
-
return /* @__PURE__ */ import_react29.default.createElement(import_antd20.Switch, { defaultChecked:
|
|
1193
|
+
return /* @__PURE__ */ import_react29.default.createElement(import_antd20.Switch, { defaultChecked: props.value, checkedChildren: props.checkedChildren, unCheckedChildren: props.unCheckedChildren, onChange });
|
|
1234
1194
|
};
|
|
1235
1195
|
|
|
1236
1196
|
// src/Components/Upload.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -258,10 +258,9 @@ import { Editor } from "@tinymce/tinymce-react";
|
|
|
258
258
|
import React8 from "react";
|
|
259
259
|
var CkEditor = (props) => {
|
|
260
260
|
const editorRef = useRef(null);
|
|
261
|
-
const
|
|
261
|
+
const log = () => {
|
|
262
262
|
if (editorRef.current) {
|
|
263
263
|
let content = editorRef.current.getContent();
|
|
264
|
-
console.log(content);
|
|
265
264
|
if (props.onChange) {
|
|
266
265
|
props.onChange(content);
|
|
267
266
|
}
|
|
@@ -300,72 +299,33 @@ var CkEditor = (props) => {
|
|
|
300
299
|
],
|
|
301
300
|
toolbar: "undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help",
|
|
302
301
|
content_style: "body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"
|
|
303
|
-
}
|
|
304
|
-
onChange: onHandleChange
|
|
302
|
+
}
|
|
305
303
|
}
|
|
306
|
-
));
|
|
304
|
+
), /* @__PURE__ */ React8.createElement("button", { onClick: log }, "Log editor content"));
|
|
307
305
|
};
|
|
308
306
|
|
|
309
307
|
// src/Components/Editor.tsx
|
|
310
|
-
import React9, { useState as useState4
|
|
308
|
+
import React9, { useState as useState4 } from "react";
|
|
311
309
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
312
310
|
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
|
|
313
311
|
var Editor2 = (props) => {
|
|
314
312
|
const [ckEditor, setckEditor] = useState4(null);
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
}, [props.value, ckEditor]);
|
|
313
|
+
console.log(ckEditor);
|
|
314
|
+
const onHandleData = (event2, ckEditor2) => {
|
|
315
|
+
props.onChange && props.onChange(ckEditor2.getData());
|
|
316
|
+
};
|
|
320
317
|
return /* @__PURE__ */ React9.createElement(
|
|
321
318
|
CKEditor,
|
|
322
319
|
{
|
|
323
320
|
editor: ClassicEditor,
|
|
324
321
|
config: {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
"
|
|
328
|
-
"
|
|
329
|
-
"
|
|
330
|
-
"
|
|
331
|
-
|
|
332
|
-
"preview",
|
|
333
|
-
"anchor",
|
|
334
|
-
"searchreplace",
|
|
335
|
-
"visualblocks",
|
|
336
|
-
"code",
|
|
337
|
-
"fullscreen",
|
|
338
|
-
"insertdatetime",
|
|
339
|
-
"media",
|
|
340
|
-
"table",
|
|
341
|
-
"code",
|
|
342
|
-
"help",
|
|
343
|
-
"wordcount"
|
|
344
|
-
],
|
|
345
|
-
toolbar: {
|
|
346
|
-
items: [
|
|
347
|
-
"undo",
|
|
348
|
-
"redo",
|
|
349
|
-
"|",
|
|
350
|
-
"bold",
|
|
351
|
-
"italic",
|
|
352
|
-
"foreColor",
|
|
353
|
-
"|",
|
|
354
|
-
"alignLeft",
|
|
355
|
-
"alignCenter",
|
|
356
|
-
"alignRight",
|
|
357
|
-
"alignJustify",
|
|
358
|
-
"|",
|
|
359
|
-
"bulletedList",
|
|
360
|
-
"numberedList",
|
|
361
|
-
"outdent",
|
|
362
|
-
"indent",
|
|
363
|
-
"|",
|
|
364
|
-
"removeFormat",
|
|
365
|
-
"|",
|
|
366
|
-
"help"
|
|
367
|
-
]
|
|
368
|
-
}
|
|
322
|
+
placeholder: `Enter Text`,
|
|
323
|
+
toolbar: [
|
|
324
|
+
"bold",
|
|
325
|
+
"bulletedList",
|
|
326
|
+
"numberedList",
|
|
327
|
+
"undo redo | blocks | bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help"
|
|
328
|
+
]
|
|
369
329
|
},
|
|
370
330
|
data: props.value || "",
|
|
371
331
|
onReady: (editor) => {
|
|
@@ -373,12 +333,12 @@ var Editor2 = (props) => {
|
|
|
373
333
|
editor.setData(props.value);
|
|
374
334
|
setckEditor(editor);
|
|
375
335
|
} catch (error) {
|
|
376
|
-
console.error("Error setting CKEditor data:", error);
|
|
377
336
|
}
|
|
378
337
|
},
|
|
379
|
-
onChange: (event,
|
|
380
|
-
|
|
381
|
-
|
|
338
|
+
onChange: () => onHandleData(event, ckEditor),
|
|
339
|
+
onBlur: (event2, editor) => {
|
|
340
|
+
},
|
|
341
|
+
onFocus: (event2, editor) => {
|
|
382
342
|
}
|
|
383
343
|
}
|
|
384
344
|
);
|
|
@@ -597,7 +557,7 @@ var ButtonElement = (props) => {
|
|
|
597
557
|
};
|
|
598
558
|
|
|
599
559
|
// src/Components/AddMoreTable.tsx
|
|
600
|
-
import React14, { useEffect
|
|
560
|
+
import React14, { useEffect, useState as useState5 } from "react";
|
|
601
561
|
import { Table, Button } from "antd";
|
|
602
562
|
import { PlusOutlined, DeleteOutlined } from "@ant-design/icons";
|
|
603
563
|
var AddMoreTable = (props) => {
|
|
@@ -667,7 +627,7 @@ var AddMoreTable = (props) => {
|
|
|
667
627
|
});
|
|
668
628
|
});
|
|
669
629
|
};
|
|
670
|
-
|
|
630
|
+
useEffect(() => {
|
|
671
631
|
}, [rows]);
|
|
672
632
|
const renderInputElement = (element, value) => {
|
|
673
633
|
if (!element) return null;
|
|
@@ -810,12 +770,12 @@ var Navbar = (props) => {
|
|
|
810
770
|
};
|
|
811
771
|
|
|
812
772
|
// src/Components/TableElement.tsx
|
|
813
|
-
import React20, { useState as useState6, useEffect as
|
|
773
|
+
import React20, { useState as useState6, useEffect as useEffect2 } from "react";
|
|
814
774
|
import { Table as Table2 } from "antd";
|
|
815
775
|
var TableElement = (props) => {
|
|
816
776
|
const { thead, tbody } = props;
|
|
817
777
|
const [dataSource, setDataSource] = useState6([]);
|
|
818
|
-
|
|
778
|
+
useEffect2(() => {
|
|
819
779
|
if (tbody) {
|
|
820
780
|
setDataSource(
|
|
821
781
|
tbody.map((row, index) => ({
|
|
@@ -1160,7 +1120,7 @@ var SwitchElement = (props) => {
|
|
|
1160
1120
|
const onChange = (checked) => {
|
|
1161
1121
|
props.onChange && props.onChange(checked);
|
|
1162
1122
|
};
|
|
1163
|
-
return /* @__PURE__ */ React28.createElement(Switch, { defaultChecked:
|
|
1123
|
+
return /* @__PURE__ */ React28.createElement(Switch, { defaultChecked: props.value, checkedChildren: props.checkedChildren, unCheckedChildren: props.unCheckedChildren, onChange });
|
|
1164
1124
|
};
|
|
1165
1125
|
|
|
1166
1126
|
// src/Components/Upload.tsx
|
|
@@ -1192,7 +1152,7 @@ var Upload2 = (props) => {
|
|
|
1192
1152
|
};
|
|
1193
1153
|
|
|
1194
1154
|
// src/Components/OtpElement.tsx
|
|
1195
|
-
import React30, { useState as useState11, useRef as useRef2, useEffect as
|
|
1155
|
+
import React30, { useState as useState11, useRef as useRef2, useEffect as useEffect3 } from "react";
|
|
1196
1156
|
import { Input as Input3 } from "antd";
|
|
1197
1157
|
var OtpElement = (props) => {
|
|
1198
1158
|
const length = props.length;
|
|
@@ -1229,7 +1189,7 @@ var OtpElement = (props) => {
|
|
|
1229
1189
|
});
|
|
1230
1190
|
}
|
|
1231
1191
|
};
|
|
1232
|
-
|
|
1192
|
+
useEffect3(() => {
|
|
1233
1193
|
inputRefs.current[0]?.focus();
|
|
1234
1194
|
}, []);
|
|
1235
1195
|
return /* @__PURE__ */ React30.createElement("div", { className: props.containerClassName }, Array.from({ length }).map((_, index) => /* @__PURE__ */ React30.createElement(
|
|
@@ -1481,7 +1441,7 @@ var HorizontalBarChart = (props) => {
|
|
|
1481
1441
|
};
|
|
1482
1442
|
|
|
1483
1443
|
// src/Components/LineChart.tsx
|
|
1484
|
-
import React34, { useEffect as
|
|
1444
|
+
import React34, { useEffect as useEffect4, useRef as useRef3 } from "react";
|
|
1485
1445
|
import Chart from "chart.js/auto";
|
|
1486
1446
|
var LineChart = (props) => {
|
|
1487
1447
|
const chartRef = useRef3(null);
|
|
@@ -1492,7 +1452,7 @@ var LineChart = (props) => {
|
|
|
1492
1452
|
{ label: "Conversion Rate", data: [50, 100, 150, 180, 50] }
|
|
1493
1453
|
];
|
|
1494
1454
|
const labels = ["Instagram", "Whatsapp", "Messages", "Telegram", "Linkedin"];
|
|
1495
|
-
|
|
1455
|
+
useEffect4(() => {
|
|
1496
1456
|
if (chartRef.current) {
|
|
1497
1457
|
if (chartInstance.current) {
|
|
1498
1458
|
chartInstance.current.destroy();
|
|
@@ -1554,12 +1514,12 @@ var LineChart = (props) => {
|
|
|
1554
1514
|
};
|
|
1555
1515
|
|
|
1556
1516
|
// src/Components/DoubleBarChart.tsx
|
|
1557
|
-
import React35, { useEffect as
|
|
1517
|
+
import React35, { useEffect as useEffect5, useRef as useRef4 } from "react";
|
|
1558
1518
|
import Chart2 from "chart.js/auto";
|
|
1559
1519
|
var DoubleBarChart = (props) => {
|
|
1560
1520
|
const chartRef = useRef4(null);
|
|
1561
1521
|
const chartInstance = useRef4(null);
|
|
1562
|
-
|
|
1522
|
+
useEffect5(() => {
|
|
1563
1523
|
if (chartRef.current) {
|
|
1564
1524
|
if (chartInstance.current) {
|
|
1565
1525
|
chartInstance.current.destroy();
|