@apexcura/core 0.0.16-Beta207 → 0.0.16-Beta209

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"));
@@ -349,6 +350,134 @@ var ElementExecutor = (props) => {
349
350
  onChange: (value) => onHandleChange(elementProps.name || "", value)
350
351
  }
351
352
  );
353
+ case "highchart-linechart":
354
+ let data_options = {
355
+ chart: {
356
+ height: "45%"
357
+ },
358
+ title: {
359
+ text: "U.S Solar Employment Growth",
360
+ align: "left"
361
+ },
362
+ subtitle: {
363
+ text: 'By Job Category. Source: <a href="https://irecusa.org/programs/solar-jobs-census/" target="_blank">IREC</a>.',
364
+ align: "left"
365
+ },
366
+ yAxis: {
367
+ title: {
368
+ text: "Number of Employees"
369
+ }
370
+ },
371
+ xAxis: {
372
+ accessibility: {
373
+ rangeDescription: "Range: 2010 to 2020"
374
+ }
375
+ },
376
+ legend: {
377
+ layout: "vertical",
378
+ align: "right",
379
+ verticalAlign: "middle"
380
+ },
381
+ plotOptions: {
382
+ series: {
383
+ label: {
384
+ connectorAllowed: false
385
+ },
386
+ pointStart: 2010
387
+ }
388
+ },
389
+ series: [{
390
+ name: "Installation & Developers",
391
+ data: [
392
+ 43934,
393
+ 48656,
394
+ 65165,
395
+ 81827,
396
+ 112143,
397
+ 142383,
398
+ 171533,
399
+ 165174,
400
+ 155157,
401
+ 161454,
402
+ 154610
403
+ ]
404
+ }, {
405
+ name: "Manufacturing",
406
+ data: [
407
+ 24916,
408
+ 37941,
409
+ 29742,
410
+ 29851,
411
+ 32490,
412
+ 30282,
413
+ 38121,
414
+ 36885,
415
+ 33726,
416
+ 34243,
417
+ 31050
418
+ ]
419
+ }, {
420
+ name: "Sales & Distribution",
421
+ data: [
422
+ 11744,
423
+ 3e4,
424
+ 16005,
425
+ 19771,
426
+ 20185,
427
+ 24377,
428
+ 32147,
429
+ 30912,
430
+ 29243,
431
+ 29213,
432
+ 25663
433
+ ]
434
+ }, {
435
+ name: "Operations & Maintenance",
436
+ data: [
437
+ null,
438
+ null,
439
+ null,
440
+ null,
441
+ null,
442
+ null,
443
+ null,
444
+ null,
445
+ 11164,
446
+ 11218,
447
+ 10077
448
+ ]
449
+ }, {
450
+ name: "Other",
451
+ data: [
452
+ 21908,
453
+ 5548,
454
+ 8105,
455
+ 11248,
456
+ 8989,
457
+ 11816,
458
+ 18274,
459
+ 17300,
460
+ 13053,
461
+ 11906,
462
+ 10073
463
+ ]
464
+ }],
465
+ responsive: {
466
+ rules: [{
467
+ condition: {
468
+ maxWidth: 500
469
+ },
470
+ chartOptions: {
471
+ legend: {
472
+ layout: "horizontal",
473
+ align: "center",
474
+ verticalAlign: "bottom"
475
+ }
476
+ }
477
+ }]
478
+ }
479
+ };
480
+ return /* @__PURE__ */ import_react.default.createElement(import_highcharts_react_official.default, { highcharts: import_highcharts.default, options: data_options });
352
481
  case "double-barchart":
353
482
  return /* @__PURE__ */ import_react.default.createElement(
354
483
  import_ui_components.DoubleBarChart,
@@ -372,25 +501,7 @@ var ElementExecutor = (props) => {
372
501
  const renderFields = (schema2) => {
373
502
  return schema2 && schema2.map((eachSection) => {
374
503
  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(
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
- ) : ""));
504
+ 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
505
  }
395
506
  return null;
396
507
  });
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,
@@ -32,7 +34,6 @@ import {
32
34
  LineChart,
33
35
  BarChart
34
36
  } from "@apexcura/ui-components";
