hrw-certificate-editor
Version:
Design Editor Tools with React.js + ant.design + fabric.js
69 lines • 4.05 kB
JavaScript
;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const React = __importStar(require("react"));
const i18next_1 = __importDefault(require("i18next"));
const shortcuts = [
[
{ key: ['esc'], description: i18next_1.default.t('shortcut.escape') },
{ key: ['h'], description: i18next_1.default.t('shortcut.h') },
{ key: ['q'], description: i18next_1.default.t('shortcut.q') },
{ key: ['w'], description: i18next_1.default.t('shortcut.w') },
{ key: ['o'], description: i18next_1.default.t('shortcut.o') },
{ key: ['p'], description: i18next_1.default.t('shortcut.p') },
{ key: ['+'], description: i18next_1.default.t('shortcut.plus') },
{ key: ['-'], description: i18next_1.default.t('shortcut.minus') },
{ key: ['↑'], description: i18next_1.default.t('shortcut.arrow-up') },
{ key: ['↓'], description: i18next_1.default.t('shortcut.arrow-down') },
{ key: ['←'], description: i18next_1.default.t('shortcut.arrow-left') },
{ key: ['→'], description: i18next_1.default.t('shortcut.arrow-right') },
],
[
{ key: ['delete | backspace'], description: i18next_1.default.t('shortcut.delete') },
{ key: ['ctrl | cmd', 'a'], description: i18next_1.default.t('shortcut.ctrl-a') },
{ key: ['ctrl | cmd', 'c'], description: i18next_1.default.t('shortcut.ctrl-c') },
{ key: ['ctrl | cmd', 'v'], description: i18next_1.default.t('shortcut.ctrl-v') },
{ key: ['ctrl | cmd', 'x'], description: i18next_1.default.t('shortcut.ctrl-x') },
{ key: ['ctrl | cmd', 'z'], description: i18next_1.default.t('shortcut.ctrl-z') },
{ key: ['ctrl | cmd', 'y'], description: i18next_1.default.t('shortcut.ctrl-y') },
{ key: ['alt', 'mouse left'], description: i18next_1.default.t('shortcut.alt-mouse-left') },
{ key: ['shift', 'mouse left'], description: i18next_1.default.t('shortcut.shfit-mouse-left') },
{ key: ['mouse left'], description: i18next_1.default.t('shortcut.mouse-left') },
{ key: ['mouse right'], description: i18next_1.default.t('shortcut.mouse-right') },
],
];
const ShortcutHelp = () => {
return (React.createElement("div", { className: "rde-shortcut-help" }, shortcuts.map((column, idx) => {
return (React.createElement("ul", { className: "rde-shortcut-help-list", key: idx }, column.map(shortcut => {
return (React.createElement("li", { key: shortcut.key.toString(), className: "rde-shortcut-help-key" },
shortcut.key.map(key => {
return (React.createElement("kbd", { key: key, className: "rde-shortcut-help-key-unit" },
React.createElement("span", null, key)));
}),
React.createElement("span", { className: "rde-shortcut-help-key-def" }, shortcut.description)));
})));
})));
};
exports.default = ShortcutHelp;
//# sourceMappingURL=ShortcutHelp.js.map