@apexcura/core 0.0.16-Beta226 → 0.0.16-Beta227

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.
Files changed (3) hide show
  1. package/dist/index.js +21 -127
  2. package/dist/index.mjs +22 -128
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -42,134 +42,28 @@ var import_ui_components = require("@apexcura/ui-components");
42
42
  var import_react = __toESM(require("react"));
43
43
  var import_highcharts = __toESM(require("highcharts"));
44
44
  var import_highcharts_react_official = __toESM(require("highcharts-react-official"));
45
+ var options = {
46
+ title: {
47
+ text: "My chart"
48
+ },
49
+ series: [
50
+ {
51
+ type: "line",
52
+ data: [1, 2, 3]
53
+ }
54
+ ]
55
+ };
45
56
  var HighchartsLineChart = (props) => {
46
- let graph_data = {
47
- chart: {
48
- height: "50%"
49
- },
50
- title: {
51
- text: "U.S Solar Employment Growth",
52
- align: "left"
53
- },
54
- subtitle: {
55
- text: 'By Job Category. Source: <a href="https://irecusa.org/programs/solar-jobs-census/" target="_blank">IREC</a>.',
56
- align: "left"
57
- },
58
- yAxis: {
59
- title: {
60
- text: "Number of Employees"
61
- }
62
- },
63
- xAxis: {
64
- accessibility: {
65
- rangeDescription: "Range: 2010 to 2020"
66
- }
67
- },
68
- legend: {
69
- layout: "vertical",
70
- align: "right",
71
- verticalAlign: "middle"
72
- },
73
- plotOptions: {
74
- series: {
75
- label: {
76
- connectorAllowed: false
77
- },
78
- pointStart: 2010
79
- }
80
- },
81
- series: [{
82
- name: "Installation & Developers",
83
- data: [
84
- 43934,
85
- 48656,
86
- 65165,
87
- 81827,
88
- 112143,
89
- 142383,
90
- 171533,
91
- 165174,
92
- 155157,
93
- 161454,
94
- 154610
95
- ]
96
- }, {
97
- name: "Manufacturing",
98
- data: [
99
- 24916,
100
- 37941,
101
- 29742,
102
- 29851,
103
- 32490,
104
- 30282,
105
- 38121,
106
- 36885,
107
- 33726,
108
- 34243,
109
- 31050
110
- ]
111
- }, {
112
- name: "Sales & Distribution",
113
- data: [
114
- 11744,
115
- 3e4,
116
- 16005,
117
- 19771,
118
- 20185,
119
- 24377,
120
- 32147,
121
- 30912,
122
- 29243,
123
- 29213,
124
- 25663
125
- ]
126
- }, {
127
- name: "Operations & Maintenance",
128
- data: [
129
- null,
130
- null,
131
- null,
132
- null,
133
- null,
134
- null,
135
- null,
136
- null,
137
- 11164,
138
- 11218,
139
- 10077
140
- ]
141
- }, {
142
- name: "Other",
143
- data: [
144
- 21908,
145
- 5548,
146
- 8105,
147
- 11248,
148
- 8989,
149
- 11816,
150
- 18274,
151
- 17300,
152
- 13053,
153
- 11906,
154
- 10073
155
- ]
156
- }],
157
- responsive: {
158
- rules: [{
159
- condition: {
160
- maxWidth: 500
161
- },
162
- chartOptions: {
163
- legend: {
164
- layout: "horizontal",
165
- align: "center",
166
- verticalAlign: "bottom"
167
- }
168
- }
169
- }]
57
+ const chartComponentRef = (0, import_react.useRef)(null);
58
+ return /* @__PURE__ */ import_react.default.createElement(
59
+ import_highcharts_react_official.default,
60
+ {
61
+ highcharts: import_highcharts.default,
62
+ options,
63
+ ref: chartComponentRef,
64
+ ...props
170
65
  }
171
- };
172
- return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_highcharts_react_official.default, { highcharts: import_highcharts.default, options: graph_data }));
66
+ );
173
67
  };
174
68
 
175
69
  // src/services/http-service.tsx
@@ -510,7 +404,7 @@ var ElementExecutor = (props) => {
510
404
  return null;
511
405
  });
512
406
  };
513
- return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("h1", null, "import in core as named export HighchartsLineChart same as file name also"), /* @__PURE__ */ import_react2.default.createElement(HighchartsLineChart, null), /* @__PURE__ */ import_react2.default.createElement("div", { className: props.data.className }, renderFields(schema)));
407
+ return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("h1", null, "import in core as typescript named export HighchartsLineChart same as file name also"), /* @__PURE__ */ import_react2.default.createElement(HighchartsLineChart, null), /* @__PURE__ */ import_react2.default.createElement("div", { className: props.data.className }, renderFields(schema)));
514
408
  };