35
- import moment from "moment";
36
37
 
37
38
  // src/services/http-service.tsx
38
39
  import axios from "axios";
@@ -344,6 +345,134 @@ var ElementExecutor = (props) => {
344
345
  onChange: (value) => onHandleChange(elementProps.name || "", value)
345
346
  }
346
347
  );
348
+ case "highchart-linechart":
349
+ let data_options = {
350
+ chart: {
351
+ height: "45%"
352
+ },
353
+ title: {
354
+ text: "U.S Solar Employment Growth",
355
+ align: "left"
356
+ },
357
+ subtitle: {
358
+ text: 'By Job Category. Source: <a href="https://irecusa.org/programs/solar-jobs-census/" target="_blank">IREC</a>.',
359
+ align: "left"
360
+ },
361
+ yAxis: {
362
+ title: {
363
+ text: "Number of Employees"
364
+ }
365
+ },
366
+ xAxis: {
367
+ accessibility: {
368
+ rangeDescription: "Range: 2010 to 2020"
369
+ }
370
+ },
371
+ legend: {
372
+ layout: "vertical",
373
+ align: "right",
374
+ verticalAlign: "middle"
375
+ },
376
+ plotOptions: {
377
+ series: {
378
+ label: {
379
+ connectorAllowed: false
380
+ },
381
+ pointStart: 2010
382
+ }
383
+ },
384
+ series: [{
385
+ name: "Installation & Developers",
386
+ data: [
387
+ 43934,
388
+ 48656,
389
+ 65165,
390
+ 81827,
391
+ 112143,
392
+ 142383,
393
+ 171533,
394
+ 165174,
395
+ 155157,
396
+ 161454,
397
+ 154610
398
+ ]
399
+ }, {
400
+ name: "Manufacturing",
401
+ data: [
402
+ 24916,
403
+ 37941,
404
+ 29742,
405
+ 29851,
406
+ 32490,
407
+ 30282,
408
+ 38121,
409
+ 36885,
410
+ 33726,
411
+ 34243,
412
+ 31050
413
+ ]
414
+ }, {
415
+ name: "Sales & Distribution",
416
+ data: [
417
+ 11744,
418
+ 3e4,
419
+ 16005,
420
+ 19771,
421
+ 20185,
422
+ 24377,
423
+ 32147,
424
+ 30912,
425
+ 29243,
426
+ 29213,
427
+ 25663
428
+ ]
429
+ }, {
430
+ name: "Operations & Maintenance",
431
+ data: [
432
+ null,
433
+ null,
434
+ null,
435
+ null,
436
+ null,
437
+ null,
438
+ null,
439
+ null,
440
+ 11164,
441
+ 11218,
442
+ 10077
443
+ ]
444
+ }, {
445
+ name: "Other",
446
+ data: [
447
+ 21908,
448
+ 5548,
449
+ 8105,
450
+ 11248,
451
+ 8989,
452
+ 11816,
453
+ 18274,
454
+ 17300,
455
+ 13053,
456
+ 11906,
457
+ 10073
458
+ ]
459
+ }],
460
+ responsive: {
461
+ rules: [{
462
+ condition: {
463
+ maxWidth: 500
464
+ },
465
+ chartOptions: {
466
+ legend: {
467
+ layout: "horizontal",
468
+ align: "center",
469
+ verticalAlign: "bottom"
470
+ }
471
+ }
472
+ }]
473
+ }
474
+ };
475
+ return /* @__PURE__ */ React.createElement(HighchartsReact, { highcharts: Highcharts, options: data_options });
347
476
  case "double-barchart":
348
477
  return /* @__PURE__ */ React.createElement(
349
478
  DoubleBarChart,
@@ -367,25 +496,7 @@ var ElementExecutor = (props) => {
367
496
  const renderFields = (schema2) => {
368
497
  return schema2 && schema2.map((eachSection) => {
369
498
  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(
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
- ) : ""));
499
+ 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
500
  }
390
501
  return null;
391
502
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.16-Beta207",
3
+ "version": "0.0.16-Beta209",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",
@@ -34,7 +34,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"