@operato/layout
Advanced tools
Comparing version 0.3.9 to 0.3.13
@@ -6,2 +6,36 @@ # Change Log | ||
### [0.3.13](https://github.com/hatiolab/operato/compare/v0.3.12...v0.3.13) (2022-01-15) | ||
**Note:** Version bump only for package @operato/layout | ||
### [0.3.12](https://github.com/hatiolab/operato/compare/v0.3.11...v0.3.12) (2022-01-15) | ||
**Note:** Version bump only for package @operato/layout | ||
### [0.3.11](https://github.com/hatiolab/operato/compare/v0.3.10...v0.3.11) (2022-01-15) | ||
**Note:** Version bump only for package @operato/layout | ||
### [0.3.10](https://github.com/hatiolab/operato/compare/v0.3.9...v0.3.10) (2022-01-15) | ||
### :bug: Bug Fix | ||
* data-grist record-view ([aa71ec5](https://github.com/hatiolab/operato/commit/aa71ec5600f4dbccd05fcbc249445c73a41d2168)) | ||
* layout dependencies ([0d04aa7](https://github.com/hatiolab/operato/commit/0d04aa7c44566f5f69602c7df72664edb4f9e643)) | ||
### [0.3.9](https://github.com/hatiolab/operato/compare/v0.3.8...v0.3.9) (2022-01-15) | ||
@@ -8,0 +42,0 @@ |
@@ -7,3 +7,4 @@ /** | ||
import { customElement } from 'lit/decorators.js'; | ||
const _isMacOS = navigator.userAgent.indexOf('Mac') != -1; | ||
import { isMacOS } from '@operato/utils'; | ||
const MACOS = isMacOS(); | ||
let OxToolbar = class OxToolbar extends LitElement { | ||
@@ -26,16 +27,16 @@ render() { | ||
case 'ctrl': | ||
symbol = _isMacOS ? '⌘' : 'Ctrl'; | ||
symbol = MACOS ? '⌘' : 'Ctrl'; | ||
break; | ||
case 'shift': | ||
symbol = _isMacOS ? '⇧' : 'Shift'; | ||
symbol = MACOS ? '⇧' : 'Shift'; | ||
break; | ||
case 'alt': | ||
case 'option': | ||
symbol = _isMacOS ? '⌥' : 'Alt'; | ||
symbol = MACOS ? '⌥' : 'Alt'; | ||
break; | ||
case 'backspace': | ||
symbol = _isMacOS ? '⌫' : 'BackSpace'; | ||
symbol = MACOS ? '⌫' : 'BackSpace'; | ||
break; | ||
case 'delete': | ||
symbol = _isMacOS ? '⌦' : 'Del'; | ||
symbol = MACOS ? '⌦' : 'Del'; | ||
break; | ||
@@ -53,6 +54,6 @@ default: | ||
} | ||
return symbols.join(_isMacOS ? '' : '+'); | ||
return symbols.join(MACOS ? '' : '+'); | ||
} | ||
onShortcut(e) { | ||
var ctrlKey = _isMacOS ? e.metaKey : e.ctrlKey; | ||
var ctrlKey = MACOS ? e.metaKey : e.ctrlKey; | ||
var altKey = e.altKey; | ||
@@ -59,0 +60,0 @@ var shiftKey = e.shiftKey; |
@@ -6,3 +6,3 @@ { | ||
"author": "heartyoh", | ||
"version": "0.3.9", | ||
"version": "0.3.13", | ||
"main": "dist/src/index.js", | ||
@@ -36,3 +36,4 @@ "module": "dist/src/index.js", | ||
"@material/mwc-icon": "^0.25.3", | ||
"@operato/styles": "^0.3.9", | ||
"@operato/styles": "^0.3.13", | ||
"@operato/utils": "^0.3.13", | ||
"lit": "^2.0.2" | ||
@@ -72,3 +73,3 @@ }, | ||
}, | ||
"gitHead": "d63971adcea045ccd788ff4ae5b9e2ca561bb754" | ||
"gitHead": "1c655a621af7ea9981bd2b9c9d1bbabe71305e63" | ||
} |
@@ -8,4 +8,6 @@ /** | ||
const _isMacOS = navigator.userAgent.indexOf('Mac') != -1 | ||
import { isMacOS } from '@operato/utils' | ||
const MACOS = isMacOS() | ||
@customElement('ox-toolbar') | ||
@@ -85,16 +87,16 @@ class OxToolbar extends LitElement { | ||
case 'ctrl': | ||
symbol = _isMacOS ? '⌘' : 'Ctrl' | ||
symbol = MACOS ? '⌘' : 'Ctrl' | ||
break | ||
case 'shift': | ||
symbol = _isMacOS ? '⇧' : 'Shift' | ||
symbol = MACOS ? '⇧' : 'Shift' | ||
break | ||
case 'alt': | ||
case 'option': | ||
symbol = _isMacOS ? '⌥' : 'Alt' | ||
symbol = MACOS ? '⌥' : 'Alt' | ||
break | ||
case 'backspace': | ||
symbol = _isMacOS ? '⌫' : 'BackSpace' | ||
symbol = MACOS ? '⌫' : 'BackSpace' | ||
break | ||
case 'delete': | ||
symbol = _isMacOS ? '⌦' : 'Del' | ||
symbol = MACOS ? '⌦' : 'Del' | ||
break | ||
@@ -115,7 +117,7 @@ default: | ||
return symbols.join(_isMacOS ? '' : '+') | ||
return symbols.join(MACOS ? '' : '+') | ||
} | ||
onShortcut(e: KeyboardEvent) { | ||
var ctrlKey = _isMacOS ? e.metaKey : e.ctrlKey | ||
var ctrlKey = MACOS ? e.metaKey : e.ctrlKey | ||
var altKey = e.altKey | ||
@@ -122,0 +124,0 @@ var shiftKey = e.shiftKey |
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
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
92394
1147
4
+ Added@operato/utils@^0.3.13
+ Added@operato/utils@0.3.28(transitive)
+ Addedlodash@4.17.21(transitive)
Updated@operato/styles@^0.3.13