@lvce-editor/about-view 2.1.0 → 2.3.0
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/aboutWorkerMain.js +46 -1
- package/package.json +1 -1
package/dist/aboutWorkerMain.js
CHANGED
@@ -1344,6 +1344,29 @@ const getAboutVirtualDom = (productName, lines, closeMessage, okMessage, copyMes
|
|
1344
1344
|
}, ...getDialogVirtualDom(content, closeMessage, infoMessage, okMessage, copyMessage, productName)];
|
1345
1345
|
};
|
1346
1346
|
|
1347
|
+
const Tab = 2;
|
1348
|
+
const Escape = 8;
|
1349
|
+
|
1350
|
+
const Shift = 1 << 10 >>> 0;
|
1351
|
+
|
1352
|
+
const FocusAbout = 4;
|
1353
|
+
|
1354
|
+
const getKeyBindings = () => {
|
1355
|
+
return [{
|
1356
|
+
key: Escape,
|
1357
|
+
command: 'About.handleClickClose',
|
1358
|
+
when: FocusAbout
|
1359
|
+
}, {
|
1360
|
+
key: Tab,
|
1361
|
+
command: 'About.focusNext',
|
1362
|
+
when: FocusAbout
|
1363
|
+
}, {
|
1364
|
+
key: Tab | Shift,
|
1365
|
+
command: 'About.focusPrevious',
|
1366
|
+
when: FocusAbout
|
1367
|
+
}];
|
1368
|
+
};
|
1369
|
+
|
1347
1370
|
const loadContent = state => {
|
1348
1371
|
const lines = getDetailStringWeb();
|
1349
1372
|
return {
|
@@ -1425,14 +1448,36 @@ const doRender = (oldState, newState) => {
|
|
1425
1448
|
return commands;
|
1426
1449
|
};
|
1427
1450
|
|
1451
|
+
const renderEventListers = () => {
|
1452
|
+
return [{
|
1453
|
+
name: HandleClickOk,
|
1454
|
+
params: ['handleClickOk']
|
1455
|
+
}, {
|
1456
|
+
name: HandleClickClose,
|
1457
|
+
params: ['handleClickClose']
|
1458
|
+
}, {
|
1459
|
+
name: HandleClickCopy,
|
1460
|
+
params: ['handleClickCopy']
|
1461
|
+
}, {
|
1462
|
+
name: HandleFocusIn,
|
1463
|
+
params: ['handleFocusIn']
|
1464
|
+
}, {
|
1465
|
+
name: HandleContextMenu,
|
1466
|
+
params: [],
|
1467
|
+
preventDefault: true
|
1468
|
+
}];
|
1469
|
+
};
|
1470
|
+
|
1428
1471
|
const commandMap = {
|
1429
1472
|
'About.focusNext': focusNext,
|
1430
1473
|
'About.focusPrevious': focusPrevious,
|
1431
1474
|
'About.getDetailString': getDetailString,
|
1432
1475
|
'About.getDetailStringWeb': getDetailStringWeb,
|
1476
|
+
'About.getKeyBindings': getKeyBindings,
|
1433
1477
|
'About.getVirtualDom': getAboutVirtualDom,
|
1434
1478
|
'About.loadContent': loadContent,
|
1435
|
-
'About.render': doRender
|
1479
|
+
'About.render': doRender,
|
1480
|
+
'About.renderEventListeners': renderEventListers
|
1436
1481
|
};
|
1437
1482
|
|
1438
1483
|
const listen = async () => {
|