515
409
  // Annotate the CommonJS export names for ESM import in node:
516
410
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -34,137 +34,31 @@ import {
34
34
  } from "@apexcura/ui-components";
35
35
 
36
36
  // src/libraries/HighchartsLineChart.tsx
37
- import React from "react";
37
+ import React, { useRef } from "react";
38
38
  import Highcharts from "highcharts";
39
39
  import HighchartsReact from "highcharts-react-official";
40
+ var options = {
41
+ title: {
42
+ text: "My chart"
43
+ },
44
+ series: [
45
+ {
46
+ type: "line",
47
+ data: [1, 2, 3]
48
+ }
49
+ ]
50
+ };
40
51
  var HighchartsLineChart = (props) => {
41
- let graph_data = {
42
- chart: {
43
- height: "50%"
44
- },
45
- title: {
46
- text: "U.S Solar Employment Growth",
47
- align: "left"
48
- },
49
- subtitle: {
50
- text: 'By Job Category. Source: <a href="https://irecusa.org/programs/solar-jobs-census/" target="_blank">IREC</a>.',
51
- align: "left"
52
- },
53
- yAxis: {
54
- title: {
55
- text: "Number of Employees"
56
- }
57
- },
58
- xAxis: {
59
- accessibility: {
60
- rangeDescription: "Range: 2010 to 2020"
61
- }
62
- },
63
- legend: {
64
- layout: "vertical",
65
- align: "right",
66
- verticalAlign: "middle"
67
- },
68
- plotOptions: {
69
- series: {
70
- label: {
71
- connectorAllowed: false
72
- },
73
- pointStart: 2010
74
- }
75
- },
76
- series: [{
77
- name: "Installation & Developers",
78
- data: [
79
- 43934,
80
- 48656,
81
- 65165,
82
- 81827,
83
- 112143,
84
- 142383,
85
- 171533,
86
- 165174,
87
- 155157,
88
- 161454,
89
- 154610
90
- ]
91
- }, {
92
- name: "Manufacturing",
93
- data: [
94
- 24916,
95
- 37941,
96
- 29742,
97
- 29851,
98
- 32490,
99
- 30282,
100
- 38121,
101
- 36885,
102
- 33726,
103
- 34243,
104
- 31050
105
- ]
106
- }, {
107
- name: "Sales & Distribution",
108
- data: [
109
- 11744,
110
- 3e4,
111
- 16005,
112
- 19771,
113
- 20185,
114
- 24377,
115
- 32147,
116
- 30912,
117
- 29243,
118
- 29213,
119
- 25663
120
- ]
121
- }, {
122
- name: "Operations & Maintenance",
123
- data: [
124
- null,
125
- null,
126
- null,
127
- null,
128
- null,
129
- null,
130
- null,
131
- null,
132
- 11164,
133
- 11218,
134
- 10077
135
- ]
136
- }, {
137
- name: "Other",
138
- data: [
139
- 21908,
140
- 5548,
141
- 8105,
142
- 11248,
143
- 8989,
144
- 11816,
145
- 18274,
146
- 17300,
147
- 13053,
148
- 11906,
149
- 10073
150
- ]
151
- }],
152
- responsive: {
153
- rules: [{
154
- condition: {
155
- maxWidth: 500
156
- },
157
- chartOptions: {
158
- legend: {
159
- layout: "horizontal",
160
- align: "center",
161
- verticalAlign: "bottom"
162
- }
163
- }
164
- }]
52
+ const chartComponentRef = useRef(null);
53
+ return /* @__PURE__ */ React.createElement(
54
+ HighchartsReact,
55
+ {
56
+ highcharts: Highcharts,
57
+ options,
58
+ ref: chartComponentRef,
59
+ ...props
165
60
  }
166
- };
167
- return /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(HighchartsReact, { highcharts: Highcharts, options: graph_data }));
61
+ );
168
62
  };
169
63
 
170
64
  // src/services/http-service.tsx
@@ -505,7 +399,7 @@ var ElementExecutor = (props) => {
505
399
  return null;
506
400
  });
507
401
  };
508
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("h1", null, "import in core as named export HighchartsLineChart same as file name also"), /* @__PURE__ */ React2.createElement(HighchartsLineChart, null), /* @__PURE__ */ React2.createElement("div", { className: props.data.className }, renderFields(schema)));
402
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement("h1", null, "import in core as typescript named export HighchartsLineChart same as file name also"), /* @__PURE__ */ React2.createElement(HighchartsLineChart, null), /* @__PURE__ */ React2.createElement("div", { className: props.data.className }, renderFields(schema)));
509
403
  };
510
404
  export {
511
405
  ElementExecutor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/core",
3
- "version": "0.0.16-Beta226",
3
+ "version": "0.0.16-Beta227",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",