@apexcura/core 0.0.16-Beta21 → 0.0.16-Beta211
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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +84 -1
- package/dist/index.mjs +93 -2
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -38,6 +38,18 @@ type FormExecutorProps = {
|
|
|
38
38
|
secondTextClassName?: string;
|
|
39
39
|
iconsClassName?: string;
|
|
40
40
|
labelClassName?: string;
|
|
41
|
+
view?: boolean;
|
|
42
|
+
isSVGStylesOverride?: boolean;
|
|
43
|
+
rowSelection?: boolean;
|
|
44
|
+
length?: number;
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
fillText1?: string;
|
|
47
|
+
fillText2?: string;
|
|
48
|
+
labels?: any[];
|
|
49
|
+
data?: any[];
|
|
50
|
+
pagination?: boolean;
|
|
51
|
+
is_detail?: boolean;
|
|
52
|
+
dateTime?: string;
|
|
41
53
|
modalContent?: {
|
|
42
54
|
className?: string;
|
|
43
55
|
fields?: {
|
|
@@ -52,11 +64,14 @@ type FormExecutorProps = {
|
|
|
52
64
|
}[];
|
|
53
65
|
};
|
|
54
66
|
items?: {
|
|
55
|
-
icon?: React.JSX.Element;
|
|
67
|
+
icon?: React.JSX.Element | string;
|
|
56
68
|
label?: string;
|
|
57
69
|
active?: boolean;
|
|
58
70
|
text?: string;
|
|
59
71
|
time?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
y?: number;
|
|
74
|
+
color?: string;
|
|
60
75
|
}[];
|
|
61
76
|
fields?: {
|
|
62
77
|
name?: string;
|
|
@@ -109,6 +124,7 @@ type FormExecutorProps = {
|
|
|
109
124
|
required?: boolean;
|
|
110
125
|
key?: string;
|
|
111
126
|
render?: () => void;
|
|
127
|
+
ellipsis: boolean;
|
|
112
128
|
}[];
|
|
113
129
|
tbody?: {
|
|
114
130
|
id?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,18 @@ type FormExecutorProps = {
|
|
|
38
38
|
secondTextClassName?: string;
|
|
39
39
|
iconsClassName?: string;
|
|
40
40
|
labelClassName?: string;
|
|
41
|
+
view?: boolean;
|
|
42
|
+
isSVGStylesOverride?: boolean;
|
|
43
|
+
rowSelection?: boolean;
|
|
44
|
+
length?: number;
|
|
45
|
+
loading?: boolean;
|
|
46
|
+
fillText1?: string;
|
|
47
|
+
fillText2?: string;
|
|
48
|
+
labels?: any[];
|
|
49
|
+
data?: any[];
|
|
50
|
+
pagination?: boolean;
|
|
51
|
+
is_detail?: boolean;
|
|
52
|
+
dateTime?: string;
|
|
41
53
|
modalContent?: {
|
|
42
54
|
className?: string;
|
|
43
55
|
fields?: {
|
|
@@ -52,11 +64,14 @@ type FormExecutorProps = {
|
|
|
52
64
|
}[];
|
|
53
65
|
};
|
|
54
66
|
items?: {
|
|
55
|
-
icon?: React.JSX.Element;
|
|
67
|
+
icon?: React.JSX.Element | string;
|
|
56
68
|
label?: string;
|
|
57
69
|
active?: boolean;
|
|
58
70
|
text?: string;
|
|
59
71
|
time?: string;
|
|
72
|
+
name?: string;
|
|
73
|
+
y?: number;
|
|
74
|
+
color?: string;
|
|
60
75
|
}[];
|
|
61
76
|
fields?: {
|
|
62
77
|
name?: string;
|
|
@@ -109,6 +124,7 @@ type FormExecutorProps = {
|
|
|
109
124
|
required?: boolean;
|
|
110
125
|
key?: string;
|
|
111
126
|
render?: () => void;
|
|
127
|
+
ellipsis: boolean;
|
|
112
128
|
}[];
|
|
113
129
|
tbody?: {
|
|
114
130
|
id?: number;
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
37
37
|
// src/libraries/element-executor.tsx
|
|
38
38
|
var import_react = __toESM(require("react"));
|
|
39
39
|
var import_ui_components = require("@apexcura/ui-components");
|
|
40
|
+
var import_moment = __toESM(require("moment"));
|
|
40
41
|
|
|
41
42
|
// src/services/http-service.tsx
|
|
42
43
|
var import_axios = __toESM(require("axios"));
|
|
@@ -266,6 +267,14 @@ var ElementExecutor = (props) => {
|
|
|
266
267
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
267
268
|
}
|
|
268
269
|
);
|
|
270
|
+
case "upload-manually":
|
|
271
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
272
|
+
import_ui_components.Upload,
|
|
273
|
+
{
|
|
274
|
+
...elementProps,
|
|
275
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
276
|
+
}
|
|
277
|
+
);
|
|
269
278
|
case "image":
|
|
270
279
|
return /* @__PURE__ */ import_react.default.createElement(import_ui_components.Image, { ...elementProps });
|
|
271
280
|
case "input-password":
|
|
@@ -300,6 +309,62 @@ var ElementExecutor = (props) => {
|
|
|
300
309
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
301
310
|
}
|
|
302
311
|
);
|
|
312
|
+
case "otp":
|
|
313
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
314
|
+
import_ui_components.OtpElement,
|
|
315
|
+
{
|
|
316
|
+
...elementProps,
|
|
317
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
318
|
+
}
|
|
319
|
+
);
|
|
320
|
+
case "circle-donut":
|
|
321
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
322
|
+
import_ui_components.CircleDonut,
|
|
323
|
+
{
|
|
324
|
+
...elementProps,
|
|
325
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
case "semicircle-donut":
|
|
329
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
330
|
+
import_ui_components.SemiCircleDonut,
|
|
331
|
+
{
|
|
332
|
+
...elementProps,
|
|
333
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
case "horizontal-barchart":
|
|
337
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
338
|
+
import_ui_components.HorizontalBarChart,
|
|
339
|
+
{
|
|
340
|
+
...elementProps,
|
|
341
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
case "linechart":
|
|
345
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
346
|
+
import_ui_components.LineChart,
|
|
347
|
+
{
|
|
348
|
+
...elementProps,
|
|
349
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
case "double-barchart":
|
|
353
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
354
|
+
import_ui_components.DoubleBarChart,
|
|
355
|
+
{
|
|
356
|
+
...elementProps,
|
|
357
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
358
|
+
}
|
|
359
|
+
);
|
|
360
|
+
case "barchart":
|
|
361
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
362
|
+
import_ui_components.BarChart,
|
|
363
|
+
{
|
|
364
|
+
...elementProps,
|
|
365
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
366
|
+
}
|
|
367
|
+
);
|
|
303
368
|
default:
|
|
304
369
|
return null;
|
|
305
370
|
}
|
|
@@ -307,7 +372,25 @@ var ElementExecutor = (props) => {
|
|
|
307
372
|
const renderFields = (schema2) => {
|
|
308
373
|
return schema2 && schema2.map((eachSection) => {
|
|
309
374
|
if (eachSection.visible !== false) {
|
|
310
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
375
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: eachSection.name }, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderElement(eachSection), /* @__PURE__ */ import_react.default.createElement("div", { className: eachSection.className, key: eachSection.name }, renderFields(eachSection.fields)), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
376
|
+
"p",
|
|
377
|
+
{
|
|
378
|
+
style: {
|
|
379
|
+
fontSize: "10px",
|
|
380
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
(0, import_moment.default)(eachSection.dateTime).format("LT")
|
|
384
|
+
) : "") : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
385
|
+
"p",
|
|
386
|
+
{
|
|
387
|
+
style: {
|
|
388
|
+
fontSize: "10px",
|
|
389
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
(0, import_moment.default)(eachSection.dateTime).format("LT")
|
|
393
|
+
) : ""));
|
|
311
394
|
}
|
|
312
395
|
return null;
|
|
313
396
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -22,8 +22,17 @@ import {
|
|
|
22
22
|
SingleCheckbox,
|
|
23
23
|
DropDownGroup,
|
|
24
24
|
FileUpload,
|
|
25
|
-
TabsElement
|
|
25
|
+
TabsElement,
|
|
26
|
+
Upload,
|
|
27
|
+
OtpElement,
|
|
28
|
+
CircleDonut,
|
|
29
|
+
SemiCircleDonut,
|
|
30
|
+
HorizontalBarChart,
|
|
31
|
+
DoubleBarChart,
|
|
32
|
+
LineChart,
|
|
33
|
+
BarChart
|
|
26
34
|
} from "@apexcura/ui-components";
|
|
35
|
+
import moment from "moment";
|
|
27
36
|
|
|
28
37
|
// src/services/http-service.tsx
|
|
29
38
|
import axios from "axios";
|
|
@@ -253,6 +262,14 @@ var ElementExecutor = (props) => {
|
|
|
253
262
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
254
263
|
}
|
|
255
264
|
);
|
|
265
|
+
case "upload-manually":
|
|
266
|
+
return /* @__PURE__ */ React.createElement(
|
|
267
|
+
Upload,
|
|
268
|
+
{
|
|
269
|
+
...elementProps,
|
|
270
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
271
|
+
}
|
|
272
|
+
);
|
|
256
273
|
case "image":
|
|
257
274
|
return /* @__PURE__ */ React.createElement(Image, { ...elementProps });
|
|
258
275
|
case "input-password":
|
|
@@ -287,6 +304,62 @@ var ElementExecutor = (props) => {
|
|
|
287
304
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
288
305
|
}
|
|
289
306
|
);
|
|
307
|
+
case "otp":
|
|
308
|
+
return /* @__PURE__ */ React.createElement(
|
|
309
|
+
OtpElement,
|
|
310
|
+
{
|
|
311
|
+
...elementProps,
|
|
312
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
case "circle-donut":
|
|
316
|
+
return /* @__PURE__ */ React.createElement(
|
|
317
|
+
CircleDonut,
|
|
318
|
+
{
|
|
319
|
+
...elementProps,
|
|
320
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
case "semicircle-donut":
|
|
324
|
+
return /* @__PURE__ */ React.createElement(
|
|
325
|
+
SemiCircleDonut,
|
|
326
|
+
{
|
|
327
|
+
...elementProps,
|
|
328
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
case "horizontal-barchart":
|
|
332
|
+
return /* @__PURE__ */ React.createElement(
|
|
333
|
+
HorizontalBarChart,
|
|
334
|
+
{
|
|
335
|
+
...elementProps,
|
|
336
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
case "linechart":
|
|
340
|
+
return /* @__PURE__ */ React.createElement(
|
|
341
|
+
LineChart,
|
|
342
|
+
{
|
|
343
|
+
...elementProps,
|
|
344
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
case "double-barchart":
|
|
348
|
+
return /* @__PURE__ */ React.createElement(
|
|
349
|
+
DoubleBarChart,
|
|
350
|
+
{
|
|
351
|
+
...elementProps,
|
|
352
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
353
|
+
}
|
|
354
|
+
);
|
|
355
|
+
case "barchart":
|
|
356
|
+
return /* @__PURE__ */ React.createElement(
|
|
357
|
+
BarChart,
|
|
358
|
+
{
|
|
359
|
+
...elementProps,
|
|
360
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
361
|
+
}
|
|
362
|
+
);
|
|
290
363
|
default:
|
|
291
364
|
return null;
|
|
292
365
|
}
|
|
@@ -294,7 +367,25 @@ var ElementExecutor = (props) => {
|
|
|
294
367
|
const renderFields = (schema2) => {
|
|
295
368
|
return schema2 && schema2.map((eachSection) => {
|
|
296
369
|
if (eachSection.visible !== false) {
|
|
297
|
-
return /* @__PURE__ */ React.createElement(
|
|
370
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, { key: eachSection.name }, eachSection.fields && eachSection.fields.length > 0 ? /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), /* @__PURE__ */ React.createElement("div", { className: eachSection.className, key: eachSection.name }, renderFields(eachSection.fields)), eachSection.dateTime ? /* @__PURE__ */ React.createElement(
|
|
371
|
+
"p",
|
|
372
|
+
{
|
|
373
|
+
style: {
|
|
374
|
+
fontSize: "10px",
|
|
375
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
moment(eachSection.dateTime).format("LT")
|
|
379
|
+
) : "") : /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ React.createElement(
|
|
380
|
+
"p",
|
|
381
|
+
{
|
|
382
|
+
style: {
|
|
383
|
+
fontSize: "10px",
|
|
384
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
moment(eachSection.dateTime).format("LT")
|
|
388
|
+
) : ""));
|
|
298
389
|
}
|
|
299
390
|
return null;
|
|
300
391
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apexcura/core",
|
|
3
|
-
"version": "0.0.16-
|
|
3
|
+
"version": "0.0.16-Beta211",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"build": "tsup"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@apexcura/ui-components": "^0.0.14-
|
|
31
|
+
"@apexcura/ui-components": "^0.0.14-Beta193",
|
|
32
32
|
"@testing-library/jest-dom": "^6.4.2",
|
|
33
33
|
"@testing-library/react": "^15.0.6",
|
|
34
34
|
"@types/react-global-configuration": "^1.3.3",
|
|
35
35
|
"antd": "^5.16.5",
|
|
36
36
|
"axios": "^1.6.8",
|
|
37
|
+
"moment": "^2.30.1",
|
|
37
38
|
"react": "^18.3.1",
|
|
38
39
|
"react-dom": "^18.3.1",
|
|
39
40
|
"tsup": "^8.0.2"
|