mario-education 2.4.178-level → 2.4.179-level

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 CHANGED
@@ -32479,6 +32479,11 @@ var useExportSessionCsv = function useExportSessionCsv() {
32479
32479
  var dispatch = reactRedux.useDispatch();
32480
32480
  var domainName = window.location.hostname;
32481
32481
  var isCheckDomainIskenya = domainName.includes('iskenya');
32482
+ var schoolName = reactRedux.useSelector(function (state) {
32483
+ var _state$common, _state$common$user;
32484
+
32485
+ return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : (_state$common$user = _state$common.user) === null || _state$common$user === void 0 ? void 0 : _state$common$user.schoolName;
32486
+ }) || "";
32482
32487
 
32483
32488
  var exportSessionsCsv = function exportSessionsCsv(filters) {
32484
32489
  try {
@@ -32494,7 +32499,7 @@ var useExportSessionCsv = function useExportSessionCsv() {
32494
32499
  var encodedUri = convertDataExportSession(data, filters.startDate, filters.endDate);
32495
32500
  var link = document.createElement("a");
32496
32501
  link.href = encodedUri;
32497
- link.download = "CheckIns_Template_" + new Date().getTime() + ".csv";
32502
+ link.download = schoolName + "_CheckIns_Report.csv";
32498
32503
  link.click();
32499
32504
  });
32500
32505
  }, function (err) {
@@ -32564,7 +32569,12 @@ var useExportSessionCsv = function useExportSessionCsv() {
32564
32569
  };
32565
32570
 
32566
32571
  var htmlToText = function htmlToText(html) {
32567
- return html.replace(/<[^>]+>/g, '');
32572
+ var entities = [['amp', '&'], ['apos', '\''], ['#x27', '\''], ['#x2F', '/'], ['#39', '\''], ['#47', '/'], ['lt', '<'], ['gt', '>'], ['nbsp', ' '], ['quot', '"']];
32573
+ var result = html.replace(/<[^>]+>/g, '');
32574
+ entities.forEach(function (entity) {
32575
+ result = result.replace(new RegExp('&' + entity[0] + ';', 'g'), entity[1]);
32576
+ });
32577
+ return result;
32568
32578
  };
32569
32579
 
32570
32580
  var escapeCell = function escapeCell(value) {