@apexcura/core 0.0.16-Beta189 → 0.0.16-Beta190
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 +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +20 -9
- package/dist/index.mjs +21 -11
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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"));
|
|
@@ -348,14 +349,6 @@ var ElementExecutor = (props) => {
|
|
|
348
349
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
349
350
|
}
|
|
350
351
|
);
|
|
351
|
-
case "highchart-linechart":
|
|
352
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
353
|
-
import_ui_components.HighchartsLineChart,
|
|
354
|
-
{
|
|
355
|
-
...elementProps,
|
|
356
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
357
|
-
}
|
|
358
|
-
);
|
|
359
352
|
case "double-barchart":
|
|
360
353
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
361
354
|
import_ui_components.DoubleBarChart,
|
|
@@ -379,7 +372,25 @@ var ElementExecutor = (props) => {
|
|
|
379
372
|
const renderFields = (schema2) => {
|
|
380
373
|
return schema2 && schema2.map((eachSection) => {
|
|
381
374
|
if (eachSection.visible !== false) {
|
|
382
|
-
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))
|
|
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: "12px",
|
|
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: "12px",
|
|
389
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
(0, import_moment.default)(eachSection.dateTime).format("LT")
|
|
393
|
+
) : ""));
|
|
383
394
|
}
|
|
384
395
|
return null;
|
|
385
396
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -30,9 +30,9 @@ import {
|
|
|
30
30
|
HorizontalBarChart,
|
|
31
31
|
DoubleBarChart,
|
|
32
32
|
LineChart,
|
|
33
|
-
BarChart
|
|
34
|
-
HighchartsLineChart
|
|
33
|
+
BarChart
|
|
35
34
|
} from "@apexcura/ui-components";
|
|
35
|
+
import moment from "moment";
|
|
36
36
|
|
|
37
37
|
// src/services/http-service.tsx
|
|
38
38
|
import axios from "axios";
|
|
@@ -344,14 +344,6 @@ var ElementExecutor = (props) => {
|
|
|
344
344
|
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
345
345
|
}
|
|
346
346
|
);
|
|
347
|
-
case "highchart-linechart":
|
|
348
|
-
return /* @__PURE__ */ React.createElement(
|
|
349
|
-
HighchartsLineChart,
|
|
350
|
-
{
|
|
351
|
-
...elementProps,
|
|
352
|
-
onChange: (value) => onHandleChange(elementProps.name || "", value)
|
|
353
|
-
}
|
|
354
|
-
);
|
|
355
347
|
case "double-barchart":
|
|
356
348
|
return /* @__PURE__ */ React.createElement(
|
|
357
349
|
DoubleBarChart,
|
|
@@ -375,7 +367,25 @@ var ElementExecutor = (props) => {
|
|
|
375
367
|
const renderFields = (schema2) => {
|
|
376
368
|
return schema2 && schema2.map((eachSection) => {
|
|
377
369
|
if (eachSection.visible !== false) {
|
|
378
|
-
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))
|
|
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: "12px",
|
|
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: "12px",
|
|
384
|
+
textAlign: eachSection.source === "bot" ? "left" : "right"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
moment(eachSection.dateTime).format("LT")
|
|
388
|
+
) : ""));
|
|
379
389
|
}
|
|
380
390
|
return null;
|
|
381
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-Beta190",
|
|
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-Beta179",
|
|
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"
|