@gedit/keyboard
Advanced tools
Comparing version 0.1.64 to 0.1.65
@@ -78,5 +78,10 @@ "use strict"; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -117,3 +122,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
label: 'Auto-detect', | ||
description: this.layoutProvider.currentLayoutSource !== 'user-choice' ? "(current: " + current.name + ")" : undefined, | ||
description: this.layoutProvider.currentLayoutSource !== 'user-choice' ? "(current: ".concat(current.name, ")") : undefined, | ||
detail: 'Try to detect the keyboard layout from browser information and pressed keys.', | ||
@@ -131,16 +136,16 @@ value: 'autodetect' | ||
if (utils_1.isOSX) { | ||
layouts = __spread([ | ||
layouts = __spreadArray(__spreadArray(__spreadArray([ | ||
autodetect, | ||
{ type: 'separator', label: 'Mac Keyboards' } | ||
], macLayouts, [ | ||
], __read(macLayouts), false), [ | ||
{ type: 'separator', label: 'PC Keyboards' } | ||
], pcLayouts); | ||
], false), __read(pcLayouts), false); | ||
} | ||
else { | ||
layouts = __spread([ | ||
layouts = __spreadArray(__spreadArray(__spreadArray([ | ||
autodetect, | ||
{ type: 'separator', label: 'PC Keyboards' } | ||
], pcLayouts, [ | ||
], __read(pcLayouts), false), [ | ||
{ type: 'separator', label: 'Mac Keyboards' } | ||
], macLayouts); | ||
], false), __read(macLayouts), false); | ||
} | ||
@@ -161,3 +166,3 @@ return [4 /*yield*/, this.quickPickService.show(layouts, { placeholder: 'Choose a keyboard layout' })]; | ||
label: layout.name, | ||
description: (layout.hardware === 'mac' ? 'Mac' : 'PC') + " (" + layout.language + ")" + (isCurrent ? ' - current layout' : ''), | ||
description: "".concat(layout.hardware === 'mac' ? 'Mac' : 'PC', " (").concat(layout.language, ")").concat(isCurrent ? ' - current layout' : ''), | ||
value: layout | ||
@@ -167,11 +172,11 @@ }; | ||
__decorate([ | ||
inversify_1.inject(browser_keyboard_layout_provider_1.BrowserKeyboardLayoutProvider), | ||
(0, inversify_1.inject)(browser_keyboard_layout_provider_1.BrowserKeyboardLayoutProvider), | ||
__metadata("design:type", browser_keyboard_layout_provider_1.BrowserKeyboardLayoutProvider) | ||
], BrowserKeyboardFrontendContribution.prototype, "layoutProvider", void 0); | ||
__decorate([ | ||
inversify_1.inject(application_common_1.QuickPickService), | ||
(0, inversify_1.inject)(application_common_1.QuickPickService), | ||
__metadata("design:type", Object) | ||
], BrowserKeyboardFrontendContribution.prototype, "quickPickService", void 0); | ||
BrowserKeyboardFrontendContribution = __decorate([ | ||
inversify_1.injectable() | ||
(0, inversify_1.injectable)() | ||
], BrowserKeyboardFrontendContribution); | ||
@@ -178,0 +183,0 @@ return BrowserKeyboardFrontendContribution; |
@@ -235,3 +235,3 @@ "use strict"; | ||
var hardware = layout.hardware === 'mac' ? 'Mac' : 'PC'; | ||
this.logger.info("Detected keyboard layout from " + from + ": " + layout.name + " (" + hardware + ")"); | ||
this.logger.info("Detected keyboard layout from ".concat(from, ": ").concat(layout.name, " (").concat(hardware, ")")); | ||
} | ||
@@ -350,11 +350,11 @@ }; | ||
__decorate([ | ||
inversify_1.inject(utils_1.Logger), | ||
(0, inversify_1.inject)(utils_1.Logger), | ||
__metadata("design:type", Object) | ||
], BrowserKeyboardLayoutProvider.prototype, "logger", void 0); | ||
__decorate([ | ||
inversify_1.inject(storage_1.LocalStorageService), | ||
(0, inversify_1.inject)(storage_1.LocalStorageService), | ||
__metadata("design:type", storage_1.LocalStorageService) | ||
], BrowserKeyboardLayoutProvider.prototype, "storageService", void 0); | ||
__decorate([ | ||
inversify_1.postConstruct(), | ||
(0, inversify_1.postConstruct)(), | ||
__metadata("design:type", Function), | ||
@@ -365,3 +365,3 @@ __metadata("design:paramtypes", []), | ||
BrowserKeyboardLayoutProvider = __decorate([ | ||
inversify_1.injectable() | ||
(0, inversify_1.injectable)() | ||
], BrowserKeyboardLayoutProvider); | ||
@@ -427,3 +427,3 @@ return BrowserKeyboardLayoutProvider; | ||
} | ||
var inputKey = input.code + "." + property; | ||
var inputKey = "".concat(input.code, ".").concat(property); | ||
if (this.testedInputs.has(inputKey)) { | ||
@@ -512,3 +512,3 @@ if (this.testedInputs.get(inputKey) === input.character) { | ||
function getLayoutId(layout) { | ||
return layout.language + "-" + layout.name.replace(' ', '_') + "-" + layout.hardware; | ||
return "".concat(layout.language, "-").concat(layout.name.replace(' ', '_'), "-").concat(layout.hardware); | ||
} | ||
@@ -515,0 +515,0 @@ /** |
@@ -25,3 +25,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -28,0 +28,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -244,16 +244,16 @@ "use strict"; | ||
__decorate([ | ||
inversify_1.inject(common_1.KeyboardLayoutProvider), | ||
(0, inversify_1.inject)(common_1.KeyboardLayoutProvider), | ||
__metadata("design:type", Object) | ||
], KeyboardLayoutService.prototype, "layoutProvider", void 0); | ||
__decorate([ | ||
inversify_1.inject(common_1.KeyboardLayoutChangeNotifier), | ||
(0, inversify_1.inject)(common_1.KeyboardLayoutChangeNotifier), | ||
__metadata("design:type", Object) | ||
], KeyboardLayoutService.prototype, "layoutChangeNotifier", void 0); | ||
__decorate([ | ||
inversify_1.inject(common_1.KeyValidator), | ||
inversify_1.optional(), | ||
(0, inversify_1.inject)(common_1.KeyValidator), | ||
(0, inversify_1.optional)(), | ||
__metadata("design:type", Object) | ||
], KeyboardLayoutService.prototype, "keyValidator", void 0); | ||
KeyboardLayoutService = __decorate([ | ||
inversify_1.injectable() | ||
(0, inversify_1.injectable)() | ||
], KeyboardLayoutService); | ||
@@ -260,0 +260,0 @@ return KeyboardLayoutService; |
@@ -28,22 +28,2 @@ "use strict"; | ||
}; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -239,3 +219,3 @@ exports.KeysOrKeyCodes = exports.Key = exports.SpecialCases = exports.KeyModifier = exports.KeyCode = exports.KeySequence = void 0; | ||
if (keys.length !== new Set(keys).size) { | ||
throw new Error("Can't parse keybinding " + keybinding + " Duplicate modifiers"); | ||
throw new Error("Can't parse keybinding ".concat(keybinding, " Duplicate modifiers")); | ||
} | ||
@@ -255,3 +235,3 @@ try { | ||
else { | ||
throw new Error("Can't parse keybinding " + keybinding + " meta is for OSX only"); | ||
throw new Error("Can't parse keybinding ".concat(keybinding, " meta is for OSX only")); | ||
} | ||
@@ -285,3 +265,3 @@ /* ctrlcmd for M1 keybindings that work on both macOS and other platforms */ | ||
else { | ||
throw new Error("Unrecognized key '" + keyString + "' in '" + keybinding + "'"); | ||
throw new Error("Unrecognized key '".concat(keyString, "' in '").concat(keybinding, "'")); | ||
} | ||
@@ -422,3 +402,3 @@ } | ||
} | ||
throw new Error("Cannot get key code from the keyboard event: " + event + "."); | ||
throw new Error("Cannot get key code from the keyboard event: ".concat(event, ".")); | ||
} | ||
@@ -692,3 +672,3 @@ KeyCode.toKey = toKey; | ||
MODIFIERS.push.apply(// Firefox on Linux | ||
MODIFIERS, __spread([Key.ALT_LEFT, Key.ALT_RIGHT, Key.CONTROL_LEFT, Key.CONTROL_RIGHT, Key.OS_LEFT, Key.OS_RIGHT, Key.SHIFT_LEFT, Key.SHIFT_RIGHT])); | ||
MODIFIERS, [Key.ALT_LEFT, Key.ALT_RIGHT, Key.CONTROL_LEFT, Key.CONTROL_RIGHT, Key.OS_LEFT, Key.OS_RIGHT, Key.SHIFT_LEFT, Key.SHIFT_RIGHT]); | ||
})(); | ||
@@ -695,0 +675,0 @@ var KeysOrKeyCodes; |
@@ -10,3 +10,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -10,3 +10,3 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
@@ -13,0 +13,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
{ | ||
"name": "@gedit/keyboard", | ||
"version": "0.1.64", | ||
"version": "0.1.65", | ||
"license": "MIT", | ||
@@ -12,5 +12,5 @@ "main": "lib/index", | ||
"dependencies": { | ||
"@gedit/command": "^0.1.60", | ||
"@gedit/storage": "^0.1.64", | ||
"@gedit/utils": "^0.1.63" | ||
"@gedit/command": "^0.1.61", | ||
"@gedit/storage": "^0.1.65", | ||
"@gedit/utils": "^0.1.64" | ||
}, | ||
@@ -32,3 +32,3 @@ "geditExtensions": [ | ||
}, | ||
"gitHead": "d4768cc579938358b825db53ce7c65445a131850" | ||
"gitHead": "db74e452a213a016b3be82938fe68df8fdde2e6b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
411984
4319
Updated@gedit/command@^0.1.61
Updated@gedit/storage@^0.1.65
Updated@gedit/utils@^0.1.64