@apexcura/ui-components 0.0.14-Beta120 → 0.0.14-Beta122
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 +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +126 -0
- package/dist/index.mjs +137 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -122,4 +122,8 @@ declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
122
122
|
|
|
123
123
|
declare const CircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
declare const SemiCircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
126
|
+
|
|
127
|
+
declare const HorizontalBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
128
|
+
|
|
129
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, HorizontalBarChart, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.d.ts
CHANGED
|
@@ -122,4 +122,8 @@ declare const OtpElement: (props: ElementType) => React$1.JSX.Element;
|
|
|
122
122
|
|
|
123
123
|
declare const CircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
declare const SemiCircleDonut: (props: ElementType) => React$1.JSX.Element;
|
|
126
|
+
|
|
127
|
+
declare const HorizontalBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
128
|
+
|
|
129
|
+
export { AddMoreTable, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DropDownGroup, FileUpload, HorizontalBarChart, Image, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(src_exports, {
|
|
|
39
39
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
40
40
|
DropDownGroup: () => DropDownGroup,
|
|
41
41
|
FileUpload: () => FileUpload,
|
|
42
|
+
HorizontalBarChart: () => HorizontalBarChart,
|
|
42
43
|
Image: () => Image,
|
|
43
44
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
44
45
|
Navbar: () => Navbar,
|
|
@@ -47,6 +48,7 @@ __export(src_exports, {
|
|
|
47
48
|
PasswordElement: () => PasswordElement,
|
|
48
49
|
RadioElement: () => RadioElement,
|
|
49
50
|
SelectElement: () => SelectElement,
|
|
51
|
+
SemiCircleDonut: () => SemiCircleDonut,
|
|
50
52
|
Sidebar: () => Sidebar,
|
|
51
53
|
SingleCheckbox: () => SingleCheckbox,
|
|
52
54
|
SingleSelectElement: () => SingleSelectElement,
|
|
@@ -1147,6 +1149,128 @@ var CircleDonut = (props) => {
|
|
|
1147
1149
|
};
|
|
1148
1150
|
return /* @__PURE__ */ import_react31.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react31.default.createElement(import_react_chartjs_2.Doughnut, { data, options }));
|
|
1149
1151
|
};
|
|
1152
|
+
|
|
1153
|
+
// src/Components/SemiCircleDonut.tsx
|
|
1154
|
+
var import_react32 = __toESM(require("react"));
|
|
1155
|
+
var import_react_chartjs_22 = require("react-chartjs-2");
|
|
1156
|
+
var import_chart2 = require("chart.js");
|
|
1157
|
+
import_chart2.Chart.register(import_chart2.DoughnutController, import_chart2.ArcElement, import_chart2.Tooltip, import_chart2.Legend);
|
|
1158
|
+
var SemiCircleDonut = (props) => {
|
|
1159
|
+
const data = {
|
|
1160
|
+
labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others Prescriptions"],
|
|
1161
|
+
datasets: [
|
|
1162
|
+
{
|
|
1163
|
+
label: "Bot Conversation",
|
|
1164
|
+
data: [30, 10, 27, 40, 12, 37],
|
|
1165
|
+
backgroundColor: [
|
|
1166
|
+
"#FFCB8A",
|
|
1167
|
+
"#CADBBF",
|
|
1168
|
+
"#8AC1BB",
|
|
1169
|
+
"#FCB0CB",
|
|
1170
|
+
"#CEB0FA",
|
|
1171
|
+
"#AEA29F"
|
|
1172
|
+
]
|
|
1173
|
+
}
|
|
1174
|
+
]
|
|
1175
|
+
};
|
|
1176
|
+
const options = {
|
|
1177
|
+
responsive: true,
|
|
1178
|
+
circumference: 180,
|
|
1179
|
+
rotation: -90,
|
|
1180
|
+
plugins: {
|
|
1181
|
+
legend: {
|
|
1182
|
+
position: "left",
|
|
1183
|
+
labels: {
|
|
1184
|
+
generateLabels: (chart) => {
|
|
1185
|
+
const dataset = chart.data.datasets[0];
|
|
1186
|
+
return chart.data.labels.map((label, index) => {
|
|
1187
|
+
const value = dataset.data[index];
|
|
1188
|
+
return {
|
|
1189
|
+
text: `${label}: ${value}`,
|
|
1190
|
+
fillStyle: dataset.backgroundColor[index],
|
|
1191
|
+
hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
|
|
1192
|
+
index
|
|
1193
|
+
};
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
tooltip: {
|
|
1199
|
+
enabled: true,
|
|
1200
|
+
callbacks: {
|
|
1201
|
+
label: function(context) {
|
|
1202
|
+
const label = context.label || "";
|
|
1203
|
+
const value = context.raw || 0;
|
|
1204
|
+
return `${label}: ${value}`;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
};
|
|
1210
|
+
return /* @__PURE__ */ import_react32.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react32.default.createElement(import_react_chartjs_22.Doughnut, { data, options }));
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
// src/Components/HorizontalBarChart.tsx
|
|
1214
|
+
var import_react33 = __toESM(require("react"));
|
|
1215
|
+
var import_react_chartjs_23 = require("react-chartjs-2");
|
|
1216
|
+
var import_chart3 = require("chart.js");
|
|
1217
|
+
import_chart3.Chart.register(import_chart3.BarElement, import_chart3.CategoryScale, import_chart3.LinearScale, import_chart3.Tooltip, import_chart3.Legend);
|
|
1218
|
+
var HorizontalBarChart = (props) => {
|
|
1219
|
+
const data = {
|
|
1220
|
+
labels: ["65+", "55-64", "45-54", "35-44", "25-34", "18-24"],
|
|
1221
|
+
datasets: [
|
|
1222
|
+
{
|
|
1223
|
+
label: "Bot Conversation",
|
|
1224
|
+
data: [30, 10, 27, 40, 12, 24],
|
|
1225
|
+
backgroundColor: "#6298D5"
|
|
1226
|
+
}
|
|
1227
|
+
]
|
|
1228
|
+
};
|
|
1229
|
+
const options = {
|
|
1230
|
+
responsive: true,
|
|
1231
|
+
indexAxis: "y",
|
|
1232
|
+
scales: {
|
|
1233
|
+
x: {
|
|
1234
|
+
beginAtZero: true
|
|
1235
|
+
},
|
|
1236
|
+
y: {
|
|
1237
|
+
ticks: {
|
|
1238
|
+
callback: (value) => `${value}%`
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
plugins: {
|
|
1243
|
+
legend: {
|
|
1244
|
+
position: "top",
|
|
1245
|
+
labels: {
|
|
1246
|
+
generateLabels: (chart) => {
|
|
1247
|
+
const dataset = chart.data.datasets[0];
|
|
1248
|
+
return chart.data.labels.map((label, index) => {
|
|
1249
|
+
const value = dataset.data[index];
|
|
1250
|
+
return {
|
|
1251
|
+
text: `${label}: ${value}`,
|
|
1252
|
+
fillStyle: dataset.backgroundColor[index],
|
|
1253
|
+
hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
|
|
1254
|
+
index
|
|
1255
|
+
};
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
tooltip: {
|
|
1261
|
+
enabled: true,
|
|
1262
|
+
callbacks: {
|
|
1263
|
+
label: function(context) {
|
|
1264
|
+
const label = context.label || "";
|
|
1265
|
+
const value = context.raw || 0;
|
|
1266
|
+
return `${label}: ${value}`;
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
};
|
|
1272
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react33.default.createElement(import_react_chartjs_23.Bar, { data, options }));
|
|
1273
|
+
};
|
|
1150
1274
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1151
1275
|
0 && (module.exports = {
|
|
1152
1276
|
AddMoreTable,
|
|
@@ -1158,6 +1282,7 @@ var CircleDonut = (props) => {
|
|
|
1158
1282
|
DateRangePickerElement,
|
|
1159
1283
|
DropDownGroup,
|
|
1160
1284
|
FileUpload,
|
|
1285
|
+
HorizontalBarChart,
|
|
1161
1286
|
Image,
|
|
1162
1287
|
MultipleSelectElement,
|
|
1163
1288
|
Navbar,
|
|
@@ -1166,6 +1291,7 @@ var CircleDonut = (props) => {
|
|
|
1166
1291
|
PasswordElement,
|
|
1167
1292
|
RadioElement,
|
|
1168
1293
|
SelectElement,
|
|
1294
|
+
SemiCircleDonut,
|
|
1169
1295
|
Sidebar,
|
|
1170
1296
|
SingleCheckbox,
|
|
1171
1297
|
SingleSelectElement,
|
package/dist/index.mjs
CHANGED
|
@@ -1092,6 +1092,141 @@ var CircleDonut = (props) => {
|
|
|
1092
1092
|
};
|
|
1093
1093
|
return /* @__PURE__ */ React31.createElement("div", { className: props.className }, /* @__PURE__ */ React31.createElement(Doughnut, { data, options }));
|
|
1094
1094
|
};
|
|
1095
|
+
|
|
1096
|
+
// src/Components/SemiCircleDonut.tsx
|
|
1097
|
+
import React32 from "react";
|
|
1098
|
+
import { Doughnut as Doughnut2 } from "react-chartjs-2";
|
|
1099
|
+
import {
|
|
1100
|
+
Chart as ChartJS2,
|
|
1101
|
+
DoughnutController as DoughnutController2,
|
|
1102
|
+
ArcElement as ArcElement2,
|
|
1103
|
+
Tooltip as Tooltip2,
|
|
1104
|
+
Legend as Legend2
|
|
1105
|
+
} from "chart.js";
|
|
1106
|
+
ChartJS2.register(DoughnutController2, ArcElement2, Tooltip2, Legend2);
|
|
1107
|
+
var SemiCircleDonut = (props) => {
|
|
1108
|
+
const data = {
|
|
1109
|
+
labels: ["Registration", "Book Appointment", "Diagnostic Tests", "Hospital Facility", "Others Prescriptions"],
|
|
1110
|
+
datasets: [
|
|
1111
|
+
{
|
|
1112
|
+
label: "Bot Conversation",
|
|
1113
|
+
data: [30, 10, 27, 40, 12, 37],
|
|
1114
|
+
backgroundColor: [
|
|
1115
|
+
"#FFCB8A",
|
|
1116
|
+
"#CADBBF",
|
|
1117
|
+
"#8AC1BB",
|
|
1118
|
+
"#FCB0CB",
|
|
1119
|
+
"#CEB0FA",
|
|
1120
|
+
"#AEA29F"
|
|
1121
|
+
]
|
|
1122
|
+
}
|
|
1123
|
+
]
|
|
1124
|
+
};
|
|
1125
|
+
const options = {
|
|
1126
|
+
responsive: true,
|
|
1127
|
+
circumference: 180,
|
|
1128
|
+
rotation: -90,
|
|
1129
|
+
plugins: {
|
|
1130
|
+
legend: {
|
|
1131
|
+
position: "left",
|
|
1132
|
+
labels: {
|
|
1133
|
+
generateLabels: (chart) => {
|
|
1134
|
+
const dataset = chart.data.datasets[0];
|
|
1135
|
+
return chart.data.labels.map((label, index) => {
|
|
1136
|
+
const value = dataset.data[index];
|
|
1137
|
+
return {
|
|
1138
|
+
text: `${label}: ${value}`,
|
|
1139
|
+
fillStyle: dataset.backgroundColor[index],
|
|
1140
|
+
hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
|
|
1141
|
+
index
|
|
1142
|
+
};
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
tooltip: {
|
|
1148
|
+
enabled: true,
|
|
1149
|
+
callbacks: {
|
|
1150
|
+
label: function(context) {
|
|
1151
|
+
const label = context.label || "";
|
|
1152
|
+
const value = context.raw || 0;
|
|
1153
|
+
return `${label}: ${value}`;
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
return /* @__PURE__ */ React32.createElement("div", { className: props.className }, /* @__PURE__ */ React32.createElement(Doughnut2, { data, options }));
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
// src/Components/HorizontalBarChart.tsx
|
|
1163
|
+
import React33 from "react";
|
|
1164
|
+
import { Bar } from "react-chartjs-2";
|
|
1165
|
+
import {
|
|
1166
|
+
Chart as ChartJS3,
|
|
1167
|
+
BarElement,
|
|
1168
|
+
CategoryScale,
|
|
1169
|
+
LinearScale,
|
|
1170
|
+
Tooltip as Tooltip3,
|
|
1171
|
+
Legend as Legend3
|
|
1172
|
+
} from "chart.js";
|
|
1173
|
+
ChartJS3.register(BarElement, CategoryScale, LinearScale, Tooltip3, Legend3);
|
|
1174
|
+
var HorizontalBarChart = (props) => {
|
|
1175
|
+
const data = {
|
|
1176
|
+
labels: ["65+", "55-64", "45-54", "35-44", "25-34", "18-24"],
|
|
1177
|
+
datasets: [
|
|
1178
|
+
{
|
|
1179
|
+
label: "Bot Conversation",
|
|
1180
|
+
data: [30, 10, 27, 40, 12, 24],
|
|
1181
|
+
backgroundColor: "#6298D5"
|
|
1182
|
+
}
|
|
1183
|
+
]
|
|
1184
|
+
};
|
|
1185
|
+
const options = {
|
|
1186
|
+
responsive: true,
|
|
1187
|
+
indexAxis: "y",
|
|
1188
|
+
scales: {
|
|
1189
|
+
x: {
|
|
1190
|
+
beginAtZero: true
|
|
1191
|
+
},
|
|
1192
|
+
y: {
|
|
1193
|
+
ticks: {
|
|
1194
|
+
callback: (value) => `${value}%`
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
plugins: {
|
|
1199
|
+
legend: {
|
|
1200
|
+
position: "top",
|
|
1201
|
+
labels: {
|
|
1202
|
+
generateLabels: (chart) => {
|
|
1203
|
+
const dataset = chart.data.datasets[0];
|
|
1204
|
+
return chart.data.labels.map((label, index) => {
|
|
1205
|
+
const value = dataset.data[index];
|
|
1206
|
+
return {
|
|
1207
|
+
text: `${label}: ${value}`,
|
|
1208
|
+
fillStyle: dataset.backgroundColor[index],
|
|
1209
|
+
hidden: isNaN(dataset.data[index]) || dataset.data[index] === null,
|
|
1210
|
+
index
|
|
1211
|
+
};
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
tooltip: {
|
|
1217
|
+
enabled: true,
|
|
1218
|
+
callbacks: {
|
|
1219
|
+
label: function(context) {
|
|
1220
|
+
const label = context.label || "";
|
|
1221
|
+
const value = context.raw || 0;
|
|
1222
|
+
return `${label}: ${value}`;
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
};
|
|
1228
|
+
return /* @__PURE__ */ React33.createElement("div", { className: props.className }, /* @__PURE__ */ React33.createElement(Bar, { data, options }));
|
|
1229
|
+
};
|
|
1095
1230
|
export {
|
|
1096
1231
|
AddMoreTable,
|
|
1097
1232
|
ButtonElement,
|
|
@@ -1102,6 +1237,7 @@ export {
|
|
|
1102
1237
|
DateRangePickerElement,
|
|
1103
1238
|
DropDownGroup,
|
|
1104
1239
|
FileUpload,
|
|
1240
|
+
HorizontalBarChart,
|
|
1105
1241
|
Image,
|
|
1106
1242
|
MultipleSelectElement,
|
|
1107
1243
|
Navbar,
|
|
@@ -1110,6 +1246,7 @@ export {
|
|
|
1110
1246
|
PasswordElement,
|
|
1111
1247
|
RadioElement,
|
|
1112
1248
|
SelectElement,
|
|
1249
|
+
SemiCircleDonut,
|
|
1113
1250
|
Sidebar,
|
|
1114
1251
|
SingleCheckbox,
|
|
1115
1252
|
SingleSelectElement,
|