Update Slickgrid to 2.3.7. As this version includes all the features we need, it can be moved out of the vendor directory and we'll use yarn to pull it in.
@ -1,36 +1,36 @@
|
||||
This is a list of the third party libraries/code used in the application, not
|
||||
including Python modules installed via Pip which are listed in requirements.txt.
|
||||
|
||||
Library Version Licence URL
|
||||
======= ======= ======= ===
|
||||
QT 4.6.2+ LGPL v2.1/3 http://www.qt.io/
|
||||
Bootstrap 3.3.4 MIT http://getbootstrap.com/
|
||||
jQuery 1.11.1 MIT http://jquery.com/
|
||||
Modernizr 2.6.2 MIT/BSD http://modernizr.com/
|
||||
AlertifyJS 1.7.1 MIT http://alertifyjs.com/ *** Do not update - changed to GPL3 in 1.8.0 ***
|
||||
CodeMirror 5.14.2 MIT http://codemirror.net/
|
||||
aciTree 4.5.0-rc.7 MIT/GPL http://acoderinsights.ro/en/aciTree-tree-view-with-jQuery
|
||||
contextMenu 2.1.0 MIT https://github.com/swisnl/jQuery-contextMenu
|
||||
wcDocker 0f5690318c MIT/GPL https://github.com/WebCabin/wcDocker
|
||||
Require.js 2.1.18 BSD/MIT http://requirejs.org/
|
||||
Underscore.js 1.8.3 MIT http://underscorejs.org/
|
||||
Underscore.string 387ab72d49 MIT http://epeli.github.io/underscore.string/
|
||||
Backform.js 5859b4f9db MIT https://github.com/AmiliaApp/backform
|
||||
Backbone 1.1.2 MIT http://backbonejs.org
|
||||
font-Awesome 4.5 SIL OFL http://fortawesome.github.io/Font-Awesome/
|
||||
font-mfizz 2.3 MIT http://fizzed.com/oss/font-mfizz
|
||||
backgrid.js 0.3.5 MIT http://backgridjs.com/
|
||||
backbone.undo 0.2 MIT http://backbone.undojs.com/
|
||||
bootstrap-switch 3.3.2 MIT http://www.bootstrap-switch.org/
|
||||
select2 4.0.1 MIT https://select2.github.io/
|
||||
backgrid-filter 01b2b21 MIT https://github.com/wyuenho/backgrid-filter
|
||||
backbone.paginator 2.0.3 MIT http://github.com/backbone-paginator/backbone.paginator
|
||||
backgrid-paginator 03632df MIT https://github.com/wyuenho/backgrid-paginator
|
||||
backgrid-select-all 1a00053 MIT https://github.com/wyuenho/backgrid-select-all
|
||||
dropzone 4e20bd4 MIT https://github.com/enyo/dropzone
|
||||
Filemanager 7e060c2 MIT https://github.com/simogeo/Filemanager
|
||||
Unit (Length) d8e6237 MIT https://github.com/heygrady/Units/blob/master/Length.min.js
|
||||
Natural Sort 9565816 MIT https://github.com/javve/natural-sort/blob/master/index.js
|
||||
SlickGrid 2.2.4 MIT https://github.com/6pac/SlickGrid
|
||||
jQuery-UI 1.11.3 MIT https://jqueryui.com/
|
||||
BigNumber 3.0.1 MIT http://mikemcl.github.io/bignumber.js
|
||||
Library Version Licence URL
|
||||
======= ======= ======= ===
|
||||
QT 4.6.2+ LGPL v2.1/3 http://www.qt.io/
|
||||
Bootstrap 3.3.4 MIT http://getbootstrap.com/
|
||||
jQuery 1.11.1 MIT http://jquery.com/
|
||||
Modernizr 2.6.2 MIT/BSD http://modernizr.com/
|
||||
AlertifyJS 1.7.1 MIT http://alertifyjs.com/ *** Do not update - changed to GPL3 in 1.8.0 ***
|
||||
CodeMirror 5.14.2 MIT http://codemirror.net/
|
||||
aciTree 4.5.0-rc.7 MIT/GPL http://acoderinsights.ro/en/aciTree-tree-view-with-jQuery
|
||||
contextMenu 2.1.0 MIT https://github.com/swisnl/jQuery-contextMenu
|
||||
wcDocker 0f5690318c MIT/GPL https://github.com/WebCabin/wcDocker
|
||||
Require.js 2.1.18 BSD/MIT http://requirejs.org/
|
||||
Underscore.js 1.8.3 MIT http://underscorejs.org/
|
||||
Underscore.string 387ab72d49 MIT http://epeli.github.io/underscore.string/
|
||||
Backform.js 5859b4f9db MIT https://github.com/AmiliaApp/backform
|
||||
Backbone 1.1.2 MIT http://backbonejs.org
|
||||
font-Awesome 4.5 SIL OFL http://fortawesome.github.io/Font-Awesome/
|
||||
font-mfizz 2.3 MIT http://fizzed.com/oss/font-mfizz
|
||||
backgrid.js 0.3.5 MIT http://backgridjs.com/
|
||||
backbone.undo 0.2 MIT http://backbone.undojs.com/
|
||||
bootstrap-switch 3.3.2 MIT http://www.bootstrap-switch.org/
|
||||
select2 4.0.1 MIT https://select2.github.io/
|
||||
backgrid-filter 01b2b21 MIT https://github.com/wyuenho/backgrid-filter
|
||||
backbone.paginator 2.0.3 MIT http://github.com/backbone-paginator/backbone.paginator
|
||||
backgrid-paginator 03632df MIT https://github.com/wyuenho/backgrid-paginator
|
||||
backgrid-select-all 1a00053 MIT https://github.com/wyuenho/backgrid-select-all
|
||||
dropzone 4e20bd4 MIT https://github.com/enyo/dropzone
|
||||
Filemanager 7e060c2 MIT https://github.com/simogeo/Filemanager
|
||||
Unit (Length) d8e6237 MIT https://github.com/heygrady/Units/blob/master/Length.min.js
|
||||
Natural Sort 9565816 MIT https://github.com/javve/natural-sort/blob/master/index.js
|
||||
SlickGrid 2.3.7-8ff6814 MIT https://github.com/6pac/SlickGrid
|
||||
jQuery-UI 1.11.3 MIT https://jqueryui.com/
|
||||
BigNumber 3.0.1 MIT http://mikemcl.github.io/bignumber.js
|
@ -17,6 +17,7 @@ module.exports = function (config) {
|
||||
{pattern: 'pgadmin/browser/static/js/**/*.js', included: false},
|
||||
'regression/javascript/**/*.jsx',
|
||||
'regression/javascript/**/*.js',
|
||||
'pgadmin/static/bundle/slickgrid.js',
|
||||
],
|
||||
|
||||
// list of files to exclude
|
||||
@ -30,6 +31,7 @@ module.exports = function (config) {
|
||||
preprocessors: {
|
||||
'regression/javascript/**/*.js': ['webpack'],
|
||||
'regression/javascript/**/*.jsx': ['webpack'],
|
||||
'pgadmin/static/bundle/slickgrid.js': ['webpack'],
|
||||
},
|
||||
|
||||
webpack: webpackConfig,
|
||||
|
@ -4,6 +4,7 @@
|
||||
"babel-loader": "~6.4.1",
|
||||
"babel-preset-es2015": "~6.24.0",
|
||||
"babel-preset-react": "~6.23.0",
|
||||
"css-loader": "^0.28.4",
|
||||
"enzyme": "~2.8.2",
|
||||
"enzyme-matchers": "^3.1.0",
|
||||
"eslint": "^3.19.0",
|
||||
@ -19,7 +20,9 @@
|
||||
"karma-requirejs": "~1.1.0",
|
||||
"karma-sourcemap-loader": "~0.3.7",
|
||||
"karma-webpack": "~2.0.3",
|
||||
"raw-loader": "^0.5.1",
|
||||
"react-addons-test-utils": "~15.4.2",
|
||||
"style-loader": "^0.18.2",
|
||||
"webpack": "~2.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
@ -36,12 +39,13 @@
|
||||
"react": "file:../web/pgadmin/static/vendor/react",
|
||||
"react-dom": "file:../web/pgadmin/static/vendor/react-dom",
|
||||
"requirejs": "~2.3.3",
|
||||
"slickgrid": "git+https://github.com/6pac/SlickGrid.git#2.3.7",
|
||||
"underscore": "~1.8.3",
|
||||
"watchify": "~3.9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"linter": "yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js",
|
||||
"webpacker": "yarn run webpack -- --optimize-minimize --config webpack.config.js",
|
||||
"webpacker": "yarn run webpack -- --config webpack.config.js",
|
||||
"webpacker:dev": "yarn run webpack -- --config webpack.config.js",
|
||||
"bundle": "yarn run linter && yarn run webpacker",
|
||||
"bundle:dev": "yarn run linter && yarn run webpacker:dev",
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
import React from 'react';
|
||||
import {render} from 'react-dom';
|
||||
import QueryHistory from './history/query_history';
|
||||
import QueryHistory from '../jsx/history/query_history';
|
||||
|
||||
export {
|
||||
render,
|
13
web/pgadmin/static/bundle/slickgrid.js
Normal file
@ -0,0 +1,13 @@
|
||||
import 'slickgrid/slick.grid.css';
|
||||
import 'slickgrid/slick-default-theme.css';
|
||||
import 'slickgrid/css/smoothness/jquery-ui-1.11.3.custom.css';
|
||||
import 'slickgrid/slick.core';
|
||||
import 'slickgrid/slick.grid';
|
||||
import 'slickgrid/slick.editors';
|
||||
import 'slickgrid/slick.formatters';
|
||||
import 'slickgrid/plugins/slick.autotooltips';
|
||||
import 'slickgrid/plugins/slick.cellrangedecorator';
|
||||
import 'slickgrid/plugins/slick.cellrangeselector';
|
||||
import 'slickgrid/lib/jquery.event.drag-2.3.0';
|
||||
|
||||
export default window.Slick;
|
@ -2,10 +2,9 @@ define([
|
||||
'jquery',
|
||||
'underscore',
|
||||
'sources/selection/range_selection_helper',
|
||||
'sources/slickgrid/pgslick.cellrangeselector',
|
||||
|
||||
'slickgrid',
|
||||
], function ($, _, RangeSelectionHelper, PGCellRangeSelector) {
|
||||
], function ($, _, RangeSelectionHelper) {
|
||||
var XCellSelectionModel = function (options) {
|
||||
|
||||
var KEY_ARROW_RIGHT = 39;
|
||||
@ -17,7 +16,7 @@ define([
|
||||
var _grid;
|
||||
var _ranges = [];
|
||||
var _self = this;
|
||||
var _selector = new PGCellRangeSelector({
|
||||
var _selector = new Slick.CellRangeSelector({
|
||||
'selectionCss': {
|
||||
'border': '2px solid black',
|
||||
},
|
||||
|
@ -1,73 +0,0 @@
|
||||
define([
|
||||
'jquery',
|
||||
|
||||
'slickgrid',
|
||||
], function ($) {
|
||||
/***
|
||||
* Displays an overlay on top of a given cell range.
|
||||
*
|
||||
* TODO:
|
||||
* Currently, it blocks mouse events to DOM nodes behind it.
|
||||
* Use FF and WebKit-specific "pointer-events" CSS style, or some kind of event forwarding.
|
||||
* Could also construct the borders separately using 4 individual DIVs.
|
||||
*
|
||||
* @param {Grid} grid
|
||||
* @param {Object} options
|
||||
*/
|
||||
var PGCellRangeDecorator = function (grid, options) {
|
||||
var _elem;
|
||||
var _defaults = {
|
||||
selectionCssClass: 'slick-range-decorator',
|
||||
selectionCss: {
|
||||
"zIndex": "9999",
|
||||
"border": "2px dashed red"
|
||||
}
|
||||
};
|
||||
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
|
||||
|
||||
function show(range) {
|
||||
if (!_elem) {
|
||||
_elem = $("<div></div>", {css: options.selectionCss})
|
||||
.addClass(options.selectionCssClass)
|
||||
.css("position", "absolute")
|
||||
.appendTo(grid.getCanvasNode());
|
||||
}
|
||||
|
||||
var from = grid.getCellNodeBox(range.fromRow, range.fromCell);
|
||||
var to = grid.getCellNodeBox(range.toRow, range.toCell);
|
||||
|
||||
// TODO: This is the original Slickgrid code temporary fix to solve
|
||||
// pgAdmin alignment of the selection box on the bottom right corner
|
||||
// _elem.css({
|
||||
// top: from.top - 1,
|
||||
// left: from.left - 1,
|
||||
// height: to.bottom - from.top - 2,
|
||||
// width: to.right - from.left - 2
|
||||
// });
|
||||
|
||||
_elem.css({
|
||||
top: from.top - 1,
|
||||
left: from.left - 1,
|
||||
height: to.bottom - from.top + 2,
|
||||
width: to.right - from.left + 1
|
||||
});
|
||||
|
||||
return _elem;
|
||||
}
|
||||
|
||||
function hide() {
|
||||
if (_elem) {
|
||||
_elem.remove();
|
||||
_elem = null;
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"show": show,
|
||||
"hide": hide
|
||||
});
|
||||
};
|
||||
return PGCellRangeDecorator;
|
||||
});
|
@ -1,119 +0,0 @@
|
||||
define([
|
||||
'jquery',
|
||||
'sources/slickgrid/pgslick.cellrangedecorator',
|
||||
|
||||
'slickgrid',
|
||||
], function ($, PGCellRangeDecorator) {
|
||||
|
||||
var PGCellRangeSelector = function (options) {
|
||||
var _grid;
|
||||
var _canvas;
|
||||
var _currentlySelectedRange;
|
||||
var _dragging;
|
||||
var _decorator;
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _defaults = {
|
||||
selectionCss: {
|
||||
"border": "2px dashed blue"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function init(grid) {
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
_decorator = new PGCellRangeDecorator(grid, options);
|
||||
_grid = grid;
|
||||
_canvas = _grid.getCanvasNode();
|
||||
_handler
|
||||
.subscribe(_grid.onDragInit, handleDragInit)
|
||||
.subscribe(_grid.onDragStart, handleDragStart)
|
||||
.subscribe(_grid.onDrag, handleDrag)
|
||||
.subscribe(_grid.onDragEnd, handleDragEnd);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
}
|
||||
|
||||
function handleDragInit(e, dd) {
|
||||
// prevent the grid from cancelling drag'n'drop by default
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
function handleDragStart(e, dd) {
|
||||
var cell = _grid.getCellFromEvent(e);
|
||||
if (_self.onBeforeCellRangeSelected.notify(cell) !== false) {
|
||||
if (_grid.canCellBeSelected(cell.row, cell.cell)) {
|
||||
_dragging = true;
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
|
||||
_grid.focus();
|
||||
|
||||
var start = _grid.getCellFromPoint(
|
||||
dd.startX - $(_canvas).offset().left,
|
||||
dd.startY - $(_canvas).offset().top);
|
||||
|
||||
dd.range = {start: start, end: {}};
|
||||
_currentlySelectedRange = dd.range;
|
||||
return _decorator.show(new Slick.Range(start.row, start.cell));
|
||||
}
|
||||
|
||||
function handleDrag(e, dd) {
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
var end = _grid.getCellFromPoint(
|
||||
e.pageX - $(_canvas).offset().left,
|
||||
e.pageY - $(_canvas).offset().top);
|
||||
|
||||
if (!_grid.canCellBeSelected(end.row, end.cell)) {
|
||||
return;
|
||||
}
|
||||
|
||||
dd.range.end = end;
|
||||
_currentlySelectedRange = dd.range;
|
||||
_decorator.show(new Slick.Range(dd.range.start.row, dd.range.start.cell, end.row, end.cell));
|
||||
}
|
||||
|
||||
function handleDragEnd(e, dd) {
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
|
||||
_dragging = false;
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
_decorator.hide();
|
||||
_self.onCellRangeSelected.notify({
|
||||
range: new Slick.Range(
|
||||
dd.range.start.row,
|
||||
dd.range.start.cell,
|
||||
dd.range.end.row,
|
||||
dd.range.end.cell
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
function getCurrentRange() {
|
||||
return _currentlySelectedRange;
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
"getCurrentRange": getCurrentRange,
|
||||
|
||||
"onBeforeCellRangeSelected": new Slick.Event(),
|
||||
"onCellRangeSelected": new Slick.Event()
|
||||
});
|
||||
};
|
||||
return PGCellRangeSelector;
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
## This is the 6pac SlickGrid repo
|
||||
|
||||
This is the acknowledged most active non-customised fork of SlickGrid.
|
||||
|
||||
It aims to be a viable alternative master repo, building on the legacy of the mleibman/SlickGrid master branch, keeping libraries up to date and applying small, safe core patches and enhancements without turning into a personalised build.
|
||||
|
||||
Check out the [examples](https://github.com/6pac/SlickGrid/wiki/Examples) for examples demonstrating new features and use cases, such as dynamic grid creation and editors with third party controls.
|
||||
|
||||
Also check out the [wiki](https://github.com/6pac/SlickGrid/wiki) for news and documentation.
|
@ -1,31 +0,0 @@
|
||||
.slick-columnpicker {
|
||||
border: 1px solid #718BB7;
|
||||
background: #f0f0f0;
|
||||
padding: 6px;
|
||||
-moz-box-shadow: 2px 2px 2px silver;
|
||||
-webkit-box-shadow: 2px 2px 2px silver;
|
||||
box-shadow: 2px 2px 2px silver;
|
||||
min-width: 100px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.slick-columnpicker li {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.slick-columnpicker input {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.slick-columnpicker li a {
|
||||
display: block;
|
||||
padding: 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.slick-columnpicker li a:hover {
|
||||
background: white;
|
||||
}
|
@ -1,153 +0,0 @@
|
||||
(function ($) {
|
||||
function SlickColumnPicker(columns, grid, options) {
|
||||
var $menu;
|
||||
var columnCheckboxes;
|
||||
|
||||
var defaults = {
|
||||
fadeSpeed:250
|
||||
};
|
||||
|
||||
function init() {
|
||||
grid.onHeaderContextMenu.subscribe(handleHeaderContextMenu);
|
||||
grid.onColumnsReordered.subscribe(updateColumnOrder);
|
||||
options = $.extend({}, defaults, options);
|
||||
|
||||
$menu = $("<span class='slick-columnpicker' style='display:none;position:absolute;z-index:20;overflow-y:scroll;' />").appendTo(document.body);
|
||||
|
||||
$menu.on("mouseleave", function (e) {
|
||||
$(this).fadeOut(options.fadeSpeed)
|
||||
});
|
||||
$menu.on("click", updateColumn);
|
||||
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
grid.onHeaderContextMenu.unsubscribe(handleHeaderContextMenu);
|
||||
grid.onColumnsReordered.unsubscribe(updateColumnOrder);
|
||||
$menu.remove();
|
||||
}
|
||||
|
||||
function handleHeaderContextMenu(e, args) {
|
||||
e.preventDefault();
|
||||
$menu.empty();
|
||||
updateColumnOrder();
|
||||
columnCheckboxes = [];
|
||||
|
||||
var $li, $input;
|
||||
for (var i = 0; i < columns.length; i++) {
|
||||
$li = $("<li />").appendTo($menu);
|
||||
$input = $("<input type='checkbox' />").data("column-id", columns[i].id);
|
||||
columnCheckboxes.push($input);
|
||||
|
||||
if (grid.getColumnIndex(columns[i].id) != null) {
|
||||
$input.attr("checked", "checked");
|
||||
}
|
||||
|
||||
$("<label />")
|
||||
.html(columns[i].name)
|
||||
.prepend($input)
|
||||
.appendTo($li);
|
||||
}
|
||||
|
||||
$("<hr/>").appendTo($menu);
|
||||
$li = $("<li />").appendTo($menu);
|
||||
$input = $("<input type='checkbox' />").data("option", "autoresize");
|
||||
$("<label />")
|
||||
.text("Force fit columns")
|
||||
.prepend($input)
|
||||
.appendTo($li);
|
||||
if (grid.getOptions().forceFitColumns) {
|
||||
$input.attr("checked", "checked");
|
||||
}
|
||||
|
||||
$li = $("<li />").appendTo($menu);
|
||||
$input = $("<input type='checkbox' />").data("option", "syncresize");
|
||||
$("<label />")
|
||||
.text("Synchronous resize")
|
||||
.prepend($input)
|
||||
.appendTo($li);
|
||||
if (grid.getOptions().syncColumnCellResize) {
|
||||
$input.attr("checked", "checked");
|
||||
}
|
||||
|
||||
$menu
|
||||
.css("top", e.pageY - 10)
|
||||
.css("left", e.pageX - 10)
|
||||
.css("max-height", $(window).height() - e.pageY -10)
|
||||
.fadeIn(options.fadeSpeed);
|
||||
}
|
||||
|
||||
function updateColumnOrder() {
|
||||
// Because columns can be reordered, we have to update the `columns`
|
||||
// to reflect the new order, however we can't just take `grid.getColumns()`,
|
||||
// as it does not include columns currently hidden by the picker.
|
||||
// We create a new `columns` structure by leaving currently-hidden
|
||||
// columns in their original ordinal position and interleaving the results
|
||||
// of the current column sort.
|
||||
var current = grid.getColumns().slice(0);
|
||||
var ordered = new Array(columns.length);
|
||||
for (var i = 0; i < ordered.length; i++) {
|
||||
if ( grid.getColumnIndex(columns[i].id) === undefined ) {
|
||||
// If the column doesn't return a value from getColumnIndex,
|
||||
// it is hidden. Leave it in this position.
|
||||
ordered[i] = columns[i];
|
||||
} else {
|
||||
// Otherwise, grab the next visible column.
|
||||
ordered[i] = current.shift();
|
||||
}
|
||||
}
|
||||
columns = ordered;
|
||||
}
|
||||
|
||||
function updateColumn(e) {
|
||||
if ($(e.target).data("option") == "autoresize") {
|
||||
if (e.target.checked) {
|
||||
grid.setOptions({forceFitColumns:true});
|
||||
grid.autosizeColumns();
|
||||
} else {
|
||||
grid.setOptions({forceFitColumns:false});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ($(e.target).data("option") == "syncresize") {
|
||||
if (e.target.checked) {
|
||||
grid.setOptions({syncColumnCellResize:true});
|
||||
} else {
|
||||
grid.setOptions({syncColumnCellResize:false});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if ($(e.target).is(":checkbox")) {
|
||||
var visibleColumns = [];
|
||||
$.each(columnCheckboxes, function (i, e) {
|
||||
if ($(this).is(":checked")) {
|
||||
visibleColumns.push(columns[i]);
|
||||
}
|
||||
});
|
||||
|
||||
if (!visibleColumns.length) {
|
||||
$(e.target).attr("checked", "checked");
|
||||
return;
|
||||
}
|
||||
|
||||
grid.setColumns(visibleColumns);
|
||||
}
|
||||
}
|
||||
|
||||
function getAllColumns() {
|
||||
return columns;
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
return {
|
||||
"getAllColumns": getAllColumns,
|
||||
"destroy": destroy
|
||||
};
|
||||
}
|
||||
|
||||
// Slick.Controls.ColumnPicker
|
||||
$.extend(true, window, { Slick:{ Controls:{ ColumnPicker:SlickColumnPicker }}});
|
||||
})(jQuery);
|
@ -1,41 +0,0 @@
|
||||
.slick-pager {
|
||||
width: 100%;
|
||||
height: 26px;
|
||||
border: 1px solid gray;
|
||||
border-top: 0;
|
||||
background: url('../images/header-columns-bg.gif') repeat-x center bottom;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.slick-pager .slick-pager-status {
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.slick-pager .ui-icon-container {
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
border-color: gray;
|
||||
}
|
||||
|
||||
.slick-pager .slick-pager-nav {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.slick-pager .slick-pager-settings {
|
||||
display: block;
|
||||
float: right;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.slick-pager .slick-pager-settings * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.slick-pager .slick-pager-settings a {
|
||||
padding: 2px;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
@ -1,147 +0,0 @@
|
||||
(function ($) {
|
||||
function SlickGridPager(dataView, grid, $container) {
|
||||
var $status;
|
||||
|
||||
function init() {
|
||||
dataView.onPagingInfoChanged.subscribe(function (e, pagingInfo) {
|
||||
updatePager(pagingInfo);
|
||||
});
|
||||
|
||||
constructPagerUI();
|
||||
updatePager(dataView.getPagingInfo());
|
||||
}
|
||||
|
||||
function getNavState() {
|
||||
var cannotLeaveEditMode = !Slick.GlobalEditorLock.commitCurrentEdit();
|
||||
var pagingInfo = dataView.getPagingInfo();
|
||||
var lastPage = pagingInfo.totalPages - 1;
|
||||
|
||||
return {
|
||||
canGotoFirst: !cannotLeaveEditMode && pagingInfo.pageSize != 0 && pagingInfo.pageNum > 0,
|
||||
canGotoLast: !cannotLeaveEditMode && pagingInfo.pageSize != 0 && pagingInfo.pageNum != lastPage,
|
||||
canGotoPrev: !cannotLeaveEditMode && pagingInfo.pageSize != 0 && pagingInfo.pageNum > 0,
|
||||
canGotoNext: !cannotLeaveEditMode && pagingInfo.pageSize != 0 && pagingInfo.pageNum < lastPage,
|
||||
pagingInfo: pagingInfo
|
||||
}
|
||||
}
|
||||
|
||||
function setPageSize(n) {
|
||||
dataView.setRefreshHints({
|
||||
isFilterUnchanged: true
|
||||
});
|
||||
dataView.setPagingOptions({pageSize: n});
|
||||
}
|
||||
|
||||
function gotoFirst() {
|
||||
if (getNavState().canGotoFirst) {
|
||||
dataView.setPagingOptions({pageNum: 0});
|
||||
}
|
||||
}
|
||||
|
||||
function gotoLast() {
|
||||
var state = getNavState();
|
||||
if (state.canGotoLast) {
|
||||
dataView.setPagingOptions({pageNum: state.pagingInfo.totalPages - 1});
|
||||
}
|
||||
}
|
||||
|
||||
function gotoPrev() {
|
||||
var state = getNavState();
|
||||
if (state.canGotoPrev) {
|
||||
dataView.setPagingOptions({pageNum: state.pagingInfo.pageNum - 1});
|
||||
}
|
||||
}
|
||||
|
||||
function gotoNext() {
|
||||
var state = getNavState();
|
||||
if (state.canGotoNext) {
|
||||
dataView.setPagingOptions({pageNum: state.pagingInfo.pageNum + 1});
|
||||
}
|
||||
}
|
||||
|
||||
function constructPagerUI() {
|
||||
$container.empty();
|
||||
|
||||
var $nav = $("<span class='slick-pager-nav' />").appendTo($container);
|
||||
var $settings = $("<span class='slick-pager-settings' />").appendTo($container);
|
||||
$status = $("<span class='slick-pager-status' />").appendTo($container);
|
||||
|
||||
$settings
|
||||
.append("<span class='slick-pager-settings-expanded' style='display:none'>Show: <a data=0>All</a><a data='-1'>Auto</a><a data=25>25</a><a data=50>50</a><a data=100>100</a></span>");
|
||||
|
||||
$settings.find("a[data]").click(function (e) {
|
||||
var pagesize = $(e.target).attr("data");
|
||||
if (pagesize != undefined) {
|
||||
if (pagesize == -1) {
|
||||
var vp = grid.getViewport();
|
||||
setPageSize(vp.bottom - vp.top);
|
||||
} else {
|
||||
setPageSize(parseInt(pagesize));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var icon_prefix = "<span class='ui-state-default ui-corner-all ui-icon-container'><span class='ui-icon ";
|
||||
var icon_suffix = "' /></span>";
|
||||
|
||||
$(icon_prefix + "ui-icon-lightbulb" + icon_suffix)
|
||||
.click(function () {
|
||||
$(".slick-pager-settings-expanded").toggle()
|
||||
})
|
||||
.appendTo($settings);
|
||||
|
||||
$(icon_prefix + "ui-icon-seek-first" + icon_suffix)
|
||||
.click(gotoFirst)
|
||||
.appendTo($nav);
|
||||
|
||||
$(icon_prefix + "ui-icon-seek-prev" + icon_suffix)
|
||||
.click(gotoPrev)
|
||||
.appendTo($nav);
|
||||
|
||||
$(icon_prefix + "ui-icon-seek-next" + icon_suffix)
|
||||
.click(gotoNext)
|
||||
.appendTo($nav);
|
||||
|
||||
$(icon_prefix + "ui-icon-seek-end" + icon_suffix)
|
||||
.click(gotoLast)
|
||||
.appendTo($nav);
|
||||
|
||||
$container.find(".ui-icon-container")
|
||||
.hover(function () {
|
||||
$(this).toggleClass("ui-state-hover");
|
||||
});
|
||||
|
||||
$container.children().wrapAll("<div class='slick-pager' />");
|
||||
}
|
||||
|
||||
|
||||
function updatePager(pagingInfo) {
|
||||
var state = getNavState();
|
||||
|
||||
$container.find(".slick-pager-nav span").removeClass("ui-state-disabled");
|
||||
if (!state.canGotoFirst) {
|
||||
$container.find(".ui-icon-seek-first").addClass("ui-state-disabled");
|
||||
}
|
||||
if (!state.canGotoLast) {
|
||||
$container.find(".ui-icon-seek-end").addClass("ui-state-disabled");
|
||||
}
|
||||
if (!state.canGotoNext) {
|
||||
$container.find(".ui-icon-seek-next").addClass("ui-state-disabled");
|
||||
}
|
||||
if (!state.canGotoPrev) {
|
||||
$container.find(".ui-icon-seek-prev").addClass("ui-state-disabled");
|
||||
}
|
||||
|
||||
if (pagingInfo.pageSize == 0) {
|
||||
$status.text("Showing all " + pagingInfo.totalRows + " rows");
|
||||
} else {
|
||||
$status.text("Showing page " + (pagingInfo.pageNum + 1) + " of " + pagingInfo.totalPages);
|
||||
}
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
// Slick.Controls.Pager
|
||||
$.extend(true, window, { Slick:{ Controls:{ Pager:SlickGridPager }}});
|
||||
})(jQuery);
|
Before Width: | Height: | Size: 257 B |
Before Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 170 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 156 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 846 B |
Before Width: | Height: | Size: 257 B |
BIN
web/pgadmin/static/vendor/slickgrid/images/down.gif
vendored
Before Width: | Height: | Size: 59 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 872 B |
Before Width: | Height: | Size: 836 B |
Before Width: | Height: | Size: 823 B |
BIN
web/pgadmin/static/vendor/slickgrid/images/help.png
vendored
Before Width: | Height: | Size: 345 B |
BIN
web/pgadmin/static/vendor/slickgrid/images/info.gif
vendored
Before Width: | Height: | Size: 80 B |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 823 B |
Before Width: | Height: | Size: 830 B |
Before Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 833 B |
Before Width: | Height: | Size: 107 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 537 B |
BIN
web/pgadmin/static/vendor/slickgrid/images/tick.png
vendored
Before Width: | Height: | Size: 484 B |
Before Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 546 B |
@ -1,83 +0,0 @@
|
||||
(function ($) {
|
||||
// Register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"AutoTooltips": AutoTooltips
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* AutoTooltips plugin to show/hide tooltips when columns are too narrow to fit content.
|
||||
* @constructor
|
||||
* @param {boolean} [options.enableForCells=true] - Enable tooltip for grid cells
|
||||
* @param {boolean} [options.enableForHeaderCells=false] - Enable tooltip for header cells
|
||||
* @param {number} [options.maxToolTipLength=null] - The maximum length for a tooltip
|
||||
*/
|
||||
function AutoTooltips(options) {
|
||||
var _grid;
|
||||
var _self = this;
|
||||
var _defaults = {
|
||||
enableForCells: true,
|
||||
enableForHeaderCells: false,
|
||||
maxToolTipLength: null
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialize plugin.
|
||||
*/
|
||||
function init(grid) {
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
_grid = grid;
|
||||
if (options.enableForCells) _grid.onMouseEnter.subscribe(handleMouseEnter);
|
||||
if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.subscribe(handleHeaderMouseEnter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy plugin.
|
||||
*/
|
||||
function destroy() {
|
||||
if (options.enableForCells) _grid.onMouseEnter.unsubscribe(handleMouseEnter);
|
||||
if (options.enableForHeaderCells) _grid.onHeaderMouseEnter.unsubscribe(handleHeaderMouseEnter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle mouse entering grid cell to add/remove tooltip.
|
||||
* @param {jQuery.Event} e - The event
|
||||
*/
|
||||
function handleMouseEnter(e) {
|
||||
var cell = _grid.getCellFromEvent(e);
|
||||
if (cell) {
|
||||
var $node = $(_grid.getCellNode(cell.row, cell.cell));
|
||||
var text;
|
||||
if ($node.innerWidth() < $node[0].scrollWidth) {
|
||||
text = $.trim($node.text());
|
||||
if (options.maxToolTipLength && text.length > options.maxToolTipLength) {
|
||||
text = text.substr(0, options.maxToolTipLength - 3) + "...";
|
||||
}
|
||||
} else {
|
||||
text = "";
|
||||
}
|
||||
$node.attr("title", text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle mouse entering header cell to add/remove tooltip.
|
||||
* @param {jQuery.Event} e - The event
|
||||
* @param {object} args.column - The column definition
|
||||
*/
|
||||
function handleHeaderMouseEnter(e, args) {
|
||||
var column = args.column,
|
||||
$node = $(e.target).closest(".slick-header-column");
|
||||
if (column && !column.toolTip) {
|
||||
$node.attr("title", ($node.innerWidth() < $node[0].scrollWidth) ? column.name : "");
|
||||
}
|
||||
}
|
||||
|
||||
// Public API
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,88 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"CellCopyManager": CellCopyManager
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function CellCopyManager() {
|
||||
var _grid;
|
||||
var _self = this;
|
||||
var _copiedRanges;
|
||||
|
||||
function init(grid) {
|
||||
_grid = grid;
|
||||
_grid.onKeyDown.subscribe(handleKeyDown);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_grid.onKeyDown.unsubscribe(handleKeyDown);
|
||||
}
|
||||
|
||||
function handleKeyDown(e, args) {
|
||||
var ranges;
|
||||
if (!_grid.getEditorLock().isActive()) {
|
||||
if (e.which == $.ui.keyCode.ESCAPE) {
|
||||
if (_copiedRanges) {
|
||||
e.preventDefault();
|
||||
clearCopySelection();
|
||||
_self.onCopyCancelled.notify({ranges: _copiedRanges});
|
||||
_copiedRanges = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.which == 67 && (e.ctrlKey || e.metaKey)) {
|
||||
ranges = _grid.getSelectionModel().getSelectedRanges();
|
||||
if (ranges.length != 0) {
|
||||
e.preventDefault();
|
||||
_copiedRanges = ranges;
|
||||
markCopySelection(ranges);
|
||||
_self.onCopyCells.notify({ranges: ranges});
|
||||
}
|
||||
}
|
||||
|
||||
if (e.which == 86 && (e.ctrlKey || e.metaKey)) {
|
||||
if (_copiedRanges) {
|
||||
e.preventDefault();
|
||||
ranges = _grid.getSelectionModel().getSelectedRanges();
|
||||
_self.onPasteCells.notify({from: _copiedRanges, to: ranges});
|
||||
if (!_grid.getOptions().preserveCopiedSelectionOnPaste) {
|
||||
clearCopySelection();
|
||||
_copiedRanges = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function markCopySelection(ranges) {
|
||||
var columns = _grid.getColumns();
|
||||
var hash = {};
|
||||
for (var i = 0; i < ranges.length; i++) {
|
||||
for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
|
||||
hash[j] = {};
|
||||
for (var k = ranges[i].fromCell; k <= ranges[i].toCell; k++) {
|
||||
hash[j][columns[k].id] = "copied";
|
||||
}
|
||||
}
|
||||
}
|
||||
_grid.setCellCssStyles("copy-manager", hash);
|
||||
}
|
||||
|
||||
function clearCopySelection() {
|
||||
_grid.removeCellCssStyles("copy-manager");
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
"clearCopySelection": clearCopySelection,
|
||||
|
||||
"onCopyCells": new Slick.Event(),
|
||||
"onCopyCancelled": new Slick.Event(),
|
||||
"onPasteCells": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,449 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"CellExternalCopyManager": CellExternalCopyManager
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function CellExternalCopyManager(options) {
|
||||
/*
|
||||
This manager enables users to copy/paste data from/to an external Spreadsheet application
|
||||
such as MS-Excel® or OpenOffice-Spreadsheet.
|
||||
|
||||
Since it is not possible to access directly the clipboard in javascript, the plugin uses
|
||||
a trick to do it's job. After detecting the keystroke, we dynamically create a textarea
|
||||
where the browser copies/pastes the serialized data.
|
||||
|
||||
options:
|
||||
copiedCellStyle : sets the css className used for copied cells. default : "copied"
|
||||
copiedCellStyleLayerKey : sets the layer key for setting css values of copied cells. default : "copy-manager"
|
||||
dataItemColumnValueExtractor : option to specify a custom column value extractor function
|
||||
dataItemColumnValueSetter : option to specify a custom column value setter function
|
||||
clipboardCommandHandler : option to specify a custom handler for paste actions
|
||||
includeHeaderWhenCopying : set to true and the plugin will take the name property from each column (which is usually what appears in your header) and put that as the first row of the text that's copied to the clipboard
|
||||
bodyElement: option to specify a custom DOM element which to will be added the hidden textbox. It's useful if the grid is inside a modal dialog.
|
||||
onCopyInit: optional handler to run when copy action initializes
|
||||
onCopySuccess: optional handler to run when copy action is complete
|
||||
newRowCreator: function to add rows to table if paste overflows bottom of table
|
||||
readOnlyMode: suppresses paste
|
||||
*/
|
||||
var _grid;
|
||||
var _self = this;
|
||||
var _copiedRanges;
|
||||
var _options = options || {};
|
||||
var _copiedCellStyleLayerKey = _options.copiedCellStyleLayerKey || "copy-manager";
|
||||
var _copiedCellStyle = _options.copiedCellStyle || "copied";
|
||||
var _clearCopyTI = 0;
|
||||
var _bodyElement = _options.bodyElement || document.body;
|
||||
var _onCopyInit = _options.onCopyInit || null;
|
||||
var _onCopySuccess = _options.onCopySuccess || null;
|
||||
|
||||
var keyCodes = {
|
||||
'C': 67,
|
||||
'V': 86,
|
||||
'ESC': 27,
|
||||
'INSERT': 45
|
||||
};
|
||||
|
||||
function init(grid) {
|
||||
_grid = grid;
|
||||
_grid.onKeyDown.subscribe(handleKeyDown);
|
||||
|
||||
// we need a cell selection model
|
||||
var cellSelectionModel = grid.getSelectionModel();
|
||||
if (!cellSelectionModel){
|
||||
throw new Error("Selection model is mandatory for this plugin. Please set a selection model on the grid before adding this plugin: grid.setSelectionModel(new Slick.CellSelectionModel())");
|
||||
}
|
||||
// we give focus on the grid when a selection is done on it.
|
||||
// without this, if the user selects a range of cell without giving focus on a particular cell, the grid doesn't get the focus and key stroke handles (ctrl+c) don't work
|
||||
cellSelectionModel.onSelectedRangesChanged.subscribe(function(e, args){
|
||||
_grid.focus();
|
||||
});
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_grid.onKeyDown.unsubscribe(handleKeyDown);
|
||||
}
|
||||
|
||||
function getDataItemValueForColumn(item, columnDef) {
|
||||
if (_options.dataItemColumnValueExtractor) {
|
||||
var dataItemColumnValueExtractorValue = _options.dataItemColumnValueExtractor(item, columnDef);
|
||||
|
||||
if (dataItemColumnValueExtractorValue)
|
||||
return dataItemColumnValueExtractorValue;
|
||||
}
|
||||
|
||||
var retVal = '';
|
||||
|
||||
// if a custom getter is not defined, we call serializeValue of the editor to serialize
|
||||
if (columnDef.editor){
|
||||
var editorArgs = {
|
||||
'container':$("<p>"), // a dummy container
|
||||
'column':columnDef,
|
||||
'position':{'top':0, 'left':0}, // a dummy position required by some editors
|
||||
'grid':_grid
|
||||
};
|
||||
var editor = new columnDef.editor(editorArgs);
|
||||
editor.loadValue(item);
|
||||
retVal = editor.serializeValue();
|
||||
editor.destroy();
|
||||
}
|
||||
else {
|
||||
retVal = item[columnDef.field];
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
function setDataItemValueForColumn(item, columnDef, value) {
|
||||
if (_options.dataItemColumnValueSetter) {
|
||||
return _options.dataItemColumnValueSetter(item, columnDef, value);
|
||||
}
|
||||
|
||||
// if a custom setter is not defined, we call applyValue of the editor to unserialize
|
||||
if (columnDef.editor){
|
||||
var editorArgs = {
|
||||
'container':$("body"), // a dummy container
|
||||
'column':columnDef,
|
||||
'position':{'top':0, 'left':0}, // a dummy position required by some editors
|
||||
'grid':_grid
|
||||
};
|
||||
var editor = new columnDef.editor(editorArgs);
|
||||
editor.loadValue(item);
|
||||
editor.applyValue(item, value);
|
||||
editor.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function _createTextBox(innerText){
|
||||
var ta = document.createElement('textarea');
|
||||
ta.style.position = 'absolute';
|
||||
ta.style.left = '-1000px';
|
||||
ta.style.top = document.body.scrollTop + 'px';
|
||||
ta.value = innerText;
|
||||
_bodyElement.appendChild(ta);
|
||||
ta.select();
|
||||
|
||||
return ta;
|
||||
}
|
||||
|
||||
function _decodeTabularData(_grid, ta){
|
||||
var columns = _grid.getColumns();
|
||||
var clipText = ta.value;
|
||||
var clipRows = clipText.split(/[\n\f\r]/);
|
||||
// trim trailing CR if present
|
||||
if (clipRows[clipRows.length - 1]=="") { clipRows.pop(); }
|
||||
|
||||
var clippedRange = [];
|
||||
var j = 0;
|
||||
|
||||
_bodyElement.removeChild(ta);
|
||||
for (var i=0; i<clipRows.length; i++) {
|
||||
if (clipRows[i]!="")
|
||||
clippedRange[j++] = clipRows[i].split("\t");
|
||||
else
|
||||
clippedRange[i] = [""];
|
||||
}
|
||||
var selectedCell = _grid.getActiveCell();
|
||||
var ranges = _grid.getSelectionModel().getSelectedRanges();
|
||||
var selectedRange = ranges && ranges.length ? ranges[0] : null; // pick only one selection
|
||||
var activeRow = null;
|
||||
var activeCell = null;
|
||||
|
||||
if (selectedRange){
|
||||
activeRow = selectedRange.fromRow;
|
||||
activeCell = selectedRange.fromCell;
|
||||
} else if (selectedCell){
|
||||
activeRow = selectedCell.row;
|
||||
activeCell = selectedCell.cell;
|
||||
} else {
|
||||
// we don't know where to paste
|
||||
return;
|
||||
}
|
||||
|
||||
var oneCellToMultiple = false;
|
||||
var destH = clippedRange.length;
|
||||
var destW = clippedRange.length ? clippedRange[0].length : 0;
|
||||
if (clippedRange.length == 1 && clippedRange[0].length == 1 && selectedRange){
|
||||
oneCellToMultiple = true;
|
||||
destH = selectedRange.toRow - selectedRange.fromRow +1;
|
||||
destW = selectedRange.toCell - selectedRange.fromCell +1;
|
||||
}
|
||||
var availableRows = _grid.getData().length - activeRow;
|
||||
var addRows = 0;
|
||||
if(availableRows < destH)
|
||||
{
|
||||
var d = _grid.getData();
|
||||
for(addRows = 1; addRows <= destH - availableRows; addRows++)
|
||||
d.push({});
|
||||
_grid.setData(d);
|
||||
_grid.render();
|
||||
}
|
||||
|
||||
var overflowsBottomOfGrid = activeRow + destH > _grid.getDataLength();
|
||||
|
||||
if (_options.newRowCreator && overflowsBottomOfGrid) {
|
||||
|
||||
var newRowsNeeded = activeRow + destH - _grid.getDataLength();
|
||||
|
||||
_options.newRowCreator(newRowsNeeded);
|
||||
|
||||
}
|
||||
|
||||
var clipCommand = {
|
||||
|
||||
isClipboardCommand: true,
|
||||
clippedRange: clippedRange,
|
||||
oldValues: [],
|
||||
cellExternalCopyManager: _self,
|
||||
_options: _options,
|
||||
setDataItemValueForColumn: setDataItemValueForColumn,
|
||||
markCopySelection: markCopySelection,
|
||||
oneCellToMultiple: oneCellToMultiple,
|
||||
activeRow: activeRow,
|
||||
activeCell: activeCell,
|
||||
destH: destH,
|
||||
destW: destW,
|
||||
maxDestY: _grid.getDataLength(),
|
||||
maxDestX: _grid.getColumns().length,
|
||||
h: 0,
|
||||
w: 0,
|
||||
|
||||
execute: function() {
|
||||
this.h=0;
|
||||
for (var y = 0; y < this.destH; y++){
|
||||
this.oldValues[y] = [];
|
||||
this.w=0;
|
||||
this.h++;
|
||||
for (var x = 0; x < this.destW; x++){
|
||||
this.w++;
|
||||
var desty = activeRow + y;
|
||||
var destx = activeCell + x;
|
||||
|
||||
if (desty < this.maxDestY && destx < this.maxDestX ) {
|
||||
var nd = _grid.getCellNode(desty, destx);
|
||||
var dt = _grid.getDataItem(desty);
|
||||
this.oldValues[y][x] = dt[columns[destx]['field']];
|
||||
if (oneCellToMultiple)
|
||||
this.setDataItemValueForColumn(dt, columns[destx], clippedRange[0][0]);
|
||||
else
|
||||
this.setDataItemValueForColumn(dt, columns[destx], clippedRange[y] ? clippedRange[y][x] : '');
|
||||
_grid.updateCell(desty, destx);
|
||||
_grid.onCellChange.notify({
|
||||
row: desty,
|
||||
cell: destx,
|
||||
item: dt,
|
||||
grid: _grid
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var bRange = {
|
||||
'fromCell': activeCell,
|
||||
'fromRow': activeRow,
|
||||
'toCell': activeCell+this.w-1,
|
||||
'toRow': activeRow+this.h-1
|
||||
}
|
||||
|
||||
this.markCopySelection([bRange]);
|
||||
_grid.getSelectionModel().setSelectedRanges([bRange]);
|
||||
this.cellExternalCopyManager.onPasteCells.notify({ranges: [bRange]});
|
||||
},
|
||||
|
||||
undo: function() {
|
||||
for (var y = 0; y < this.destH; y++){
|
||||
for (var x = 0; x < this.destW; x++){
|
||||
var desty = activeRow + y;
|
||||
var destx = activeCell + x;
|
||||
|
||||
if (desty < this.maxDestY && destx < this.maxDestX ) {
|
||||
var nd = _grid.getCellNode(desty, destx);
|
||||
var dt = _grid.getDataItem(desty);
|
||||
if (oneCellToMultiple)
|
||||
this.setDataItemValueForColumn(dt, columns[destx], this.oldValues[0][0]);
|
||||
else
|
||||
this.setDataItemValueForColumn(dt, columns[destx], this.oldValues[y][x]);
|
||||
_grid.updateCell(desty, destx);
|
||||
_grid.onCellChange.notify({
|
||||
row: desty,
|
||||
cell: destx,
|
||||
item: dt,
|
||||
grid: _grid
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var bRange = {
|
||||
'fromCell': activeCell,
|
||||
'fromRow': activeRow,
|
||||
'toCell': activeCell+this.w-1,
|
||||
'toRow': activeRow+this.h-1
|
||||
}
|
||||
|
||||
this.markCopySelection([bRange]);
|
||||
_grid.getSelectionModel().setSelectedRanges([bRange]);
|
||||
this.cellExternalCopyManager.onPasteCells.notify({ranges: [bRange]});
|
||||
|
||||
if(addRows > 1){
|
||||
var d = _grid.getData();
|
||||
for(; addRows > 1; addRows--)
|
||||
d.splice(d.length - 1, 1);
|
||||
_grid.setData(d);
|
||||
_grid.render();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if(_options.clipboardCommandHandler) {
|
||||
_options.clipboardCommandHandler(clipCommand);
|
||||
}
|
||||
else {
|
||||
clipCommand.execute();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function handleKeyDown(e, args) {
|
||||
var ranges;
|
||||
if (!_grid.getEditorLock().isActive() || _grid.getOptions().autoEdit) {
|
||||
if (e.which == keyCodes.ESC) {
|
||||
if (_copiedRanges) {
|
||||
e.preventDefault();
|
||||
clearCopySelection();
|
||||
_self.onCopyCancelled.notify({ranges: _copiedRanges});
|
||||
_copiedRanges = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ((e.which === keyCodes.C || e.which === keyCodes.INSERT) && (e.ctrlKey || e.metaKey) && !e.shiftKey) { // CTRL+C or CTRL+INS
|
||||
if (_onCopyInit) {
|
||||
_onCopyInit.call();
|
||||
}
|
||||
ranges = _grid.getSelectionModel().getSelectedRanges();
|
||||
if (ranges.length != 0) {
|
||||
_copiedRanges = ranges;
|
||||
markCopySelection(ranges);
|
||||
_self.onCopyCells.notify({ranges: ranges});
|
||||
|
||||
var columns = _grid.getColumns();
|
||||
var clipText = "";
|
||||
|
||||
for (var rg = 0; rg < ranges.length; rg++){
|
||||
var range = ranges[rg];
|
||||
var clipTextRows = [];
|
||||
for (var i=range.fromRow; i< range.toRow+1 ; i++){
|
||||
var clipTextCells = [];
|
||||
var dt = _grid.getDataItem(i);
|
||||
|
||||
if (clipTextRows == "" && _options.includeHeaderWhenCopying) {
|
||||
var clipTextHeaders = [];
|
||||
for (var j = range.fromCell; j < range.toCell + 1 ; j++) {
|
||||
if (columns[j].name.length > 0)
|
||||
clipTextHeaders.push(columns[j].name);
|
||||
}
|
||||
clipTextRows.push(clipTextHeaders.join("\t"));
|
||||
}
|
||||
|
||||
for (var j=range.fromCell; j< range.toCell+1 ; j++){
|
||||
clipTextCells.push(getDataItemValueForColumn(dt, columns[j]));
|
||||
}
|
||||
clipTextRows.push(clipTextCells.join("\t"));
|
||||
}
|
||||
clipText += clipTextRows.join("\r\n") + "\r\n";
|
||||
}
|
||||
|
||||
if(window.clipboardData) {
|
||||
window.clipboardData.setData("Text", clipText);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
var focusEl = document.activeElement;
|
||||
|
||||
var ta = _createTextBox(clipText);
|
||||
|
||||
ta.focus();
|
||||
|
||||
setTimeout(function(){
|
||||
_bodyElement.removeChild(ta);
|
||||
// restore focus
|
||||
if (focusEl)
|
||||
focusEl.focus();
|
||||
else
|
||||
console.log("Not element to restore focus to after copy?");
|
||||
|
||||
}, 100);
|
||||
|
||||
if (_onCopySuccess) {
|
||||
var rowCount = 0;
|
||||
// If it's cell selection, use the toRow/fromRow fields
|
||||
if (ranges.length === 1) {
|
||||
rowCount = (ranges[0].toRow + 1) - ranges[0].fromRow;
|
||||
}
|
||||
else {
|
||||
rowCount = ranges.length;
|
||||
}
|
||||
_onCopySuccess.call(this, rowCount);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!_options.readOnlyMode && (
|
||||
(e.which === keyCodes.V && (e.ctrlKey || e.metaKey) && !e.shiftKey)
|
||||
|| (e.which === keyCodes.INSERT && e.shiftKey && !e.ctrlKey)
|
||||
)) { // CTRL+V or Shift+INS
|
||||
var ta = _createTextBox('');
|
||||
|
||||
setTimeout(function(){
|
||||
_decodeTabularData(_grid, ta);
|
||||
}, 100);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function markCopySelection(ranges) {
|
||||
clearCopySelection();
|
||||
|
||||
var columns = _grid.getColumns();
|
||||
var hash = {};
|
||||
for (var i = 0; i < ranges.length; i++) {
|
||||
for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
|
||||
hash[j] = {};
|
||||
for (var k = ranges[i].fromCell; k <= ranges[i].toCell && k<columns.length; k++) {
|
||||
hash[j][columns[k].id] = _copiedCellStyle;
|
||||
}
|
||||
}
|
||||
}
|
||||
_grid.setCellCssStyles(_copiedCellStyleLayerKey, hash);
|
||||
clearTimeout(_clearCopyTI);
|
||||
_clearCopyTI = setTimeout(function(){
|
||||
_self.clearCopySelection();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function clearCopySelection() {
|
||||
_grid.removeCellCssStyles(_copiedCellStyleLayerKey);
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
"clearCopySelection": clearCopySelection,
|
||||
"handleKeyDown":handleKeyDown,
|
||||
|
||||
"onCopyCells": new Slick.Event(),
|
||||
"onCopyCancelled": new Slick.Event(),
|
||||
"onPasteCells": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,66 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"CellRangeDecorator": CellRangeDecorator
|
||||
}
|
||||
});
|
||||
|
||||
/***
|
||||
* Displays an overlay on top of a given cell range.
|
||||
*
|
||||
* TODO:
|
||||
* Currently, it blocks mouse events to DOM nodes behind it.
|
||||
* Use FF and WebKit-specific "pointer-events" CSS style, or some kind of event forwarding.
|
||||
* Could also construct the borders separately using 4 individual DIVs.
|
||||
*
|
||||
* @param {Grid} grid
|
||||
* @param {Object} options
|
||||
*/
|
||||
function CellRangeDecorator(grid, options) {
|
||||
var _elem;
|
||||
var _defaults = {
|
||||
selectionCssClass: 'slick-range-decorator',
|
||||
selectionCss: {
|
||||
"zIndex": "9999",
|
||||
"border": "2px dashed red"
|
||||
}
|
||||
};
|
||||
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
|
||||
|
||||
function show(range) {
|
||||
if (!_elem) {
|
||||
_elem = $("<div></div>", {css: options.selectionCss})
|
||||
.addClass(options.selectionCssClass)
|
||||
.css("position", "absolute")
|
||||
.appendTo(grid.getCanvasNode());
|
||||
}
|
||||
|
||||
var from = grid.getCellNodeBox(range.fromRow, range.fromCell);
|
||||
var to = grid.getCellNodeBox(range.toRow, range.toCell);
|
||||
|
||||
_elem.css({
|
||||
top: from.top - 1,
|
||||
left: from.left - 1,
|
||||
height: to.bottom - from.top - 2,
|
||||
width: to.right - from.left - 2
|
||||
});
|
||||
|
||||
return _elem;
|
||||
}
|
||||
|
||||
function hide() {
|
||||
if (_elem) {
|
||||
_elem.remove();
|
||||
_elem = null;
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"show": show,
|
||||
"hide": hide
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,120 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"CellRangeSelector": CellRangeSelector
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function CellRangeSelector(options) {
|
||||
var _grid;
|
||||
var _canvas;
|
||||
var _currentlySelectedRange;
|
||||
var _dragging;
|
||||
var _decorator;
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _defaults = {
|
||||
selectionCss: {
|
||||
"border": "2px dashed blue"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function init(grid) {
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
_decorator = new Slick.CellRangeDecorator(grid, options);
|
||||
_grid = grid;
|
||||
_canvas = _grid.getCanvasNode();
|
||||
_handler
|
||||
.subscribe(_grid.onDragInit, handleDragInit)
|
||||
.subscribe(_grid.onDragStart, handleDragStart)
|
||||
.subscribe(_grid.onDrag, handleDrag)
|
||||
.subscribe(_grid.onDragEnd, handleDragEnd);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
}
|
||||
|
||||
function handleDragInit(e, dd) {
|
||||
// prevent the grid from cancelling drag'n'drop by default
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
function handleDragStart(e, dd) {
|
||||
var cell = _grid.getCellFromEvent(e);
|
||||
if (_self.onBeforeCellRangeSelected.notify(cell) !== false) {
|
||||
if (_grid.canCellBeSelected(cell.row, cell.cell)) {
|
||||
_dragging = true;
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
|
||||
_grid.focus();
|
||||
|
||||
var start = _grid.getCellFromPoint(
|
||||
dd.startX - $(_canvas).offset().left,
|
||||
dd.startY - $(_canvas).offset().top);
|
||||
|
||||
dd.range = {start: start, end: {}};
|
||||
_currentlySelectedRange = dd.range;
|
||||
return _decorator.show(new Slick.Range(start.row, start.cell));
|
||||
}
|
||||
|
||||
function handleDrag(e, dd) {
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
var end = _grid.getCellFromPoint(
|
||||
e.pageX - $(_canvas).offset().left,
|
||||
e.pageY - $(_canvas).offset().top);
|
||||
|
||||
if (!_grid.canCellBeSelected(end.row, end.cell)) {
|
||||
return;
|
||||
}
|
||||
|
||||
dd.range.end = end;
|
||||
_currentlySelectedRange = dd.range;
|
||||
_decorator.show(new Slick.Range(dd.range.start.row, dd.range.start.cell, end.row, end.cell));
|
||||
}
|
||||
|
||||
function handleDragEnd(e, dd) {
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
|
||||
_dragging = false;
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
_decorator.hide();
|
||||
_self.onCellRangeSelected.notify({
|
||||
range: new Slick.Range(
|
||||
dd.range.start.row,
|
||||
dd.range.start.cell,
|
||||
dd.range.end.row,
|
||||
dd.range.end.cell
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
function getCurrentRange() {
|
||||
return _currentlySelectedRange;
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
"getCurrentRange": getCurrentRange,
|
||||
|
||||
"onBeforeCellRangeSelected": new Slick.Event(),
|
||||
"onCellRangeSelected": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,159 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"CellSelectionModel": CellSelectionModel
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function CellSelectionModel(options) {
|
||||
var _grid;
|
||||
var _canvas;
|
||||
var _ranges = [];
|
||||
var _self = this;
|
||||
var _selector = new Slick.CellRangeSelector({
|
||||
"selectionCss": {
|
||||
"border": "2px solid black"
|
||||
}
|
||||
});
|
||||
var _options;
|
||||
var _defaults = {
|
||||
selectActiveCell: true
|
||||
};
|
||||
|
||||
|
||||
function init(grid) {
|
||||
_options = $.extend(true, {}, _defaults, options);
|
||||
_grid = grid;
|
||||
_canvas = _grid.getCanvasNode();
|
||||
_grid.onActiveCellChanged.subscribe(handleActiveCellChange);
|
||||
_grid.onKeyDown.subscribe(handleKeyDown);
|
||||
grid.registerPlugin(_selector);
|
||||
_selector.onCellRangeSelected.subscribe(handleCellRangeSelected);
|
||||
_selector.onBeforeCellRangeSelected.subscribe(handleBeforeCellRangeSelected);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_grid.onActiveCellChanged.unsubscribe(handleActiveCellChange);
|
||||
_grid.onKeyDown.unsubscribe(handleKeyDown);
|
||||
_selector.onCellRangeSelected.unsubscribe(handleCellRangeSelected);
|
||||
_selector.onBeforeCellRangeSelected.unsubscribe(handleBeforeCellRangeSelected);
|
||||
_grid.unregisterPlugin(_selector);
|
||||
}
|
||||
|
||||
function removeInvalidRanges(ranges) {
|
||||
var result = [];
|
||||
|
||||
for (var i = 0; i < ranges.length; i++) {
|
||||
var r = ranges[i];
|
||||
if (_grid.canCellBeSelected(r.fromRow, r.fromCell) && _grid.canCellBeSelected(r.toRow, r.toCell)) {
|
||||
result.push(r);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function setSelectedRanges(ranges) {
|
||||
// simple check for: empty selection didn't change, prevent firing onSelectedRangesChanged
|
||||
if ((!_ranges || _ranges.length === 0) && (!ranges || ranges.length === 0)) { return; }
|
||||
|
||||
_ranges = removeInvalidRanges(ranges);
|
||||
_self.onSelectedRangesChanged.notify(_ranges);
|
||||
}
|
||||
|
||||
function getSelectedRanges() {
|
||||
return _ranges;
|
||||
}
|
||||
|
||||
function handleBeforeCellRangeSelected(e, args) {
|
||||
if (_grid.getEditorLock().isActive()) {
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function handleCellRangeSelected(e, args) {
|
||||
_grid.setActiveCell(args.range.fromRow, args.range.fromCell, false, false, true);
|
||||
setSelectedRanges([args.range]);
|
||||
}
|
||||
|
||||
function handleActiveCellChange(e, args) {
|
||||
if (_options.selectActiveCell && args.row != null && args.cell != null) {
|
||||
setSelectedRanges([new Slick.Range(args.row, args.cell)]);
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyDown(e) {
|
||||
/***
|
||||
* Кey codes
|
||||
* 37 left
|
||||
* 38 up
|
||||
* 39 right
|
||||
* 40 down
|
||||
*/
|
||||
var ranges, last;
|
||||
var active = _grid.getActiveCell();
|
||||
var metaKey = e.ctrlKey || e.metaKey;
|
||||
|
||||
if ( active && e.shiftKey && !metaKey && !e.altKey &&
|
||||
(e.which == 37 || e.which == 39 || e.which == 38 || e.which == 40) ) {
|
||||
|
||||
ranges = getSelectedRanges();
|
||||
if (!ranges.length)
|
||||
ranges.push(new Slick.Range(active.row, active.cell));
|
||||
|
||||
// keyboard can work with last range only
|
||||
last = ranges.pop();
|
||||
|
||||
// can't handle selection out of active cell
|
||||
if (!last.contains(active.row, active.cell))
|
||||
last = new Slick.Range(active.row, active.cell);
|
||||
|
||||
var dRow = last.toRow - last.fromRow,
|
||||
dCell = last.toCell - last.fromCell,
|
||||
// walking direction
|
||||
dirRow = active.row == last.fromRow ? 1 : -1,
|
||||
dirCell = active.cell == last.fromCell ? 1 : -1;
|
||||
|
||||
if (e.which == 37) {
|
||||
dCell -= dirCell;
|
||||
} else if (e.which == 39) {
|
||||
dCell += dirCell ;
|
||||
} else if (e.which == 38) {
|
||||
dRow -= dirRow;
|
||||
} else if (e.which == 40) {
|
||||
dRow += dirRow;
|
||||
}
|
||||
|
||||
// define new selection range
|
||||
var new_last = new Slick.Range(active.row, active.cell, active.row + dirRow*dRow, active.cell + dirCell*dCell);
|
||||
if (removeInvalidRanges([new_last]).length) {
|
||||
ranges.push(new_last);
|
||||
var viewRow = dirRow > 0 ? new_last.toRow : new_last.fromRow;
|
||||
var viewCell = dirCell > 0 ? new_last.toCell : new_last.fromCell;
|
||||
_grid.scrollRowIntoView(viewRow);
|
||||
_grid.scrollCellIntoView(viewRow, viewCell);
|
||||
}
|
||||
else
|
||||
ranges.push(last);
|
||||
|
||||
setSelectedRanges(ranges);
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"getSelectedRanges": getSelectedRanges,
|
||||
"setSelectedRanges": setSelectedRanges,
|
||||
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
|
||||
"onSelectedRangesChanged": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,153 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"CheckboxSelectColumn": CheckboxSelectColumn
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function CheckboxSelectColumn(options) {
|
||||
var _grid;
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _selectedRowsLookup = {};
|
||||
var _defaults = {
|
||||
columnId: "_checkbox_selector",
|
||||
cssClass: null,
|
||||
toolTip: "Select/Deselect All",
|
||||
width: 30
|
||||
};
|
||||
|
||||
var _options = $.extend(true, {}, _defaults, options);
|
||||
|
||||
function init(grid) {
|
||||
_grid = grid;
|
||||
_handler
|
||||
.subscribe(_grid.onSelectedRowsChanged, handleSelectedRowsChanged)
|
||||
.subscribe(_grid.onClick, handleClick)
|
||||
.subscribe(_grid.onHeaderClick, handleHeaderClick)
|
||||
.subscribe(_grid.onKeyDown, handleKeyDown);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
}
|
||||
|
||||
function handleSelectedRowsChanged(e, args) {
|
||||
var selectedRows = _grid.getSelectedRows();
|
||||
var lookup = {}, row, i;
|
||||
for (i = 0; i < selectedRows.length; i++) {
|
||||
row = selectedRows[i];
|
||||
lookup[row] = true;
|
||||
if (lookup[row] !== _selectedRowsLookup[row]) {
|
||||
_grid.invalidateRow(row);
|
||||
delete _selectedRowsLookup[row];
|
||||
}
|
||||
}
|
||||
for (i in _selectedRowsLookup) {
|
||||
_grid.invalidateRow(i);
|
||||
}
|
||||
_selectedRowsLookup = lookup;
|
||||
_grid.render();
|
||||
|
||||
if (selectedRows.length && selectedRows.length == _grid.getDataLength()) {
|
||||
_grid.updateColumnHeader(_options.columnId, "<input type='checkbox' checked='checked'>", _options.toolTip);
|
||||
} else {
|
||||
_grid.updateColumnHeader(_options.columnId, "<input type='checkbox'>", _options.toolTip);
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyDown(e, args) {
|
||||
if (e.which == 32) {
|
||||
if (_grid.getColumns()[args.cell].id === _options.columnId) {
|
||||
// if editing, try to commit
|
||||
if (!_grid.getEditorLock().isActive() || _grid.getEditorLock().commitCurrentEdit()) {
|
||||
toggleRowSelection(args.row);
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(e, args) {
|
||||
// clicking on a row select checkbox
|
||||
if (_grid.getColumns()[args.cell].id === _options.columnId && $(e.target).is(":checkbox")) {
|
||||
// if editing, try to commit
|
||||
if (_grid.getEditorLock().isActive() && !_grid.getEditorLock().commitCurrentEdit()) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
toggleRowSelection(args.row);
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
|
||||
function toggleRowSelection(row) {
|
||||
if (_selectedRowsLookup[row]) {
|
||||
_grid.setSelectedRows($.grep(_grid.getSelectedRows(), function (n) {
|
||||
return n != row
|
||||
}));
|
||||
} else {
|
||||
_grid.setSelectedRows(_grid.getSelectedRows().concat(row));
|
||||
}
|
||||
}
|
||||
|
||||
function handleHeaderClick(e, args) {
|
||||
if (args.column.id == _options.columnId && $(e.target).is(":checkbox")) {
|
||||
// if editing, try to commit
|
||||
if (_grid.getEditorLock().isActive() && !_grid.getEditorLock().commitCurrentEdit()) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
return;
|
||||
}
|
||||
|
||||
if ($(e.target).is(":checked")) {
|
||||
var rows = [];
|
||||
for (var i = 0; i < _grid.getDataLength(); i++) {
|
||||
rows.push(i);
|
||||
}
|
||||
_grid.setSelectedRows(rows);
|
||||
} else {
|
||||
_grid.setSelectedRows([]);
|
||||
}
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
}
|
||||
|
||||
function getColumnDefinition() {
|
||||
return {
|
||||
id: _options.columnId,
|
||||
name: "<input type='checkbox'>",
|
||||
toolTip: _options.toolTip,
|
||||
field: "sel",
|
||||
width: _options.width,
|
||||
resizable: false,
|
||||
sortable: false,
|
||||
cssClass: _options.cssClass,
|
||||
formatter: checkboxSelectionFormatter
|
||||
};
|
||||
}
|
||||
|
||||
function checkboxSelectionFormatter(row, cell, value, columnDef, dataContext) {
|
||||
if (dataContext) {
|
||||
return _selectedRowsLookup[row]
|
||||
? "<input type='checkbox' checked='checked'>"
|
||||
: "<input type='checkbox'>";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
|
||||
"getColumnDefinition": getColumnDefinition
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,39 +0,0 @@
|
||||
.slick-column-name,
|
||||
.slick-sort-indicator {
|
||||
/**
|
||||
* This makes all "float:right" elements after it that spill over to the next line
|
||||
* display way below the lower boundary of the column thus hiding them.
|
||||
*/
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.slick-header-button {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
vertical-align: top;
|
||||
margin: 1px;
|
||||
/**
|
||||
* This makes all "float:right" elements after it that spill over to the next line
|
||||
* display way below the lower boundary of the column thus hiding them.
|
||||
*/
|
||||
margin-bottom: 100px;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.slick-header-button-hidden {
|
||||
width: 0;
|
||||
|
||||
-webkit-transition: 0.2s width;
|
||||
-ms-transition: 0.2s width;
|
||||
transition: 0.2s width;
|
||||
}
|
||||
|
||||
.slick-header-column:hover > .slick-header-button {
|
||||
width: 15px;
|
||||
}
|
@ -1,177 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"Plugins": {
|
||||
"HeaderButtons": HeaderButtons
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***
|
||||
* A plugin to add custom buttons to column headers.
|
||||
*
|
||||
* USAGE:
|
||||
*
|
||||
* Add the plugin .js & .css files and register it with the grid.
|
||||
*
|
||||
* To specify a custom button in a column header, extend the column definition like so:
|
||||
*
|
||||
* var columns = [
|
||||
* {
|
||||
* id: 'myColumn',
|
||||
* name: 'My column',
|
||||
*
|
||||
* // This is the relevant part
|
||||
* header: {
|
||||
* buttons: [
|
||||
* {
|
||||
* // button options
|
||||
* },
|
||||
* {
|
||||
* // button options
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* }
|
||||
* ];
|
||||
*
|
||||
* Available button options:
|
||||
* cssClass: CSS class to add to the button.
|
||||
* image: Relative button image path.
|
||||
* tooltip: Button tooltip.
|
||||
* showOnHover: Only show the button on hover.
|
||||
* handler: Button click handler.
|
||||
* command: A command identifier to be passed to the onCommand event handlers.
|
||||
*
|
||||
* The plugin exposes the following events:
|
||||
* onCommand: Fired on button click for buttons with 'command' specified.
|
||||
* Event args:
|
||||
* grid: Reference to the grid.
|
||||
* column: Column definition.
|
||||
* command: Button command identified.
|
||||
* button: Button options. Note that you can change the button options in your
|
||||
* event handler, and the column header will be automatically updated to
|
||||
* reflect them. This is useful if you want to implement something like a
|
||||
* toggle button.
|
||||
*
|
||||
*
|
||||
* @param options {Object} Options:
|
||||
* buttonCssClass: a CSS class to use for buttons (default 'slick-header-button')
|
||||
* @class Slick.Plugins.HeaderButtons
|
||||
* @constructor
|
||||
*/
|
||||
function HeaderButtons(options) {
|
||||
var _grid;
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _defaults = {
|
||||
buttonCssClass: "slick-header-button"
|
||||
};
|
||||
|
||||
|
||||
function init(grid) {
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
_grid = grid;
|
||||
_handler
|
||||
.subscribe(_grid.onHeaderCellRendered, handleHeaderCellRendered)
|
||||
.subscribe(_grid.onBeforeHeaderCellDestroy, handleBeforeHeaderCellDestroy);
|
||||
|
||||
// Force the grid to re-render the header now that the events are hooked up.
|
||||
_grid.setColumns(_grid.getColumns());
|
||||
}
|
||||
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
}
|
||||
|
||||
|
||||
function handleHeaderCellRendered(e, args) {
|
||||
var column = args.column;
|
||||
|
||||
if (column.header && column.header.buttons) {
|
||||
// Append buttons in reverse order since they are floated to the right.
|
||||
var i = column.header.buttons.length;
|
||||
while (i--) {
|
||||
var button = column.header.buttons[i];
|
||||
var btn = $("<div></div>")
|
||||
.addClass(options.buttonCssClass)
|
||||
.data("column", column)
|
||||
.data("button", button);
|
||||
|
||||
if (button.showOnHover) {
|
||||
btn.addClass("slick-header-button-hidden");
|
||||
}
|
||||
|
||||
if (button.image) {
|
||||
btn.css("backgroundImage", "url(" + button.image + ")");
|
||||
}
|
||||
|
||||
if (button.cssClass) {
|
||||
btn.addClass(button.cssClass);
|
||||
}
|
||||
|
||||
if (button.tooltip) {
|
||||
btn.attr("title", button.tooltip);
|
||||
}
|
||||
|
||||
if (button.command) {
|
||||
btn.data("command", button.command);
|
||||
}
|
||||
|
||||
if (button.handler) {
|
||||
btn.on("click", button.handler);
|
||||
}
|
||||
|
||||
btn
|
||||
.on("click", handleButtonClick)
|
||||
.appendTo(args.node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function handleBeforeHeaderCellDestroy(e, args) {
|
||||
var column = args.column;
|
||||
|
||||
if (column.header && column.header.buttons) {
|
||||
// Removing buttons via jQuery will also clean up any event handlers and data.
|
||||
// NOTE: If you attach event handlers directly or using a different framework,
|
||||
// you must also clean them up here to avoid memory leaks.
|
||||
$(args.node).find("." + options.buttonCssClass).remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function handleButtonClick(e) {
|
||||
var command = $(this).data("command");
|
||||
var columnDef = $(this).data("column");
|
||||
var button = $(this).data("button");
|
||||
|
||||
if (command != null) {
|
||||
_self.onCommand.notify({
|
||||
"grid": _grid,
|
||||
"column": columnDef,
|
||||
"command": command,
|
||||
"button": button
|
||||
}, e, _self);
|
||||
|
||||
// Update the header in case the user updated the button definition in the handler.
|
||||
_grid.updateColumnHeader(columnDef.id);
|
||||
}
|
||||
|
||||
// Stop propagation so that it doesn't register as a header click event.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
|
||||
"onCommand": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,59 +0,0 @@
|
||||
/* Menu button */
|
||||
.slick-header-menubutton {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 14px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
background-image: url(../images/down.gif);
|
||||
cursor: pointer;
|
||||
|
||||
display: none;
|
||||
border-left: thin ridge silver;
|
||||
}
|
||||
|
||||
.slick-header-column:hover > .slick-header-menubutton,
|
||||
.slick-header-column-active .slick-header-menubutton {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
.slick-header-menu {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
/* Menu items */
|
||||
.slick-header-menuitem {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.slick-header-menuicon {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
.slick-header-menucontent {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
/* Disabled */
|
||||
.slick-header-menuitem-disabled {
|
||||
color: silver;
|
||||
}
|
@ -1,275 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"Plugins": {
|
||||
"HeaderMenu": HeaderMenu
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***
|
||||
* A plugin to add drop-down menus to column headers.
|
||||
*
|
||||
* USAGE:
|
||||
*
|
||||
* Add the plugin .js & .css files and register it with the grid.
|
||||
*
|
||||
* To specify a menu in a column header, extend the column definition like so:
|
||||
*
|
||||
* var columns = [
|
||||
* {
|
||||
* id: 'myColumn',
|
||||
* name: 'My column',
|
||||
*
|
||||
* // This is the relevant part
|
||||
* header: {
|
||||
* menu: {
|
||||
* items: [
|
||||
* {
|
||||
* // menu item options
|
||||
* },
|
||||
* {
|
||||
* // menu item options
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* ];
|
||||
*
|
||||
*
|
||||
* Available menu options:
|
||||
* tooltip: Menu button tooltip.
|
||||
*
|
||||
*
|
||||
* Available menu item options:
|
||||
* title: Menu item text.
|
||||
* disabled: Whether the item is disabled.
|
||||
* tooltip: Item tooltip.
|
||||
* command: A command identifier to be passed to the onCommand event handlers.
|
||||
* iconCssClass: A CSS class to be added to the menu item icon.
|
||||
* iconImage: A url to the icon image.
|
||||
*
|
||||
*
|
||||
* The plugin exposes the following events:
|
||||
* onBeforeMenuShow: Fired before the menu is shown. You can customize the menu or dismiss it by returning false.
|
||||
* Event args:
|
||||
* grid: Reference to the grid.
|
||||
* column: Column definition.
|
||||
* menu: Menu options. Note that you can change the menu items here.
|
||||
*
|
||||
* onCommand: Fired on menu item click for buttons with 'command' specified.
|
||||
* Event args:
|
||||
* grid: Reference to the grid.
|
||||
* column: Column definition.
|
||||
* command: Button command identified.
|
||||
* button: Button options. Note that you can change the button options in your
|
||||
* event handler, and the column header will be automatically updated to
|
||||
* reflect them. This is useful if you want to implement something like a
|
||||
* toggle button.
|
||||
*
|
||||
*
|
||||
* @param options {Object} Options:
|
||||
* buttonCssClass: an extra CSS class to add to the menu button
|
||||
* buttonImage: a url to the menu button image (default '../images/down.gif')
|
||||
* @class Slick.Plugins.HeaderButtons
|
||||
* @constructor
|
||||
*/
|
||||
function HeaderMenu(options) {
|
||||
var _grid;
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _defaults = {
|
||||
buttonCssClass: null,
|
||||
buttonImage: null
|
||||
};
|
||||
var $menu;
|
||||
var $activeHeaderColumn;
|
||||
|
||||
|
||||
function init(grid) {
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
_grid = grid;
|
||||
_handler
|
||||
.subscribe(_grid.onHeaderCellRendered, handleHeaderCellRendered)
|
||||
.subscribe(_grid.onBeforeHeaderCellDestroy, handleBeforeHeaderCellDestroy);
|
||||
|
||||
// Force the grid to re-render the header now that the events are hooked up.
|
||||
_grid.setColumns(_grid.getColumns());
|
||||
|
||||
// Hide the menu on outside click.
|
||||
$(document.body).on("mousedown", handleBodyMouseDown);
|
||||
}
|
||||
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
$(document.body).off("mousedown", handleBodyMouseDown);
|
||||
}
|
||||
|
||||
|
||||
function handleBodyMouseDown(e) {
|
||||
if ($menu && $menu[0] != e.target && !$.contains($menu[0], e.target)) {
|
||||
hideMenu();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function hideMenu() {
|
||||
if ($menu) {
|
||||
$menu.remove();
|
||||
$menu = null;
|
||||
$activeHeaderColumn
|
||||
.removeClass("slick-header-column-active");
|
||||
}
|
||||
}
|
||||
|
||||
function handleHeaderCellRendered(e, args) {
|
||||
var column = args.column;
|
||||
var menu = column.header && column.header.menu;
|
||||
|
||||
if (menu) {
|
||||
var $el = $("<div></div>")
|
||||
.addClass("slick-header-menubutton")
|
||||
.data("column", column)
|
||||
.data("menu", menu);
|
||||
|
||||
if (options.buttonCssClass) {
|
||||
$el.addClass(options.buttonCssClass);
|
||||
}
|
||||
|
||||
if (options.buttonImage) {
|
||||
$el.css("background-image", "url(" + options.buttonImage + ")");
|
||||
}
|
||||
|
||||
if (menu.tooltip) {
|
||||
$el.attr("title", menu.tooltip);
|
||||
}
|
||||
|
||||
$el
|
||||
.on("click", showMenu)
|
||||
.appendTo(args.node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function handleBeforeHeaderCellDestroy(e, args) {
|
||||
var column = args.column;
|
||||
|
||||
if (column.header && column.header.menu) {
|
||||
$(args.node).find(".slick-header-menubutton").remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function showMenu(e) {
|
||||
var $menuButton = $(this);
|
||||
var menu = $menuButton.data("menu");
|
||||
var columnDef = $menuButton.data("column");
|
||||
|
||||
// Let the user modify the menu or cancel altogether,
|
||||
// or provide alternative menu implementation.
|
||||
if (_self.onBeforeMenuShow.notify({
|
||||
"grid": _grid,
|
||||
"column": columnDef,
|
||||
"menu": menu
|
||||
}, e, _self) == false) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!$menu) {
|
||||
$menu = $("<div class='slick-header-menu'></div>")
|
||||
.appendTo(_grid.getContainerNode());
|
||||
}
|
||||
$menu.empty();
|
||||
|
||||
|
||||
// Construct the menu items.
|
||||
for (var i = 0; i < menu.items.length; i++) {
|
||||
var item = menu.items[i];
|
||||
|
||||
var $li = $("<div class='slick-header-menuitem'></div>")
|
||||
.data("command", item.command || '')
|
||||
.data("column", columnDef)
|
||||
.data("item", item)
|
||||
.on("click", handleMenuItemClick)
|
||||
.appendTo($menu);
|
||||
|
||||
if (item.disabled) {
|
||||
$li.addClass("slick-header-menuitem-disabled");
|
||||
}
|
||||
|
||||
if (item.tooltip) {
|
||||
$li.attr("title", item.tooltip);
|
||||
}
|
||||
|
||||
var $icon = $("<div class='slick-header-menuicon'></div>")
|
||||
.appendTo($li);
|
||||
|
||||
if (item.iconCssClass) {
|
||||
$icon.addClass(item.iconCssClass);
|
||||
}
|
||||
|
||||
if (item.iconImage) {
|
||||
$icon.css("background-image", "url(" + item.iconImage + ")");
|
||||
}
|
||||
|
||||
$("<span class='slick-header-menucontent'></span>")
|
||||
.text(item.title)
|
||||
.appendTo($li);
|
||||
}
|
||||
|
||||
|
||||
// Position the menu.
|
||||
$menu
|
||||
.offset({ top: $(this).offset().top + $(this).height(), left: $(this).offset().left });
|
||||
|
||||
|
||||
// Mark the header as active to keep the highlighting.
|
||||
$activeHeaderColumn = $menuButton.closest(".slick-header-column");
|
||||
$activeHeaderColumn
|
||||
.addClass("slick-header-column-active");
|
||||
|
||||
// Stop propagation so that it doesn't register as a header click event.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
|
||||
function handleMenuItemClick(e) {
|
||||
var command = $(this).data("command");
|
||||
var columnDef = $(this).data("column");
|
||||
var item = $(this).data("item");
|
||||
|
||||
if (item.disabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
hideMenu();
|
||||
|
||||
if (command != null && command != '') {
|
||||
_self.onCommand.notify({
|
||||
"grid": _grid,
|
||||
"column": columnDef,
|
||||
"command": command,
|
||||
"item": item
|
||||
}, e, _self);
|
||||
}
|
||||
|
||||
// Stop propagation so that it doesn't register as a header click event.
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
|
||||
"onBeforeMenuShow": new Slick.Event(),
|
||||
"onCommand": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,138 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"RowMoveManager": RowMoveManager
|
||||
}
|
||||
});
|
||||
|
||||
function RowMoveManager(options) {
|
||||
var _grid;
|
||||
var _canvas;
|
||||
var _dragging;
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _defaults = {
|
||||
cancelEditOnDrag: false
|
||||
};
|
||||
|
||||
function init(grid) {
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
_grid = grid;
|
||||
_canvas = _grid.getCanvasNode();
|
||||
_handler
|
||||
.subscribe(_grid.onDragInit, handleDragInit)
|
||||
.subscribe(_grid.onDragStart, handleDragStart)
|
||||
.subscribe(_grid.onDrag, handleDrag)
|
||||
.subscribe(_grid.onDragEnd, handleDragEnd);
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
}
|
||||
|
||||
function handleDragInit(e, dd) {
|
||||
// prevent the grid from cancelling drag'n'drop by default
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
function handleDragStart(e, dd) {
|
||||
var cell = _grid.getCellFromEvent(e);
|
||||
|
||||
if (options.cancelEditOnDrag && _grid.getEditorLock().isActive()) {
|
||||
_grid.getEditorLock().cancelCurrentEdit();
|
||||
}
|
||||
|
||||
if (_grid.getEditorLock().isActive() || !/move|selectAndMove/.test(_grid.getColumns()[cell.cell].behavior)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_dragging = true;
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
var selectedRows = _grid.getSelectedRows();
|
||||
|
||||
if (selectedRows.length == 0 || $.inArray(cell.row, selectedRows) == -1) {
|
||||
selectedRows = [cell.row];
|
||||
_grid.setSelectedRows(selectedRows);
|
||||
}
|
||||
|
||||
var rowHeight = _grid.getOptions().rowHeight;
|
||||
|
||||
dd.selectedRows = selectedRows;
|
||||
|
||||
dd.selectionProxy = $("<div class='slick-reorder-proxy'/>")
|
||||
.css("position", "absolute")
|
||||
.css("zIndex", "99999")
|
||||
.css("width", $(_canvas).innerWidth())
|
||||
.css("height", rowHeight * selectedRows.length)
|
||||
.appendTo(_canvas);
|
||||
|
||||
dd.guide = $("<div class='slick-reorder-guide'/>")
|
||||
.css("position", "absolute")
|
||||
.css("zIndex", "99998")
|
||||
.css("width", $(_canvas).innerWidth())
|
||||
.css("top", -1000)
|
||||
.appendTo(_canvas);
|
||||
|
||||
dd.insertBefore = -1;
|
||||
}
|
||||
|
||||
function handleDrag(e, dd) {
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
var top = e.pageY - $(_canvas).offset().top;
|
||||
dd.selectionProxy.css("top", top - 5);
|
||||
|
||||
var insertBefore = Math.max(0, Math.min(Math.round(top / _grid.getOptions().rowHeight), _grid.getDataLength()));
|
||||
if (insertBefore !== dd.insertBefore) {
|
||||
var eventData = {
|
||||
"rows": dd.selectedRows,
|
||||
"insertBefore": insertBefore
|
||||
};
|
||||
|
||||
if (_self.onBeforeMoveRows.notify(eventData) === false) {
|
||||
dd.guide.css("top", -1000);
|
||||
dd.canMove = false;
|
||||
} else {
|
||||
dd.guide.css("top", insertBefore * _grid.getOptions().rowHeight);
|
||||
dd.canMove = true;
|
||||
}
|
||||
|
||||
dd.insertBefore = insertBefore;
|
||||
}
|
||||
}
|
||||
|
||||
function handleDragEnd(e, dd) {
|
||||
if (!_dragging) {
|
||||
return;
|
||||
}
|
||||
_dragging = false;
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
dd.guide.remove();
|
||||
dd.selectionProxy.remove();
|
||||
|
||||
if (dd.canMove) {
|
||||
var eventData = {
|
||||
"rows": dd.selectedRows,
|
||||
"insertBefore": dd.insertBefore
|
||||
};
|
||||
// TODO: _grid.remapCellCssClasses ?
|
||||
_self.onMoveRows.notify(eventData);
|
||||
}
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"onBeforeMoveRows": new Slick.Event(),
|
||||
"onMoveRows": new Slick.Event(),
|
||||
|
||||
"init": init,
|
||||
"destroy": destroy
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,189 +0,0 @@
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"RowSelectionModel": RowSelectionModel
|
||||
}
|
||||
});
|
||||
|
||||
function RowSelectionModel(options) {
|
||||
var _grid;
|
||||
var _ranges = [];
|
||||
var _self = this;
|
||||
var _handler = new Slick.EventHandler();
|
||||
var _inHandler;
|
||||
var _options;
|
||||
var _defaults = {
|
||||
selectActiveRow: true
|
||||
};
|
||||
|
||||
function init(grid) {
|
||||
_options = $.extend(true, {}, _defaults, options);
|
||||
_grid = grid;
|
||||
_handler.subscribe(_grid.onActiveCellChanged,
|
||||
wrapHandler(handleActiveCellChange));
|
||||
_handler.subscribe(_grid.onKeyDown,
|
||||
wrapHandler(handleKeyDown));
|
||||
_handler.subscribe(_grid.onClick,
|
||||
wrapHandler(handleClick));
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
_handler.unsubscribeAll();
|
||||
}
|
||||
|
||||
function wrapHandler(handler) {
|
||||
return function () {
|
||||
if (!_inHandler) {
|
||||
_inHandler = true;
|
||||
handler.apply(this, arguments);
|
||||
_inHandler = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function rangesToRows(ranges) {
|
||||
var rows = [];
|
||||
for (var i = 0; i < ranges.length; i++) {
|
||||
for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
|
||||
rows.push(j);
|
||||
}
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
function rowsToRanges(rows) {
|
||||
var ranges = [];
|
||||
var lastCell = _grid.getColumns().length - 1;
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));
|
||||
}
|
||||
return ranges;
|
||||
}
|
||||
|
||||
function getRowsRange(from, to) {
|
||||
var i, rows = [];
|
||||
for (i = from; i <= to; i++) {
|
||||
rows.push(i);
|
||||
}
|
||||
for (i = to; i < from; i++) {
|
||||
rows.push(i);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
function getSelectedRows() {
|
||||
return rangesToRows(_ranges);
|
||||
}
|
||||
|
||||
function setSelectedRows(rows) {
|
||||
setSelectedRanges(rowsToRanges(rows));
|
||||
}
|
||||
|
||||
function setSelectedRanges(ranges) {
|
||||
// simple check for: empty selection didn't change, prevent firing onSelectedRangesChanged
|
||||
if ((!_ranges || _ranges.length === 0) && (!ranges || ranges.length === 0)) { return; }
|
||||
_ranges = ranges;
|
||||
_self.onSelectedRangesChanged.notify(_ranges);
|
||||
}
|
||||
|
||||
function getSelectedRanges() {
|
||||
return _ranges;
|
||||
}
|
||||
|
||||
function handleActiveCellChange(e, data) {
|
||||
if (_options.selectActiveRow && data.row != null) {
|
||||
setSelectedRanges([new Slick.Range(data.row, 0, data.row, _grid.getColumns().length - 1)]);
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyDown(e) {
|
||||
var activeRow = _grid.getActiveCell();
|
||||
if (activeRow && e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && (e.which == 38 || e.which == 40)) {
|
||||
var selectedRows = getSelectedRows();
|
||||
selectedRows.sort(function (x, y) {
|
||||
return x - y
|
||||
});
|
||||
|
||||
if (!selectedRows.length) {
|
||||
selectedRows = [activeRow.row];
|
||||
}
|
||||
|
||||
var top = selectedRows[0];
|
||||
var bottom = selectedRows[selectedRows.length - 1];
|
||||
var active;
|
||||
|
||||
if (e.which == 40) {
|
||||
active = activeRow.row < bottom || top == bottom ? ++bottom : ++top;
|
||||
} else {
|
||||
active = activeRow.row < bottom ? --bottom : --top;
|
||||
}
|
||||
|
||||
if (active >= 0 && active < _grid.getDataLength()) {
|
||||
_grid.scrollRowIntoView(active);
|
||||
var tempRanges = rowsToRanges(getRowsRange(top, bottom));
|
||||
setSelectedRanges(tempRanges);
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
||||
function handleClick(e) {
|
||||
var cell = _grid.getCellFromEvent(e);
|
||||
if (!cell || !_grid.canCellBeActive(cell.row, cell.cell)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_grid.getOptions().multiSelect || (
|
||||
!e.ctrlKey && !e.shiftKey && !e.metaKey)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var selection = rangesToRows(_ranges);
|
||||
var idx = $.inArray(cell.row, selection);
|
||||
|
||||
if (idx === -1 && (e.ctrlKey || e.metaKey)) {
|
||||
selection.push(cell.row);
|
||||
_grid.setActiveCell(cell.row, cell.cell);
|
||||
} else if (idx !== -1 && (e.ctrlKey || e.metaKey)) {
|
||||
selection = $.grep(selection, function (o, i) {
|
||||
return (o !== cell.row);
|
||||
});
|
||||
_grid.setActiveCell(cell.row, cell.cell);
|
||||
} else if (selection.length && e.shiftKey) {
|
||||
var last = selection.pop();
|
||||
var from = Math.min(cell.row, last);
|
||||
var to = Math.max(cell.row, last);
|
||||
selection = [];
|
||||
for (var i = from; i <= to; i++) {
|
||||
if (i !== last) {
|
||||
selection.push(i);
|
||||
}
|
||||
}
|
||||
selection.push(last);
|
||||
_grid.setActiveCell(cell.row, cell.cell);
|
||||
}
|
||||
|
||||
var tempRanges = rowsToRanges(selection);
|
||||
setSelectedRanges(tempRanges);
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$.extend(this, {
|
||||
"getSelectedRows": getSelectedRows,
|
||||
"setSelectedRows": setSelectedRows,
|
||||
|
||||
"getSelectedRanges": getSelectedRanges,
|
||||
"setSelectedRanges": setSelectedRanges,
|
||||
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
|
||||
"onSelectedRangesChanged": new Slick.Event()
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
@ -1,118 +0,0 @@
|
||||
/*
|
||||
IMPORTANT:
|
||||
In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
|
||||
No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS
|
||||
classes should alter those!
|
||||
*/
|
||||
|
||||
.slick-header-columns {
|
||||
background: url('images/header-columns-bg.gif') repeat-x center bottom;
|
||||
border-bottom: 1px solid silver;
|
||||
}
|
||||
|
||||
.slick-header-column {
|
||||
background: url('images/header-columns-bg.gif') repeat-x center bottom;
|
||||
border-right: 1px solid silver;
|
||||
}
|
||||
|
||||
.slick-header-column:hover, .slick-header-column-active {
|
||||
background: white url('images/header-columns-over-bg.gif') repeat-x center bottom;
|
||||
}
|
||||
|
||||
.slick-headerrow {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.slick-headerrow-column {
|
||||
background: #fafafa;
|
||||
border-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.slick-row.ui-state-active {
|
||||
background: #F5F7D7;
|
||||
}
|
||||
|
||||
.slick-row {
|
||||
position: absolute;
|
||||
background: white;
|
||||
border: 0px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.slick-row.selected {
|
||||
z-index: 10;
|
||||
background: #DFE8F6;
|
||||
}
|
||||
|
||||
.slick-cell {
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.slick-group {
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
|
||||
.slick-group-toggle {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.slick-group-toggle.expanded {
|
||||
background: url(images/collapse.gif) no-repeat center center;
|
||||
}
|
||||
|
||||
.slick-group-toggle.collapsed {
|
||||
background: url(images/expand.gif) no-repeat center center;
|
||||
}
|
||||
|
||||
.slick-group-totals {
|
||||
color: gray;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.slick-cell.selected {
|
||||
background-color: beige;
|
||||
}
|
||||
|
||||
.slick-cell.active {
|
||||
border-color: gray;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.slick-sortable-placeholder {
|
||||
background: silver !important;
|
||||
}
|
||||
|
||||
.slick-row.odd {
|
||||
background: #fafafa;
|
||||
}
|
||||
|
||||
.slick-row.ui-state-active {
|
||||
background: #F5F7D7;
|
||||
}
|
||||
|
||||
.slick-row.loading {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity = 50);
|
||||
}
|
||||
|
||||
.slick-cell.invalid {
|
||||
border-color: red;
|
||||
-moz-animation-duration: 0.2s;
|
||||
-webkit-animation-duration: 0.2s;
|
||||
-moz-animation-name: slickgrid-invalid-hilite;
|
||||
-webkit-animation-name: slickgrid-invalid-hilite;
|
||||
}
|
||||
|
||||
@-moz-keyframes slickgrid-invalid-hilite {
|
||||
from { box-shadow: 0 0 6px red; }
|
||||
to { box-shadow: none; }
|
||||
}
|
||||
|
||||
@-webkit-keyframes slickgrid-invalid-hilite {
|
||||
from { box-shadow: 0 0 6px red; }
|
||||
to { box-shadow: none; }
|
||||
}
|
485
web/pgadmin/static/vendor/slickgrid/slick.core.js
vendored
@ -1,485 +0,0 @@
|
||||
/***
|
||||
* Contains core SlickGrid classes.
|
||||
* @module Core
|
||||
* @namespace Slick
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"Event": Event,
|
||||
"EventData": EventData,
|
||||
"EventHandler": EventHandler,
|
||||
"Range": Range,
|
||||
"NonDataRow": NonDataItem,
|
||||
"Group": Group,
|
||||
"GroupTotals": GroupTotals,
|
||||
"EditorLock": EditorLock,
|
||||
|
||||
/***
|
||||
* A global singleton editor lock.
|
||||
* @class GlobalEditorLock
|
||||
* @static
|
||||
* @constructor
|
||||
*/
|
||||
"GlobalEditorLock": new EditorLock(),
|
||||
|
||||
"keyCode": {
|
||||
BACKSPACE: 8,
|
||||
DELETE: 46,
|
||||
DOWN: 40,
|
||||
END: 35,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
HOME: 36,
|
||||
INSERT: 45,
|
||||
LEFT: 37,
|
||||
PAGE_DOWN: 34,
|
||||
PAGE_UP: 33,
|
||||
RIGHT: 39,
|
||||
TAB: 9,
|
||||
UP: 38
|
||||
},
|
||||
"preClickClassName" : "slick-edit-preclick"
|
||||
}
|
||||
});
|
||||
|
||||
/***
|
||||
* An event object for passing data to event handlers and letting them control propagation.
|
||||
* <p>This is pretty much identical to how W3C and jQuery implement events.</p>
|
||||
* @class EventData
|
||||
* @constructor
|
||||
*/
|
||||
function EventData() {
|
||||
var isPropagationStopped = false;
|
||||
var isImmediatePropagationStopped = false;
|
||||
|
||||
/***
|
||||
* Stops event from propagating up the DOM tree.
|
||||
* @method stopPropagation
|
||||
*/
|
||||
this.stopPropagation = function () {
|
||||
isPropagationStopped = true;
|
||||
};
|
||||
|
||||
/***
|
||||
* Returns whether stopPropagation was called on this event object.
|
||||
* @method isPropagationStopped
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.isPropagationStopped = function () {
|
||||
return isPropagationStopped;
|
||||
};
|
||||
|
||||
/***
|
||||
* Prevents the rest of the handlers from being executed.
|
||||
* @method stopImmediatePropagation
|
||||
*/
|
||||
this.stopImmediatePropagation = function () {
|
||||
isImmediatePropagationStopped = true;
|
||||
};
|
||||
|
||||
/***
|
||||
* Returns whether stopImmediatePropagation was called on this event object.\
|
||||
* @method isImmediatePropagationStopped
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.isImmediatePropagationStopped = function () {
|
||||
return isImmediatePropagationStopped;
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* A simple publisher-subscriber implementation.
|
||||
* @class Event
|
||||
* @constructor
|
||||
*/
|
||||
function Event() {
|
||||
var handlers = [];
|
||||
|
||||
/***
|
||||
* Adds an event handler to be called when the event is fired.
|
||||
* <p>Event handler will receive two arguments - an <code>EventData</code> and the <code>data</code>
|
||||
* object the event was fired with.<p>
|
||||
* @method subscribe
|
||||
* @param fn {Function} Event handler.
|
||||
*/
|
||||
this.subscribe = function (fn) {
|
||||
handlers.push(fn);
|
||||
};
|
||||
|
||||
/***
|
||||
* Removes an event handler added with <code>subscribe(fn)</code>.
|
||||
* @method unsubscribe
|
||||
* @param fn {Function} Event handler to be removed.
|
||||
*/
|
||||
this.unsubscribe = function (fn) {
|
||||
for (var i = handlers.length - 1; i >= 0; i--) {
|
||||
if (handlers[i] === fn) {
|
||||
handlers.splice(i, 1);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/***
|
||||
* Fires an event notifying all subscribers.
|
||||
* @method notify
|
||||
* @param args {Object} Additional data object to be passed to all handlers.
|
||||
* @param e {EventData}
|
||||
* Optional.
|
||||
* An <code>EventData</code> object to be passed to all handlers.
|
||||
* For DOM events, an existing W3C/jQuery event object can be passed in.
|
||||
* @param scope {Object}
|
||||
* Optional.
|
||||
* The scope ("this") within which the handler will be executed.
|
||||
* If not specified, the scope will be set to the <code>Event</code> instance.
|
||||
*/
|
||||
this.notify = function (args, e, scope) {
|
||||
e = e || new EventData();
|
||||
scope = scope || this;
|
||||
|
||||
var returnValue;
|
||||
for (var i = 0; i < handlers.length && !(e.isPropagationStopped() || e.isImmediatePropagationStopped()); i++) {
|
||||
returnValue = handlers[i].call(scope, e, args);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
}
|
||||
|
||||
function EventHandler() {
|
||||
var handlers = [];
|
||||
|
||||
this.subscribe = function (event, handler) {
|
||||
handlers.push({
|
||||
event: event,
|
||||
handler: handler
|
||||
});
|
||||
event.subscribe(handler);
|
||||
|
||||
return this; // allow chaining
|
||||
};
|
||||
|
||||
this.unsubscribe = function (event, handler) {
|
||||
var i = handlers.length;
|
||||
while (i--) {
|
||||
if (handlers[i].event === event &&
|
||||
handlers[i].handler === handler) {
|
||||
handlers.splice(i, 1);
|
||||
event.unsubscribe(handler);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return this; // allow chaining
|
||||
};
|
||||
|
||||
this.unsubscribeAll = function () {
|
||||
var i = handlers.length;
|
||||
while (i--) {
|
||||
handlers[i].event.unsubscribe(handlers[i].handler);
|
||||
}
|
||||
handlers = [];
|
||||
|
||||
return this; // allow chaining
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
* A structure containing a range of cells.
|
||||
* @class Range
|
||||
* @constructor
|
||||
* @param fromRow {Integer} Starting row.
|
||||
* @param fromCell {Integer} Starting cell.
|
||||
* @param toRow {Integer} Optional. Ending row. Defaults to <code>fromRow</code>.
|
||||
* @param toCell {Integer} Optional. Ending cell. Defaults to <code>fromCell</code>.
|
||||
*/
|
||||
function Range(fromRow, fromCell, toRow, toCell) {
|
||||
if (toRow === undefined && toCell === undefined) {
|
||||
toRow = fromRow;
|
||||
toCell = fromCell;
|
||||
}
|
||||
|
||||
/***
|
||||
* @property fromRow
|
||||
* @type {Integer}
|
||||
*/
|
||||
this.fromRow = Math.min(fromRow, toRow);
|
||||
|
||||
/***
|
||||
* @property fromCell
|
||||
* @type {Integer}
|
||||
*/
|
||||
this.fromCell = Math.min(fromCell, toCell);
|
||||
|
||||
/***
|
||||
* @property toRow
|
||||
* @type {Integer}
|
||||
*/
|
||||
this.toRow = Math.max(fromRow, toRow);
|
||||
|
||||
/***
|
||||
* @property toCell
|
||||
* @type {Integer}
|
||||
*/
|
||||
this.toCell = Math.max(fromCell, toCell);
|
||||
|
||||
/***
|
||||
* Returns whether a range represents a single row.
|
||||
* @method isSingleRow
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.isSingleRow = function () {
|
||||
return this.fromRow == this.toRow;
|
||||
};
|
||||
|
||||
/***
|
||||
* Returns whether a range represents a single cell.
|
||||
* @method isSingleCell
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.isSingleCell = function () {
|
||||
return this.fromRow == this.toRow && this.fromCell == this.toCell;
|
||||
};
|
||||
|
||||
/***
|
||||
* Returns whether a range contains a given cell.
|
||||
* @method contains
|
||||
* @param row {Integer}
|
||||
* @param cell {Integer}
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.contains = function (row, cell) {
|
||||
return row >= this.fromRow && row <= this.toRow &&
|
||||
cell >= this.fromCell && cell <= this.toCell;
|
||||
};
|
||||
|
||||
/***
|
||||
* Returns a readable representation of a range.
|
||||
* @method toString
|
||||
* @return {String}
|
||||
*/
|
||||
this.toString = function () {
|
||||
if (this.isSingleCell()) {
|
||||
return "(" + this.fromRow + ":" + this.fromCell + ")";
|
||||
}
|
||||
else {
|
||||
return "(" + this.fromRow + ":" + this.fromCell + " - " + this.toRow + ":" + this.toCell + ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* A base class that all special / non-data rows (like Group and GroupTotals) derive from.
|
||||
* @class NonDataItem
|
||||
* @constructor
|
||||
*/
|
||||
function NonDataItem() {
|
||||
this.__nonDataRow = true;
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
* Information about a group of rows.
|
||||
* @class Group
|
||||
* @extends Slick.NonDataItem
|
||||
* @constructor
|
||||
*/
|
||||
function Group() {
|
||||
this.__group = true;
|
||||
|
||||
/**
|
||||
* Grouping level, starting with 0.
|
||||
* @property level
|
||||
* @type {Number}
|
||||
*/
|
||||
this.level = 0;
|
||||
|
||||
/***
|
||||
* Number of rows in the group.
|
||||
* @property count
|
||||
* @type {Integer}
|
||||
*/
|
||||
this.count = 0;
|
||||
|
||||
/***
|
||||
* Grouping value.
|
||||
* @property value
|
||||
* @type {Object}
|
||||
*/
|
||||
this.value = null;
|
||||
|
||||
/***
|
||||
* Formatted display value of the group.
|
||||
* @property title
|
||||
* @type {String}
|
||||
*/
|
||||
this.title = null;
|
||||
|
||||
/***
|
||||
* Whether a group is collapsed.
|
||||
* @property collapsed
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.collapsed = false;
|
||||
|
||||
/***
|
||||
* GroupTotals, if any.
|
||||
* @property totals
|
||||
* @type {GroupTotals}
|
||||
*/
|
||||
this.totals = null;
|
||||
|
||||
/**
|
||||
* Rows that are part of the group.
|
||||
* @property rows
|
||||
* @type {Array}
|
||||
*/
|
||||
this.rows = [];
|
||||
|
||||
/**
|
||||
* Sub-groups that are part of the group.
|
||||
* @property groups
|
||||
* @type {Array}
|
||||
*/
|
||||
this.groups = null;
|
||||
|
||||
/**
|
||||
* A unique key used to identify the group. This key can be used in calls to DataView
|
||||
* collapseGroup() or expandGroup().
|
||||
* @property groupingKey
|
||||
* @type {Object}
|
||||
*/
|
||||
this.groupingKey = null;
|
||||
}
|
||||
|
||||
Group.prototype = new NonDataItem();
|
||||
|
||||
/***
|
||||
* Compares two Group instances.
|
||||
* @method equals
|
||||
* @return {Boolean}
|
||||
* @param group {Group} Group instance to compare to.
|
||||
*/
|
||||
Group.prototype.equals = function (group) {
|
||||
return this.value === group.value &&
|
||||
this.count === group.count &&
|
||||
this.collapsed === group.collapsed &&
|
||||
this.title === group.title;
|
||||
};
|
||||
|
||||
/***
|
||||
* Information about group totals.
|
||||
* An instance of GroupTotals will be created for each totals row and passed to the aggregators
|
||||
* so that they can store arbitrary data in it. That data can later be accessed by group totals
|
||||
* formatters during the display.
|
||||
* @class GroupTotals
|
||||
* @extends Slick.NonDataItem
|
||||
* @constructor
|
||||
*/
|
||||
function GroupTotals() {
|
||||
this.__groupTotals = true;
|
||||
|
||||
/***
|
||||
* Parent Group.
|
||||
* @param group
|
||||
* @type {Group}
|
||||
*/
|
||||
this.group = null;
|
||||
|
||||
/***
|
||||
* Whether the totals have been fully initialized / calculated.
|
||||
* Will be set to false for lazy-calculated group totals.
|
||||
* @param initialized
|
||||
* @type {Boolean}
|
||||
*/
|
||||
this.initialized = false;
|
||||
}
|
||||
|
||||
GroupTotals.prototype = new NonDataItem();
|
||||
|
||||
/***
|
||||
* A locking helper to track the active edit controller and ensure that only a single controller
|
||||
* can be active at a time. This prevents a whole class of state and validation synchronization
|
||||
* issues. An edit controller (such as SlickGrid) can query if an active edit is in progress
|
||||
* and attempt a commit or cancel before proceeding.
|
||||
* @class EditorLock
|
||||
* @constructor
|
||||
*/
|
||||
function EditorLock() {
|
||||
var activeEditController = null;
|
||||
|
||||
/***
|
||||
* Returns true if a specified edit controller is active (has the edit lock).
|
||||
* If the parameter is not specified, returns true if any edit controller is active.
|
||||
* @method isActive
|
||||
* @param editController {EditController}
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.isActive = function (editController) {
|
||||
return (editController ? activeEditController === editController : activeEditController !== null);
|
||||
};
|
||||
|
||||
/***
|
||||
* Sets the specified edit controller as the active edit controller (acquire edit lock).
|
||||
* If another edit controller is already active, and exception will be throw new Error(.
|
||||
* @method activate
|
||||
* @param editController {EditController} edit controller acquiring the lock
|
||||
*/
|
||||
this.activate = function (editController) {
|
||||
if (editController === activeEditController) { // already activated?
|
||||
return;
|
||||
}
|
||||
if (activeEditController !== null) {
|
||||
throw new Error("SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController");
|
||||
}
|
||||
if (!editController.commitCurrentEdit) {
|
||||
throw new Error("SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()");
|
||||
}
|
||||
if (!editController.cancelCurrentEdit) {
|
||||
throw new Error("SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()");
|
||||
}
|
||||
activeEditController = editController;
|
||||
};
|
||||
|
||||
/***
|
||||
* Unsets the specified edit controller as the active edit controller (release edit lock).
|
||||
* If the specified edit controller is not the active one, an exception will be throw new Error(.
|
||||
* @method deactivate
|
||||
* @param editController {EditController} edit controller releasing the lock
|
||||
*/
|
||||
this.deactivate = function (editController) {
|
||||
if (activeEditController !== editController) {
|
||||
throw new Error("SlickGrid.EditorLock.deactivate: specified editController is not the currently active one");
|
||||
}
|
||||
activeEditController = null;
|
||||
};
|
||||
|
||||
/***
|
||||
* Attempts to commit the current edit by calling "commitCurrentEdit" method on the active edit
|
||||
* controller and returns whether the commit attempt was successful (commit may fail due to validation
|
||||
* errors, etc.). Edit controller's "commitCurrentEdit" must return true if the commit has succeeded
|
||||
* and false otherwise. If no edit controller is active, returns true.
|
||||
* @method commitCurrentEdit
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.commitCurrentEdit = function () {
|
||||
return (activeEditController ? activeEditController.commitCurrentEdit() : true);
|
||||
};
|
||||
|
||||
/***
|
||||
* Attempts to cancel the current edit by calling "cancelCurrentEdit" method on the active edit
|
||||
* controller and returns whether the edit was successfully cancelled. If no edit controller is
|
||||
* active, returns true.
|
||||
* @method cancelCurrentEdit
|
||||
* @return {Boolean}
|
||||
*/
|
||||
this.cancelCurrentEdit = function cancelCurrentEdit() {
|
||||
return (activeEditController ? activeEditController.cancelCurrentEdit() : true);
|
||||
};
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
|
1159
web/pgadmin/static/vendor/slickgrid/slick.dataview.js
vendored
634
web/pgadmin/static/vendor/slickgrid/slick.editors.js
vendored
@ -1,634 +0,0 @@
|
||||
/***
|
||||
* Contains basic SlickGrid editors.
|
||||
* @module Editors
|
||||
* @namespace Slick
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"Editors": {
|
||||
"Text": TextEditor,
|
||||
"Integer": IntegerEditor,
|
||||
"Float": FloatEditor,
|
||||
"Date": DateEditor,
|
||||
"YesNoSelect": YesNoSelectEditor,
|
||||
"Checkbox": CheckboxEditor,
|
||||
"PercentComplete": PercentCompleteEditor,
|
||||
"LongText": LongTextEditor
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function TextEditor(args) {
|
||||
var $input;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
$input = $("<INPUT type=text class='editor-text' />")
|
||||
.appendTo(args.container)
|
||||
.on("keydown.nav", function (e) {
|
||||
if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
})
|
||||
.focus()
|
||||
.select();
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$input.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$input.focus();
|
||||
};
|
||||
|
||||
this.getValue = function () {
|
||||
return $input.val();
|
||||
};
|
||||
|
||||
this.setValue = function (val) {
|
||||
$input.val(val);
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
defaultValue = item[args.column.field] || "";
|
||||
$input.val(defaultValue);
|
||||
$input[0].defaultValue = defaultValue;
|
||||
$input.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return $input.val();
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
if (args.column.validator) {
|
||||
var validationResults = args.column.validator($input.val());
|
||||
if (!validationResults.valid) {
|
||||
return validationResults;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
function IntegerEditor(args) {
|
||||
var $input;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
$input = $("<INPUT type=text class='editor-text' />");
|
||||
|
||||
$input.on("keydown.nav", function (e) {
|
||||
if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
$input.appendTo(args.container);
|
||||
$input.focus().select();
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$input.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$input.focus();
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
defaultValue = item[args.column.field];
|
||||
$input.val(defaultValue);
|
||||
$input[0].defaultValue = defaultValue;
|
||||
$input.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return parseInt($input.val(), 10) || 0;
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
if (isNaN($input.val())) {
|
||||
return {
|
||||
valid: false,
|
||||
msg: "Please enter a valid integer"
|
||||
};
|
||||
}
|
||||
|
||||
if (args.column.validator) {
|
||||
var validationResults = args.column.validator($input.val());
|
||||
if (!validationResults.valid) {
|
||||
return validationResults;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
function FloatEditor(args) {
|
||||
var $input;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
$input = $("<INPUT type=text class='editor-text' />");
|
||||
|
||||
$input.on("keydown.nav", function (e) {
|
||||
if (e.keyCode === $.ui.keyCode.LEFT || e.keyCode === $.ui.keyCode.RIGHT) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
$input.appendTo(args.container);
|
||||
$input.focus().select();
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$input.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$input.focus();
|
||||
};
|
||||
|
||||
function getDecimalPlaces() {
|
||||
// returns the number of fixed decimal places or null
|
||||
var rtn = args.column.editorFixedDecimalPlaces;
|
||||
if (typeof rtn == 'undefined') {
|
||||
rtn = FloatEditor.DefaultDecimalPlaces;
|
||||
}
|
||||
return (!rtn && rtn!==0 ? null : rtn);
|
||||
}
|
||||
|
||||
this.loadValue = function (item) {
|
||||
defaultValue = item[args.column.field];
|
||||
|
||||
var decPlaces = getDecimalPlaces();
|
||||
if (decPlaces !== null
|
||||
&& (defaultValue || defaultValue===0)
|
||||
&& defaultValue.toFixed) {
|
||||
defaultValue = defaultValue.toFixed(decPlaces);
|
||||
}
|
||||
|
||||
$input.val(defaultValue);
|
||||
$input[0].defaultValue = defaultValue;
|
||||
$input.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
var rtn = parseFloat($input.val()) || 0;
|
||||
|
||||
var decPlaces = getDecimalPlaces();
|
||||
if (decPlaces !== null
|
||||
&& (rtn || rtn===0)
|
||||
&& rtn.toFixed) {
|
||||
rtn = parseFloat(rtn.toFixed(decPlaces));
|
||||
}
|
||||
|
||||
return rtn;
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
if (isNaN($input.val())) {
|
||||
return {
|
||||
valid: false,
|
||||
msg: "Please enter a valid number"
|
||||
};
|
||||
}
|
||||
|
||||
if (args.column.validator) {
|
||||
var validationResults = args.column.validator($input.val());
|
||||
if (!validationResults.valid) {
|
||||
return validationResults;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
FloatEditor.DefaultDecimalPlaces = null;
|
||||
|
||||
function DateEditor(args) {
|
||||
var $input;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
var calendarOpen = false;
|
||||
|
||||
this.init = function () {
|
||||
$input = $("<INPUT type=text class='editor-text' />");
|
||||
$input.appendTo(args.container);
|
||||
$input.focus().select();
|
||||
$input.datepicker({
|
||||
showOn: "button",
|
||||
buttonImageOnly: true,
|
||||
beforeShow: function () {
|
||||
calendarOpen = true
|
||||
},
|
||||
onClose: function () {
|
||||
calendarOpen = false
|
||||
}
|
||||
});
|
||||
$input.width($input.width() - 18);
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$.datepicker.dpDiv.stop(true, true);
|
||||
$input.datepicker("hide");
|
||||
$input.datepicker("destroy");
|
||||
$input.remove();
|
||||
};
|
||||
|
||||
this.show = function () {
|
||||
if (calendarOpen) {
|
||||
$.datepicker.dpDiv.stop(true, true).show();
|
||||
}
|
||||
};
|
||||
|
||||
this.hide = function () {
|
||||
if (calendarOpen) {
|
||||
$.datepicker.dpDiv.stop(true, true).hide();
|
||||
}
|
||||
};
|
||||
|
||||
this.position = function (position) {
|
||||
if (!calendarOpen) {
|
||||
return;
|
||||
}
|
||||
$.datepicker.dpDiv
|
||||
.css("top", position.top + 30)
|
||||
.css("left", position.left);
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$input.focus();
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
defaultValue = item[args.column.field];
|
||||
$input.val(defaultValue);
|
||||
$input[0].defaultValue = defaultValue;
|
||||
$input.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return $input.val();
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
if (args.column.validator) {
|
||||
var validationResults = args.column.validator($input.val());
|
||||
if (!validationResults.valid) {
|
||||
return validationResults;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
function YesNoSelectEditor(args) {
|
||||
var $select;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
$select = $("<SELECT tabIndex='0' class='editor-yesno'><OPTION value='yes'>Yes</OPTION><OPTION value='no'>No</OPTION></SELECT>");
|
||||
$select.appendTo(args.container);
|
||||
$select.focus();
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$select.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$select.focus();
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
$select.val((defaultValue = item[args.column.field]) ? "yes" : "no");
|
||||
$select.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return ($select.val() == "yes");
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return ($select.val() != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
function CheckboxEditor(args) {
|
||||
var $select;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
$select = $("<INPUT type=checkbox value='true' class='editor-checkbox' hideFocus>");
|
||||
$select.appendTo(args.container);
|
||||
$select.focus();
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$select.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$select.focus();
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
defaultValue = !!item[args.column.field];
|
||||
if (defaultValue) {
|
||||
$select.prop('checked', true);
|
||||
} else {
|
||||
$select.prop('checked', false);
|
||||
}
|
||||
};
|
||||
|
||||
this.preClick = function () {
|
||||
$select.prop('checked', !$select.prop('checked'));
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return $select.prop('checked');
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (this.serializeValue() !== defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
function PercentCompleteEditor(args) {
|
||||
var $input, $picker;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
$input = $("<INPUT type=text class='editor-percentcomplete' />");
|
||||
$input.width($(args.container).innerWidth() - 25);
|
||||
$input.appendTo(args.container);
|
||||
|
||||
$picker = $("<div class='editor-percentcomplete-picker' />").appendTo(args.container);
|
||||
$picker.append("<div class='editor-percentcomplete-helper'><div class='editor-percentcomplete-wrapper'><div class='editor-percentcomplete-slider' /><div class='editor-percentcomplete-buttons' /></div></div>");
|
||||
|
||||
$picker.find(".editor-percentcomplete-buttons").append("<button val=0>Not started</button><br/><button val=50>In Progress</button><br/><button val=100>Complete</button>");
|
||||
|
||||
$input.focus().select();
|
||||
|
||||
$picker.find(".editor-percentcomplete-slider").slider({
|
||||
orientation: "vertical",
|
||||
range: "min",
|
||||
value: defaultValue,
|
||||
slide: function (event, ui) {
|
||||
$input.val(ui.value)
|
||||
}
|
||||
});
|
||||
|
||||
$picker.find(".editor-percentcomplete-buttons button").on("click", function (e) {
|
||||
$input.val($(this).attr("val"));
|
||||
$picker.find(".editor-percentcomplete-slider").slider("value", $(this).attr("val"));
|
||||
})
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$input.remove();
|
||||
$picker.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$input.focus();
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
$input.val(defaultValue = item[args.column.field]);
|
||||
$input.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return parseInt($input.val(), 10) || 0;
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (!($input.val() == "" && defaultValue == null)) && ((parseInt($input.val(), 10) || 0) != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
if (isNaN(parseInt($input.val(), 10))) {
|
||||
return {
|
||||
valid: false,
|
||||
msg: "Please enter a valid positive number"
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
/*
|
||||
* An example of a "detached" editor.
|
||||
* The UI is added onto document BODY and .position(), .show() and .hide() are implemented.
|
||||
* KeyDown events are also handled to provide handling for Tab, Shift-Tab, Esc and Ctrl-Enter.
|
||||
*/
|
||||
function LongTextEditor(args) {
|
||||
var $input, $wrapper;
|
||||
var defaultValue;
|
||||
var scope = this;
|
||||
|
||||
this.init = function () {
|
||||
var $container = $("body");
|
||||
|
||||
$wrapper = $("<DIV style='z-index:10000;position:absolute;background:white;padding:5px;border:3px solid gray; -moz-border-radius:10px; border-radius:10px;'/>")
|
||||
.appendTo($container);
|
||||
|
||||
$input = $("<TEXTAREA hidefocus rows=5 style='background:white;width:250px;height:80px;border:0;outline:0'>")
|
||||
.appendTo($wrapper);
|
||||
|
||||
$("<DIV style='text-align:right'><BUTTON>Save</BUTTON><BUTTON>Cancel</BUTTON></DIV>")
|
||||
.appendTo($wrapper);
|
||||
|
||||
$wrapper.find("button:first").on("click", this.save);
|
||||
$wrapper.find("button:last").on("click", this.cancel);
|
||||
$input.on("keydown", this.handleKeyDown);
|
||||
|
||||
scope.position(args.position);
|
||||
$input.focus().select();
|
||||
};
|
||||
|
||||
this.handleKeyDown = function (e) {
|
||||
if (e.which == $.ui.keyCode.ENTER && e.ctrlKey) {
|
||||
scope.save();
|
||||
} else if (e.which == $.ui.keyCode.ESCAPE) {
|
||||
e.preventDefault();
|
||||
scope.cancel();
|
||||
} else if (e.which == $.ui.keyCode.TAB && e.shiftKey) {
|
||||
e.preventDefault();
|
||||
args.grid.navigatePrev();
|
||||
} else if (e.which == $.ui.keyCode.TAB) {
|
||||
e.preventDefault();
|
||||
args.grid.navigateNext();
|
||||
}
|
||||
};
|
||||
|
||||
this.save = function () {
|
||||
args.commitChanges();
|
||||
};
|
||||
|
||||
this.cancel = function () {
|
||||
$input.val(defaultValue);
|
||||
args.cancelChanges();
|
||||
};
|
||||
|
||||
this.hide = function () {
|
||||
$wrapper.hide();
|
||||
};
|
||||
|
||||
this.show = function () {
|
||||
$wrapper.show();
|
||||
};
|
||||
|
||||
this.position = function (position) {
|
||||
$wrapper
|
||||
.css("top", position.top - 5)
|
||||
.css("left", position.left - 5)
|
||||
};
|
||||
|
||||
this.destroy = function () {
|
||||
$wrapper.remove();
|
||||
};
|
||||
|
||||
this.focus = function () {
|
||||
$input.focus();
|
||||
};
|
||||
|
||||
this.loadValue = function (item) {
|
||||
$input.val(defaultValue = item[args.column.field]);
|
||||
$input.select();
|
||||
};
|
||||
|
||||
this.serializeValue = function () {
|
||||
return $input.val();
|
||||
};
|
||||
|
||||
this.applyValue = function (item, state) {
|
||||
item[args.column.field] = state;
|
||||
};
|
||||
|
||||
this.isValueChanged = function () {
|
||||
return (!($input.val() == "" && defaultValue == null)) && ($input.val() != defaultValue);
|
||||
};
|
||||
|
||||
this.validate = function () {
|
||||
if (args.column.validator) {
|
||||
var validationResults = args.column.validator($input.val());
|
||||
if (!validationResults.valid) {
|
||||
return validationResults;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
valid: true,
|
||||
msg: null
|
||||
};
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
})(jQuery);
|
@ -1,65 +0,0 @@
|
||||
/***
|
||||
* Contains basic SlickGrid formatters.
|
||||
*
|
||||
* NOTE: These are merely examples. You will most likely need to implement something more
|
||||
* robust/extensible/localizable/etc. for your use!
|
||||
*
|
||||
* @module Formatters
|
||||
* @namespace Slick
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
// register namespace
|
||||
$.extend(true, window, {
|
||||
"Slick": {
|
||||
"Formatters": {
|
||||
"PercentComplete": PercentCompleteFormatter,
|
||||
"PercentCompleteBar": PercentCompleteBarFormatter,
|
||||
"YesNo": YesNoFormatter,
|
||||
"Checkmark": CheckmarkFormatter,
|
||||
"Checkbox": CheckboxFormatter
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function PercentCompleteFormatter(row, cell, value, columnDef, dataContext) {
|
||||
if (value == null || value === "") {
|
||||
return "-";
|
||||
} else if (value < 50) {
|
||||
return "<span style='color:red;font-weight:bold;'>" + value + "%</span>";
|
||||
} else {
|
||||
return "<span style='color:green'>" + value + "%</span>";
|
||||
}
|
||||
}
|
||||
|
||||
function PercentCompleteBarFormatter(row, cell, value, columnDef, dataContext) {
|
||||
if (value == null || value === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
var color;
|
||||
|
||||
if (value < 30) {
|
||||
color = "red";
|
||||
} else if (value < 70) {
|
||||
color = "silver";
|
||||
} else {
|
||||
color = "green";
|
||||
}
|
||||
|
||||
return "<span class='percent-complete-bar' style='background:" + color + ";width:" + value + "%'></span>";
|
||||
}
|
||||
|
||||
function YesNoFormatter(row, cell, value, columnDef, dataContext) {
|
||||
return value ? "Yes" : "No";
|
||||
}
|
||||
|
||||
function CheckboxFormatter(row, cell, value, columnDef, dataContext) {
|
||||
return '<img class="slick-edit-preclick" src="../images/' + (value ? "CheckboxY" : "CheckboxN") + '.png">';
|
||||
}
|
||||
|
||||
function CheckmarkFormatter(row, cell, value, columnDef, dataContext) {
|
||||
return value ? "<img src='../images/tick.png'>" : "";
|
||||
}
|
||||
})(jQuery);
|
179
web/pgadmin/static/vendor/slickgrid/slick.grid.css
vendored
@ -1,179 +0,0 @@
|
||||
/*
|
||||
IMPORTANT:
|
||||
In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
|
||||
No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS
|
||||
classes should alter those!
|
||||
*/
|
||||
|
||||
.slick-header.ui-state-default, .slick-headerrow.ui-state-default, .slick-footerrow.ui-state-default {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-left: 0px !important;
|
||||
}
|
||||
|
||||
.slick-header-columns, .slick-headerrow-columns, .slick-footerrow-columns {
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
cursor: default;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.slick-header-column.ui-state-default {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
/*box-sizing: content-box !important; use this for Firefox! */
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
margin: 0;
|
||||
padding: 4px;
|
||||
border-right: 1px solid silver;
|
||||
border-left: 0px !important;
|
||||
border-top: 0px !important;
|
||||
border-bottom: 0px !important;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.slick-headerrow-column.ui-state-default, .slick-footerrow-column.ui-state-default {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.slick-header-column-sorted {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.slick-sort-indicator {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 5px;
|
||||
margin-left: 4px;
|
||||
margin-top: 6px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.slick-sort-indicator-numbered {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 5px;
|
||||
margin-left: 4px;
|
||||
margin-top: 0;
|
||||
padding-left: 1px;
|
||||
line-height: 20px;
|
||||
float: left;
|
||||
font-family: Arial;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
color: #6190CD;
|
||||
}
|
||||
|
||||
.slick-sort-indicator-desc {
|
||||
background: url(images/sort-desc.gif);
|
||||
}
|
||||
|
||||
.slick-sort-indicator-asc {
|
||||
background: url(images/sort-asc.gif);
|
||||
}
|
||||
|
||||
.slick-resizable-handle {
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
display: block;
|
||||
cursor: col-resize;
|
||||
width: 4px;
|
||||
right: 0px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.slick-sortable-placeholder {
|
||||
background: silver;
|
||||
}
|
||||
|
||||
.grid-canvas {
|
||||
position: relative;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.slick-row.ui-widget-content, .slick-row.ui-state-active {
|
||||
position: absolute;
|
||||
border: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.slick-cell, .slick-headerrow-column , .slick-footerrow-column{
|
||||
position: absolute;
|
||||
border: 1px solid transparent;
|
||||
border-right: 1px dotted silver;
|
||||
border-bottom-color: silver;
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
z-index: 1;
|
||||
padding: 1px 2px 2px 1px;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
cursor: default;
|
||||
}
|
||||
.slick-cell, .slick-headerrow-column{
|
||||
border-bottom-color: silver;
|
||||
}
|
||||
.slick-footerrow-column {
|
||||
border-top-color: silver;
|
||||
}
|
||||
|
||||
.slick-group {
|
||||
}
|
||||
|
||||
.slick-group-toggle {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.slick-cell.highlighted {
|
||||
background: lightskyblue;
|
||||
background: rgba(0, 0, 255, 0.2);
|
||||
-webkit-transition: all 0.5s;
|
||||
-moz-transition: all 0.5s;
|
||||
-o-transition: all 0.5s;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.slick-cell.flashing {
|
||||
border: 1px solid red !important;
|
||||
}
|
||||
|
||||
.slick-cell.editable {
|
||||
z-index: 11;
|
||||
overflow: visible;
|
||||
background: white;
|
||||
border-color: black;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.slick-cell:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.slick-reorder-proxy {
|
||||
display: inline-block;
|
||||
background: blue;
|
||||
opacity: 0.15;
|
||||
filter: alpha(opacity = 15);
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.slick-reorder-guide {
|
||||
display: inline-block;
|
||||
height: 2px;
|
||||
background: blue;
|
||||
opacity: 0.7;
|
||||
filter: alpha(opacity = 70);
|
||||
}
|
||||
|
||||
.slick-selection {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
border: 2px dashed black;
|
||||
}
|
3813
web/pgadmin/static/vendor/slickgrid/slick.grid.js
vendored
@ -1,158 +0,0 @@
|
||||
(function ($) {
|
||||
$.extend(true, window, {
|
||||
Slick: {
|
||||
Data: {
|
||||
GroupItemMetadataProvider: GroupItemMetadataProvider
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/***
|
||||
* Provides item metadata for group (Slick.Group) and totals (Slick.Totals) rows produced by the DataView.
|
||||
* This metadata overrides the default behavior and formatting of those rows so that they appear and function
|
||||
* correctly when processed by the grid.
|
||||
*
|
||||
* This class also acts as a grid plugin providing event handlers to expand & collapse groups.
|
||||
* If "grid.registerPlugin(...)" is not called, expand & collapse will not work.
|
||||
*
|
||||
* @class GroupItemMetadataProvider
|
||||
* @module Data
|
||||
* @namespace Slick.Data
|
||||
* @constructor
|
||||
* @param options
|
||||
*/
|
||||
function GroupItemMetadataProvider(options) {
|
||||
var _grid;
|
||||
var _defaults = {
|
||||
groupCssClass: "slick-group",
|
||||
groupTitleCssClass: "slick-group-title",
|
||||
totalsCssClass: "slick-group-totals",
|
||||
groupFocusable: true,
|
||||
totalsFocusable: false,
|
||||
toggleCssClass: "slick-group-toggle",
|
||||
toggleExpandedCssClass: "expanded",
|
||||
toggleCollapsedCssClass: "collapsed",
|
||||
enableExpandCollapse: true,
|
||||
groupFormatter: defaultGroupCellFormatter,
|
||||
totalsFormatter: defaultTotalsCellFormatter
|
||||
};
|
||||
|
||||
options = $.extend(true, {}, _defaults, options);
|
||||
|
||||
|
||||
function defaultGroupCellFormatter(row, cell, value, columnDef, item) {
|
||||
if (!options.enableExpandCollapse) {
|
||||
return item.title;
|
||||
}
|
||||
|
||||
var indentation = item.level * 15 + "px";
|
||||
|
||||
return "<span class='" + options.toggleCssClass + " " +
|
||||
(item.collapsed ? options.toggleCollapsedCssClass : options.toggleExpandedCssClass) +
|
||||
"' style='margin-left:" + indentation +"'>" +
|
||||
"</span>" +
|
||||
"<span class='" + options.groupTitleCssClass + "' level='" + item.level + "'>" +
|
||||
item.title +
|
||||
"</span>";
|
||||
}
|
||||
|
||||
function defaultTotalsCellFormatter(row, cell, value, columnDef, item) {
|
||||
return (columnDef.groupTotalsFormatter && columnDef.groupTotalsFormatter(item, columnDef)) || "";
|
||||
}
|
||||
|
||||
|
||||
function init(grid) {
|
||||
_grid = grid;
|
||||
_grid.onClick.subscribe(handleGridClick);
|
||||
_grid.onKeyDown.subscribe(handleGridKeyDown);
|
||||
|
||||
}
|
||||
|
||||
function destroy() {
|
||||
if (_grid) {
|
||||
_grid.onClick.unsubscribe(handleGridClick);
|
||||
_grid.onKeyDown.unsubscribe(handleGridKeyDown);
|
||||
}
|
||||
}
|
||||
|
||||
function handleGridClick(e, args) {
|
||||
var item = this.getDataItem(args.row);
|
||||
if (item && item instanceof Slick.Group && $(e.target).hasClass(options.toggleCssClass)) {
|
||||
var range = _grid.getRenderedRange();
|
||||
this.getData().setRefreshHints({
|
||||
ignoreDiffsBefore: range.top,
|
||||
ignoreDiffsAfter: range.bottom + 1
|
||||
});
|
||||
|
||||
if (item.collapsed) {
|
||||
this.getData().expandGroup(item.groupingKey);
|
||||
} else {
|
||||
this.getData().collapseGroup(item.groupingKey);
|
||||
}
|
||||
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: add -/+ handling
|
||||
function handleGridKeyDown(e, args) {
|
||||
if (options.enableExpandCollapse && (e.which == $.ui.keyCode.SPACE)) {
|
||||
var activeCell = this.getActiveCell();
|
||||
if (activeCell) {
|
||||
var item = this.getDataItem(activeCell.row);
|
||||
if (item && item instanceof Slick.Group) {
|
||||
var range = _grid.getRenderedRange();
|
||||
this.getData().setRefreshHints({
|
||||
ignoreDiffsBefore: range.top,
|
||||
ignoreDiffsAfter: range.bottom + 1
|
||||
});
|
||||
|
||||
if (item.collapsed) {
|
||||
this.getData().expandGroup(item.groupingKey);
|
||||
} else {
|
||||
this.getData().collapseGroup(item.groupingKey);
|
||||
}
|
||||
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getGroupRowMetadata(item) {
|
||||
return {
|
||||
selectable: false,
|
||||
focusable: options.groupFocusable,
|
||||
cssClasses: options.groupCssClass,
|
||||
columns: {
|
||||
0: {
|
||||
colspan: "*",
|
||||
formatter: options.groupFormatter,
|
||||
editor: null
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function getTotalsRowMetadata(item) {
|
||||
return {
|
||||
selectable: false,
|
||||
focusable: options.totalsFocusable,
|
||||
cssClasses: options.totalsCssClass,
|
||||
formatter: options.totalsFormatter,
|
||||
editor: null
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
"init": init,
|
||||
"destroy": destroy,
|
||||
"getGroupRowMetadata": getGroupRowMetadata,
|
||||
"getTotalsRowMetadata": getTotalsRowMetadata
|
||||
};
|
||||
}
|
||||
})(jQuery);
|
@ -1,206 +0,0 @@
|
||||
(function ($) {
|
||||
/***
|
||||
* A sample AJAX data store implementation.
|
||||
* Right now, it's hooked up to load Hackernews stories, but can
|
||||
* easily be extended to support any JSONP-compatible backend that accepts paging parameters.
|
||||
*/
|
||||
function RemoteModel() {
|
||||
// private
|
||||
var PAGESIZE = 10;
|
||||
var data = {length: 0};
|
||||
var h_request = null;
|
||||
var req = null; // ajax request
|
||||
|
||||
// events
|
||||
var onDataLoading = new Slick.Event();
|
||||
var onDataLoaded = new Slick.Event();
|
||||
|
||||
|
||||
function init() {
|
||||
}
|
||||
|
||||
|
||||
function isDataLoaded(from, to) {
|
||||
for (var i = from; i <= to; i++) {
|
||||
if (data[i] == undefined || data[i] == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function clear() {
|
||||
for (var key in data) {
|
||||
delete data[key];
|
||||
}
|
||||
data.length = 0;
|
||||
}
|
||||
|
||||
function ensureData(from, to) {
|
||||
if (req) {
|
||||
req.abort();
|
||||
for (var i = req.fromPage; i <= req.toPage; i++) {
|
||||
data[i * PAGESIZE] = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
if (from < 0) {
|
||||
from = 0;
|
||||
}
|
||||
|
||||
if (data.length > 0) {
|
||||
to = Math.min(to, data.length - 1);
|
||||
}
|
||||
|
||||
var fromPage = Math.floor(from / PAGESIZE);
|
||||
var toPage = Math.floor(to / PAGESIZE);
|
||||
|
||||
while (data[fromPage * PAGESIZE] !== undefined && fromPage < toPage)
|
||||
fromPage++;
|
||||
|
||||
while (data[toPage * PAGESIZE] !== undefined && fromPage < toPage)
|
||||
toPage--;
|
||||
|
||||
if (fromPage > toPage || ((fromPage == toPage) && data[fromPage * PAGESIZE] !== undefined)) {
|
||||
// TODO: look-ahead
|
||||
onDataLoaded.notify({from: from, to: to});
|
||||
return;
|
||||
}
|
||||
|
||||
var recStart = (fromPage * PAGESIZE);
|
||||
var recCount = (((toPage - fromPage) * PAGESIZE) + PAGESIZE);
|
||||
|
||||
var url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss"
|
||||
+ "(" + recStart + "%2C" + recCount + ")"
|
||||
+ "%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22"
|
||||
+ "&format=json";
|
||||
|
||||
if (h_request != null) {
|
||||
clearTimeout(h_request);
|
||||
}
|
||||
|
||||
h_request = setTimeout(function () {
|
||||
for (var i = fromPage; i <= toPage; i++)
|
||||
data[i * PAGESIZE] = null; // null indicates a 'requested but not available yet'
|
||||
|
||||
onDataLoading.notify({from: from, to: to});
|
||||
|
||||
req = $.jsonp({
|
||||
url: url,
|
||||
callbackParameter: "callback",
|
||||
cache: true,
|
||||
success: function (json, textStatus, xOptions) {
|
||||
onSuccess(json, recStart)
|
||||
},
|
||||
error: function () {
|
||||
onError(fromPage, toPage)
|
||||
}
|
||||
});
|
||||
|
||||
req.fromPage = fromPage;
|
||||
req.toPage = toPage;
|
||||
}, 50);
|
||||
}
|
||||
|
||||
|
||||
function onError(fromPage, toPage) {
|
||||
alert("error loading pages " + fromPage + " to " + toPage);
|
||||
}
|
||||
|
||||
// SAMPLE DATA
|
||||
// {
|
||||
// "query": {
|
||||
// "count": 40,
|
||||
// "created": "2015-03-03T00:34:00Z",
|
||||
// "lang": "en-US",
|
||||
// "results": {
|
||||
// "item": [
|
||||
// {
|
||||
// "title": "Netanyahu assails Iran deal, touts US-Israel ties",
|
||||
// "description": "<p><a href=\"http://news.yahoo.com/netanyahu-us-officials-face-off-iran-133539021--politics.html\"><img src=\"http://l2.yimg.com/bt/api/res/1.2/4eoBxbJStrbGAKbmBYOJfg--/YXBwaWQ9eW5ld3M7Zmk9ZmlsbDtoPTg2O3E9NzU7dz0xMzA-/http://media.zenfs.com/en_us/News/ap_webfeeds/2f3a20c2d46d9f096f0f6a706700d430.jpg\" width=\"130\" height=\"86\" alt=\"Israeli Prime Minister Benjamin Netanyahu addresses the 2015 American Israel Public Affairs Committee (AIPAC) Policy Conference in Washington, Monday, March 2, 2015. (AP Photo/Cliff Owen)\" align=\"left\" title=\"Israeli Prime Minister Benjamin Netanyahu addresses the 2015 American Israel Public Affairs Committee (AIPAC) Policy Conference in Washington, Monday, March 2, 2015. (AP Photo/Cliff Owen)\" border=\"0\" /></a>WASHINGTON (AP) — Seeking to lower tensions, Benjamin Netanyahu and U.S. officials cast their dispute over Iran as a family squabble on Monday, even as the Israeli leader claimed President Barack Obama did not — and could not — fully understand his nation's vital security concerns.</p><br clear=\"all\"/>",
|
||||
// "link": "http://news.yahoo.com/netanyahu-us-officials-face-off-iran-133539021--politics.html",
|
||||
// "pubDate": "Mon, 02 Mar 2015 19:17:36 -0500",
|
||||
// "source": {
|
||||
// "url": "http://www.ap.org/",
|
||||
// "content": "Associated Press"
|
||||
// },
|
||||
// "guid": {
|
||||
// "isPermaLink": "false",
|
||||
// "content": "netanyahu-us-officials-face-off-iran-133539021--politics"
|
||||
// },
|
||||
// "content": {
|
||||
// "height": "86",
|
||||
// "type": "image/jpeg",
|
||||
// "url": "http://l2.yimg.com/bt/api/res/1.2/4eoBxbJStrbGAKbmBYOJfg--/YXBwaWQ9eW5ld3M7Zmk9ZmlsbDtoPTg2O3E9NzU7dz0xMzA-/http://media.zenfs.com/en_us/News/ap_webfeeds/2f3a20c2d46d9f096f0f6a706700d430.jpg",
|
||||
// "width": "130"
|
||||
// },
|
||||
// "text": {
|
||||
// "type": "html",
|
||||
// "content": "<p><a href=\"http://news.yahoo.com/netanyahu-us-officials-face-off-iran-133539021--politics.html\"><img src=\"http://l2.yimg.com/bt/api/res/1.2/4eoBxbJStrbGAKbmBYOJfg--/YXBwaWQ9eW5ld3M7Zmk9ZmlsbDtoPTg2O3E9NzU7dz0xMzA-/http://media.zenfs.com/en_us/News/ap_webfeeds/2f3a20c2d46d9f096f0f6a706700d430.jpg\" width=\"130\" height=\"86\" alt=\"Israeli Prime Minister Benjamin Netanyahu addresses the 2015 American Israel Public Affairs Committee (AIPAC) Policy Conference in Washington, Monday, March 2, 2015. (AP Photo/Cliff Owen)\" align=\"left\" title=\"Israeli Prime Minister Benjamin Netanyahu addresses the 2015 American Israel Public Affairs Committee (AIPAC) Policy Conference in Washington, Monday, March 2, 2015. (AP Photo/Cliff Owen)\" border=\"0\" /></a>WASHINGTON (AP) — Seeking to lower tensions, Benjamin Netanyahu and U.S. officials cast their dispute over Iran as a family squabble on Monday, even as the Israeli leader claimed President Barack Obama did not — and could not — fully understand his nation's vital security concerns.</p><br clear=\"all\"/>"
|
||||
// },
|
||||
// "credit": {
|
||||
// "role": "publishing company"
|
||||
// }
|
||||
// },
|
||||
// {... },
|
||||
// {... },
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
function onSuccess(json, recStart) {
|
||||
var recEnd = recStart;
|
||||
if (json.query.count > 0) {
|
||||
var results = json.query.results.item;
|
||||
recEnd = recStart + results.length;
|
||||
data.length = 100;// Math.min(parseInt(results.length),1000); // limitation of the API
|
||||
|
||||
for (var i = 0; i < results.length; i++) {
|
||||
var item = results[i];
|
||||
|
||||
item.pubDate = new Date(item.pubDate);
|
||||
|
||||
data[recStart + i] = { index: recStart + i };
|
||||
data[recStart + i].pubDate = item.pubDate;
|
||||
data[recStart + i].title = item.title;
|
||||
data[recStart + i].url = item.link;
|
||||
data[recStart + i].text = item.description;
|
||||
}
|
||||
}
|
||||
req = null;
|
||||
|
||||
onDataLoaded.notify({from: recStart, to: recEnd});
|
||||
}
|
||||
|
||||
|
||||
function reloadData(from, to) {
|
||||
for (var i = from; i <= to; i++)
|
||||
delete data[i];
|
||||
|
||||
ensureData(from, to);
|
||||
}
|
||||
|
||||
init();
|
||||
|
||||
return {
|
||||
// properties
|
||||
"data": data,
|
||||
|
||||
// methods
|
||||
"clear": clear,
|
||||
"isDataLoaded": isDataLoaded,
|
||||
"ensureData": ensureData,
|
||||
"reloadData": reloadData,
|
||||
|
||||
// events
|
||||
"onDataLoading": onDataLoading,
|
||||
"onDataLoaded": onDataLoaded
|
||||
};
|
||||
}
|
||||
|
||||
// Slick.Data.RemoteModel
|
||||
$.extend(true, window, { Slick: { Data: { RemoteModel: RemoteModel }}});
|
||||
})(jQuery);
|
@ -1,169 +0,0 @@
|
||||
(function ($) {
|
||||
/***
|
||||
* A sample AJAX data store implementation.
|
||||
* Right now, it's hooked up to load search results from Octopart, but can
|
||||
* easily be extended to support any JSONP-compatible backend that accepts paging parameters.
|
||||
*/
|
||||
function RemoteModel() {
|
||||
// private
|
||||
var PAGESIZE = 50;
|
||||
var data = {length: 0};
|
||||
var searchstr = "";
|
||||
var sortcol = null;
|
||||
var sortdir = 1;
|
||||
var h_request = null;
|
||||
var req = null; // ajax request
|
||||
|
||||
// events
|
||||
var onDataLoading = new Slick.Event();
|
||||
var onDataLoaded = new Slick.Event();
|
||||
|
||||
|
||||
function init() {
|
||||
}
|
||||
|
||||
|
||||
function isDataLoaded(from, to) {
|
||||
for (var i = from; i <= to; i++) {
|
||||
if (data[i] == undefined || data[i] == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function clear() {
|
||||
for (var key in data) {
|
||||
delete data[key];
|
||||
}
|
||||
data.length = 0;
|
||||
}
|
||||
|
||||
|
||||
function ensureData(from, to) {
|
||||
if (req) {
|
||||
req.abort();
|
||||
for (var i = req.fromPage; i <= req.toPage; i++)
|
||||
data[i * PAGESIZE] = undefined;
|
||||
}
|
||||
|
||||
if (from < 0) {
|
||||
from = 0;
|
||||
}
|
||||
|
||||
if (data.length > 0) {
|
||||
to = Math.min(to, data.length - 1);
|
||||
}
|
||||
|
||||
var fromPage = Math.floor(from / PAGESIZE);
|
||||
var toPage = Math.floor(to / PAGESIZE);
|
||||
|
||||
while (data[fromPage * PAGESIZE] !== undefined && fromPage < toPage)
|
||||
fromPage++;
|
||||
|
||||
while (data[toPage * PAGESIZE] !== undefined && fromPage < toPage)
|
||||
toPage--;
|
||||
|
||||
if (fromPage > toPage || ((fromPage == toPage) && data[fromPage * PAGESIZE] !== undefined)) {
|
||||
// TODO: look-ahead
|
||||
onDataLoaded.notify({from: from, to: to});
|
||||
return;
|
||||
}
|
||||
|
||||
var url = "http://octopart.com/api/v3/parts/search?apikey=68b25f31&include[]=short_description&show[]=uid&show[]=manufacturer&show[]=mpn&show[]=brand&show[]=octopart_url&show[]=short_description&q=" + searchstr + "&start=" + (fromPage * PAGESIZE) + "&limit=" + (((toPage - fromPage) * PAGESIZE) + PAGESIZE);
|
||||
|
||||
if (sortcol != null) {
|
||||
url += ("&sortby=" + sortcol + ((sortdir > 0) ? "+asc" : "+desc"));
|
||||
}
|
||||
|
||||
if (h_request != null) {
|
||||
clearTimeout(h_request);
|
||||
}
|
||||
|
||||
h_request = setTimeout(function () {
|
||||
for (var i = fromPage; i <= toPage; i++)
|
||||
data[i * PAGESIZE] = null; // null indicates a 'requested but not available yet'
|
||||
|
||||
onDataLoading.notify({from: from, to: to});
|
||||
|
||||
req = $.jsonp({
|
||||
url: url,
|
||||
callbackParameter: "callback",
|
||||
cache: true,
|
||||
success: onSuccess,
|
||||
error: function () {
|
||||
onError(fromPage, toPage)
|
||||
}
|
||||
});
|
||||
req.fromPage = fromPage;
|
||||
req.toPage = toPage;
|
||||
}, 50);
|
||||
}
|
||||
|
||||
|
||||
function onError(fromPage, toPage) {
|
||||
alert("error loading pages " + fromPage + " to " + toPage);
|
||||
}
|
||||
|
||||
function onSuccess(resp) {
|
||||
var from = resp.request.start, to = from + resp.results.length;
|
||||
data.length = Math.min(parseInt(resp.hits),1000); // limitation of the API
|
||||
|
||||
for (var i = 0; i < resp.results.length; i++) {
|
||||
var item = resp.results[i].item;
|
||||
|
||||
data[from + i] = item;
|
||||
data[from + i].index = from + i;
|
||||
}
|
||||
|
||||
req = null;
|
||||
|
||||
onDataLoaded.notify({from: from, to: to});
|
||||
}
|
||||
|
||||
|
||||
function reloadData(from, to) {
|
||||
for (var i = from; i <= to; i++)
|
||||
delete data[i];
|
||||
|
||||
ensureData(from, to);
|
||||
}
|
||||
|
||||
|
||||
function setSort(column, dir) {
|
||||
sortcol = column;
|
||||
sortdir = dir;
|
||||
clear();
|
||||
}
|
||||
|
||||
function setSearch(str) {
|
||||
searchstr = str;
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
init();
|
||||
|
||||
return {
|
||||
// properties
|
||||
"data": data,
|
||||
|
||||
// methods
|
||||
"clear": clear,
|
||||
"isDataLoaded": isDataLoaded,
|
||||
"ensureData": ensureData,
|
||||
"reloadData": reloadData,
|
||||
"setSort": setSort,
|
||||
"setSearch": setSearch,
|
||||
|
||||
// events
|
||||
"onDataLoading": onDataLoading,
|
||||
"onDataLoaded": onDataLoaded
|
||||
};
|
||||
}
|
||||
|
||||
// Slick.Data.RemoteModel
|
||||
$.extend(true, window, { Slick: { Data: { RemoteModel: RemoteModel }}});
|
||||
})(jQuery);
|
Before Width: | Height: | Size: 212 B |
Before Width: | Height: | Size: 208 B |
Before Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 207 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 262 B |
Before Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 4.4 KiB |
@ -45,12 +45,6 @@
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="{{ url_for('static', filename='vendor/select2/select2.css' if config.DEBUG else 'vendor/select2/select2.min.css')}}"/>
|
||||
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="{{ url_for('static', filename='vendor/slickgrid/slick.grid.css')}}"/>
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="{{ url_for('static', filename='vendor/slickgrid/slick-default-theme.css')}}"/>
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="{{ url_for('static', filename='vendor/slickgrid/smoothness/jquery-ui-1.11.3.custom.css' if config.DEBUG else 'vendor/slickgrid/smoothness/jquery-ui-1.11.3.custom.min.css')}}"/>
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="{{ url_for('static', filename='vendor/codemirror/addon/scroll/simplescrollbars.css')}}"/>
|
||||
|
||||
@ -77,10 +71,6 @@
|
||||
name: 'codemirror',
|
||||
location: '{{ url_for('static', filename='vendor/codemirror')}}',
|
||||
main: 'lib/codemirror'
|
||||
},{
|
||||
name: 'slickgrid',
|
||||
location: '{{ url_for('static', filename='vendor/slickgrid')}}',
|
||||
main: 'slick.core'
|
||||
}],
|
||||
shim: {
|
||||
"backbone": {
|
||||
@ -135,18 +125,14 @@
|
||||
"deps": ['jquery'], "exports": 'jQuery.fn.drag'
|
||||
},
|
||||
"jquery.ui": {"deps": ['jquery']},
|
||||
"slick.pgadmin.formatters": {"deps": ['slickgrid']},
|
||||
"slick.pgadmin.editors": {"deps": ['slickgrid']},
|
||||
"slickgrid": {
|
||||
"deps": [
|
||||
'jquery', "jquery.ui", "jquery.event.drag"
|
||||
],
|
||||
"exports": 'Slick'
|
||||
},
|
||||
"slickgrid/slick.grid": {
|
||||
"deps": [
|
||||
'jquery', "jquery.ui", "jquery.event.drag", "slickgrid"
|
||||
],
|
||||
"exports": 'Slick.Grid'
|
||||
},
|
||||
"flotr2": {
|
||||
deps: ['bean'],
|
||||
exports: function(bean) {
|
||||
@ -189,9 +175,11 @@
|
||||
"jquery.ui": "{{ url_for('static', filename='vendor/jquery-ui/jquery-ui-1.11.3' + ('' if config.DEBUG else '.min')) }}",
|
||||
"bignumber": "{{ url_for('static', filename='vendor/bignumber/bignumber' if config.DEBUG else 'vendor/bignumber/bignumber.min') }}",
|
||||
bean :"{{ url_for('static', filename='vendor/flotr2/bean' + ('' if config.DEBUG else '-min')) }}",
|
||||
flotr2 :"{{ url_for('static', filename='vendor/flotr2/flotr2.amd') }}"{% for script in current_app.javascripts %},
|
||||
'{{ script.name }}': "{{ script.path }}"{% endfor %}
|
||||
|
||||
flotr2 :"{{ url_for('static', filename='vendor/flotr2/flotr2.amd') }}",
|
||||
slickgrid: "{{ url_for('static', filename='js/generated/slickgrid') }}"
|
||||
{% for script in current_app.javascripts %}
|
||||
,'{{ script.name }}': "{{ script.path }}"
|
||||
{% endfor %}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -25,15 +25,9 @@ define([
|
||||
'codemirror/addon/search/search',
|
||||
'codemirror/addon/search/searchcursor',
|
||||
'codemirror/addon/search/jump-to-line',
|
||||
'backgrid.sizeable.columns', 'slickgrid/slick.formatters',
|
||||
'slick.pgadmin.formatters', 'slickgrid/slick.editors',
|
||||
'slick.pgadmin.editors', 'slickgrid/plugins/slick.autotooltips',
|
||||
'slickgrid/plugins/slick.cellrangedecorator',
|
||||
'slickgrid/plugins/slick.cellrangeselector',
|
||||
'slickgrid/plugins/slick.cellselectionmodel',
|
||||
'slickgrid/plugins/slick.cellcopymanager',
|
||||
'slickgrid/plugins/slick.rowselectionmodel',
|
||||
'slickgrid/slick.grid'
|
||||
'backgrid.sizeable.columns',
|
||||
'slick.pgadmin.formatters',
|
||||
'slick.pgadmin.editors',
|
||||
], function(
|
||||
$, _, S, alertify, pgAdmin, Backbone, Backgrid, CodeMirror,
|
||||
pgExplain, GridSelector, ActiveCellCapture, clipboard, copyData, RangeSelectionHelper, handleQueryOutputKeyboardEvent,
|
||||
@ -880,7 +874,7 @@ define([
|
||||
if (self.history_grid) {
|
||||
self.history_grid.remove();
|
||||
}
|
||||
|
||||
|
||||
self.history_collection = new HistoryBundle.historyCollection([]);
|
||||
|
||||
let queryHistoryElement = reactComponents.React.createElement(
|
||||
|
@ -15,9 +15,9 @@ import 'slickgrid.grid';
|
||||
import ColumnSelector from 'sources/selection/column_selector';
|
||||
import ActiveCellCapture from 'sources/selection/active_cell_capture';
|
||||
import 'sources/selection/grid_selector';
|
||||
import 'slickgrid.plugins/slick.cellrangeselector';
|
||||
|
||||
import XCellSelectionModel from 'sources/selection/xcell_selection_model';
|
||||
import 'sources/slickgrid/pgslick.cellrangedecorator';
|
||||
import 'sources/slickgrid/pgslick.cellrangeselector';
|
||||
|
||||
describe('ColumnSelector', function () {
|
||||
var container, data, columns, options;
|
||||
|
@ -7,6 +7,7 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
import 'slickgrid.plugins/slick.cellrangeselector';
|
||||
import XCellSelectionModel from 'sources/selection/xcell_selection_model';
|
||||
import 'slickgrid.grid';
|
||||
import Slick from 'slickgrid';
|
||||
|
@ -8,14 +8,18 @@
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
import $ from 'jquery';
|
||||
import Slick from 'slickgrid';
|
||||
import 'slickgrid';
|
||||
import 'slickgrid.grid';
|
||||
|
||||
import XCellSelectionModel from 'sources/selection/xcell_selection_model';
|
||||
import CellSelector from 'sources/slickgrid/cell_selector';
|
||||
import RangeSelectionHelper from 'sources/selection/range_selection_helper';
|
||||
|
||||
describe('CellSelector', function () {
|
||||
var container, columns, cellSelector, data, cellSelectionModel, grid;
|
||||
|
||||
var Slick = window.Slick;
|
||||
|
||||
beforeEach(function () {
|
||||
container = $('<div></div>');
|
||||
container.height(9999);
|
||||
|
@ -13,6 +13,7 @@ import RangeSelectionHelper from 'sources/selection/range_selection_helper';
|
||||
import XCellSelectionModel from 'sources/selection/xcell_selection_model';
|
||||
import Slick from 'slickgrid';
|
||||
import 'slickgrid.grid';
|
||||
|
||||
import $ from 'jquery';
|
||||
|
||||
describe('#handleQueryOutputKeyboardEvent', function () {
|
||||
|
@ -3,8 +3,9 @@
|
||||
module.exports = {
|
||||
context: __dirname + '/pgadmin/static',
|
||||
entry: {
|
||||
reactComponents: './jsx/components.jsx',
|
||||
reactComponents: './bundle/components.js',
|
||||
history: './js/history/index.js',
|
||||
slickgrid: './bundle/slickgrid.js',
|
||||
},
|
||||
output: {
|
||||
libraryTarget: 'amd',
|
||||
@ -22,8 +23,10 @@ module.exports = {
|
||||
presets: ['es2015', 'react'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'raw-loader'],
|
||||
}],
|
||||
},
|
||||
|
||||
resolve: {
|
||||
|
@ -3,6 +3,7 @@ const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
const sourcesDir = path.resolve(__dirname, 'pgadmin/static');
|
||||
const nodeModulesDir = path.resolve(__dirname, 'node_modules');
|
||||
const regressionDir = path.resolve(__dirname, 'regression');
|
||||
|
||||
module.exports = {
|
||||
@ -25,21 +26,23 @@ module.exports = {
|
||||
presets: ['es2015', 'react'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
use: [ 'style-loader', 'raw-loader' ],
|
||||
}, {
|
||||
test: /.*slickgrid\/slick\.(?!core)*/,
|
||||
loader: 'imports-loader?' +
|
||||
'jquery.ui' +
|
||||
',jquery.event.drag' +
|
||||
',slickgrid',
|
||||
}, {
|
||||
test: /.*slickgrid\/plugins\/slick\.rowselectionmodel/,
|
||||
test: /.*slickgrid\.plugins\/slick\.cellrangeselector/,
|
||||
loader: 'imports-loader?' +
|
||||
'jquery.ui' +
|
||||
',jquery.event.drag' +
|
||||
',slickgrid' +
|
||||
'!exports-loader?' +
|
||||
'Slick.RowSelectionModel',
|
||||
'Slick.CellRangeSelector',
|
||||
}, {
|
||||
test: /.*slickgrid\/slick\.core.*/,
|
||||
loader: 'imports-loader?' +
|
||||
@ -59,11 +62,12 @@ module.exports = {
|
||||
'jquery.event.drag': sourcesDir + '/vendor/jquery-ui/jquery.event.drag-2.2',
|
||||
'sources': sourcesDir + '/js',
|
||||
'underscore.string': sourcesDir + '/vendor/underscore/underscore.string',
|
||||
'vendor': sourcesDir + '/vendor/',
|
||||
'translations': regressionDir + '/javascript/fake_translations',
|
||||
'pgadmin.browser.endpoints': regressionDir + '/javascript/fake_endpoints',
|
||||
'slickgrid': sourcesDir + '/vendor/slickgrid/slick.core',
|
||||
'slickgrid.grid': sourcesDir + '/vendor/slickgrid/slick.grid',
|
||||
'slickgrid.rowselectionmodel': sourcesDir + '/vendor/slickgrid/plugins/slick.rowselectionmodel',
|
||||
'slickgrid': nodeModulesDir + '/slickgrid/',
|
||||
'slickgrid.plugins': nodeModulesDir + '/slickgrid/plugins/',
|
||||
'slickgrid.grid': nodeModulesDir + '/slickgrid/slick.grid',
|
||||
'browser': path.resolve(__dirname, 'pgadmin/browser/static/js'),
|
||||
'pgadmin': sourcesDir + '/js/pgadmin',
|
||||
},
|
||||
|
646
web/yarn.lock
@ -59,6 +59,13 @@ ajv@^4.7.0, ajv@^4.9.1:
|
||||
co "^4.6.0"
|
||||
json-stable-stringify "^1.0.1"
|
||||
|
||||
ajv@^5.0.0:
|
||||
version "5.1.5"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.1.5.tgz#8734931b601f00d4feef7c65738d77d1b65d1f68"
|
||||
dependencies:
|
||||
co "^4.6.0"
|
||||
json-stable-stringify "^1.0.1"
|
||||
|
||||
align-text@^0.1.1, align-text@^0.1.3:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
|
||||
@ -67,6 +74,10 @@ align-text@^0.1.1, align-text@^0.1.3:
|
||||
longest "^1.0.1"
|
||||
repeat-string "^1.5.2"
|
||||
|
||||
alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
|
||||
|
||||
amdefine@>=0.0.4:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
|
||||
@ -216,6 +227,17 @@ asynckit@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||
|
||||
autoprefixer@^6.3.1:
|
||||
version "6.7.7"
|
||||
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
|
||||
dependencies:
|
||||
browserslist "^1.7.6"
|
||||
caniuse-db "^1.0.30000634"
|
||||
normalize-range "^0.1.2"
|
||||
num2fraction "^1.2.2"
|
||||
postcss "^5.2.16"
|
||||
postcss-value-parser "^3.2.3"
|
||||
|
||||
aws-sign2@~0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
|
||||
@ -231,7 +253,7 @@ axios@^0.16.1:
|
||||
follow-redirects "^1.2.3"
|
||||
is-buffer "^1.1.5"
|
||||
|
||||
babel-code-frame@^6.16.0, babel-code-frame@^6.22.0:
|
||||
babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0:
|
||||
version "6.22.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4"
|
||||
dependencies:
|
||||
@ -751,6 +773,10 @@ backo2@1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947"
|
||||
|
||||
balanced-match@^0.4.2:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
@ -974,6 +1000,13 @@ browserify@^14.0.0, browserify@~14.1.0:
|
||||
vm-browserify "~0.0.1"
|
||||
xtend "^4.0.0"
|
||||
|
||||
browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
|
||||
version "1.7.7"
|
||||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9"
|
||||
dependencies:
|
||||
caniuse-db "^1.0.30000639"
|
||||
electron-to-chromium "^1.2.7"
|
||||
|
||||
buffer-xor@^1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
|
||||
@ -1031,6 +1064,19 @@ camelcase@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
|
||||
|
||||
caniuse-api@^1.5.2:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
|
||||
dependencies:
|
||||
browserslist "^1.3.6"
|
||||
caniuse-db "^1.0.30000529"
|
||||
lodash.memoize "^4.1.2"
|
||||
lodash.uniq "^4.5.0"
|
||||
|
||||
caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
|
||||
version "1.0.30000684"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000684.tgz#99acb0118b8fd1fdd601a15e0c0f2dfc15a81680"
|
||||
|
||||
caseless@~0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
|
||||
@ -1102,6 +1148,12 @@ circular-json@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d"
|
||||
|
||||
clap@^1.0.9:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.0.tgz#59c90fe3e137104746ff19469a27a634ff68c857"
|
||||
dependencies:
|
||||
chalk "^1.1.3"
|
||||
|
||||
cli-cursor@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
|
||||
@ -1128,15 +1180,57 @@ cliui@^3.2.0:
|
||||
strip-ansi "^3.0.1"
|
||||
wrap-ansi "^2.0.0"
|
||||
|
||||
clone@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
|
||||
|
||||
co@^4.6.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||
|
||||
coa@~1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.3.tgz#1b54a5e1dcf77c990455d4deea98c564416dc893"
|
||||
dependencies:
|
||||
q "^1.1.2"
|
||||
|
||||
code-point-at@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
|
||||
|
||||
colors@^1.1.0:
|
||||
color-convert@^1.3.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a"
|
||||
dependencies:
|
||||
color-name "^1.1.1"
|
||||
|
||||
color-name@^1.0.0, color-name@^1.1.1:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d"
|
||||
|
||||
color-string@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991"
|
||||
dependencies:
|
||||
color-name "^1.0.0"
|
||||
|
||||
color@^0.11.0:
|
||||
version "0.11.4"
|
||||
resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764"
|
||||
dependencies:
|
||||
clone "^1.0.2"
|
||||
color-convert "^1.3.0"
|
||||
color-string "^0.3.0"
|
||||
|
||||
colormin@^1.0.5:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133"
|
||||
dependencies:
|
||||
color "^0.11.0"
|
||||
css-color-names "0.0.4"
|
||||
has "^1.0.1"
|
||||
|
||||
colors@^1.1.0, colors@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
|
||||
|
||||
@ -1306,6 +1400,29 @@ crypto-browserify@^3.0.0, crypto-browserify@^3.11.0:
|
||||
public-encrypt "^4.0.0"
|
||||
randombytes "^2.0.0"
|
||||
|
||||
css-color-names@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
|
||||
|
||||
css-loader@^0.28.4:
|
||||
version "0.28.4"
|
||||
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.4.tgz#6cf3579192ce355e8b38d5f42dd7a1f2ec898d0f"
|
||||
dependencies:
|
||||
babel-code-frame "^6.11.0"
|
||||
css-selector-tokenizer "^0.7.0"
|
||||
cssnano ">=2.6.1 <4"
|
||||
icss-utils "^2.1.0"
|
||||
loader-utils "^1.0.2"
|
||||
lodash.camelcase "^4.3.0"
|
||||
object-assign "^4.0.1"
|
||||
postcss "^5.0.6"
|
||||
postcss-modules-extract-imports "^1.0.0"
|
||||
postcss-modules-local-by-default "^1.0.1"
|
||||
postcss-modules-scope "^1.0.0"
|
||||
postcss-modules-values "^1.1.0"
|
||||
postcss-value-parser "^3.3.0"
|
||||
source-list-map "^0.1.7"
|
||||
|
||||
css-select@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
|
||||
@ -1315,10 +1432,66 @@ css-select@~1.2.0:
|
||||
domutils "1.5.1"
|
||||
nth-check "~1.0.1"
|
||||
|
||||
css-selector-tokenizer@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86"
|
||||
dependencies:
|
||||
cssesc "^0.1.0"
|
||||
fastparse "^1.1.1"
|
||||
regexpu-core "^1.0.0"
|
||||
|
||||
css-what@2.1:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd"
|
||||
|
||||
cssesc@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4"
|
||||
|
||||
"cssnano@>=2.6.1 <4":
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38"
|
||||
dependencies:
|
||||
autoprefixer "^6.3.1"
|
||||
decamelize "^1.1.2"
|
||||
defined "^1.0.0"
|
||||
has "^1.0.1"
|
||||
object-assign "^4.0.1"
|
||||
postcss "^5.0.14"
|
||||
postcss-calc "^5.2.0"
|
||||
postcss-colormin "^2.1.8"
|
||||
postcss-convert-values "^2.3.4"
|
||||
postcss-discard-comments "^2.0.4"
|
||||
postcss-discard-duplicates "^2.0.1"
|
||||
postcss-discard-empty "^2.0.1"
|
||||
postcss-discard-overridden "^0.1.1"
|
||||
postcss-discard-unused "^2.2.1"
|
||||
postcss-filter-plugins "^2.0.0"
|
||||
postcss-merge-idents "^2.1.5"
|
||||
postcss-merge-longhand "^2.0.1"
|
||||
postcss-merge-rules "^2.0.3"
|
||||
postcss-minify-font-values "^1.0.2"
|
||||
postcss-minify-gradients "^1.0.1"
|
||||
postcss-minify-params "^1.0.4"
|
||||
postcss-minify-selectors "^2.0.4"
|
||||
postcss-normalize-charset "^1.1.0"
|
||||
postcss-normalize-url "^3.0.7"
|
||||
postcss-ordered-values "^2.1.0"
|
||||
postcss-reduce-idents "^2.2.2"
|
||||
postcss-reduce-initial "^1.0.0"
|
||||
postcss-reduce-transforms "^1.0.3"
|
||||
postcss-svgo "^2.1.1"
|
||||
postcss-unique-selectors "^2.0.2"
|
||||
postcss-value-parser "^3.2.3"
|
||||
postcss-zindex "^2.0.1"
|
||||
|
||||
csso@~2.3.1:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85"
|
||||
dependencies:
|
||||
clap "^1.0.9"
|
||||
source-map "^0.5.3"
|
||||
|
||||
custom-event@~1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/custom-event/-/custom-event-1.0.1.tgz#5d02a46850adf1b4a317946a3928fccb5bfd0425"
|
||||
@ -1367,7 +1540,7 @@ debug@^2.1.1, debug@^2.2.0, debug@^2.4.5:
|
||||
dependencies:
|
||||
ms "2.0.0"
|
||||
|
||||
decamelize@^1.0.0, decamelize@^1.1.1:
|
||||
decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
|
||||
|
||||
@ -1532,6 +1705,10 @@ ee-first@1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
|
||||
|
||||
electron-to-chromium@^1.2.7:
|
||||
version "1.3.14"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.14.tgz#64af0f9efd3c3c6acd57d71f83b49ca7ee9c4b43"
|
||||
|
||||
elliptic@^6.0.0:
|
||||
version "6.4.0"
|
||||
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df"
|
||||
@ -1794,6 +1971,10 @@ espree@^3.4.0:
|
||||
acorn "^5.0.1"
|
||||
acorn-jsx "^3.0.0"
|
||||
|
||||
esprima@^2.6.0:
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
|
||||
|
||||
esprima@^3.1.1:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
|
||||
@ -1905,6 +2086,10 @@ fast-levenshtein@~2.0.4:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
|
||||
|
||||
fastparse@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
|
||||
|
||||
fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.9:
|
||||
version "0.8.12"
|
||||
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.12.tgz#10b5d92f76d45575fd63a217d4ea02bea2f8ed04"
|
||||
@ -1987,6 +2172,10 @@ flat-cache@^1.2.1:
|
||||
graceful-fs "^4.1.2"
|
||||
write "^0.2.1"
|
||||
|
||||
flatten@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
|
||||
|
||||
follow-redirects@^1.2.3:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.2.3.tgz#01abaeca85e3609837d9fcda3167a7e42fdaca21"
|
||||
@ -2253,6 +2442,10 @@ hosted-git-info@^2.1.4:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67"
|
||||
|
||||
html-comment-regex@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e"
|
||||
|
||||
htmlescape@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/htmlescape/-/htmlescape-1.1.1.tgz#3a03edc2214bca3b66424a3e7959349509cb0351"
|
||||
@ -2300,6 +2493,16 @@ iconv-lite@0.4.15, iconv-lite@~0.4.13:
|
||||
version "0.4.15"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.15.tgz#fe265a218ac6a57cfe854927e9d04c19825eddeb"
|
||||
|
||||
icss-replace-symbols@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"
|
||||
|
||||
icss-utils@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962"
|
||||
dependencies:
|
||||
postcss "^6.0.1"
|
||||
|
||||
ieee754@^1.1.4:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
|
||||
@ -2325,6 +2528,10 @@ imurmurhash@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
|
||||
|
||||
indexes-of@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
|
||||
|
||||
indexof@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
|
||||
@ -2399,6 +2606,10 @@ invert-kv@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
|
||||
|
||||
is-absolute-url@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
|
||||
|
||||
is-arrayish@^0.2.1:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
||||
@ -2508,6 +2719,10 @@ is-path-inside@^1.0.0:
|
||||
dependencies:
|
||||
path-is-inside "^1.0.1"
|
||||
|
||||
is-plain-obj@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
|
||||
|
||||
is-posix-bracket@^0.1.0:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
|
||||
@ -2540,6 +2755,12 @@ is-subset@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6"
|
||||
|
||||
is-svg@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
|
||||
dependencies:
|
||||
html-comment-regex "^1.1.0"
|
||||
|
||||
is-symbol@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
||||
@ -2595,6 +2816,18 @@ jasmine-enzyme@^3.1.0:
|
||||
dependencies:
|
||||
enzyme-matchers "^3.2.0"
|
||||
|
||||
jquery-ui@>=1.8.0:
|
||||
version "1.12.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery-ui/-/jquery-ui-1.12.1.tgz#bcb4045c8dd0539c134bc1488cdd3e768a7a9e51"
|
||||
|
||||
jquery@>=1.8.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.2.1.tgz#5c4d9de652af6cd0a770154a631bba12b015c787"
|
||||
|
||||
js-base64@^2.1.9:
|
||||
version "2.1.9"
|
||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
|
||||
|
||||
js-string-escape@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef"
|
||||
@ -2610,6 +2843,13 @@ js-yaml@^3.5.1:
|
||||
argparse "^1.0.7"
|
||||
esprima "^3.1.1"
|
||||
|
||||
js-yaml@~3.7.0:
|
||||
version "3.7.0"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
|
||||
dependencies:
|
||||
argparse "^1.0.7"
|
||||
esprima "^2.6.0"
|
||||
|
||||
jsbn@~0.1.0:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
|
||||
@ -2879,6 +3119,10 @@ lodash.bind@^4.1.4:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35"
|
||||
|
||||
lodash.camelcase@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
|
||||
|
||||
lodash.defaults@^4.0.1:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
|
||||
@ -2926,6 +3170,10 @@ lodash.map@^4.4.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
|
||||
|
||||
lodash.memoize@^4.1.2:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
|
||||
|
||||
lodash.memoize@~3.0.3:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f"
|
||||
@ -2950,6 +3198,10 @@ lodash.some@^4.4.0:
|
||||
version "4.6.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
|
||||
|
||||
lodash.uniq@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||
|
||||
lodash@^3.10.1, lodash@^3.8.0:
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
|
||||
@ -2979,6 +3231,14 @@ lru-cache@2.2.x:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"
|
||||
|
||||
macaddress@^0.2.8:
|
||||
version "0.2.8"
|
||||
resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
|
||||
|
||||
math-expression-evaluator@^1.2.14:
|
||||
version "1.2.17"
|
||||
resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
|
||||
|
||||
media-typer@0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
|
||||
@ -3057,7 +3317,7 @@ mkdirp@0.5.0:
|
||||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0:
|
||||
"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
|
||||
dependencies:
|
||||
@ -3186,6 +3446,19 @@ normalize-path@^2.0.1:
|
||||
dependencies:
|
||||
remove-trailing-separator "^1.0.1"
|
||||
|
||||
normalize-range@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
|
||||
|
||||
normalize-url@^1.4.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
|
||||
dependencies:
|
||||
object-assign "^4.0.1"
|
||||
prepend-http "^1.0.0"
|
||||
query-string "^4.1.0"
|
||||
sort-keys "^1.0.0"
|
||||
|
||||
npmlog@^4.0.2:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.0.tgz#dc59bee85f64f00ed424efb2af0783df25d1c0b5"
|
||||
@ -3201,6 +3474,10 @@ nth-check@~1.0.1:
|
||||
dependencies:
|
||||
boolbase "~1.0.0"
|
||||
|
||||
num2fraction@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
|
||||
|
||||
number-is-nan@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
|
||||
@ -3486,10 +3763,260 @@ pluralize@^1.2.1:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45"
|
||||
|
||||
postcss-calc@^5.2.0:
|
||||
version "5.3.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"
|
||||
dependencies:
|
||||
postcss "^5.0.2"
|
||||
postcss-message-helpers "^2.0.0"
|
||||
reduce-css-calc "^1.2.6"
|
||||
|
||||
postcss-colormin@^2.1.8:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b"
|
||||
dependencies:
|
||||
colormin "^1.0.5"
|
||||
postcss "^5.0.13"
|
||||
postcss-value-parser "^3.2.3"
|
||||
|
||||
postcss-convert-values@^2.3.4:
|
||||
version "2.6.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d"
|
||||
dependencies:
|
||||
postcss "^5.0.11"
|
||||
postcss-value-parser "^3.1.2"
|
||||
|
||||
postcss-discard-comments@^2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d"
|
||||
dependencies:
|
||||
postcss "^5.0.14"
|
||||
|
||||
postcss-discard-duplicates@^2.0.1:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932"
|
||||
dependencies:
|
||||
postcss "^5.0.4"
|
||||
|
||||
postcss-discard-empty@^2.0.1:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5"
|
||||
dependencies:
|
||||
postcss "^5.0.14"
|
||||
|
||||
postcss-discard-overridden@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58"
|
||||
dependencies:
|
||||
postcss "^5.0.16"
|
||||
|
||||
postcss-discard-unused@^2.2.1:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433"
|
||||
dependencies:
|
||||
postcss "^5.0.14"
|
||||
uniqs "^2.0.0"
|
||||
|
||||
postcss-filter-plugins@^2.0.0:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c"
|
||||
dependencies:
|
||||
postcss "^5.0.4"
|
||||
uniqid "^4.0.0"
|
||||
|
||||
postcss-merge-idents@^2.1.5:
|
||||
version "2.1.7"
|
||||
resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
|
||||
dependencies:
|
||||
has "^1.0.1"
|
||||
postcss "^5.0.10"
|
||||
postcss-value-parser "^3.1.1"
|
||||
|
||||
postcss-merge-longhand@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658"
|
||||
dependencies:
|
||||
postcss "^5.0.4"
|
||||
|
||||
postcss-merge-rules@^2.0.3:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721"
|
||||
dependencies:
|
||||
browserslist "^1.5.2"
|
||||
caniuse-api "^1.5.2"
|
||||
postcss "^5.0.4"
|
||||
postcss-selector-parser "^2.2.2"
|
||||
vendors "^1.0.0"
|
||||
|
||||
postcss-message-helpers@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e"
|
||||
|
||||
postcss-minify-font-values@^1.0.2:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69"
|
||||
dependencies:
|
||||
object-assign "^4.0.1"
|
||||
postcss "^5.0.4"
|
||||
postcss-value-parser "^3.0.2"
|
||||
|
||||
postcss-minify-gradients@^1.0.1:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1"
|
||||
dependencies:
|
||||
postcss "^5.0.12"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
postcss-minify-params@^1.0.4:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3"
|
||||
dependencies:
|
||||
alphanum-sort "^1.0.1"
|
||||
postcss "^5.0.2"
|
||||
postcss-value-parser "^3.0.2"
|
||||
uniqs "^2.0.0"
|
||||
|
||||
postcss-minify-selectors@^2.0.4:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf"
|
||||
dependencies:
|
||||
alphanum-sort "^1.0.2"
|
||||
has "^1.0.1"
|
||||
postcss "^5.0.14"
|
||||
postcss-selector-parser "^2.0.0"
|
||||
|
||||
postcss-modules-extract-imports@^1.0.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85"
|
||||
dependencies:
|
||||
postcss "^6.0.1"
|
||||
|
||||
postcss-modules-local-by-default@^1.0.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069"
|
||||
dependencies:
|
||||
css-selector-tokenizer "^0.7.0"
|
||||
postcss "^6.0.1"
|
||||
|
||||
postcss-modules-scope@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90"
|
||||
dependencies:
|
||||
css-selector-tokenizer "^0.7.0"
|
||||
postcss "^6.0.1"
|
||||
|
||||
postcss-modules-values@^1.1.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20"
|
||||
dependencies:
|
||||
icss-replace-symbols "^1.1.0"
|
||||
postcss "^6.0.1"
|
||||
|
||||
postcss-normalize-charset@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1"
|
||||
dependencies:
|
||||
postcss "^5.0.5"
|
||||
|
||||
postcss-normalize-url@^3.0.7:
|
||||
version "3.0.8"
|
||||
resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222"
|
||||
dependencies:
|
||||
is-absolute-url "^2.0.0"
|
||||
normalize-url "^1.4.0"
|
||||
postcss "^5.0.14"
|
||||
postcss-value-parser "^3.2.3"
|
||||
|
||||
postcss-ordered-values@^2.1.0:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d"
|
||||
dependencies:
|
||||
postcss "^5.0.4"
|
||||
postcss-value-parser "^3.0.1"
|
||||
|
||||
postcss-reduce-idents@^2.2.2:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3"
|
||||
dependencies:
|
||||
postcss "^5.0.4"
|
||||
postcss-value-parser "^3.0.2"
|
||||
|
||||
postcss-reduce-initial@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea"
|
||||
dependencies:
|
||||
postcss "^5.0.4"
|
||||
|
||||
postcss-reduce-transforms@^1.0.3:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1"
|
||||
dependencies:
|
||||
has "^1.0.1"
|
||||
postcss "^5.0.8"
|
||||
postcss-value-parser "^3.0.1"
|
||||
|
||||
postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90"
|
||||
dependencies:
|
||||
flatten "^1.0.2"
|
||||
indexes-of "^1.0.1"
|
||||
uniq "^1.0.1"
|
||||
|
||||
postcss-svgo@^2.1.1:
|
||||
version "2.1.6"
|
||||
resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d"
|
||||
dependencies:
|
||||
is-svg "^2.0.0"
|
||||
postcss "^5.0.14"
|
||||
postcss-value-parser "^3.2.3"
|
||||
svgo "^0.7.0"
|
||||
|
||||
postcss-unique-selectors@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d"
|
||||
dependencies:
|
||||
alphanum-sort "^1.0.1"
|
||||
postcss "^5.0.4"
|
||||
uniqs "^2.0.0"
|
||||
|
||||
postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15"
|
||||
|
||||
postcss-zindex@^2.0.1:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22"
|
||||
dependencies:
|
||||
has "^1.0.1"
|
||||
postcss "^5.0.4"
|
||||
uniqs "^2.0.0"
|
||||
|
||||
postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16:
|
||||
version "5.2.17"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.17.tgz#cf4f597b864d65c8a492b2eabe9d706c879c388b"
|
||||
dependencies:
|
||||
chalk "^1.1.3"
|
||||
js-base64 "^2.1.9"
|
||||
source-map "^0.5.6"
|
||||
supports-color "^3.2.3"
|
||||
|
||||
postcss@^6.0.1:
|
||||
version "6.0.2"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.2.tgz#5c4fea589f0ac3b00caa75b1cbc3a284195b7e5d"
|
||||
dependencies:
|
||||
chalk "^1.1.3"
|
||||
source-map "^0.5.6"
|
||||
supports-color "^3.2.3"
|
||||
|
||||
prelude-ls@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
|
||||
prepend-http@^1.0.0:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
|
||||
|
||||
preserve@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
|
||||
@ -3545,6 +4072,10 @@ punycode@^1.2.4, punycode@^1.3.2, punycode@^1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
|
||||
|
||||
q@^1.1.2:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
|
||||
|
||||
qjobs@^1.1.4:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/qjobs/-/qjobs-1.1.5.tgz#659de9f2cf8dcc27a1481276f205377272382e73"
|
||||
@ -3557,6 +4088,13 @@ qs@~6.3.0:
|
||||
version "6.3.2"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c"
|
||||
|
||||
query-string@^4.1.0:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
|
||||
dependencies:
|
||||
object-assign "^4.1.0"
|
||||
strict-uri-encode "^1.0.0"
|
||||
|
||||
querystring-es3@^0.2.0, querystring-es3@~0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
|
||||
@ -3590,6 +4128,10 @@ raw-body@~2.2.0:
|
||||
iconv-lite "0.4.15"
|
||||
unpipe "1.0.0"
|
||||
|
||||
raw-loader@^0.5.1:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa"
|
||||
|
||||
rc@^1.1.7:
|
||||
version "1.2.1"
|
||||
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95"
|
||||
@ -3696,6 +4238,20 @@ rechoir@^0.6.2:
|
||||
dependencies:
|
||||
resolve "^1.1.6"
|
||||
|
||||
reduce-css-calc@^1.2.6:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
|
||||
dependencies:
|
||||
balanced-match "^0.4.2"
|
||||
math-expression-evaluator "^1.2.14"
|
||||
reduce-function-call "^1.0.1"
|
||||
|
||||
reduce-function-call@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99"
|
||||
dependencies:
|
||||
balanced-match "^0.4.2"
|
||||
|
||||
regenerate@^1.2.1:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260"
|
||||
@ -3719,6 +4275,14 @@ regex-cache@^0.4.2:
|
||||
is-equal-shallow "^0.1.3"
|
||||
is-primitive "^2.0.0"
|
||||
|
||||
regexpu-core@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b"
|
||||
dependencies:
|
||||
regenerate "^1.2.1"
|
||||
regjsgen "^0.2.0"
|
||||
regjsparser "^0.1.4"
|
||||
|
||||
regexpu-core@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
|
||||
@ -3898,6 +4462,16 @@ safe-buffer@~5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7"
|
||||
|
||||
sax@~1.2.1:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828"
|
||||
|
||||
schema-utils@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.3.0.tgz#f5877222ce3e931edae039f17eb3716e7137f8cf"
|
||||
dependencies:
|
||||
ajv "^5.0.0"
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@^5.3.0:
|
||||
version "5.3.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
||||
@ -3964,6 +4538,13 @@ slice-ansi@0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
|
||||
|
||||
"slickgrid@git+https://github.com/6pac/SlickGrid.git#2.3.7":
|
||||
version "2.3.4"
|
||||
resolved "git+https://github.com/6pac/SlickGrid.git#8ff68140bd5be132d2913640b4b1f2512219d075"
|
||||
dependencies:
|
||||
jquery ">=1.8.0"
|
||||
jquery-ui ">=1.8.0"
|
||||
|
||||
sntp@1.x.x:
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
|
||||
@ -4014,6 +4595,16 @@ socket.io@1.7.3:
|
||||
socket.io-client "1.7.3"
|
||||
socket.io-parser "2.3.1"
|
||||
|
||||
sort-keys@^1.0.0:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
|
||||
dependencies:
|
||||
is-plain-obj "^1.0.0"
|
||||
|
||||
source-list-map@^0.1.7:
|
||||
version "0.1.8"
|
||||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106"
|
||||
|
||||
source-list-map@^1.1.1:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-1.1.2.tgz#9889019d1024cce55cdc069498337ef6186a11a1"
|
||||
@ -4101,6 +4692,10 @@ stream-splicer@^2.0.0:
|
||||
inherits "^2.0.1"
|
||||
readable-stream "^2.0.2"
|
||||
|
||||
strict-uri-encode@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
|
||||
|
||||
string-width@^1.0.1, string-width@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
|
||||
@ -4150,6 +4745,13 @@ strip-json-comments@~2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
|
||||
style-loader@^0.18.2:
|
||||
version "0.18.2"
|
||||
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb"
|
||||
dependencies:
|
||||
loader-utils "^1.0.2"
|
||||
schema-utils "^0.3.0"
|
||||
|
||||
subarg@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/subarg/-/subarg-1.0.0.tgz#f62cf17581e996b48fc965699f54c06ae268b8d2"
|
||||
@ -4160,12 +4762,24 @@ supports-color@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
||||
|
||||
supports-color@^3.1.0:
|
||||
supports-color@^3.1.0, supports-color@^3.2.3:
|
||||
version "3.2.3"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
|
||||
dependencies:
|
||||
has-flag "^1.0.0"
|
||||
|
||||
svgo@^0.7.0:
|
||||
version "0.7.2"
|
||||
resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
|
||||
dependencies:
|
||||
coa "~1.0.1"
|
||||
colors "~1.1.2"
|
||||
csso "~2.3.1"
|
||||
js-yaml "~3.7.0"
|
||||
mkdirp "~0.5.1"
|
||||
sax "~1.2.1"
|
||||
whet.extend "~0.9.9"
|
||||
|
||||
syntax-error@^1.1.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.3.0.tgz#1ed9266c4d40be75dc55bf9bb1cb77062bb96ca1"
|
||||
@ -4339,6 +4953,20 @@ underscore@~1.8.3:
|
||||
version "1.8.3"
|
||||
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
|
||||
|
||||
uniq@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
|
||||
|
||||
uniqid@^4.0.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1"
|
||||
dependencies:
|
||||
macaddress "^0.2.8"
|
||||
|
||||
uniqs@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
|
||||
|
||||
unpipe@1.0.0, unpipe@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
||||
@ -4392,6 +5020,10 @@ validate-npm-package-license@^3.0.1:
|
||||
spdx-correct "~1.0.0"
|
||||
spdx-expression-parse "~1.0.0"
|
||||
|
||||
vendors@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22"
|
||||
|
||||
verror@1.3.6:
|
||||
version "1.3.6"
|
||||
resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c"
|
||||
@ -4473,6 +5105,10 @@ whatwg-fetch@>=0.10.0:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"
|
||||
|
||||
whet.extend@~0.9.9:
|
||||
version "0.9.9"
|
||||
resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
|
||||
|
||||
which-module@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
|
||||
|