@teselagen/ui 0.7.33-beta.6 → 0.7.33
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/AdvancedOptions.js +33 -0
- package/AssignDefaultsModeContext.js +22 -0
- package/CellDragHandle.js +132 -0
- package/ColumnFilterMenu.js +62 -0
- package/Columns.js +979 -0
- package/DataTable/utils/queryParams.d.ts +14 -7
- package/DisabledLoadingComponent.js +15 -0
- package/DisplayOptions.js +199 -0
- package/DropdownButton.js +36 -0
- package/DropdownCell.js +61 -0
- package/EditableCell.js +44 -0
- package/FillWindow.css +6 -0
- package/FillWindow.js +69 -0
- package/FilterAndSortMenu.js +391 -0
- package/FormSeparator.js +9 -0
- package/LoadingDots.js +14 -0
- package/MatchHeaders.js +234 -0
- package/PagingTool.js +225 -0
- package/RenderCell.js +191 -0
- package/SearchBar.js +69 -0
- package/SimpleStepViz.js +22 -0
- package/SortableColumns.js +100 -0
- package/TableFormTrackerContext.js +10 -0
- package/Tag.js +112 -0
- package/ThComponent.js +44 -0
- package/TimelineEvent.js +31 -0
- package/UploadCsvWizard.css +4 -0
- package/UploadCsvWizard.js +719 -0
- package/Uploader.js +1278 -0
- package/adHoc.js +10 -0
- package/autoTooltip.js +201 -0
- package/basicHandleActionsWithFullState.js +14 -0
- package/browserUtils.js +3 -0
- package/combineReducersWithFullState.js +14 -0
- package/commandControls.js +82 -0
- package/commandUtils.js +112 -0
- package/constants.js +1 -0
- package/convertSchema.js +69 -0
- package/customIcons.js +361 -0
- package/dataTableEnhancer.js +41 -0
- package/defaultFormatters.js +32 -0
- package/defaultValidators.js +40 -0
- package/determineBlackOrWhiteTextColor.js +4 -0
- package/editCellHelper.js +44 -0
- package/formatPasteData.js +16 -0
- package/getAllRows.js +11 -0
- package/getCellCopyText.js +7 -0
- package/getCellInfo.js +36 -0
- package/getCellVal.js +20 -0
- package/getDayjsFormatter.js +35 -0
- package/getFieldPathToField.js +7 -0
- package/getIdOrCodeOrIndex.js +9 -0
- package/getLastSelectedEntity.js +11 -0
- package/getNewEntToSelect.js +25 -0
- package/getNewName.js +31 -0
- package/getRowCopyText.js +28 -0
- package/getTableConfigFromStorage.js +5 -0
- package/getTextFromEl.js +28 -0
- package/getVals.js +8 -0
- package/handleCopyColumn.js +21 -0
- package/handleCopyHelper.js +15 -0
- package/handleCopyRows.js +23 -0
- package/handleCopyTable.js +16 -0
- package/handlerHelpers.js +24 -0
- package/hotkeyUtils.js +131 -0
- package/index.cjs.js +972 -837
- package/index.d.ts +0 -1
- package/index.es.js +972 -837
- package/index.js +196 -0
- package/isBeingCalledExcessively.js +31 -0
- package/isBottomRightCornerOfRectangle.js +20 -0
- package/isEntityClean.js +15 -0
- package/isTruthy.js +12 -0
- package/isValueEmpty.js +3 -0
- package/itemUpload.js +84 -0
- package/menuUtils.js +433 -0
- package/package.json +1 -2
- package/popoverOverflowModifiers.js +11 -0
- package/primarySelectedValue.js +1 -0
- package/pureNoFunc.js +31 -0
- package/queryParams.js +1058 -0
- package/removeCleanRows.js +22 -0
- package/renderOnDoc.js +32 -0
- package/rerenderOnWindowResize.js +26 -0
- package/rowClick.js +181 -0
- package/selection.js +8 -0
- package/showAppSpinner.js +12 -0
- package/showDialogOnDocBody.js +33 -0
- package/showProgressToast.js +22 -0
- package/sortify.js +73 -0
- package/style.css +29 -0
- package/tagUtils.js +45 -0
- package/tgFormValues.js +35 -0
- package/tg_modalState.js +47 -0
- package/throwFormError.js +16 -0
- package/toastr.js +148 -0
- package/tryToMatchSchemas.js +264 -0
- package/typeToCommonType.js +6 -0
- package/useDeepEqualMemo.js +15 -0
- package/useDialog.js +63 -0
- package/useStableReference.js +9 -0
- package/useTableEntities.js +38 -0
- package/useTraceUpdate.js +19 -0
- package/utils.js +37 -0
- package/validateTableWideErrors.js +160 -0
- package/viewColumn.js +97 -0
- package/withField.js +20 -0
- package/withFields.js +11 -0
- package/withLocalStorage.js +11 -0
- package/withSelectTableRecords.js +43 -0
- package/withSelectedEntities.js +65 -0
- package/withStore.js +10 -0
- package/withTableParams.js +301 -0
- package/wrapDialog.js +116 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import LocalizedFormat from "dayjs/plugin/localizedFormat";
|
|
3
|
+
import localeData from "dayjs/plugin/localeData";
|
|
4
|
+
|
|
5
|
+
dayjs.extend(localeData);
|
|
6
|
+
dayjs.extend(LocalizedFormat);
|
|
7
|
+
const userLocale = Intl.DateTimeFormat().resolvedOptions().locale;
|
|
8
|
+
|
|
9
|
+
if (userLocale) {
|
|
10
|
+
const requireLocale = (newLocale, skipCall) => {
|
|
11
|
+
if (dayjs.locale() !== newLocale) {
|
|
12
|
+
try {
|
|
13
|
+
require(`dayjs/locale/${newLocale}.js`);
|
|
14
|
+
dayjs.locale(newLocale);
|
|
15
|
+
} catch (error) {
|
|
16
|
+
// error
|
|
17
|
+
if (!skipCall && newLocale.includes("-")) {
|
|
18
|
+
requireLocale(newLocale.split("-")[0], true);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const localeToUse = userLocale.toLowerCase();
|
|
24
|
+
requireLocale(localeToUse);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default function getDayjsFormatter(format) {
|
|
28
|
+
return {
|
|
29
|
+
formatDate: date => dayjs(date).format(format),
|
|
30
|
+
parseDate: str => dayjs(str, format).toDate(),
|
|
31
|
+
placeholder: format?.toLowerCase().includes("l")
|
|
32
|
+
? dayjs.Ls[dayjs.locale()]?.formats[format.toUpperCase()]
|
|
33
|
+
: format
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const getLastSelectedEntity = idMap => {
|
|
2
|
+
let lastSelectedEnt;
|
|
3
|
+
let latestTime;
|
|
4
|
+
Object.values(idMap).forEach(({ time, entity }) => {
|
|
5
|
+
if (!latestTime || time > latestTime) {
|
|
6
|
+
lastSelectedEnt = entity;
|
|
7
|
+
latestTime = time;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
return lastSelectedEnt;
|
|
11
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const getNewEntToSelect = ({
|
|
2
|
+
type,
|
|
3
|
+
lastSelectedIndex,
|
|
4
|
+
entities,
|
|
5
|
+
isEntityDisabled
|
|
6
|
+
}) => {
|
|
7
|
+
let newIndexToSelect;
|
|
8
|
+
if (type === "up") {
|
|
9
|
+
newIndexToSelect = lastSelectedIndex - 1;
|
|
10
|
+
} else {
|
|
11
|
+
newIndexToSelect = lastSelectedIndex + 1;
|
|
12
|
+
}
|
|
13
|
+
const newEntToSelect = entities[newIndexToSelect];
|
|
14
|
+
if (!newEntToSelect) return;
|
|
15
|
+
if (isEntityDisabled && isEntityDisabled(newEntToSelect)) {
|
|
16
|
+
return getNewEntToSelect({
|
|
17
|
+
type,
|
|
18
|
+
lastSelectedIndex: newIndexToSelect,
|
|
19
|
+
entities,
|
|
20
|
+
isEntityDisabled
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
return newEntToSelect;
|
|
24
|
+
}
|
|
25
|
+
};
|
package/getNewName.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export function getNewName(list, targetName) {
|
|
2
|
+
const usedNumbers = [];
|
|
3
|
+
|
|
4
|
+
for (let i = 0; i < list.length; i++) {
|
|
5
|
+
const currentName = list[i].name;
|
|
6
|
+
const baseName = currentName.replace(/\(\d+\)\.csv$/, ".csv");
|
|
7
|
+
|
|
8
|
+
if (baseName === targetName) {
|
|
9
|
+
const match = currentName.match(/\((\d+)\)\.csv$/);
|
|
10
|
+
if (match) {
|
|
11
|
+
usedNumbers[parseInt(match[1])] = true;
|
|
12
|
+
} else {
|
|
13
|
+
usedNumbers[0] = true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let newName = targetName;
|
|
19
|
+
for (let i = 0; i <= usedNumbers.length; i++) {
|
|
20
|
+
if (!usedNumbers[i]) {
|
|
21
|
+
if (i === 0) {
|
|
22
|
+
newName = targetName;
|
|
23
|
+
} else {
|
|
24
|
+
newName = targetName.replace(".csv", `(${i}).csv`);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return newName;
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { getCellCopyText } from "./getCellCopyText";
|
|
2
|
+
import { flatMap } from "lodash-es";
|
|
3
|
+
|
|
4
|
+
export const getRowCopyText = (rowEl, { specificColumn } = {}) => {
|
|
5
|
+
//takes in a row element
|
|
6
|
+
if (!rowEl) return [];
|
|
7
|
+
const textContent = [];
|
|
8
|
+
const jsonText = [];
|
|
9
|
+
|
|
10
|
+
for (const cellEl of rowEl.children) {
|
|
11
|
+
const cellChild = cellEl.querySelector(`[data-copy-text]`);
|
|
12
|
+
if (!cellChild) {
|
|
13
|
+
if (specificColumn) continue; //strip it
|
|
14
|
+
continue; //just leave it blank
|
|
15
|
+
}
|
|
16
|
+
if (
|
|
17
|
+
specificColumn &&
|
|
18
|
+
cellChild.getAttribute("data-test") !== specificColumn
|
|
19
|
+
) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const [t, j] = getCellCopyText(cellChild);
|
|
23
|
+
textContent.push(t);
|
|
24
|
+
jsonText.push(j);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return [flatMap(textContent).join("\t"), jsonText];
|
|
28
|
+
};
|
package/getTextFromEl.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export default function getTextFromEl(el, options = {}) {
|
|
4
|
+
const { lowerCase } = options;
|
|
5
|
+
if (React.isValidElement(el)) {
|
|
6
|
+
return el && el.props && el.props.children
|
|
7
|
+
? (el.props.children.reduce
|
|
8
|
+
? el.props.children
|
|
9
|
+
: [el.props.children]
|
|
10
|
+
).reduce((acc, child) => {
|
|
11
|
+
if (child && child.props && child.props.children) {
|
|
12
|
+
acc += getTextFromEl(child);
|
|
13
|
+
} else if (typeof child === "string") {
|
|
14
|
+
if (lowerCase) {
|
|
15
|
+
acc += child.toLowerCase();
|
|
16
|
+
} else {
|
|
17
|
+
acc += child;
|
|
18
|
+
}
|
|
19
|
+
} else if (typeof child === "number") {
|
|
20
|
+
acc += child + "";
|
|
21
|
+
}
|
|
22
|
+
return acc;
|
|
23
|
+
}, "")
|
|
24
|
+
: "";
|
|
25
|
+
} else {
|
|
26
|
+
return el;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/getVals.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getAllRows } from "./getAllRows";
|
|
2
|
+
import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
|
|
3
|
+
import { handleCopyRows } from "./handleCopyRows";
|
|
4
|
+
|
|
5
|
+
export const handleCopyColumn = (e, cellWrapper, selectedRecords) => {
|
|
6
|
+
const specificColumn = cellWrapper.getAttribute("data-test");
|
|
7
|
+
let rowElsToCopy = getAllRows(e);
|
|
8
|
+
if (!rowElsToCopy) return;
|
|
9
|
+
if (selectedRecords) {
|
|
10
|
+
const ids = selectedRecords.map(e => getIdOrCodeOrIndex(e)?.toString());
|
|
11
|
+
rowElsToCopy = Array.from(rowElsToCopy).filter(rowEl => {
|
|
12
|
+
const id = rowEl.closest(".rt-tr-group")?.getAttribute("data-test-id");
|
|
13
|
+
return id !== undefined && ids.includes(id);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
if (!rowElsToCopy) return;
|
|
17
|
+
handleCopyRows(rowElsToCopy, {
|
|
18
|
+
specificColumn,
|
|
19
|
+
onFinishMsg: "Column Copied"
|
|
20
|
+
});
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import copy from "copy-to-clipboard";
|
|
2
|
+
|
|
3
|
+
export const handleCopyHelper = (stringToCopy, jsonToCopy, message) => {
|
|
4
|
+
!window.Cypress &&
|
|
5
|
+
copy(stringToCopy, {
|
|
6
|
+
onCopy: clipboardData => {
|
|
7
|
+
clipboardData.setData("application/json", JSON.stringify(jsonToCopy));
|
|
8
|
+
},
|
|
9
|
+
// keep this so that pasting into spreadsheets works.
|
|
10
|
+
format: "text/plain"
|
|
11
|
+
});
|
|
12
|
+
if (message) {
|
|
13
|
+
window.toastr.success(message);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import download from "downloadjs";
|
|
2
|
+
import { getRowCopyText } from "./getRowCopyText";
|
|
3
|
+
import { handleCopyHelper } from "./handleCopyHelper";
|
|
4
|
+
|
|
5
|
+
export const handleCopyRows = (
|
|
6
|
+
rowElsToCopy,
|
|
7
|
+
{ specificColumn, onFinishMsg, isDownload } = {}
|
|
8
|
+
) => {
|
|
9
|
+
let textToCopy = [];
|
|
10
|
+
const jsonToCopy = [];
|
|
11
|
+
rowElsToCopy.forEach(rowEl => {
|
|
12
|
+
const [t, j] = getRowCopyText(rowEl, { specificColumn });
|
|
13
|
+
textToCopy.push(t);
|
|
14
|
+
jsonToCopy.push(j);
|
|
15
|
+
});
|
|
16
|
+
textToCopy = textToCopy.filter(text => text).join("\n");
|
|
17
|
+
if (!textToCopy) return window.toastr.warning("No text to copy");
|
|
18
|
+
if (isDownload) {
|
|
19
|
+
download(textToCopy.replaceAll("\t", ","), "tableData.csv", "text/csv");
|
|
20
|
+
} else {
|
|
21
|
+
handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getAllRows } from "./getAllRows";
|
|
2
|
+
import { handleCopyRows } from "./handleCopyRows";
|
|
3
|
+
|
|
4
|
+
export const handleCopyTable = (e, opts) => {
|
|
5
|
+
try {
|
|
6
|
+
const allRowEls = getAllRows(e);
|
|
7
|
+
if (!allRowEls) return;
|
|
8
|
+
handleCopyRows(allRowEls, {
|
|
9
|
+
...opts,
|
|
10
|
+
onFinishMsg: "Table Copied"
|
|
11
|
+
});
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.error(`error:`, error);
|
|
14
|
+
window.toastr.error("Error copying rows.");
|
|
15
|
+
}
|
|
16
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const onEnterHelper = callback => ({
|
|
2
|
+
onKeyDown: event => {
|
|
3
|
+
if (event.key === "Enter") {
|
|
4
|
+
callback(event);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const onBlurHelper = callback => ({
|
|
10
|
+
onBlur: event => {
|
|
11
|
+
callback(event);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const onEnterOrBlurHelper = callback => ({
|
|
16
|
+
onKeyDown: function (event) {
|
|
17
|
+
if (event.key === "Enter") {
|
|
18
|
+
callback(event);
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
onBlur: function (event) {
|
|
22
|
+
callback(event);
|
|
23
|
+
}
|
|
24
|
+
});
|
package/hotkeyUtils.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { useHotkeys } from "@blueprintjs/core";
|
|
3
|
+
import { startCase } from "lodash-es";
|
|
4
|
+
|
|
5
|
+
// This has been mostly superseded by blueprint's KeyCombo component, but may
|
|
6
|
+
// still be useful for cases where we need plain text
|
|
7
|
+
export function comboToLabel(def, useSymbols = true) {
|
|
8
|
+
const combo = typeof def === "string" ? def : def.combo;
|
|
9
|
+
|
|
10
|
+
if (useSymbols) {
|
|
11
|
+
let parts = combo.replace("++", "+plus").split("+");
|
|
12
|
+
parts = parts.map(p => symbols[p] || startCase(p) || p);
|
|
13
|
+
return parts.join("");
|
|
14
|
+
} else {
|
|
15
|
+
return combo
|
|
16
|
+
.split("+")
|
|
17
|
+
.map(p => startCase(p) || p)
|
|
18
|
+
.join(" + ")
|
|
19
|
+
.replace("Meta", isMac ? "Cmd" : "Ctrl")
|
|
20
|
+
.replace("Mod", isMac ? "Cmd" : "Ctrl")
|
|
21
|
+
.replace("Alt", isMac ? "Option" : "Alt");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// HOF to get hotkey combos by id
|
|
26
|
+
export const hotkeysById =
|
|
27
|
+
(hotkeys, mode = "raw") =>
|
|
28
|
+
id => {
|
|
29
|
+
const def = getHotkeyProps(hotkeys[id]);
|
|
30
|
+
return (
|
|
31
|
+
def &&
|
|
32
|
+
(mode === "raw" ? def.combo : comboToLabel(def.combo, mode === "symbols"))
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Translate shorthand array if needed
|
|
37
|
+
export const getHotkeyProps = (def, id) => {
|
|
38
|
+
let out;
|
|
39
|
+
if (typeof def === "string") {
|
|
40
|
+
out = { combo: def };
|
|
41
|
+
} else if (def instanceof Array) {
|
|
42
|
+
out = { combo: def[0], label: def[1], ...(def[2] || {}) };
|
|
43
|
+
} else {
|
|
44
|
+
out = def;
|
|
45
|
+
}
|
|
46
|
+
out.label = out.label || startCase(id);
|
|
47
|
+
return out;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* HOC to add hotkey support to components. Use this instead of blueprint's one.
|
|
52
|
+
*
|
|
53
|
+
* Arguments:
|
|
54
|
+
* - hotkeySpec: either a named hotkey section previously registered, or an
|
|
55
|
+
* object mapping command ids to hotkey definitions, where each hotkey can
|
|
56
|
+
* be either:
|
|
57
|
+
* - a string consisting in the key combo (e.g. 'ctrl+shift+x')
|
|
58
|
+
* - an array holding the combo, label, and an object with any other props
|
|
59
|
+
* - an object holding all props
|
|
60
|
+
* - handlers: an object mapping command ids to handler functions
|
|
61
|
+
* - options: an object that may specify the follownig options:
|
|
62
|
+
* - functional: boolean indicating if the wrapped component will be a
|
|
63
|
+
* functional stateless component instead of a class-based one
|
|
64
|
+
*
|
|
65
|
+
* Returns a function that can be invoked with a component class, or a
|
|
66
|
+
* stateless component function (if specified in the options) and returns
|
|
67
|
+
* the decorated class. It may also be invoked without arguments to generate a
|
|
68
|
+
* dummy ad-hoc component with no output.
|
|
69
|
+
*
|
|
70
|
+
*/
|
|
71
|
+
export const withHotkeys = (hotkeys, handlers) => {
|
|
72
|
+
return ({ children } = {}) => {
|
|
73
|
+
const memoedHotkeys = useMemo(
|
|
74
|
+
() =>
|
|
75
|
+
Object.keys(hotkeys).map(id => {
|
|
76
|
+
const { ...props } = getHotkeyProps(hotkeys[id], id);
|
|
77
|
+
return {
|
|
78
|
+
key: id,
|
|
79
|
+
global: props.global !== false,
|
|
80
|
+
onKeyDown: function (e) {
|
|
81
|
+
return handlers[id](e);
|
|
82
|
+
},
|
|
83
|
+
...props
|
|
84
|
+
};
|
|
85
|
+
}),
|
|
86
|
+
[]
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
const { handleKeyDown, handleKeyUp } = useHotkeys(memoedHotkeys);
|
|
90
|
+
const newProps = {
|
|
91
|
+
tabIndex: 0,
|
|
92
|
+
onKeyDown: handleKeyDown,
|
|
93
|
+
onKeyUp: handleKeyUp
|
|
94
|
+
};
|
|
95
|
+
return children ? ( //tnr: if children are passed, we'll clone them with the new props
|
|
96
|
+
React.cloneElement(children, newProps)
|
|
97
|
+
) : (
|
|
98
|
+
//if not, then we'll return a div that can be used
|
|
99
|
+
<div className="hotkeyHandler" {...newProps}></div>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const isMac = navigator.userAgent.includes("Mac OS X");
|
|
105
|
+
|
|
106
|
+
// TODO maybe avoid using symbols by default when not on Mac?
|
|
107
|
+
// Anyway, alternative 'Key + Key' description is provided as well
|
|
108
|
+
const symbols = {
|
|
109
|
+
cmd: "⌘",
|
|
110
|
+
meta: "⌘",
|
|
111
|
+
ctrl: "⌃",
|
|
112
|
+
alt: "⌥",
|
|
113
|
+
shift: "⇧",
|
|
114
|
+
esc: "␛", //'⎋',
|
|
115
|
+
enter: "⏎",
|
|
116
|
+
backspace: "⌫",
|
|
117
|
+
plus: "+",
|
|
118
|
+
tab: "⇥",
|
|
119
|
+
space: "␣",
|
|
120
|
+
capslock: "⇪",
|
|
121
|
+
pageup: "⇞",
|
|
122
|
+
pagedown: "⇟",
|
|
123
|
+
home: "↖",
|
|
124
|
+
end: "↘",
|
|
125
|
+
left: "←",
|
|
126
|
+
right: "→",
|
|
127
|
+
up: "↑",
|
|
128
|
+
down: "↓"
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
symbols.mod = symbols[isMac ? "meta" : "ctrl"];
|