diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-06-08 02:46:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 02:46:56 +0300 |
commit | d0aaab95f1ef6d8b748b0e8d54f811a366864249 (patch) | |
tree | 86820438b4b56c764912316ebe8152362aa3e2dd /libs/bower_components/mousetrap/plugins | |
parent | d10c4e89dc5d1081a3755497c45d366b470eeec7 (diff) |
Switch from bower to npm and update JS libraries (#14082)
* Starting to replace bower with npm: use updated jquery-ui from npm.
* Use jquery from npm./
* Use angular from npm.
* Add more angular libraries.
* Use chroma-js from npm.
* Remove html5shiv, does not appear to be used.
* Use iframe resizer library from npm.
* Add jquery-mousewheel
* Add jquery.dotdotdot from npm.
* Get jquery.scrollto from npm.
* Get jscrollpane from npm.
* Get materialize-css from npm.
* Get mousetrap from npm.
* Remove ngDialog, as it is no longer used.
* Install qrcode.js from npm.
* Get sprintf-js from npm.
* Get visibillityjs from npm.
* Remove bower.json.
* Getting parts of matomo to work w/ new versions of libraries installed by npm.
* Ignore node_modules subfolders in node_modules since we only use npm for frontend dependencies + fix a test.
* Fix button padding.
* Fix series picker checkboxes.
* Fix karma conf.
* Fix CSS in right place.
* Fixing more css/less issues.
* More test fixes.
* Limit selection style fix.
* Fix more tests + materializecss issues.
* Fix a couple more tests.
* Fix annotation styling.
* remove error
* add ng-dialog files
* try to fix some tests
* Fix several UI tests.
* fixing more build issues
* Fix several more tests and issues.
* fixing more tests
* split ui tests into 3 groups
* fix several more issues and tests
* Fix some console warnings on chrome.
* Updating more test files.
* fix some tests
* yet more fixes
* couple more fixes
* another form fix
* Fix some tests.
* update screenshot
* update more expected files
* Fix two more form issues.
* test commit (travis is not fetching submodules for some reason...)
* remove scripts removed in merge
* three travis builds
* split UIIntegrationTest into multiple suites
* lets try this again
* updae several expected screenshots
* fix some more tests
* fix plugin details material select and tabs initiaialization
* update screenshots + css fix
* re-initialize materialize tabs since we load jquery-ui afterwards for datepicker which unsets materialize tabs
* update more screenshots and fix couple more issues
* update more screenshots + tweak to test
* more fixes and screenshot updates
* fix some issues and update more screenshots
* update submodules
* more fixes + more updated screenshots
* more css fixes and test fixes
* couple fixes & updated screenshots
* update screenshots
* fix random failure
* Map old bower_component files to new ones in AssetManager.
* Remove node_modules from PR and ignore node_modules in .gitignore and remove libs/jquery (adding new required libs).
* Update .travis.yml.
* update screenshots
* fixing some more issues
* fix copy pasta
* update screenshots
* fix more modal issues
* Update css & screenshots.
* correct close modal calls
* fixing more issues
* data-target instead of data-activates
* fix more tests
* trigger build that works?
* fix more tests
* update submodule
* debugging travis
* more debugging
* try to fix test
* fix modal no button click in test
* update more screenshots
* couple more test fixes
* some more fixes and updated screenshots
* update screenshots
* apply some review feedback
* Fix modal centering and initial top position.
* apply some more pr feedback
* another pr fix
* update submodule
* remove style
* fix color of checkbox mark
* Fix centering the popover
Note: centering the popover relative to body doesn't work poperly anymore, maybe because of the fixed position of the widget overlay. Using the ui-widget-overlay to position the dialog centered seems to work
* ignore line endings check for node modules
* updates expected UI files
* submodule updates
* use minified file of jquery.browser.js
* updates expected test files
* ensure to hide parent tooltips when row action tooltips are shown
* tweak less for datatable navigation
* style is only useful for dashboard
* update some screenshots
* update submodules
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'libs/bower_components/mousetrap/plugins')
13 files changed, 0 insertions, 382 deletions
diff --git a/libs/bower_components/mousetrap/plugins/README.md b/libs/bower_components/mousetrap/plugins/README.md deleted file mode 100644 index 704cf04e0f..0000000000 --- a/libs/bower_components/mousetrap/plugins/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Plugins - -Plugins extend the functionality of Mousetrap. To use a plugin just include the plugin after mousetrap. - -```html -<script src="mousetrap.js"></script> -<script src="mousetrap-record.js"></script> -``` - -## Bind dictionary - -Allows you to make multiple bindings in a single ``Mousetrap.bind`` call. - -## Global bind - -Allows you to set global bindings that work even inside of input fields. - -## Pause/unpause - -Allows you to temporarily prevent Mousetrap events from firing. - -## Record - -Allows you to capture a keyboard shortcut or sequence defined by a user. diff --git a/libs/bower_components/mousetrap/plugins/bind-dictionary/README.md b/libs/bower_components/mousetrap/plugins/bind-dictionary/README.md deleted file mode 100644 index 6f956b6f1f..0000000000 --- a/libs/bower_components/mousetrap/plugins/bind-dictionary/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Bind Dictionary - -This extension overwrites the default bind behavior and allows you to bind multiple combinations in a single bind call. - -Usage looks like: - -```javascript -Mousetrap.bind({ - 'a': function() { console.log('a'); }, - 'b': function() { console.log('b'); } -}); -``` - -You can optionally pass in ``keypress``, ``keydown`` or ``keyup`` as a second argument. - -Other bind calls work the same way as they do by default. diff --git a/libs/bower_components/mousetrap/plugins/bind-dictionary/mousetrap-bind-dictionary.js b/libs/bower_components/mousetrap/plugins/bind-dictionary/mousetrap-bind-dictionary.js deleted file mode 100644 index dc7054a64b..0000000000 --- a/libs/bower_components/mousetrap/plugins/bind-dictionary/mousetrap-bind-dictionary.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Overwrites default Mousetrap.bind method to optionally accept - * an object to bind multiple key events in a single call - * - * You can pass it in like: - * - * Mousetrap.bind({ - * 'a': function() { console.log('a'); }, - * 'b': function() { console.log('b'); } - * }); - * - * And can optionally pass in 'keypress', 'keydown', or 'keyup' - * as a second argument - * - */ -/* global Mousetrap:true */ -Mousetrap = (function(Mousetrap) { - var self = Mousetrap, - _oldBind = self.bind, - args; - - self.bind = function() { - args = arguments; - - // normal call - if (typeof args[0] == 'string' || args[0] instanceof Array) { - return _oldBind(args[0], args[1], args[2]); - } - - // object passed in - for (var key in args[0]) { - if (args[0].hasOwnProperty(key)) { - _oldBind(key, args[0][key], args[1]); - } - } - }; - - return self; -}) (Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js b/libs/bower_components/mousetrap/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js deleted file mode 100644 index 3c4382bad6..0000000000 --- a/libs/bower_components/mousetrap/plugins/bind-dictionary/mousetrap-bind-dictionary.min.js +++ /dev/null @@ -1 +0,0 @@ -Mousetrap=function(b){var c=b.bind,a;b.bind=function(){a=arguments;if("string"==typeof a[0]||a[0]instanceof Array)return c(a[0],a[1],a[2]);for(var b in a[0])a[0].hasOwnProperty(b)&&c(b,a[0][b],a[1])};return b}(Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/global-bind/README.md b/libs/bower_components/mousetrap/plugins/global-bind/README.md deleted file mode 100644 index a37a219152..0000000000 --- a/libs/bower_components/mousetrap/plugins/global-bind/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Global Bind - -This extension allows you to specify keyboard events that will work anywhere including inside textarea/input fields. - -Usage looks like: - -```javascript -Mousetrap.bindGlobal('ctrl+s', function() { - _save(); -}); -``` - -This means that a keyboard event bound using ``Mousetrap.bind`` will only work outside of form input fields, but using ``Moustrap.bindGlobal`` will work in both places. - -If you wanted to create keyboard shortcuts that only work when you are inside a specific textarea you can do that too by creating your own extension. diff --git a/libs/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.js b/libs/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.js deleted file mode 100644 index 022ceb71dc..0000000000 --- a/libs/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * adds a bindGlobal method to Mousetrap that allows you to - * bind specific keyboard shortcuts that will still work - * inside a text input field - * - * usage: - * Mousetrap.bindGlobal('ctrl+s', _saveChanges); - */ -/* global Mousetrap:true */ -Mousetrap = (function(Mousetrap) { - var _globalCallbacks = {}, - _originalStopCallback = Mousetrap.stopCallback; - - Mousetrap.stopCallback = function(e, element, combo, sequence) { - if (_globalCallbacks[combo] || _globalCallbacks[sequence]) { - return false; - } - - return _originalStopCallback(e, element, combo); - }; - - Mousetrap.bindGlobal = function(keys, callback, action) { - Mousetrap.bind(keys, callback, action); - - if (keys instanceof Array) { - for (var i = 0; i < keys.length; i++) { - _globalCallbacks[keys[i]] = true; - } - return; - } - - _globalCallbacks[keys] = true; - }; - - return Mousetrap; -}) (Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js b/libs/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js deleted file mode 100644 index 636b25e08e..0000000000 --- a/libs/bower_components/mousetrap/plugins/global-bind/mousetrap-global-bind.min.js +++ /dev/null @@ -1 +0,0 @@ -Mousetrap=function(a){var d={},e=a.stopCallback;a.stopCallback=function(b,c,a){return d[a]?!1:e(b,c,a)};a.bindGlobal=function(b,c,e){a.bind(b,c,e);if(b instanceof Array)for(c=0;c<b.length;c++)d[b[c]]=!0;else d[b]=!0};return a}(Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/pause/README.md b/libs/bower_components/mousetrap/plugins/pause/README.md deleted file mode 100644 index 0b3b3bd2e3..0000000000 --- a/libs/bower_components/mousetrap/plugins/pause/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Pause/unpause - -This extension allows Mousetrap to be paused and unpaused without having to reset keyboard shortcuts and rebind them. - -Usage looks like: - -```javascript -// stop Mousetrap events from firing -Mousetrap.pause(); - -// allow Mousetrap events to fire again -Mousetrap.unpause(); -``` diff --git a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js b/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js deleted file mode 100644 index ca9cafee4b..0000000000 --- a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * adds a pause and unpause method to Mousetrap - * this allows you to enable or disable keyboard shortcuts - * without having to reset Mousetrap and rebind everything - */ -/* global Mousetrap:true */ -Mousetrap = (function(Mousetrap) { - var self = Mousetrap, - _originalStopCallback = self.stopCallback, - enabled = true; - - self.stopCallback = function(e, element, combo) { - if (!enabled) { - return true; - } - - return _originalStopCallback(e, element, combo); - }; - - self.pause = function() { - enabled = false; - }; - - self.unpause = function() { - enabled = true; - }; - - return self; -}) (Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.min.js b/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.min.js deleted file mode 100644 index 9b6d67c527..0000000000 --- a/libs/bower_components/mousetrap/plugins/pause/mousetrap-pause.min.js +++ /dev/null @@ -1 +0,0 @@ -Mousetrap=function(a){var c=a.stopCallback,b=!0;a.stopCallback=function(a,d,e){return b?c(a,d,e):!0};a.pause=function(){b=!1};a.unpause=function(){b=!0};return a}(Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/record/README.md b/libs/bower_components/mousetrap/plugins/record/README.md deleted file mode 100644 index 903f6057ff..0000000000 --- a/libs/bower_components/mousetrap/plugins/record/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Record - -This extension lets you use Mousetrap to record keyboard sequences and play them back: - -```html -<button onclick="recordSequence()">Record</button> - -<script> - function recordSequence() { - Mousetrap.record(function(sequence) { - // sequence is an array like ['ctrl+k', 'c'] - alert('You pressed: ' + sequence.join(' ')); - }); - } -</script> -``` diff --git a/libs/bower_components/mousetrap/plugins/record/mousetrap-record.js b/libs/bower_components/mousetrap/plugins/record/mousetrap-record.js deleted file mode 100644 index 1b9353371d..0000000000 --- a/libs/bower_components/mousetrap/plugins/record/mousetrap-record.js +++ /dev/null @@ -1,189 +0,0 @@ -/** - * This extension allows you to record a sequence using Mousetrap. - * - * @author Dan Tao <daniel.tao@gmail.com> - */ -(function(Mousetrap) { - /** - * the sequence currently being recorded - * - * @type {Array} - */ - var _recordedSequence = [], - - /** - * a callback to invoke after recording a sequence - * - * @type {Function|null} - */ - _recordedSequenceCallback = null, - - /** - * a list of all of the keys currently held down - * - * @type {Array} - */ - _currentRecordedKeys = [], - - /** - * temporary state where we remember if we've already captured a - * character key in the current combo - * - * @type {boolean} - */ - _recordedCharacterKey = false, - - /** - * a handle for the timer of the current recording - * - * @type {null|number} - */ - _recordTimer = null, - - /** - * the original handleKey method to override when Mousetrap.record() is - * called - * - * @type {Function} - */ - _origHandleKey = Mousetrap.handleKey; - - /** - * handles a character key event - * - * @param {string} character - * @param {Array} modifiers - * @param {Event} e - * @returns void - */ - function _handleKey(character, modifiers, e) { - // remember this character if we're currently recording a sequence - if (e.type == 'keydown') { - if (character.length === 1 && _recordedCharacterKey) { - _recordCurrentCombo(); - } - - for (i = 0; i < modifiers.length; ++i) { - _recordKey(modifiers[i]); - } - _recordKey(character); - - // once a key is released, all keys that were held down at the time - // count as a keypress - } else if (e.type == 'keyup' && _currentRecordedKeys.length > 0) { - _recordCurrentCombo(); - } - } - - /** - * marks a character key as held down while recording a sequence - * - * @param {string} key - * @returns void - */ - function _recordKey(key) { - var i; - - // one-off implementation of Array.indexOf, since IE6-9 don't support it - for (i = 0; i < _currentRecordedKeys.length; ++i) { - if (_currentRecordedKeys[i] === key) { - return; - } - } - - _currentRecordedKeys.push(key); - - if (key.length === 1) { - _recordedCharacterKey = true; - } - } - - /** - * marks whatever key combination that's been recorded so far as finished - * and gets ready for the next combo - * - * @returns void - */ - function _recordCurrentCombo() { - _recordedSequence.push(_currentRecordedKeys); - _currentRecordedKeys = []; - _recordedCharacterKey = false; - _restartRecordTimer(); - } - - /** - * ensures each combo in a sequence is in a predictable order and formats - * key combos to be '+'-delimited - * - * modifies the sequence in-place - * - * @param {Array} sequence - * @returns void - */ - function _normalizeSequence(sequence) { - var i; - - for (i = 0; i < sequence.length; ++i) { - sequence[i].sort(function(x, y) { - // modifier keys always come first, in alphabetical order - if (x.length > 1 && y.length === 1) { - return -1; - } else if (x.length === 1 && y.length > 1) { - return 1; - } - - // character keys come next (list should contain no duplicates, - // so no need for equality check) - return x > y ? 1 : -1; - }); - - sequence[i] = sequence[i].join('+'); - } - } - - /** - * finishes the current recording, passes the recorded sequence to the stored - * callback, and sets Mousetrap.handleKey back to its original function - * - * @returns void - */ - function _finishRecording() { - if (_recordedSequenceCallback) { - _normalizeSequence(_recordedSequence); - _recordedSequenceCallback(_recordedSequence); - } - - // reset all recorded state - _recordedSequence = []; - _recordedSequenceCallback = null; - _currentRecordedKeys = []; - - Mousetrap.handleKey = _origHandleKey; - } - - /** - * called to set a 1 second timeout on the current recording - * - * this is so after each key press in the sequence the recording will wait for - * 1 more second before executing the callback - * - * @returns void - */ - function _restartRecordTimer() { - clearTimeout(_recordTimer); - _recordTimer = setTimeout(_finishRecording, 1000); - } - - /** - * records the next sequence and passes it to a callback once it's - * completed - * - * @param {Function} callback - * @returns void - */ - Mousetrap.record = function(callback) { - Mousetrap.handleKey = _handleKey; - _recordedSequenceCallback = callback; - }; - -})(Mousetrap); diff --git a/libs/bower_components/mousetrap/plugins/record/mousetrap-record.min.js b/libs/bower_components/mousetrap/plugins/record/mousetrap-record.min.js deleted file mode 100644 index dd2f60e28a..0000000000 --- a/libs/bower_components/mousetrap/plugins/record/mousetrap-record.min.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(d){function n(b,a,h){if("keydown"==h.type){1===b.length&&g&&k();for(i=0;i<a.length;++i)l(a[i]);l(b)}else"keyup"==h.type&&0<c.length&&k()}function l(b){var a;for(a=0;a<c.length;++a)if(c[a]===b)return;c.push(b);1===b.length&&(g=!0)}function k(){e.push(c);c=[];g=!1;clearTimeout(m);m=setTimeout(p,1E3)}function q(b){var a;for(a=0;a<b.length;++a)b[a].sort(function(a,b){return 1<a.length&&1===b.length?-1:1===a.length&&1<b.length?1:a>b?1:-1}),b[a]=b[a].join("+")}function p(){f&&(q(e),f(e));e=[]; -f=null;c=[];d.handleKey=r}var e=[],f=null,c=[],g=!1,m=null,r=d.handleKey;d.record=function(b){d.handleKey=n;f=b}})(Mousetrap); |