@apexcura/core 0.0.16-Beta184 → 0.0.16-Beta185

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 CHANGED
@@ -47,6 +47,9 @@ type FormExecutorProps = {
47
47
  fillText2?: string;
48
48
  labels?: any[];
49
49
  data?: any[];
50
+ pagination?: boolean;
51
+ is_detail?: boolean;
52
+ dateTime?: string;
50
53
  modalContent?: {
51
54
  className?: string;
52
55
  fields?: {
package/dist/index.d.ts CHANGED
@@ -47,6 +47,9 @@ type FormExecutorProps = {
47
47
  fillText2?: string;
48
48
  labels?: any[];
49
49
  data?: any[];
50
+ pagination?: boolean;
51
+ is_detail?: boolean;
52
+ dateTime?: string;
50
53
  modalContent?: {
51
54
  className?: string;
52
55
  fields?: {
package/dist/index.js CHANGED
@@ -36,9 +36,8 @@ 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"));
41
39
  var import_ui_components = require("@apexcura/ui-components");
40
+ var import_moment = __toESM(require("moment"));
42
41
 
43
42
  // src/services/http-service.tsx
44
43
  var import_axios = __toESM(require("axios"));
@@ -343,137 +342,12 @@ var ElementExecutor = (props) => {
343
342
  }
344
343
  );
345
344
  case "linechart":
346
- let data_options = {
347
- title: {
348
- text: "U.S Solar Employment Growth",
349
- align: "left"
350
- },
351
- subtitle: {
352
- text: 'By Job Category. Source: <a href="https://irecusa.org/programs/solar-jobs-census/" target="_blank">IREC</a>.',
353
- align: "left"
354
- },
355
- yAxis: {
356
- title: {
357
- text: "Number of Employees"
358
- }
359
- },
360
- xAxis: {
361
- accessibility: {
362
- rangeDescription: "Range: 2010 to 2020"
363
- }
364
- },
365
- legend: {
366
- layout: "vertical",
367
- align: "right",
368
- verticalAlign: "middle"
369
- },
370
- plotOptions: {
371
- series: {
372
- label: {
373
- connectorAllowed: false
374
- },
375
- pointStart: 2010
376
- }
377
- },
378
- series: [{
379
- name: "Installation & Developers",
380
- data: [
381
- 43934,
382
- 48656,
383
- 65165,
384
- 81827,
385
- 112143,
386
- 142383,
387
- 171533,
388
- 165174,
389
- 155157,
390
- 161454,
391
- 154610
392
- ]
393
- }, {
394
- name: "Manufacturing",
395
- data: [
396
- 24916,
397
- 37941,
398
- 29742,
399
- 29851,
400
- 32490,
401
- 30282,
402
- 38121,
403
- 36885,
404
- 33726,
405
- 34243,
406
- 31050
407
- ]
408
- }, {
409
- name: "Sales & Distribution",
410
- data: [
411
- 11744,
412
- 3e4,
413
- 16005,
414
- 19771,
415
- 20185,
416
- 24377,
417
- 32147,
418
- 30912,
419
- 29243,
420
- 29213,
421
- 25663
422
- ]
423
- }, {
424
- name: "Operations & Maintenance",
425
- data: [
426
- null,
427
- null,
428
- null,
429
- null,
430
- null,
431
- null,
432
- null,
433
- null,
434
- 11164,
435
- 11218,
436
- 10077
437
- ]
438
- }, {
439
- name: "Other",
440
- data: [
441
- 21908,
442
- 5548,
443
- 8105,
444
- 11248,
445
- 8989,
446
- 11816,
447
- 18274,
448
- 17300,
449
- 13053,
450
- 11906,
451
- 10073
452
- ]
453
- }],
454
- responsive: {
455
- rules: [{
456
- condition: {
457
- maxWidth: 500
458
- },
459
- chartOptions: {
460
- legend: {
461
- layout: "horizontal",
462
- align: "center",
463
- verticalAlign: "bottom"
464
- }
465
- }
466
- }]
345
+ return /* @__PURE__ */ import_react.default.createElement(
346
+ import_ui_components.LineChart,
347
+ {
348
+ ...elementProps,
349
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
467
350
  }
468
- };
469
- return (
470
- // <LineChart
471
- // {...elementProps}
472
- // onChange={(value: any) =>
473
- // onHandleChange(elementProps.name || "", value)
474
- // }
475
- // />
476
- /* @__PURE__ */ import_react.default.createElement(import_highcharts_react_official.default, { highcharts: import_highcharts.default, options: data_options })
477
351
  );
478
352
  case "double-barchart":
479
353
  return /* @__PURE__ */ import_react.default.createElement(
@@ -498,7 +372,17 @@ var ElementExecutor = (props) => {
498
372
  const renderFields = (schema2) => {
499
373
  return schema2 && schema2.map((eachSection) => {
500
374
  if (eachSection.visible !== false) {
501
- 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));
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("p", { style: {
376
+ fontSize: "12px",
377
+ position: "absolute",
378
+ [eachSection.source === "bot" ? "left" : "right"]: "0",
379
+ margin: "0"
380
+ } }, (0, import_moment.default)(eachSection.dateTime).format("LT")) : "") : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement("p", { style: {
381
+ fontSize: "12px",
382
+ position: "absolute",
383
+ [eachSection.source === "bot" ? "left" : "right"]: "0",
384
+ margin: "0"
385
+ } }, (0, import_moment.default)(eachSection.dateTime).format("LT")) : ""));
502
386
  }
503
387
  return null;
504
388
  });
package/dist/index.mjs CHANGED
@@ -1,7 +1,5 @@
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";
5
3
  import {
6
4
  TextElement,
7
5
  NumberElement,
@@ -31,8 +29,10 @@ import {
31
29
  SemiCircleDonut,
32
30
  HorizontalBarChart,
33
31
  DoubleBarChart,
32
+ LineChart,
34
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";
@@ -337,137 +337,12 @@ var ElementExecutor = (props) => {
337
337
  }
338
338
  );
339
339
  case "linechart":
340
- let data_options = {
341
- title: {
342
- text: "U.S Solar Employment Growth",
343
- align: "left"
344
- },
345
- subtitle: {
346
- text: 'By Job Category. Source: <a href="https://irecusa.org/programs/solar-jobs-census/" target="_blank">IREC</a>.',
347
- align: "left"
348
- },
349
- yAxis: {
350
- title: {
351
- text: "Number of Employees"
352
- }
353
- },
354
- xAxis: {
355
- accessibility: {
356
- rangeDescription: "Range: 2010 to 2020"
357
- }
358
- },
359
- legend: {
360
- layout: "vertical",
361
- align: "right",
362
- verticalAlign: "middle"
363
- },
364
- plotOptions: {
365
- series: {
366
- label: {
367
- connectorAllowed: false
368
- },
369
- pointStart: 2010
370
- }
371
- },
372
- series: [{
373
- name: "Installation & Developers",
374
- data: [
375
- 43934,
376
- 48656,
377
- 65165,
378
- 81827,
379
- 112143,
380
- 142383,
381
- 171533,
382
- 165174,
383
- 155157,
384
- 161454,
385
- 154610
386
- ]
387
- }, {
388
- name: "Manufacturing",
389
- data: [
390
- 24916,
391
- 37941,
392
- 29742,
393
- 29851,
394
- 32490,
395
- 30282,
396
- 38121,
397
- 36885,
398
- 33726,
399
- 34243,
400
- 31050
401
- ]
402
- }, {
403
- name: "Sales & Distribution",
404
- data: [
405
- 11744,
406
- 3e4,
407
- 16005,
408
- 19771,
409
- 20185,
410
- 24377,
411
- 32147,
412
- 30912,
413
- 29243,
414
- 29213,
415
- 25663
416
- ]
417
- }, {
418
- name: "Operations & Maintenance",
419
- data: [
420
- null,
421
- null,
422
- null,
423
- null,
424
- null,
425
- null,
426
- null,
427
- null,
428
- 11164,
429
- 11218,
430
- 10077
431
- ]
432
- }, {
433
- name: "Other",
434
- data: [
435
- 21908,
436
- 5548,
437
- 8105,
438
- 11248,
439
- 8989,
440
- 11816,
441
- 18274,
442
- 17300,
443
- 13053,
444
- 11906,
445
- 10073
446
- ]
447
- }],
448
- responsive: {
449
- rules: [{
450
- condition: {
451
- maxWidth: 500
452
- },
453
- chartOptions: {
454
- legend: {
455
- layout: "horizontal",
456
- align: "center",
457
- verticalAlign: "bottom"
458
- }
459
- }
460
- }]
340
+ return /* @__PURE__ */ React.createElement(
341
+ LineChart,
342
+ {
343
+ ...elementProps,
344
+ onChange: (value) => onHandleChange(elementProps.name || "", value)
461
345
  }
462
- };
463
- return (
464
- // <LineChart
465
- // {...elementProps}
466
- // onChange={(value: any) =>
467
- // onHandleChange(elementProps.name || "", value)
468
- // }
469
- // />
470
- /* @__PURE__ */ React.createElement(HighchartsReact, { highcharts: Highcharts, options: data_options })
471
346
  );
472
347
  case "double-barchart":
473
348
  return /* @__PURE__ */ React.createElement(
@@ -492,7 +367,17 @@ var ElementExecutor = (props) => {
492
367
  const renderFields = (schema2) => {
493
368
  return schema2 && schema2.map((eachSection) => {
494
369
  if (eachSection.visible !== false) {
495
- 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));
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("p", { style: {
371
+ fontSize: "12px",
372
+ position: "absolute",
373
+ [eachSection.source === "bot" ? "left" : "right"]: "0",
374
+ margin: "0"
375
+ } }, moment(eachSection.dateTime).format("LT")) : "") : /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ React.createElement("p", { style: {
376
+ fontSize: "12px",
377
+ position: "absolute",
378
+ [eachSection.source === "bot" ? "left" : "right"]: "0",
379
+ margin: "0"
380
+ } }, moment(eachSection.dateTime).format("LT")) : ""));
496
381
  }
497
382
  return null;
498
383
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.16-Beta184",
3
+ "version": "0.0.16-Beta185",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",
@@ -28,14 +28,13 @@
28
28
  "build": "tsup"
29
29
  },
30
30
  "dependencies": {
31
- "@apexcura/ui-components": "^0.0.14-Beta142",
31
+ "@apexcura/ui-components": "^0.0.14-Beta175",
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
- "highcharts": "^11.4.3",
38
- "highcharts-react-official": "^3.2.1",
37
+ "moment": "^2.30.1",
39
38
  "react": "^18.3.1",
40
39
  "react-dom": "^18.3.1",
41
40
  "tsup": "^8.0.2"