@apexcura/core 0.0.16-Beta211 → 0.0.16-Beta213
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 +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/index.js +13 -26
- package/dist/index.mjs +13 -27
- package/package.json +2 -3
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -36,8 +36,9 @@ module.exports = __toCommonJS(src_exports);
|
|
|
36
36
|
|
|
37
37
|
// src/libraries/element-executor.tsx
|
|
38
38
|
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_highcharts = __toESM(require("highcharts"));
|
|
40
|
+
var import_highcharts_react_official = __toESM(require("highcharts-react-official"));
|
|
39
41
|
var import_ui_components = require("@apexcura/ui-components");
|
|
40
|
-
var import_moment = __toESM(require("moment"));
|
|
41
42
|
|
|
42
43
|
// src/services/http-service.tsx
|
|
43
44
|
var import_axios = __toESM(require("axios"));
|
|
@@ -342,13 +343,17 @@ var ElementExecutor = (props) => {
|
|
|
342
343
|
}
|
|
343
344
|
);
|
|
344
345
|
case "linechart":
|
|
345
|
-
return
|
|
346
|
-
|
|
347
|
-
{
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}
|
|
346
|
+
return (
|
|
347
|
+
// <LineChart
|
|
348
|
+
// {...elementProps}
|
|
349
|
+
// onChange={(value: any) =>
|
|
350
|
+
// onHandleChange(elementProps.name || "", value)
|
|
351
|
+
// }
|
|
352
|
+
// />
|
|
353
|
+
/* @__PURE__ */ import_react.default.createElement("h1", null, "123")
|
|
351
354
|
);
|
|
355
|
+
case "highchart-linechart":
|
|
356
|
+
return /* @__PURE__ */ import_react.default.createElement(import_highcharts_react_official.default, { highcharts: import_highcharts.default, options: elementProps.data_options });
|
|
352
357
|
case "double-barchart":
|
|
353
358
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
354
359
|
import_ui_components.DoubleBarChart,
|
|
@@ -372,25 +377,7 @@ var ElementExecutor = (props) => {
|
|
|
372
377
|
const renderFields = (schema2) => {
|
|
373
378
|
return schema2 && schema2.map((eachSection) => {
|
|
374
379
|
if (eachSection.visible !== false) {
|
|
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))
|
|
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
|
-
) : ""));
|
|
380
|
+
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))) : renderElement(eachSection));
|
|
394
381
|
}
|
|
395
382
|
return null;
|
|
396
383
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/libraries/element-executor.tsx
|
|
2
2
|
import React, { useState } from "react";
|
|
3
|
+
import Highcharts from "highcharts";
|
|
4
|
+
import HighchartsReact from "highcharts-react-official";
|
|
3
5
|
import {
|
|
4
6
|
TextElement,
|
|
5
7
|
NumberElement,
|
|
@@ -29,10 +31,8 @@ import {
|
|
|
29
31
|
SemiCircleDonut,
|
|
30
32
|
HorizontalBarChart,
|
|
31
33
|
DoubleBarChart,
|
|
32
|
-
LineChart,
|
|
33
34
|
BarChart
|
|
34
35
|
} from "@apexcura/ui-components";
|
|
35
|
-
import moment from "moment";
|
|
36
36
|
|
|
37
37
|
// src/services/http-service.tsx
|
|
38
38
|
import axios from "axios";
|
|
@@ -337,13 +337,17 @@ var ElementExecutor = (props) => {
|
|
|
337
337
|
}
|
|
338
338
|
);
|
|
339
339
|
case "linechart":
|
|
340
|
-
return
|
|
341
|
-
LineChart
|
|
342
|
-
{
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
}
|
|
340
|
+
return (
|
|
341
|
+
// <LineChart
|
|
342
|
+
// {...elementProps}
|
|
343
|
+
// onChange={(value: any) =>
|
|
344
|
+
// onHandleChange(elementProps.name || "", value)
|
|
345
|
+
// }
|
|
346
|
+
// />
|
|
347
|
+
/* @__PURE__ */ React.createElement("h1", null, "123")
|
|
346
348
|
);
|
|
349
|
+
case "highchart-linechart":
|
|
350
|
+
return /* @__PURE__ */ React.createElement(HighchartsReact, { highcharts: Highcharts, options: elementProps.data_options });
|
|
347
351
|
case "double-barchart":
|
|
348
352
|
return /* @__PURE__ */ React.createElement(
|
|
349
353
|
DoubleBarChart,
|
|
@@ -367,25 +371,7 @@ var ElementExecutor = (props) => {
|
|
|
367
371
|
const renderFields = (schema2) => {
|
|
368
372
|
return schema2 && schema2.map((eachSection) => {
|
|
369
373
|
if (eachSection.visible !== false) {
|
|
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))
|
|
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
|
-
) : ""));
|
|
374
|
+
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))) : renderElement(eachSection));
|
|
389
375
|
}
|
|
390
376
|
return null;
|
|
391
377
|
});
|
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-Beta213",
|
|
4
4
|
"description": "Apex cura React components library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex cura",
|
|
@@ -28,13 +28,12 @@
|
|
|
28
28
|
"build": "tsup"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@apexcura/ui-components": "^0.0.14-
|
|
31
|
+
"@apexcura/ui-components": "^0.0.14-Beta194",
|
|
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",
|
|
38
37
|
"react": "^18.3.1",
|
|
39
38
|
"react-dom": "^18.3.1",
|
|
40
39
|
"tsup": "^8.0.2"
|