@examind/block-sdk 0.2.0 → 0.2.1
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 +9 -7
- package/dist/index.mjs +9 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1324,31 +1324,33 @@ var TAG_X = "x-excel";
|
|
|
1324
1324
|
function parseData(xDataString) {
|
|
1325
1325
|
const xData = JSON.parse(xDataString);
|
|
1326
1326
|
const parts = [];
|
|
1327
|
-
for (const xPart of xData.parts) {
|
|
1327
|
+
for (const xPart of xData.parts ?? []) {
|
|
1328
1328
|
const tasks = [];
|
|
1329
|
-
for (const xTask of xPart.tasks) {
|
|
1329
|
+
for (const xTask of xPart.tasks ?? []) {
|
|
1330
1330
|
const steps = [];
|
|
1331
|
-
for (const xStep of xTask.steps) {
|
|
1331
|
+
for (const xStep of xTask.steps ?? []) {
|
|
1332
1332
|
steps.push({
|
|
1333
1333
|
id: xStep.id,
|
|
1334
1334
|
description: createNestedEditorFromHtml(
|
|
1335
|
-
(0, import_node_html_parser5.parse)(xStep.description)
|
|
1335
|
+
(0, import_node_html_parser5.parse)(xStep.description ?? "")
|
|
1336
1336
|
)
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
1339
1339
|
tasks.push({
|
|
1340
1340
|
id: xTask.id,
|
|
1341
1341
|
instructions: createNestedEditorFromHtml(
|
|
1342
|
-
(0, import_node_html_parser5.parse)(xTask.instructions)
|
|
1342
|
+
(0, import_node_html_parser5.parse)(xTask.instructions ?? "")
|
|
1343
1343
|
),
|
|
1344
1344
|
steps
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
1347
|
parts.push({
|
|
1348
1348
|
id: xPart.id,
|
|
1349
|
-
objective: createNestedEditorFromHtml(
|
|
1349
|
+
objective: createNestedEditorFromHtml(
|
|
1350
|
+
(0, import_node_html_parser5.parse)(xPart.objective ?? "")
|
|
1351
|
+
),
|
|
1350
1352
|
instructions: createNestedEditorFromHtml(
|
|
1351
|
-
(0, import_node_html_parser5.parse)(xPart.instructions)
|
|
1353
|
+
(0, import_node_html_parser5.parse)(xPart.instructions ?? "")
|
|
1352
1354
|
),
|
|
1353
1355
|
onLoadActions: xPart.onLoadActions,
|
|
1354
1356
|
onNextActions: xPart.onNextActions,
|
package/dist/index.mjs
CHANGED
|
@@ -1297,31 +1297,33 @@ var TAG_X = "x-excel";
|
|
|
1297
1297
|
function parseData(xDataString) {
|
|
1298
1298
|
const xData = JSON.parse(xDataString);
|
|
1299
1299
|
const parts = [];
|
|
1300
|
-
for (const xPart of xData.parts) {
|
|
1300
|
+
for (const xPart of xData.parts ?? []) {
|
|
1301
1301
|
const tasks = [];
|
|
1302
|
-
for (const xTask of xPart.tasks) {
|
|
1302
|
+
for (const xTask of xPart.tasks ?? []) {
|
|
1303
1303
|
const steps = [];
|
|
1304
|
-
for (const xStep of xTask.steps) {
|
|
1304
|
+
for (const xStep of xTask.steps ?? []) {
|
|
1305
1305
|
steps.push({
|
|
1306
1306
|
id: xStep.id,
|
|
1307
1307
|
description: createNestedEditorFromHtml(
|
|
1308
|
-
parse(xStep.description)
|
|
1308
|
+
parse(xStep.description ?? "")
|
|
1309
1309
|
)
|
|
1310
1310
|
});
|
|
1311
1311
|
}
|
|
1312
1312
|
tasks.push({
|
|
1313
1313
|
id: xTask.id,
|
|
1314
1314
|
instructions: createNestedEditorFromHtml(
|
|
1315
|
-
parse(xTask.instructions)
|
|
1315
|
+
parse(xTask.instructions ?? "")
|
|
1316
1316
|
),
|
|
1317
1317
|
steps
|
|
1318
1318
|
});
|
|
1319
1319
|
}
|
|
1320
1320
|
parts.push({
|
|
1321
1321
|
id: xPart.id,
|
|
1322
|
-
objective: createNestedEditorFromHtml(
|
|
1322
|
+
objective: createNestedEditorFromHtml(
|
|
1323
|
+
parse(xPart.objective ?? "")
|
|
1324
|
+
),
|
|
1323
1325
|
instructions: createNestedEditorFromHtml(
|
|
1324
|
-
parse(xPart.instructions)
|
|
1326
|
+
parse(xPart.instructions ?? "")
|
|
1325
1327
|
),
|
|
1326
1328
|
onLoadActions: xPart.onLoadActions,
|
|
1327
1329
|
onNextActions: xPart.onNextActions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@examind/block-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"@comment version": [
|
|
5
5
|
"Don't specify package version here. It will be injected by publish workflow."
|
|
6
6
|
],
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"nanoid": ">=3.0.0",
|
|
23
23
|
"node-html-parser": ">=6.0.0",
|
|
24
|
-
"@examind/block-types": "^0.2.
|
|
24
|
+
"@examind/block-types": "^0.2.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@eslint/js": "^9.17.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"tsup": "^8.3.5",
|
|
37
37
|
"typescript": "^5.7.2",
|
|
38
38
|
"typescript-eslint": "^8.18.2",
|
|
39
|
-
"@examind/block-types": "0.2.
|
|
39
|
+
"@examind/block-types": "0.2.1"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"lodash-es": "4.17.21"
|