@willwade/aac-processors 0.2.4 → 0.2.6
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/browser/processors/gridsetProcessor.js +254 -232
- package/dist/browser/utilities/analytics/metrics/core.js +16 -5
- package/dist/browser/utilities/analytics/metrics/effort.js +1 -0
- package/dist/processors/gridsetProcessor.js +254 -232
- package/dist/utilities/analytics/metrics/core.js +16 -5
- package/dist/utilities/analytics/metrics/effort.d.ts +1 -0
- package/dist/utilities/analytics/metrics/effort.js +1 -0
- package/dist/utilities/analytics/metrics/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -939,7 +939,7 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
939
939
|
}
|
|
940
940
|
// Parse all command types from Grid3 and create semantic actions
|
|
941
941
|
let semanticAction;
|
|
942
|
-
let
|
|
942
|
+
let _legacyAction = null;
|
|
943
943
|
// infer action type implicitly from commands; no explicit enum needed
|
|
944
944
|
let navigationTarget;
|
|
945
945
|
let detectedCommands = []; // Store detected command metadata
|
|
@@ -1065,114 +1065,125 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
1065
1065
|
if (gridTarget) {
|
|
1066
1066
|
// Resolve grid name to grid ID for navigation
|
|
1067
1067
|
const targetGridId = gridNameToIdMap.get(gridTarget) || gridTarget;
|
|
1068
|
+
// Always set navigationTarget even if another command already
|
|
1069
|
+
// set semanticAction (e.g. Jump.SetBookmark + Jump.To).
|
|
1068
1070
|
navigationTarget = targetGridId;
|
|
1069
|
-
//
|
|
1071
|
+
// Only set semanticAction if not already set by a prior command
|
|
1072
|
+
if (!semanticAction) {
|
|
1073
|
+
semanticAction = {
|
|
1074
|
+
category: treeStructure_1.AACSemanticCategory.NAVIGATION,
|
|
1075
|
+
intent: treeStructure_1.AACSemanticIntent.NAVIGATE_TO,
|
|
1076
|
+
targetId: targetGridId,
|
|
1077
|
+
platformData: {
|
|
1078
|
+
grid3: {
|
|
1079
|
+
commandId,
|
|
1080
|
+
parameters: { grid: gridTarget },
|
|
1081
|
+
},
|
|
1082
|
+
},
|
|
1083
|
+
fallback: {
|
|
1084
|
+
type: 'NAVIGATE',
|
|
1085
|
+
targetPageId: targetGridId,
|
|
1086
|
+
},
|
|
1087
|
+
};
|
|
1088
|
+
_legacyAction = {
|
|
1089
|
+
type: 'NAVIGATE',
|
|
1090
|
+
targetPageId: targetGridId,
|
|
1091
|
+
};
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
break;
|
|
1095
|
+
}
|
|
1096
|
+
case 'Jump.Back':
|
|
1097
|
+
if (!semanticAction) {
|
|
1070
1098
|
semanticAction = {
|
|
1071
1099
|
category: treeStructure_1.AACSemanticCategory.NAVIGATION,
|
|
1072
|
-
intent: treeStructure_1.AACSemanticIntent.
|
|
1073
|
-
targetId: targetGridId,
|
|
1100
|
+
intent: treeStructure_1.AACSemanticIntent.GO_BACK,
|
|
1074
1101
|
platformData: {
|
|
1075
1102
|
grid3: {
|
|
1076
1103
|
commandId,
|
|
1077
|
-
parameters: {
|
|
1104
|
+
parameters: {},
|
|
1078
1105
|
},
|
|
1079
1106
|
},
|
|
1080
1107
|
fallback: {
|
|
1081
|
-
type: '
|
|
1082
|
-
|
|
1108
|
+
type: 'ACTION',
|
|
1109
|
+
message: 'Go back',
|
|
1083
1110
|
},
|
|
1084
1111
|
};
|
|
1085
|
-
|
|
1086
|
-
type: '
|
|
1087
|
-
targetPageId: targetGridId,
|
|
1112
|
+
_legacyAction = {
|
|
1113
|
+
type: 'GO_BACK',
|
|
1088
1114
|
};
|
|
1089
1115
|
}
|
|
1090
1116
|
break;
|
|
1091
|
-
}
|
|
1092
|
-
case 'Jump.Back':
|
|
1093
|
-
// action
|
|
1094
|
-
semanticAction = {
|
|
1095
|
-
category: treeStructure_1.AACSemanticCategory.NAVIGATION,
|
|
1096
|
-
intent: treeStructure_1.AACSemanticIntent.GO_BACK,
|
|
1097
|
-
platformData: {
|
|
1098
|
-
grid3: {
|
|
1099
|
-
commandId,
|
|
1100
|
-
parameters: {},
|
|
1101
|
-
},
|
|
1102
|
-
},
|
|
1103
|
-
fallback: {
|
|
1104
|
-
type: 'ACTION',
|
|
1105
|
-
message: 'Go back',
|
|
1106
|
-
},
|
|
1107
|
-
};
|
|
1108
|
-
legacyAction = {
|
|
1109
|
-
type: 'GO_BACK',
|
|
1110
|
-
};
|
|
1111
|
-
break;
|
|
1112
1117
|
case 'Jump.Home':
|
|
1113
1118
|
case 'Jump.SetHome':
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
semanticAction
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1119
|
+
if (!navigationTarget)
|
|
1120
|
+
navigationTarget = tree.rootId || undefined;
|
|
1121
|
+
if (!semanticAction) {
|
|
1122
|
+
semanticAction = {
|
|
1123
|
+
category: treeStructure_1.AACSemanticCategory.NAVIGATION,
|
|
1124
|
+
intent: treeStructure_1.AACSemanticIntent.GO_HOME,
|
|
1125
|
+
targetId: tree.rootId || undefined,
|
|
1126
|
+
platformData: {
|
|
1127
|
+
grid3: {
|
|
1128
|
+
commandId,
|
|
1129
|
+
parameters: {},
|
|
1130
|
+
},
|
|
1124
1131
|
},
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1132
|
+
fallback: {
|
|
1133
|
+
type: 'ACTION',
|
|
1134
|
+
message: 'Go home',
|
|
1135
|
+
},
|
|
1136
|
+
};
|
|
1137
|
+
_legacyAction = {
|
|
1138
|
+
type: 'GO_HOME',
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1134
1141
|
break;
|
|
1135
1142
|
case 'Jump.ToKeyboard': {
|
|
1136
1143
|
// Navigate to the set keyboard if we found one in settings
|
|
1137
1144
|
const keyboardGridName = tree.keyboardGridName;
|
|
1138
1145
|
const keyboardPageId = gridNameToIdMap.get(keyboardGridName);
|
|
1139
|
-
if (keyboardPageId) {
|
|
1146
|
+
if (keyboardPageId && !navigationTarget) {
|
|
1140
1147
|
navigationTarget = keyboardPageId;
|
|
1141
1148
|
}
|
|
1142
|
-
semanticAction
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1149
|
+
if (!semanticAction) {
|
|
1150
|
+
semanticAction = {
|
|
1151
|
+
category: treeStructure_1.AACSemanticCategory.NAVIGATION,
|
|
1152
|
+
intent: treeStructure_1.AACSemanticIntent.GO_HOME, // Close enough to 'navigation to keyboard'
|
|
1153
|
+
targetId: keyboardPageId,
|
|
1154
|
+
platformData: {
|
|
1155
|
+
grid3: {
|
|
1156
|
+
commandId,
|
|
1157
|
+
parameters: {},
|
|
1158
|
+
},
|
|
1150
1159
|
},
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1160
|
+
fallback: {
|
|
1161
|
+
type: 'NAVIGATE',
|
|
1162
|
+
targetPageId: keyboardPageId,
|
|
1163
|
+
},
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1157
1166
|
break;
|
|
1158
1167
|
}
|
|
1159
1168
|
case 'Action.InsertTextAndSpeak': {
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
+
if (!semanticAction) {
|
|
1170
|
+
const insertText = getParam('text');
|
|
1171
|
+
semanticAction = {
|
|
1172
|
+
category: treeStructure_1.AACSemanticCategory.COMMUNICATION,
|
|
1173
|
+
intent: treeStructure_1.AACSemanticIntent.SPEAK_IMMEDIATE,
|
|
1174
|
+
text: insertText,
|
|
1175
|
+
platformData: {
|
|
1176
|
+
grid3: {
|
|
1177
|
+
commandId,
|
|
1178
|
+
parameters: { text: insertText },
|
|
1179
|
+
},
|
|
1169
1180
|
},
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1181
|
+
fallback: {
|
|
1182
|
+
type: 'SPEAK',
|
|
1183
|
+
message: insertText,
|
|
1184
|
+
},
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1176
1187
|
break;
|
|
1177
1188
|
}
|
|
1178
1189
|
case 'Prediction.PredictThis': {
|
|
@@ -1205,193 +1216,207 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
1205
1216
|
// speak
|
|
1206
1217
|
const speakUnit = getParam('unit');
|
|
1207
1218
|
const moveCaret = getParam('movecaret');
|
|
1208
|
-
semanticAction
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1219
|
+
if (!semanticAction) {
|
|
1220
|
+
semanticAction = {
|
|
1221
|
+
category: treeStructure_1.AACSemanticCategory.COMMUNICATION,
|
|
1222
|
+
intent: treeStructure_1.AACSemanticIntent.SPEAK_TEXT,
|
|
1223
|
+
platformData: {
|
|
1224
|
+
grid3: {
|
|
1225
|
+
commandId,
|
|
1226
|
+
parameters: {
|
|
1227
|
+
unit: speakUnit,
|
|
1228
|
+
movecaret: moveCaret,
|
|
1229
|
+
},
|
|
1217
1230
|
},
|
|
1218
1231
|
},
|
|
1219
|
-
|
|
1220
|
-
|
|
1232
|
+
fallback: {
|
|
1233
|
+
type: 'SPEAK',
|
|
1234
|
+
message: 'Speak text',
|
|
1235
|
+
},
|
|
1236
|
+
};
|
|
1237
|
+
_legacyAction = {
|
|
1221
1238
|
type: 'SPEAK',
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
type: 'SPEAK',
|
|
1227
|
-
unit: speakUnit,
|
|
1228
|
-
moveCaret: moveCaret ? parseInt(String(moveCaret)) : undefined,
|
|
1229
|
-
};
|
|
1239
|
+
unit: speakUnit,
|
|
1240
|
+
moveCaret: moveCaret ? parseInt(String(moveCaret)) : undefined,
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1230
1243
|
break;
|
|
1231
1244
|
}
|
|
1232
1245
|
case 'Action.InsertText': {
|
|
1233
1246
|
const insertText = getParam('text');
|
|
1234
1247
|
const posParam = getParam('pos');
|
|
1248
|
+
// Always extract POS even if semanticAction is already set
|
|
1235
1249
|
if (posParam) {
|
|
1236
1250
|
buttonPos = posParam;
|
|
1237
1251
|
}
|
|
1238
|
-
semanticAction
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1252
|
+
if (!semanticAction) {
|
|
1253
|
+
semanticAction = {
|
|
1254
|
+
category: treeStructure_1.AACSemanticCategory.COMMUNICATION,
|
|
1255
|
+
intent: treeStructure_1.AACSemanticIntent.INSERT_TEXT,
|
|
1256
|
+
text: insertText,
|
|
1257
|
+
platformData: {
|
|
1258
|
+
grid3: {
|
|
1259
|
+
commandId,
|
|
1260
|
+
parameters: { text: insertText, pos: posParam },
|
|
1261
|
+
},
|
|
1246
1262
|
},
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
}
|
|
1263
|
+
fallback: {
|
|
1264
|
+
type: 'SPEAK',
|
|
1265
|
+
message: insertText,
|
|
1266
|
+
},
|
|
1267
|
+
};
|
|
1268
|
+
_legacyAction = {
|
|
1269
|
+
type: 'INSERT_TEXT',
|
|
1270
|
+
text: insertText,
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1257
1273
|
break;
|
|
1258
1274
|
}
|
|
1259
1275
|
case 'Action.DeleteWord':
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1276
|
+
if (!semanticAction) {
|
|
1277
|
+
semanticAction = {
|
|
1278
|
+
category: treeStructure_1.AACSemanticCategory.TEXT_EDITING,
|
|
1279
|
+
intent: treeStructure_1.AACSemanticIntent.DELETE_WORD,
|
|
1280
|
+
platformData: {
|
|
1281
|
+
grid3: {
|
|
1282
|
+
commandId,
|
|
1283
|
+
parameters: {},
|
|
1284
|
+
},
|
|
1268
1285
|
},
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
}
|
|
1286
|
+
fallback: {
|
|
1287
|
+
type: 'ACTION',
|
|
1288
|
+
message: 'Delete word',
|
|
1289
|
+
},
|
|
1290
|
+
};
|
|
1291
|
+
_legacyAction = {
|
|
1292
|
+
type: 'DELETE_WORD',
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1278
1295
|
break;
|
|
1279
1296
|
case 'Action.DeleteLetter':
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1297
|
+
if (!semanticAction) {
|
|
1298
|
+
semanticAction = {
|
|
1299
|
+
category: treeStructure_1.AACSemanticCategory.TEXT_EDITING,
|
|
1300
|
+
intent: treeStructure_1.AACSemanticIntent.DELETE_CHARACTER,
|
|
1301
|
+
platformData: {
|
|
1302
|
+
grid3: {
|
|
1303
|
+
commandId,
|
|
1304
|
+
parameters: {},
|
|
1305
|
+
},
|
|
1288
1306
|
},
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
}
|
|
1307
|
+
fallback: {
|
|
1308
|
+
type: 'ACTION',
|
|
1309
|
+
message: 'Delete character',
|
|
1310
|
+
},
|
|
1311
|
+
};
|
|
1312
|
+
_legacyAction = {
|
|
1313
|
+
type: 'DELETE_CHARACTER',
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1298
1316
|
break;
|
|
1299
1317
|
case 'Action.Clear':
|
|
1300
1318
|
// action
|
|
1301
|
-
semanticAction
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1319
|
+
if (!semanticAction) {
|
|
1320
|
+
semanticAction = {
|
|
1321
|
+
category: treeStructure_1.AACSemanticCategory.TEXT_EDITING,
|
|
1322
|
+
intent: treeStructure_1.AACSemanticIntent.CLEAR_TEXT,
|
|
1323
|
+
platformData: {
|
|
1324
|
+
grid3: {
|
|
1325
|
+
commandId,
|
|
1326
|
+
parameters: {},
|
|
1327
|
+
},
|
|
1308
1328
|
},
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}
|
|
1329
|
+
fallback: {
|
|
1330
|
+
type: 'ACTION',
|
|
1331
|
+
message: 'Clear text',
|
|
1332
|
+
},
|
|
1333
|
+
};
|
|
1334
|
+
_legacyAction = {
|
|
1335
|
+
type: 'CLEAR_TEXT',
|
|
1336
|
+
};
|
|
1337
|
+
}
|
|
1318
1338
|
break;
|
|
1319
1339
|
case 'Action.Letter': {
|
|
1320
1340
|
// action
|
|
1321
1341
|
const letter = getParam('letter');
|
|
1322
|
-
semanticAction
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1342
|
+
if (!semanticAction) {
|
|
1343
|
+
semanticAction = {
|
|
1344
|
+
category: treeStructure_1.AACSemanticCategory.TEXT_EDITING,
|
|
1345
|
+
intent: treeStructure_1.AACSemanticIntent.INSERT_TEXT,
|
|
1346
|
+
text: letter,
|
|
1347
|
+
platformData: {
|
|
1348
|
+
grid3: {
|
|
1349
|
+
commandId,
|
|
1350
|
+
parameters: { letter },
|
|
1351
|
+
},
|
|
1330
1352
|
},
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
}
|
|
1353
|
+
fallback: {
|
|
1354
|
+
type: 'ACTION',
|
|
1355
|
+
message: letter,
|
|
1356
|
+
},
|
|
1357
|
+
};
|
|
1358
|
+
_legacyAction = {
|
|
1359
|
+
type: 'INSERT_LETTER',
|
|
1360
|
+
letter,
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1341
1363
|
break;
|
|
1342
1364
|
}
|
|
1343
1365
|
case 'Settings.RestAll':
|
|
1344
1366
|
// action
|
|
1345
|
-
semanticAction
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1367
|
+
if (!semanticAction) {
|
|
1368
|
+
semanticAction = {
|
|
1369
|
+
category: treeStructure_1.AACSemanticCategory.CUSTOM,
|
|
1370
|
+
intent: treeStructure_1.AACSemanticIntent.PLATFORM_SPECIFIC,
|
|
1371
|
+
platformData: {
|
|
1372
|
+
grid3: {
|
|
1373
|
+
commandId,
|
|
1374
|
+
parameters: {
|
|
1375
|
+
indicatorenabled: getParam('indicatorenabled'),
|
|
1376
|
+
action: getParam('action'),
|
|
1377
|
+
},
|
|
1354
1378
|
},
|
|
1355
1379
|
},
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
}
|
|
1380
|
+
fallback: {
|
|
1381
|
+
type: 'ACTION',
|
|
1382
|
+
message: 'Settings action',
|
|
1383
|
+
},
|
|
1384
|
+
};
|
|
1385
|
+
_legacyAction = {
|
|
1386
|
+
type: 'SETTINGS',
|
|
1387
|
+
indicatorEnabled: getParam('indicatorenabled') === '1',
|
|
1388
|
+
settingsAction: getParam('action'),
|
|
1389
|
+
};
|
|
1390
|
+
}
|
|
1367
1391
|
break;
|
|
1368
1392
|
case 'AutoContent.Activate':
|
|
1369
1393
|
// action
|
|
1370
|
-
semanticAction
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1394
|
+
if (!semanticAction) {
|
|
1395
|
+
semanticAction = {
|
|
1396
|
+
category: treeStructure_1.AACSemanticCategory.CUSTOM,
|
|
1397
|
+
intent: treeStructure_1.AACSemanticIntent.PLATFORM_SPECIFIC,
|
|
1398
|
+
platformData: {
|
|
1399
|
+
grid3: {
|
|
1400
|
+
commandId,
|
|
1401
|
+
parameters: {
|
|
1402
|
+
autocontenttype: getParam('autocontenttype'),
|
|
1403
|
+
},
|
|
1378
1404
|
},
|
|
1379
1405
|
},
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
}
|
|
1406
|
+
fallback: {
|
|
1407
|
+
type: 'ACTION',
|
|
1408
|
+
message: 'Auto content',
|
|
1409
|
+
},
|
|
1410
|
+
};
|
|
1411
|
+
_legacyAction = {
|
|
1412
|
+
type: 'AUTO_CONTENT',
|
|
1413
|
+
autoContentType: getParam('autocontenttype'),
|
|
1414
|
+
};
|
|
1415
|
+
}
|
|
1390
1416
|
break;
|
|
1391
1417
|
default:
|
|
1392
1418
|
// Unknown command - preserve as generic action
|
|
1393
|
-
if (commandId) {
|
|
1394
|
-
// action
|
|
1419
|
+
if (commandId && !semanticAction) {
|
|
1395
1420
|
const allParams = Object.fromEntries(paramArr.map((p) => [p.Key || p.key, p['#text']]));
|
|
1396
1421
|
semanticAction = {
|
|
1397
1422
|
category: treeStructure_1.AACSemanticCategory.CUSTOM,
|
|
@@ -1407,16 +1432,13 @@ class GridsetProcessor extends baseProcessor_1.BaseProcessor {
|
|
|
1407
1432
|
message: 'Unknown command',
|
|
1408
1433
|
},
|
|
1409
1434
|
};
|
|
1410
|
-
|
|
1411
|
-
type: 'SPEAK',
|
|
1412
|
-
parameters: { commandId, ...allParams },
|
|
1413
|
-
};
|
|
1435
|
+
// legacy action not needed for unknown commands
|
|
1414
1436
|
}
|
|
1415
1437
|
break;
|
|
1416
1438
|
}
|
|
1417
|
-
//
|
|
1418
|
-
|
|
1419
|
-
|
|
1439
|
+
// Continue processing remaining commands so that navigation
|
|
1440
|
+
// targets (Jump.To) are discovered even when a non-navigation
|
|
1441
|
+
// command (e.g. Jump.SetBookmark, Action.InsertText) appears first.
|
|
1420
1442
|
}
|
|
1421
1443
|
}
|
|
1422
1444
|
// Create default semantic action if none was created from commands
|