@apexcura/core 0.0.16-Beta183 → 0.0.16-Beta184

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,9 +47,6 @@ type FormExecutorProps = {
47
47
  fillText2?: string;
48
48
  labels?: any[];
49
49
  data?: any[];
50
- pagination?: boolean;
51
- is_detail?: boolean;
52
- dateTime?: string;
53
50
  modalContent?: {
54
51
  className?: string;
55
52
  fields?: {
package/dist/index.d.ts CHANGED
@@ -47,9 +47,6 @@ type FormExecutorProps = {
47
47
  fillText2?: string;
48
48
  labels?: any[];
49
49
  data?: any[];
50
- pagination?: boolean;
51
- is_detail?: boolean;
52
- dateTime?: string;
53
50
  modalContent?: {
54
51
  className?: string;
55
52
  fields?: {
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,12 +343,137 @@ var ElementExecutor = (props) => {
342
343
  }
343
344
  );
344
345
  case "linechart":
345
- return /* @__PURE__ */ import_react.default.createElement(
346
- import_ui_components.LineChart,
347
- {
348
- ...elementProps,
349
- onChange: (value) => onHandleChange(elementProps.name || "", value)
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
+ }]
350
467
  }
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 })
351
477
  );
352
478
  case "double-barchart":
353
479
  return /* @__PURE__ */ import_react.default.createElement(
@@ -372,7 +498,7 @@ var ElementExecutor = (props) => {
372
498
  const renderFields = (schema2) => {
373
499
  return schema2 && schema2.map((eachSection) => {
374
500
  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)), eachSection.dateTime ? /* @__PURE__ */ import_react.default.createElement("p", null, (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", null, (0, import_moment.default)(eachSection.dateTime).format("LT")) : ""));
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));
376
502
  }
377
503
  return null;
378
504
  });
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,12 +337,137 @@ var ElementExecutor = (props) => {
337
337
  }
338
338
  );
339
339
  case "linechart":
340
- return /* @__PURE__ */ React.createElement(
341
- LineChart,
342
- {
343
- ...elementProps,
344
- onChange: (value) => onHandleChange(elementProps.name || "", value)
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
+ }]
345
461
  }
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 })
346
471
  );
347
472
  case "double-barchart":
348
473
  return /* @__PURE__ */ React.createElement(
@@ -367,7 +492,7 @@ var ElementExecutor = (props) => {
367
492
  const renderFields = (schema2) => {
368
493
  return schema2 && schema2.map((eachSection) => {
369
494
  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)), eachSection.dateTime ? /* @__PURE__ */ React.createElement("p", null, moment(eachSection.dateTime).format("LT")) : "") : /* @__PURE__ */ React.createElement(React.Fragment, null, renderElement(eachSection), eachSection.dateTime ? /* @__PURE__ */ React.createElement("p", null, moment(eachSection.dateTime).format("LT")) : ""));
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));
371
496
  }
372
497
  return null;
373
498
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.16-Beta183",
3
+ "version": "0.0.16-Beta184",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",
@@ -28,13 +28,14 @@
28
28
  "build": "tsup"
29
29
  },
30
30
  "dependencies": {
31
- "@apexcura/ui-components": "^0.0.14-Beta174",
31
+ "@apexcura/ui-components": "^0.0.14-Beta142",
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
+ "highcharts": "^11.4.3",
38
+ "highcharts-react-official": "^3.2.1",
38
39
  "react": "^18.3.1",
39
40
  "react-dom": "^18.3.1",
40
41
  "tsup": "^8.0.2"