mario-education 2.2.5 → 2.2.9
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 +32 -231
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -232
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5413,7 +5413,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
|
|
|
5413
5413
|
})), React__default.createElement(reactstrap.Col, {
|
|
5414
5414
|
md: 6
|
|
5415
5415
|
}, React__default.createElement(DatePicker, {
|
|
5416
|
-
value: marioCore.utcToLocalTime(values.startTime, "
|
|
5416
|
+
value: marioCore.utcToLocalTime(values.startTime, "Do MMMM YYYY"),
|
|
5417
5417
|
todayButton: "Today",
|
|
5418
5418
|
peekNextMonth: true,
|
|
5419
5419
|
showMonthDropdown: true,
|
|
@@ -5444,7 +5444,7 @@ var SemesterDetailModal = function SemesterDetailModal(props, ref) {
|
|
|
5444
5444
|
})), React__default.createElement(reactstrap.Col, {
|
|
5445
5445
|
md: 6
|
|
5446
5446
|
}, React__default.createElement(DatePicker, {
|
|
5447
|
-
value: marioCore.utcToLocalTime(values.endTime, "
|
|
5447
|
+
value: marioCore.utcToLocalTime(values.endTime, "Do MMMM YYYY"),
|
|
5448
5448
|
todayButton: "Today",
|
|
5449
5449
|
peekNextMonth: true,
|
|
5450
5450
|
showMonthDropdown: true,
|
|
@@ -6060,9 +6060,9 @@ var SemesterList = function SemesterList() {
|
|
|
6060
6060
|
}
|
|
6061
6061
|
})), React__default.createElement("td", {
|
|
6062
6062
|
className: "align-middle"
|
|
6063
|
-
}, marioCore.utcToLocalTime(record.startTime, "
|
|
6063
|
+
}, marioCore.utcToLocalTime(record.startTime, "Do MMMM YYYY")), React__default.createElement("td", {
|
|
6064
6064
|
className: "align-middle"
|
|
6065
|
-
}, marioCore.utcToLocalTime(record.endTime, "
|
|
6065
|
+
}, marioCore.utcToLocalTime(record.endTime, "Do MMMM YYYY")), React__default.createElement("td", {
|
|
6066
6066
|
className: "text-center align-middle"
|
|
6067
6067
|
}, React__default.createElement(marioCore.DeleteButtonIcon, {
|
|
6068
6068
|
onClick: function onClick() {
|
|
@@ -7244,9 +7244,9 @@ var SchoolBlankDayList = function SchoolBlankDayList() {
|
|
|
7244
7244
|
}
|
|
7245
7245
|
})), React__default.createElement("td", {
|
|
7246
7246
|
className: "align-middle"
|
|
7247
|
-
}, marioCore.utcToLocalTime(record.startTime,
|
|
7247
|
+
}, marioCore.utcToLocalTime(record.startTime, "Do MMMM YYYY")), React__default.createElement("td", {
|
|
7248
7248
|
className: "align-middle"
|
|
7249
|
-
}, marioCore.utcToLocalTime(record.endTime,
|
|
7249
|
+
}, marioCore.utcToLocalTime(record.endTime, "Do MMMM YYYY")), React__default.createElement("td", {
|
|
7250
7250
|
className: "text-center align-middle"
|
|
7251
7251
|
}, React__default.createElement(marioCore.DeleteButtonIcon, {
|
|
7252
7252
|
onClick: function onClick() {
|
|
@@ -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,17 +17457,12 @@ 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;
|
|
17565
17464
|
if (!data) return React__default.createElement(Loading, null);
|
|
17566
17465
|
var series = [{
|
|
17567
|
-
name: "Teacher",
|
|
17568
|
-
data: data.map(function (item) {
|
|
17569
|
-
return item.teacherRating;
|
|
17570
|
-
})
|
|
17571
|
-
}, {
|
|
17572
17466
|
name: "Student",
|
|
17573
17467
|
data: data.map(function (item) {
|
|
17574
17468
|
return item.studentRating;
|
|
@@ -17585,7 +17479,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17585
17479
|
show: false
|
|
17586
17480
|
}
|
|
17587
17481
|
},
|
|
17588
|
-
colors: colors$
|
|
17482
|
+
colors: colors$2,
|
|
17589
17483
|
plotOptions: {
|
|
17590
17484
|
bar: {
|
|
17591
17485
|
horizontal: false,
|
|
@@ -17623,7 +17517,7 @@ var PerceivedImpact = function PerceivedImpact(_ref) {
|
|
|
17623
17517
|
}));
|
|
17624
17518
|
};
|
|
17625
17519
|
|
|
17626
|
-
var colors$
|
|
17520
|
+
var colors$3 = ["#00b894", "#00cec9", "#0984e3"];
|
|
17627
17521
|
|
|
17628
17522
|
var Quantity = function Quantity(_ref) {
|
|
17629
17523
|
var data = _ref.data;
|
|
@@ -17640,7 +17534,7 @@ var Quantity = function Quantity(_ref) {
|
|
|
17640
17534
|
type: "pie"
|
|
17641
17535
|
},
|
|
17642
17536
|
labels: ["Teachers", "Students", "Assistants"],
|
|
17643
|
-
colors: colors$
|
|
17537
|
+
colors: colors$3,
|
|
17644
17538
|
legend: {
|
|
17645
17539
|
show: false
|
|
17646
17540
|
},
|
|
@@ -17655,15 +17549,15 @@ var Quantity = function Quantity(_ref) {
|
|
|
17655
17549
|
};
|
|
17656
17550
|
var details = [{
|
|
17657
17551
|
label: "Teachers",
|
|
17658
|
-
color: colors$
|
|
17552
|
+
color: colors$3[0],
|
|
17659
17553
|
value: teacherPercentage
|
|
17660
17554
|
}, {
|
|
17661
17555
|
label: "Students",
|
|
17662
|
-
color: colors$
|
|
17556
|
+
color: colors$3[1],
|
|
17663
17557
|
value: studentPercentage
|
|
17664
17558
|
}, {
|
|
17665
17559
|
label: "Assistants",
|
|
17666
|
-
color: colors$
|
|
17560
|
+
color: colors$3[2],
|
|
17667
17561
|
value: assistantPercentage
|
|
17668
17562
|
}];
|
|
17669
17563
|
return React__default.createElement("div", {
|
|
@@ -17700,117 +17594,14 @@ var Quantity = function Quantity(_ref) {
|
|
|
17700
17594
|
})));
|
|
17701
17595
|
};
|
|
17702
17596
|
|
|
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
17597
|
var Dashboard = function Dashboard() {
|
|
17785
17598
|
var _useDashboard = useDashboard(),
|
|
17786
17599
|
loginCounting = _useDashboard.loginCounting,
|
|
17787
17600
|
quantity = _useDashboard.quantity,
|
|
17788
|
-
goalProgress = _useDashboard.goalProgress,
|
|
17789
17601
|
highImpact = _useDashboard.highImpact,
|
|
17790
|
-
perceivedImpact = _useDashboard.perceivedImpact
|
|
17791
|
-
grade = _useDashboard.grade;
|
|
17602
|
+
perceivedImpact = _useDashboard.perceivedImpact;
|
|
17792
17603
|
|
|
17793
17604
|
var cards = [{
|
|
17794
|
-
label: "Students & teachers login per day",
|
|
17795
|
-
children: React__default.createElement(LoginCouting, {
|
|
17796
|
-
data: loginCounting
|
|
17797
|
-
})
|
|
17798
|
-
}, {
|
|
17799
|
-
label: "Number of students, teachers, assistants",
|
|
17800
|
-
children: React__default.createElement(Quantity, {
|
|
17801
|
-
data: quantity
|
|
17802
|
-
})
|
|
17803
|
-
}, {
|
|
17804
|
-
label: "Goal progress",
|
|
17805
|
-
children: React__default.createElement(GoalProgressReport, {
|
|
17806
|
-
data: goalProgress
|
|
17807
|
-
})
|
|
17808
|
-
}, {
|
|
17809
|
-
label: "Grades",
|
|
17810
|
-
children: React__default.createElement(Grade, {
|
|
17811
|
-
data: grade
|
|
17812
|
-
})
|
|
17813
|
-
}, {
|
|
17814
17605
|
label: "High-impact learning strategies of current school year",
|
|
17815
17606
|
children: React__default.createElement(HighImpact, {
|
|
17816
17607
|
data: highImpact
|
|
@@ -17820,6 +17611,16 @@ var Dashboard = function Dashboard() {
|
|
|
17820
17611
|
children: React__default.createElement(PerceivedImpact, {
|
|
17821
17612
|
data: perceivedImpact
|
|
17822
17613
|
})
|
|
17614
|
+
}, {
|
|
17615
|
+
label: "Students & teachers logins per day",
|
|
17616
|
+
children: React__default.createElement(LoginCouting, {
|
|
17617
|
+
data: loginCounting
|
|
17618
|
+
})
|
|
17619
|
+
}, {
|
|
17620
|
+
label: "Number of students, teachers, assistants",
|
|
17621
|
+
children: React__default.createElement(Quantity, {
|
|
17622
|
+
data: quantity
|
|
17623
|
+
})
|
|
17823
17624
|
}];
|
|
17824
17625
|
return React__default.createElement("div", null, React__default.createElement("h4", {
|
|
17825
17626
|
className: "mb-5"
|