@apexcura/ui-components 0.0.14-Beta71 → 0.0.14-Beta73
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 +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +77 -0
- package/dist/index.mjs +76 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -118,4 +118,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
|
118
118
|
|
|
119
119
|
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
declare const Donut: (props: ElementType) => React$1.JSX.Element;
|
|
122
|
+
|
|
123
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.d.ts
CHANGED
|
@@ -118,4 +118,6 @@ declare const Upload: (props: ElementType) => React$1.JSX.Element;
|
|
|
118
118
|
|
|
119
119
|
declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
declare const Donut: (props: ElementType) => React$1.JSX.Element;
|
|
122
|
+
|
|
123
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CkEditor, DatePickerElement, DateRangePickerElement, Donut, DropDownGroup, FileUpload, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
CkEditor: () => CkEditor,
|
|
37
37
|
DatePickerElement: () => DatePickerElement,
|
|
38
38
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
39
|
+
Donut: () => Donut,
|
|
39
40
|
DropDownGroup: () => DropDownGroup,
|
|
40
41
|
FileUpload: () => FileUpload,
|
|
41
42
|
Image: () => Image,
|
|
@@ -1081,6 +1082,81 @@ var OtpElement = (props) => {
|
|
|
1081
1082
|
}
|
|
1082
1083
|
)));
|
|
1083
1084
|
};
|
|
1085
|
+
|
|
1086
|
+
// src/Components/Donut.tsx
|
|
1087
|
+
var import_react31 = __toESM(require("react"));
|
|
1088
|
+
var import_highcharts = __toESM(require("highcharts"));
|
|
1089
|
+
var import_highcharts_react_official = __toESM(require("highcharts-react-official"));
|
|
1090
|
+
var Donut = (props) => {
|
|
1091
|
+
console.log(props);
|
|
1092
|
+
const total = 100;
|
|
1093
|
+
const girls = 20;
|
|
1094
|
+
const girlsPercentage = girls / total * 100;
|
|
1095
|
+
const chartOptions = {
|
|
1096
|
+
chart: {
|
|
1097
|
+
type: "pie",
|
|
1098
|
+
events: {
|
|
1099
|
+
render: function() {
|
|
1100
|
+
const chart = this;
|
|
1101
|
+
const width = chart.plotWidth;
|
|
1102
|
+
const height = chart.plotHeight;
|
|
1103
|
+
const centerX = chart.plotLeft + width / 2;
|
|
1104
|
+
const centerY = chart.plotTop + height / 2;
|
|
1105
|
+
if (!chart.customText) {
|
|
1106
|
+
chart.customText = chart.renderer.text(
|
|
1107
|
+
`${girlsPercentage.toFixed(1)}%`,
|
|
1108
|
+
centerX,
|
|
1109
|
+
centerY
|
|
1110
|
+
).attr({
|
|
1111
|
+
align: "center",
|
|
1112
|
+
zIndex: 5
|
|
1113
|
+
}).add();
|
|
1114
|
+
} else {
|
|
1115
|
+
chart.customText.attr({
|
|
1116
|
+
text: `${girlsPercentage.toFixed(1)}%`
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
},
|
|
1122
|
+
title: {
|
|
1123
|
+
text: "Distribution of Students"
|
|
1124
|
+
},
|
|
1125
|
+
plotOptions: {
|
|
1126
|
+
pie: {
|
|
1127
|
+
innerSize: "70%",
|
|
1128
|
+
dataLabels: {
|
|
1129
|
+
enabled: false,
|
|
1130
|
+
format: "<b>{point.name}</b>: {point.percentage:.1f} %"
|
|
1131
|
+
},
|
|
1132
|
+
showInLegend: true
|
|
1133
|
+
}
|
|
1134
|
+
},
|
|
1135
|
+
series: [{
|
|
1136
|
+
type: "pie",
|
|
1137
|
+
name: "Percentage",
|
|
1138
|
+
data: props.items
|
|
1139
|
+
}],
|
|
1140
|
+
legend: {
|
|
1141
|
+
enabled: true,
|
|
1142
|
+
align: "left",
|
|
1143
|
+
verticalAlign: "middle",
|
|
1144
|
+
layout: "proximate",
|
|
1145
|
+
labelFormatter: function() {
|
|
1146
|
+
const point = this;
|
|
1147
|
+
return `${point.name}: ${point.y?.toFixed(1)}%`;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
console.log(chartOptions.series);
|
|
1152
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
1153
|
+
import_highcharts_react_official.default,
|
|
1154
|
+
{
|
|
1155
|
+
highcharts: import_highcharts.default,
|
|
1156
|
+
options: chartOptions
|
|
1157
|
+
}
|
|
1158
|
+
);
|
|
1159
|
+
};
|
|
1084
1160
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1085
1161
|
0 && (module.exports = {
|
|
1086
1162
|
AddMoreTable,
|
|
@@ -1089,6 +1165,7 @@ var OtpElement = (props) => {
|
|
|
1089
1165
|
CkEditor,
|
|
1090
1166
|
DatePickerElement,
|
|
1091
1167
|
DateRangePickerElement,
|
|
1168
|
+
Donut,
|
|
1092
1169
|
DropDownGroup,
|
|
1093
1170
|
FileUpload,
|
|
1094
1171
|
Image,
|
package/dist/index.mjs
CHANGED
|
@@ -1021,6 +1021,81 @@ var OtpElement = (props) => {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
)));
|
|
1023
1023
|
};
|
|
1024
|
+
|
|
1025
|
+
// src/Components/Donut.tsx
|
|
1026
|
+
import React31 from "react";
|
|
1027
|
+
import Highcharts from "highcharts";
|
|
1028
|
+
import HighchartsReact from "highcharts-react-official";
|
|
1029
|
+
var Donut = (props) => {
|
|
1030
|
+
console.log(props);
|
|
1031
|
+
const total = 100;
|
|
1032
|
+
const girls = 20;
|
|
1033
|
+
const girlsPercentage = girls / total * 100;
|
|
1034
|
+
const chartOptions = {
|
|
1035
|
+
chart: {
|
|
1036
|
+
type: "pie",
|
|
1037
|
+
events: {
|
|
1038
|
+
render: function() {
|
|
1039
|
+
const chart = this;
|
|
1040
|
+
const width = chart.plotWidth;
|
|
1041
|
+
const height = chart.plotHeight;
|
|
1042
|
+
const centerX = chart.plotLeft + width / 2;
|
|
1043
|
+
const centerY = chart.plotTop + height / 2;
|
|
1044
|
+
if (!chart.customText) {
|
|
1045
|
+
chart.customText = chart.renderer.text(
|
|
1046
|
+
`${girlsPercentage.toFixed(1)}%`,
|
|
1047
|
+
centerX,
|
|
1048
|
+
centerY
|
|
1049
|
+
).attr({
|
|
1050
|
+
align: "center",
|
|
1051
|
+
zIndex: 5
|
|
1052
|
+
}).add();
|
|
1053
|
+
} else {
|
|
1054
|
+
chart.customText.attr({
|
|
1055
|
+
text: `${girlsPercentage.toFixed(1)}%`
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
},
|
|
1061
|
+
title: {
|
|
1062
|
+
text: "Distribution of Students"
|
|
1063
|
+
},
|
|
1064
|
+
plotOptions: {
|
|
1065
|
+
pie: {
|
|
1066
|
+
innerSize: "70%",
|
|
1067
|
+
dataLabels: {
|
|
1068
|
+
enabled: false,
|
|
1069
|
+
format: "<b>{point.name}</b>: {point.percentage:.1f} %"
|
|
1070
|
+
},
|
|
1071
|
+
showInLegend: true
|
|
1072
|
+
}
|
|
1073
|
+
},
|
|
1074
|
+
series: [{
|
|
1075
|
+
type: "pie",
|
|
1076
|
+
name: "Percentage",
|
|
1077
|
+
data: props.items
|
|
1078
|
+
}],
|
|
1079
|
+
legend: {
|
|
1080
|
+
enabled: true,
|
|
1081
|
+
align: "left",
|
|
1082
|
+
verticalAlign: "middle",
|
|
1083
|
+
layout: "proximate",
|
|
1084
|
+
labelFormatter: function() {
|
|
1085
|
+
const point = this;
|
|
1086
|
+
return `${point.name}: ${point.y?.toFixed(1)}%`;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
console.log(chartOptions.series);
|
|
1091
|
+
return /* @__PURE__ */ React31.createElement(
|
|
1092
|
+
HighchartsReact,
|
|
1093
|
+
{
|
|
1094
|
+
highcharts: Highcharts,
|
|
1095
|
+
options: chartOptions
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1098
|
+
};
|
|
1024
1099
|
export {
|
|
1025
1100
|
AddMoreTable,
|
|
1026
1101
|
ButtonElement,
|
|
@@ -1028,6 +1103,7 @@ export {
|
|
|
1028
1103
|
CkEditor,
|
|
1029
1104
|
DatePickerElement,
|
|
1030
1105
|
DateRangePickerElement,
|
|
1106
|
+
Donut,
|
|
1031
1107
|
DropDownGroup,
|
|
1032
1108
|
FileUpload,
|
|
1033
1109
|
Image,
|