mario-education 2.4.516-feedback → 2.4.517-feedback
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 +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -2
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6083,7 +6083,7 @@ var useCSVImport = function useCSVImport() {
|
|
|
6083
6083
|
setStudentDataFile = _useState5[1];
|
|
6084
6084
|
|
|
6085
6085
|
var domainName = window.location.hostname;
|
|
6086
|
-
var isCheckDomainIBS = domainName.includes('isb') || domainName.includes('stage')
|
|
6086
|
+
var isCheckDomainIBS = domainName.includes('isb') || domainName.includes('stage');
|
|
6087
6087
|
|
|
6088
6088
|
var _useState6 = React.useState(0),
|
|
6089
6089
|
defaultTeacher = _useState6[0],
|
|
@@ -6169,12 +6169,23 @@ var useCSVImport = function useCSVImport() {
|
|
|
6169
6169
|
var _temp8 = function () {
|
|
6170
6170
|
if (type == CSVType.AllUser) {
|
|
6171
6171
|
console.log("📌 Type 1:", type.toString());
|
|
6172
|
-
return Promise.resolve(
|
|
6172
|
+
return Promise.resolve(new Promise(function (resolve, reject) {
|
|
6173
|
+
var reader = new FileReader();
|
|
6174
|
+
|
|
6175
|
+
reader.onload = function () {
|
|
6176
|
+
return resolve(reader.result);
|
|
6177
|
+
};
|
|
6178
|
+
|
|
6179
|
+
reader.onerror = reject;
|
|
6180
|
+
reader.readAsText(file);
|
|
6181
|
+
})).then(function (fileTextRaw) {
|
|
6182
|
+
console.log("📌 fileTextRaw:", fileTextRaw);
|
|
6173
6183
|
var fileText = fileTextRaw.trim();
|
|
6174
6184
|
var headerIndex = 0;
|
|
6175
6185
|
var rows = fileText.split("\n").map(function (row) {
|
|
6176
6186
|
return row.trim();
|
|
6177
6187
|
});
|
|
6188
|
+
console.log("📌 rows:", rows);
|
|
6178
6189
|
|
|
6179
6190
|
for (var _i = 0; _i < rows.length; _i++) {
|
|
6180
6191
|
var cols = rows[_i].split(",");
|
|
@@ -6190,12 +6201,14 @@ var useCSVImport = function useCSVImport() {
|
|
|
6190
6201
|
}
|
|
6191
6202
|
|
|
6192
6203
|
fileText = rows.slice(headerIndex).join("\n");
|
|
6204
|
+
console.log("📌 fileText:", fileText);
|
|
6193
6205
|
var parsedData = Papa.parse(fileText, {
|
|
6194
6206
|
header: true,
|
|
6195
6207
|
skipEmptyLines: true
|
|
6196
6208
|
});
|
|
6197
6209
|
var header = parsedData.meta.fields;
|
|
6198
6210
|
var dataRows = parsedData.data;
|
|
6211
|
+
console.log("📌 dataRows:", dataRows);
|
|
6199
6212
|
var chunkSize = 20;
|
|
6200
6213
|
var chunks = [];
|
|
6201
6214
|
|