mario-education 2.2.6 → 2.2.7
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.js +16 -210
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +17 -211
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17268,107 +17268,6 @@ var DashboardCard = function DashboardCard(_ref) {
|
|
|
17268
17268
|
}, children));
|
|
17269
17269
|
};
|
|
17270
17270
|
|
|
17271
|
-
var colors = ["#1C77AC", "#00979B", "#8B0000", "#87E0E0", "#2EB82E"];
|
|
17272
|
-
var levels = [{
|
|
17273
|
-
name: "No progress",
|
|
17274
|
-
field: "noProgress"
|
|
17275
|
-
}, {
|
|
17276
|
-
name: "Slight",
|
|
17277
|
-
field: "slight"
|
|
17278
|
-
}, {
|
|
17279
|
-
name: "Moderate",
|
|
17280
|
-
field: "moderate"
|
|
17281
|
-
}, {
|
|
17282
|
-
name: "Significant",
|
|
17283
|
-
field: "significant"
|
|
17284
|
-
}, {
|
|
17285
|
-
name: "Achieved",
|
|
17286
|
-
field: "achieved"
|
|
17287
|
-
}];
|
|
17288
|
-
|
|
17289
|
-
var GoalProgressReport = function GoalProgressReport(_ref) {
|
|
17290
|
-
var data = _ref.data;
|
|
17291
|
-
var series = React.useMemo(function () {
|
|
17292
|
-
if (!data) return [];
|
|
17293
|
-
|
|
17294
|
-
try {
|
|
17295
|
-
return levels.map(function (level) {
|
|
17296
|
-
return {
|
|
17297
|
-
name: level.name,
|
|
17298
|
-
data: data.map(function (item) {
|
|
17299
|
-
return item[level.field];
|
|
17300
|
-
})
|
|
17301
|
-
};
|
|
17302
|
-
});
|
|
17303
|
-
} catch (_unused) {
|
|
17304
|
-
return [];
|
|
17305
|
-
}
|
|
17306
|
-
}, [data]);
|
|
17307
|
-
var categories = React.useMemo(function () {
|
|
17308
|
-
if (!data) return [];
|
|
17309
|
-
|
|
17310
|
-
try {
|
|
17311
|
-
return data.map(function (item) {
|
|
17312
|
-
return item.createdAt;
|
|
17313
|
-
});
|
|
17314
|
-
} catch (_unused2) {
|
|
17315
|
-
return [];
|
|
17316
|
-
}
|
|
17317
|
-
}, [data]);
|
|
17318
|
-
if (!data) return React__default.createElement(marioCore.Loading, null);
|
|
17319
|
-
var options = {
|
|
17320
|
-
chart: {
|
|
17321
|
-
type: "bar",
|
|
17322
|
-
height: 350,
|
|
17323
|
-
stacked: true,
|
|
17324
|
-
stackType: "100%",
|
|
17325
|
-
toolbar: {
|
|
17326
|
-
show: false
|
|
17327
|
-
}
|
|
17328
|
-
},
|
|
17329
|
-
plotOptions: {
|
|
17330
|
-
bar: {
|
|
17331
|
-
horizontal: false,
|
|
17332
|
-
columnWidth: "80%"
|
|
17333
|
-
}
|
|
17334
|
-
},
|
|
17335
|
-
colors: colors,
|
|
17336
|
-
responsive: [{
|
|
17337
|
-
breakpoint: 480,
|
|
17338
|
-
options: {
|
|
17339
|
-
legend: {
|
|
17340
|
-
position: "bottom",
|
|
17341
|
-
offsetX: -10,
|
|
17342
|
-
offsetY: 0
|
|
17343
|
-
}
|
|
17344
|
-
}
|
|
17345
|
-
}],
|
|
17346
|
-
xaxis: {
|
|
17347
|
-
categories: categories
|
|
17348
|
-
},
|
|
17349
|
-
fill: {
|
|
17350
|
-
opacity: 1
|
|
17351
|
-
},
|
|
17352
|
-
legend: {
|
|
17353
|
-
position: "right",
|
|
17354
|
-
offsetX: 0,
|
|
17355
|
-
offsetY: 50,
|
|
17356
|
-
onItemClick: {
|
|
17357
|
-
toggleDataSeries: false
|
|
17358
|
-
},
|
|
17359
|
-
onItemHover: {
|
|
17360
|
-
highlightDataSeries: false
|
|
17361
|
-
}
|
|
17362
|
-
}
|
|
17363
|
-
};
|
|
17364
|
-
return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
|
|
17365
|
-
options: options,
|
|
17366
|
-
series: series,
|
|
17367
|
-
type: "bar",
|
|
17368
|
-
height: 350
|
|
17369
|
-
}));
|
|
17370
|
-
};
|
|
17371
|
-
|
|
17372
17271
|
var Loading = function Loading() {
|
|
17373
17272
|
return React__default.createElement("div", {
|
|
17374
17273
|
className: "d-flex align-items-center justify-content-center"
|
|
@@ -17390,14 +17289,14 @@ var Loading = function Loading() {
|
|
|
17390
17289
|
}, "Loading...")));
|
|
17391
17290
|
};
|
|
17392
17291
|
|
|
17393
|
-
var colors
|
|
17292
|
+
var colors = ["rgba(129, 236, 236, 0.8)", "rgba(116, 185, 255, 0.8)", "rgba(250, 177, 160, 0.8)", "rgba(255, 234, 167, 0.8)", "rgba(178, 190, 195, 0.8)", "rgba(85, 239, 196, 0.8)", "rgba(120, 111, 166, 0.8)", "rgba(243, 166, 131, 0.8)"];
|
|
17394
17293
|
|
|
17395
17294
|
var getColors = function getColors(length) {
|
|
17396
|
-
if (colors
|
|
17397
|
-
var newColors = [].concat(colors
|
|
17295
|
+
if (colors.length >= length) return colors;
|
|
17296
|
+
var newColors = [].concat(colors);
|
|
17398
17297
|
|
|
17399
17298
|
while (newColors.length < length) {
|
|
17400
|
-
newColors = [].concat(newColors, colors
|
|
17299
|
+
newColors = [].concat(newColors, colors);
|
|
17401
17300
|
}
|
|
17402
17301
|
|
|
17403
17302
|
return newColors;
|
|
@@ -17488,7 +17387,7 @@ var HighImpact = function HighImpact(_ref) {
|
|
|
17488
17387
|
})));
|
|
17489
17388
|
};
|
|
17490
17389
|
|
|
17491
|
-
var colors$
|
|
17390
|
+
var colors$1 = ["#1abc9c", "#c0392b"];
|
|
17492
17391
|
|
|
17493
17392
|
var LoginCouting = function LoginCouting(_ref) {
|
|
17494
17393
|
var data = _ref.data;
|
|
@@ -17505,11 +17404,11 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17505
17404
|
var series = [{
|
|
17506
17405
|
name: "Teacher",
|
|
17507
17406
|
data: teacherCount,
|
|
17508
|
-
color: colors$
|
|
17407
|
+
color: colors$1[0]
|
|
17509
17408
|
}, {
|
|
17510
17409
|
name: "Student",
|
|
17511
17410
|
data: studentCount,
|
|
17512
|
-
color: colors$
|
|
17411
|
+
color: colors$1[1]
|
|
17513
17412
|
}];
|
|
17514
17413
|
var options = {
|
|
17515
17414
|
chart: {
|
|
@@ -17526,7 +17425,7 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17526
17425
|
markers: {
|
|
17527
17426
|
size: 4,
|
|
17528
17427
|
colors: ["#fff"],
|
|
17529
|
-
strokeColors: colors$
|
|
17428
|
+
strokeColors: colors$1,
|
|
17530
17429
|
strokeWidth: 2,
|
|
17531
17430
|
strokeOpacity: 0.9,
|
|
17532
17431
|
strokeDashArray: 0,
|
|
@@ -17558,7 +17457,7 @@ var LoginCouting = function LoginCouting(_ref) {
|
|
|
17558
17457
|
}));
|
|
17559
17458
|
};
|
|
17560
17459
|
|
|
17561
|
-
var colors$
|
|
17460
|
+
var colors$2 = ["#00cec9", "#00b894"];
|
|
17562
17461
|
|
|
17563
17462
|
var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
17564
17463
|
var data = _ref.data;
|
|
@@ -17585,7 +17484,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17585
17484
|
show: false
|
|
17586
17485
|
}
|
|
17587
17486
|
},
|
|
17588
|
-
colors: colors$
|
|
17487
|
+
colors: colors$2,
|
|
17589
17488
|
plotOptions: {
|
|
17590
17489
|
bar: {
|
|
17591
17490
|
horizontal: false,
|
|
@@ -17623,7 +17522,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17623
17522
|
}));
|
|
17624
17523
|
};
|
|
17625
17524
|
|
|
17626
|
-
var colors$
|
|
17525
|
+
var colors$3 = ["#00b894", "#00cec9", "#0984e3"];
|
|
17627
17526
|
|
|
17628
17527
|
var Quantity = function Quantity(_ref) {
|
|
17629
17528
|
var data = _ref.data;
|
|
@@ -17640,7 +17539,7 @@ var Quantity = function Quantity(_ref) {
|
|
|
17640
17539
|
type: "pie"
|
|
17641
17540
|
},
|
|
17642
17541
|
labels: ["Teachers", "Students", "Assistants"],
|
|
17643
|
-
colors: colors$
|
|
17542
|
+
colors: colors$3,
|
|
17644
17543
|
legend: {
|
|
17645
17544
|
show: false
|
|
17646
17545
|
},
|
|
@@ -17655,15 +17554,15 @@ var Quantity = function Quantity(_ref) {
|
|
|
17655
17554
|
};
|
|
17656
17555
|
var details = [{
|
|
17657
17556
|
label: "Teachers",
|
|
17658
|
-
color: colors$
|
|
17557
|
+
color: colors$3[0],
|
|
17659
17558
|
value: teacherPercentage
|
|
17660
17559
|
}, {
|
|
17661
17560
|
label: "Students",
|
|
17662
|
-
color: colors$
|
|
17561
|
+
color: colors$3[1],
|
|
17663
17562
|
value: studentPercentage
|
|
17664
17563
|
}, {
|
|
17665
17564
|
label: "Assistants",
|
|
17666
|
-
color: colors$
|
|
17565
|
+
color: colors$3[2],
|
|
17667
17566
|
value: assistantPercentage
|
|
17668
17567
|
}];
|
|
17669
17568
|
return React__default.createElement("div", {
|
|
@@ -17700,95 +17599,12 @@ var Quantity = function Quantity(_ref) {
|
|
|
17700
17599
|
})));
|
|
17701
17600
|
};
|
|
17702
17601
|
|
|
17703
|
-
var colors$5 = ["#f0932b", "#22a6b3", "#6ab04c"];
|
|
17704
|
-
var categories = ["Before intervention", "During intervention", "After intervention"];
|
|
17705
|
-
|
|
17706
|
-
var findGradeLabel = function findGradeLabel(value, bandScores) {
|
|
17707
|
-
var sortedBandScores = bandScores === null || bandScores === void 0 ? void 0 : bandScores.sort(function (item1, item2) {
|
|
17708
|
-
return item1.value - item2.value;
|
|
17709
|
-
});
|
|
17710
|
-
|
|
17711
|
-
if ((sortedBandScores === null || sortedBandScores === void 0 ? void 0 : sortedBandScores.length) > 0) {
|
|
17712
|
-
for (var i = 0; i < sortedBandScores.length; i++) {
|
|
17713
|
-
var _sortedBandScores$i, _sortedBandScores;
|
|
17714
|
-
|
|
17715
|
-
if (((_sortedBandScores$i = sortedBandScores[i]) === null || _sortedBandScores$i === void 0 ? void 0 : _sortedBandScores$i.value) <= value && value <= ((_sortedBandScores = sortedBandScores[i + 1]) === null || _sortedBandScores === void 0 ? void 0 : _sortedBandScores.value)) {
|
|
17716
|
-
var _sortedBandScores$i2, _sortedBandScores2, _sortedBandScores3;
|
|
17717
|
-
|
|
17718
|
-
if (value - ((_sortedBandScores$i2 = sortedBandScores[i]) === null || _sortedBandScores$i2 === void 0 ? void 0 : _sortedBandScores$i2.value) <= ((_sortedBandScores2 = sortedBandScores[i + 1]) === null || _sortedBandScores2 === void 0 ? void 0 : _sortedBandScores2.value) - value) {
|
|
17719
|
-
var _sortedBandScores$i3;
|
|
17720
|
-
|
|
17721
|
-
return (_sortedBandScores$i3 = sortedBandScores[i]) === null || _sortedBandScores$i3 === void 0 ? void 0 : _sortedBandScores$i3.label;
|
|
17722
|
-
}
|
|
17723
|
-
|
|
17724
|
-
return (_sortedBandScores3 = sortedBandScores[i + 1]) === null || _sortedBandScores3 === void 0 ? void 0 : _sortedBandScores3.label;
|
|
17725
|
-
}
|
|
17726
|
-
}
|
|
17727
|
-
}
|
|
17728
|
-
|
|
17729
|
-
return "";
|
|
17730
|
-
};
|
|
17731
|
-
|
|
17732
|
-
var Grade = function Grade(_ref) {
|
|
17733
|
-
var data = _ref.data;
|
|
17734
|
-
if (!data) return React__default.createElement(Loading, null);
|
|
17735
|
-
var series = [{
|
|
17736
|
-
data: [data.beforeIntervention, data.duringIntervention, data.afterIntervention]
|
|
17737
|
-
}];
|
|
17738
|
-
var options = {
|
|
17739
|
-
chart: {
|
|
17740
|
-
height: 350,
|
|
17741
|
-
type: "bar",
|
|
17742
|
-
toolbar: {
|
|
17743
|
-
show: false
|
|
17744
|
-
}
|
|
17745
|
-
},
|
|
17746
|
-
colors: colors$5,
|
|
17747
|
-
plotOptions: {
|
|
17748
|
-
bar: {
|
|
17749
|
-
columnWidth: "45%",
|
|
17750
|
-
distributed: true
|
|
17751
|
-
}
|
|
17752
|
-
},
|
|
17753
|
-
dataLabels: {
|
|
17754
|
-
enabled: false
|
|
17755
|
-
},
|
|
17756
|
-
legend: {
|
|
17757
|
-
show: false
|
|
17758
|
-
},
|
|
17759
|
-
xaxis: {
|
|
17760
|
-
categories: categories
|
|
17761
|
-
},
|
|
17762
|
-
yaxis: {
|
|
17763
|
-
max: Math.max.apply(Math, data.bandScores.map(function (item) {
|
|
17764
|
-
return item.value;
|
|
17765
|
-
})),
|
|
17766
|
-
min: Math.min.apply(Math, data.bandScores.map(function (item) {
|
|
17767
|
-
return item.value;
|
|
17768
|
-
})),
|
|
17769
|
-
labels: {
|
|
17770
|
-
formatter: function formatter(val) {
|
|
17771
|
-
return findGradeLabel(val, data.bandScores);
|
|
17772
|
-
}
|
|
17773
|
-
}
|
|
17774
|
-
}
|
|
17775
|
-
};
|
|
17776
|
-
return React__default.createElement("div", null, React__default.createElement(ReactApexChart, {
|
|
17777
|
-
options: options,
|
|
17778
|
-
series: series,
|
|
17779
|
-
type: "bar",
|
|
17780
|
-
height: 350
|
|
17781
|
-
}));
|
|
17782
|
-
};
|
|
17783
|
-
|
|
17784
17602
|
var Dashboard = function Dashboard() {
|
|
17785
17603
|
var _useDashboard = useDashboard(),
|
|
17786
17604
|
loginCounting = _useDashboard.loginCounting,
|
|
17787
17605
|
quantity = _useDashboard.quantity,
|
|
17788
|
-
goalProgress = _useDashboard.goalProgress,
|
|
17789
17606
|
highImpact = _useDashboard.highImpact,
|
|
17790
|
-
perceivedImpact = _useDashboard.perceivedImpact
|
|
17791
|
-
grade = _useDashboard.grade;
|
|
17607
|
+
perceivedImpact = _useDashboard.perceivedImpact;
|
|
17792
17608
|
|
|
17793
17609
|
var cards = [{
|
|
17794
17610
|
label: "High-impact learning strategies of current school year",
|
|
@@ -17810,16 +17626,6 @@ var Dashboard = function Dashboard() {
|
|
|
17810
17626
|
children: React__default.createElement(Quantity, {
|
|
17811
17627
|
data: quantity
|
|
17812
17628
|
})
|
|
17813
|
-
}, {
|
|
17814
|
-
label: "Goal progress",
|
|
17815
|
-
children: React__default.createElement(GoalProgressReport, {
|
|
17816
|
-
data: goalProgress
|
|
17817
|
-
})
|
|
17818
|
-
}, {
|
|
17819
|
-
label: "Grades",
|
|
17820
|
-
children: React__default.createElement(Grade, {
|
|
17821
|
-
data: grade
|
|
17822
|
-
})
|
|
17823
17629
|
}];
|
|
17824
17630
|
return React__default.createElement("div", null, React__default.createElement("h4", {
|
|
17825
17631
|
className: "mb-5"
|