@apexcura/core 0.0.16-Beta30 → 0.0.16-Beta300
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 +19 -11
- package/dist/index.d.ts +19 -11
- package/dist/index.js +83 -2
- package/dist/index.mjs +92 -3
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -38,25 +38,32 @@ 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?: {
|
|
54
|
+
name?: string;
|
|
42
55
|
className?: string;
|
|
43
|
-
fields?:
|
|
44
|
-
_id?: string;
|
|
45
|
-
name?: string;
|
|
46
|
-
label?: string;
|
|
47
|
-
source?: string;
|
|
48
|
-
initial_message?: boolean;
|
|
49
|
-
element: string;
|
|
50
|
-
className?: string;
|
|
51
|
-
position?: string;
|
|
52
|
-
}[];
|
|
56
|
+
fields?: any[];
|
|
53
57
|
};
|
|
54
58
|
items?: {
|
|
55
|
-
icon?: React.JSX.Element;
|
|
59
|
+
icon?: React.JSX.Element | string;
|
|
56
60
|
label?: string;
|
|
57
61
|
active?: boolean;
|
|
58
62
|
text?: string;
|
|
59
63
|
time?: string;
|
|
64
|
+
name?: string;
|
|
65
|
+
y?: number;
|
|
66
|
+
color?: string;
|
|
60
67
|
}[];
|
|
61
68
|
fields?: {
|
|
62
69
|
name?: string;
|
|
@@ -109,6 +116,7 @@ type FormExecutorProps = {
|
|
|
109
116
|
required?: boolean;
|
|
110
117
|
key?: string;
|
|
111
118
|
render?: () => void;
|
|
119
|
+
ellipsis: boolean;
|
|
112
120
|
}[];
|
|
113
121
|
tbody?: {
|
|
114
122
|
id?: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -38,25 +38,32 @@ 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?: {
|
|
54
|
+
name?: string;
|
|
42
55
|
className?: string;
|
|
43
|
-
fields?:
|
|
44
|
-
_id?: string;
|
|
45
|
-
name?: string;
|
|
46
|
-
label?: string;
|
|
47
|
-
source?: string;
|
|
48
|
-
initial_message?: boolean;
|
|
49
|
-
element: string;
|
|
50
|
-
className?: string;
|
|
51
|
-
position?: string;
|
|
52
|
-
}[];
|
|
56
|
+
fields?: any[];
|
|
53
57
|
};
|
|
54
58
|
items?: {
|
|
55
|
-
icon?: React.JSX.Element;
|
|
59
|
+
icon?: React.JSX.Element | string;
|
|
56
60
|
label?: string;
|
|
57
61
|
active?: boolean;
|
|
58
62
|
text?: string;
|
|
59
63
|
time?: string;
|
|
64
|
+
name?: string;
|
|
65
|
+
y?: number;
|
|
66
|
+
color?: string;
|
|
60
67
|
}[];
|
|
61
68
|
fields?: {
|
|
62
69
|
name?: string;
|
|
@@ -109,6 +116,7 @@ type FormExecutorProps = {
|
|
|
109
116
|
required?: boolean;
|
|
110
117
|
key?: string;
|
|
111
118
|
render?: () => void;
|
|
119
|
+
ellipsis: boolean;
|
|
112
120
|
}[];
|
|
113
121
|
tbody?: {
|
|
114
122
|
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"));
|
|
@@ -215,7 +216,13 @@ var ElementExecutor = (props) => {
|
|
|
215
216
|
case "add-more":
|
|
216
217
|
return /* @__PURE__ */ import_react.default.createElement(import_ui_components.AddMoreTable, { ...elementProps });
|
|
217
218
|
case "div":
|
|
218
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
219
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
220
|
+
import_ui_components.DivContainer,
|
|
221
|
+
{
|
|
222
|
+
...elementProps,
|
|
223
|
+
onClick: () => props.selectedRecord(elementProps)
|
|
224
|
+
}
|
|
225
|
+
);
|
|
219
226
|
case "button":
|
|
220
227
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
221
228
|
import_ui_components.ButtonElement,
|
|
@@ -308,6 +315,62 @@ var ElementExecutor = (props) => {
|
|
|
308
315
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
309
316
|
}
|
|
310
317
|
);
|
|
318
|
+
case "otp":
|
|
319
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
320
|
+
import_ui_components.OtpElement,
|
|
321
|
+
{
|
|
322
|
+
...elementProps,
|
|
323
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
case "circle-donut":
|
|
327
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
328
|
+
import_ui_components.CircleDonut,
|
|
329
|
+
{
|
|
330
|
+
...elementProps,
|
|
331
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
case "semicircle-donut":
|
|
335
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
336
|
+
import_ui_components.SemiCircleDonut,
|
|
337
|
+
{
|
|
338
|
+
...elementProps,
|
|
339
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
case "horizontal-barchart":
|
|
343
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
344
|
+
import_ui_components.HorizontalBarChart,
|
|
345
|
+
{
|
|
346
|
+
...elementProps,
|
|
347
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
case "linechart":
|
|
351
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
352
|
+
import_ui_components.LineChart,
|
|
353
|
+
{
|
|
354
|
+
...elementProps,
|
|
355
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
case "double-barchart":
|
|
359
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
360
|
+
import_ui_components.DoubleBarChart,
|
|
361
|
+
{
|
|
362
|
+
...elementProps,
|
|
363
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
364
|
+
}
|
|
365
|
+
);
|
|
366
|
+
case "barchart":
|
|
367
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
368
|
+
import_ui_components.BarChart,
|
|
369
|
+
{
|
|
370
|
+
...elementProps,
|
|
371
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
372
|
+
}
|
|
373
|
+
);
|
|
311
374
|
default:
|
|
312
375
|
return null;
|
|
313
376
|
}
|
|
@@ -315,7 +378,25 @@ var ElementExecutor = (props) => {
|
|
|
315
378
|
const renderFields = (schema2) => {
|
|
316
379
|
return schema2 && schema2.map((eachSection) => {
|
|
317
380
|
if (eachSection.visible !== false) {
|
|
318
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment,
|
|
381
|
+
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(
|
|
382
|
+
"p",
|
|
383
|
+
{
|
|
384
|
+
style: {
|
|
385
|
+
fontSize: "10px",
|
|
386
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
(0, import_moment.default)(eachSection.dateTime).format("LT")
|
|
390
|
+
) : "") : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement(
|
|
391
|
+
"p",
|
|
392
|
+
{
|
|
393
|
+
style: {
|
|
394
|
+
fontSize: "10px",
|
|
395
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
(0, import_moment.default)(eachSection.dateTime).format("LT")
|
|
399
|
+
) : ""));
|
|
319
400
|
}
|
|
320
401
|
return null;
|
|
321
402
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -23,8 +23,17 @@ import {
|
|
|
23
23
|
DropDownGroup,
|
|
24
24
|
FileUpload,
|
|
25
25
|
TabsElement,
|
|
26
|
-
Upload
|
|
26
|
+
Upload,
|
|
27
|
+
OtpElement,
|
|
28
|
+
CircleDonut,
|
|
29
|
+
SemiCircleDonut,
|
|
30
|
+
HorizontalBarChart,
|
|
31
|
+
DoubleBarChart,
|
|
32
|
+
LineChart,
|
|
33
|
+
BarChart,
|
|
34
|
+
DivContainer
|
|
27
35
|
} from "@apexcura/ui-components";
|
|
36
|
+
import moment from "moment";
|
|
28
37
|
|
|
29
38
|
// src/services/http-service.tsx
|
|
30
39
|
import axios from "axios";
|
|
@@ -203,7 +212,13 @@ var ElementExecutor = (props) => {
|
|
|
203
212
|
case "add-more":
|
|
204
213
|
return /* @__PURE__ */ React.createElement(AddMoreTable, { ...elementProps });
|
|
205
214
|
case "div":
|
|
206
|
-
return /* @__PURE__ */ React.createElement(
|
|
215
|
+
return /* @__PURE__ */ React.createElement(
|
|
216
|
+
DivContainer,
|
|
217
|
+
{
|
|
218
|
+
...elementProps,
|
|
219
|
+
onClick: () => props.selectedRecord(elementProps)
|
|
220
|
+
}
|
|
221
|
+
);
|
|
207
222
|
case "button":
|
|
208
223
|
return /* @__PURE__ */ React.createElement(
|
|
209
224
|
ButtonElement,
|
|
@@ -296,6 +311,62 @@ var ElementExecutor = (props) => {
|
|
|
296
311
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
297
312
|
}
|
|
298
313
|
);
|
|
314
|
+
case "otp":
|
|
315
|
+
return /* @__PURE__ */ React.createElement(
|
|
316
|
+
OtpElement,
|
|
317
|
+
{
|
|
318
|
+
...elementProps,
|
|
319
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
case "circle-donut":
|
|
323
|
+
return /* @__PURE__ */ React.createElement(
|
|
324
|
+
CircleDonut,
|
|
325
|
+
{
|
|
326
|
+
...elementProps,
|
|
327
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
328
|
+
}
|
|
329
|
+
);
|
|
330
|
+
case "semicircle-donut":
|
|
331
|
+
return /* @__PURE__ */ React.createElement(
|
|
332
|
+
SemiCircleDonut,
|
|
333
|
+
{
|
|
334
|
+
...elementProps,
|
|
335
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
336
|
+
}
|
|
337
|
+
);
|
|
338
|
+
case "horizontal-barchart":
|
|
339
|
+
return /* @__PURE__ */ React.createElement(
|
|
340
|
+
HorizontalBarChart,
|
|
341
|
+
{
|
|
342
|
+
...elementProps,
|
|
343
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
case "linechart":
|
|
347
|
+
return /* @__PURE__ */ React.createElement(
|
|
348
|
+
LineChart,
|
|
349
|
+
{
|
|
350
|
+
...elementProps,
|
|
351
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
352
|
+
}
|
|
353
|
+
);
|
|
354
|
+
case "double-barchart":
|
|
355
|
+
return /* @__PURE__ */ React.createElement(
|
|
356
|
+
DoubleBarChart,
|
|
357
|
+
{
|
|
358
|
+
...elementProps,
|
|
359
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
case "barchart":
|
|
363
|
+
return /* @__PURE__ */ React.createElement(
|
|
364
|
+
BarChart,
|
|
365
|
+
{
|
|
366
|
+
...elementProps,
|
|
367
|
+
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
368
|
+
}
|
|
369
|
+
);
|
|
299
370
|
default:
|
|
300
371
|
return null;
|
|
301
372
|
}
|
|
@@ -303,7 +374,25 @@ var ElementExecutor = (props) => {
|
|
|
303
374
|
const renderFields = (schema2) => {
|
|
304
375
|
return schema2 && schema2.map((eachSection) => {
|
|
305
376
|
if (eachSection.visible !== false) {
|
|
306
|
-
return /* @__PURE__ */ React.createElement(React.Fragment,
|
|
377
|
+
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(
|
|
378
|
+
"p",
|
|
379
|
+
{
|
|
380
|
+
style: {
|
|
381
|
+
fontSize: "10px",
|
|
382
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
moment(eachSection.dateTime).format("LT")
|
|
386
|
+
) : "") : /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ React.createElement(
|
|
387
|
+
"p",
|
|
388
|
+
{
|
|
389
|
+
style: {
|
|
390
|
+
fontSize: "10px",
|
|
391
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
moment(eachSection.dateTime).format("LT")
|
|
395
|
+
) : ""));
|
|
307
396
|
}
|
|
308
397
|
return null;
|
|
309
398
|
});
|
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-Beta300",
|
|
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-Beta268",
|
|
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"
|