handsontable 0.34.1 → 0.34.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/.travis.yml +2 -0
- package/README.md +127 -96
- package/commonjs/core.js +11 -6
- package/commonjs/helpers/dom/element.js +4 -3
- package/commonjs/helpers/mixed.js +8 -4
- package/commonjs/index.js +5 -4
- package/commonjs/pluginHooks.js +18 -2
- package/commonjs/plugins/copyPaste/clipboardData.js +31 -0
- package/commonjs/plugins/copyPaste/contextMenuItem/copy.js +1 -2
- package/commonjs/plugins/copyPaste/contextMenuItem/cut.js +1 -2
- package/commonjs/plugins/copyPaste/copyPaste.js +127 -134
- package/commonjs/plugins/copyPaste/pasteEvent.js +19 -0
- package/commonjs/plugins/copyPaste/test/copyPaste.e2e.js +90 -189
- package/commonjs/plugins/copyPaste/test/textarea.unit.js +2 -2
- package/commonjs/plugins/copyPaste/textarea.js +2 -1
- package/commonjs/plugins/manualColumnMove/manualColumnMove.js +8 -11
- package/commonjs/plugins/manualColumnMove/test/manualColumnMoveUI.e2e.js +35 -0
- package/commonjs/plugins/manualRowMove/manualRowMove.js +9 -12
- package/commonjs/plugins/manualRowMove/test/manualRowMove.e2e.js +256 -60
- package/commonjs/plugins/manualRowMove/test/manualRowMoveUI.e2e.js +40 -182
- package/commonjs/plugins/manualRowMove/ui/_base.js +2 -2
- package/commonjs/tableView.js +1 -0
- package/dist/handsontable.css +6 -5
- package/dist/handsontable.css.map +1 -1
- package/dist/handsontable.full.css +6 -5
- package/dist/handsontable.full.js +37721 -42290
- package/dist/handsontable.full.min.css +4 -4
- package/dist/handsontable.full.min.js +5 -5
- package/dist/handsontable.js +28732 -28433
- package/dist/handsontable.js.map +1 -1
- package/dist/handsontable.min.css +4 -4
- package/dist/handsontable.min.js +3 -3
- package/es/core.js +11 -6
- package/es/helpers/dom/element.js +4 -3
- package/es/helpers/mixed.js +4 -4
- package/es/index.js +3 -4
- package/es/pluginHooks.js +18 -2
- package/es/plugins/copyPaste/clipboardData.js +27 -0
- package/es/plugins/copyPaste/contextMenuItem/copy.js +1 -2
- package/es/plugins/copyPaste/contextMenuItem/cut.js +1 -2
- package/es/plugins/copyPaste/copyPaste.js +124 -132
- package/es/plugins/copyPaste/pasteEvent.js +11 -0
- package/es/plugins/copyPaste/test/copyPaste.e2e.js +90 -189
- package/es/plugins/copyPaste/test/textarea.unit.js +2 -2
- package/es/plugins/copyPaste/textarea.js +2 -1
- package/es/plugins/manualColumnMove/manualColumnMove.js +8 -11
- package/es/plugins/manualColumnMove/test/manualColumnMoveUI.e2e.js +35 -0
- package/es/plugins/manualRowMove/manualRowMove.js +9 -12
- package/es/plugins/manualRowMove/test/manualRowMove.e2e.js +256 -60
- package/es/plugins/manualRowMove/test/manualRowMoveUI.e2e.js +40 -182
- package/es/plugins/manualRowMove/ui/_base.js +2 -2
- package/es/tableView.js +1 -0
- package/handsontable.jquery.json +1 -1
- package/hot.config.js +1 -1
- package/package.json +5 -5
- package/src/3rdparty/walkontable/dist/walkontable.js +27234 -11175
- package/src/3rdparty/walkontable/dist/walkontable.js.map +1 -1
- package/src/3rdparty/walkontable/test/dist/helpers.entry.js +32 -36
- package/src/3rdparty/walkontable/test/dist/helpers.entry.js.map +1 -1
- package/src/3rdparty/walkontable/test/dist/specs.entry.js +36 -39
- package/src/3rdparty/walkontable/test/dist/specs.entry.js.map +1 -1
- package/src/core.js +11 -6
- package/src/css/handsontable.css +1 -2
- package/src/helpers/dom/element.js +4 -3
- package/src/helpers/mixed.js +3 -3
- package/src/index.js +1 -2
- package/src/pluginHooks.js +18 -2
- package/src/plugins/copyPaste/clipboardData.js +11 -0
- package/src/plugins/copyPaste/contextMenuItem/copy.js +1 -2
- package/src/plugins/copyPaste/contextMenuItem/cut.js +1 -2
- package/src/plugins/copyPaste/copyPaste.css +3 -1
- package/src/plugins/copyPaste/copyPaste.js +120 -127
- package/src/plugins/copyPaste/pasteEvent.js +7 -0
- package/src/plugins/copyPaste/test/copyPaste.e2e.js +75 -193
- package/src/plugins/copyPaste/test/textarea.unit.js +2 -2
- package/src/plugins/copyPaste/textarea.js +2 -1
- package/src/plugins/manualColumnMove/manualColumnMove.js +6 -9
- package/src/plugins/manualColumnMove/test/manualColumnMoveUI.e2e.js +35 -0
- package/src/plugins/manualRowMove/manualRowMove.js +7 -10
- package/src/plugins/manualRowMove/test/manualRowMove.e2e.js +282 -86
- package/src/plugins/manualRowMove/test/manualRowMoveUI.e2e.js +51 -190
- package/src/plugins/manualRowMove/ui/_base.js +2 -2
- package/test/dist/e2e.entry.js +31381 -31131
- package/test/dist/e2e.entry.js.map +1 -1
- package/test/dist/helpers.entry.js +16 -19
- package/test/dist/helpers.entry.js.map +1 -1
- package/test/e2e/Core_listen.spec.js +32 -0
- package/test/e2e/Core_selection.spec.js +1 -1
- package/test/e2e/Core_validate.spec.js +29 -0
- package/test/e2e/renderers/checkboxRenderer.spec.js +20 -7
- package/test/e2e/settings/fragmentSelection.spec.js +12 -9
- package/test/scripts/trigger-pro-tests.sh +41 -0
- package/yarn.lock +260 -208
- package/.npmignore +0 -19
- package/demo/bower_components/numbro/package.json +0 -63
@@ -54,7 +54,7 @@ describe('manualRowMove', function () {
|
|
54
54
|
manualRowMove: true
|
55
55
|
});
|
56
56
|
|
57
|
-
var $headers = [
|
57
|
+
var $headers = [spec().$container.find('tbody tr:eq(0) th:eq(0)'), spec().$container.find('tbody tr:eq(1) th:eq(0)'), spec().$container.find('tbody tr:eq(2) th:eq(0)')];
|
58
58
|
|
59
59
|
$headers[0].simulate('mousedown');
|
60
60
|
$headers[0].simulate('mouseup');
|
@@ -66,202 +66,60 @@ describe('manualRowMove', function () {
|
|
66
66
|
expect(spec().$container.find('.ht__manualRowMove--backlight:visible').length).toBe(1);
|
67
67
|
});
|
68
68
|
|
69
|
-
|
70
|
-
|
69
|
+
describe('backlight', function () {
|
70
|
+
it('should set proper left position of element when colWidths is undefined', function () {
|
71
|
+
handsontable({
|
72
|
+
data: Handsontable.helper.createSpreadsheetData(10, 10),
|
73
|
+
rowHeaders: true,
|
74
|
+
manualRowMove: true
|
75
|
+
});
|
71
76
|
|
72
|
-
|
73
|
-
data: Handsontable.helper.createSpreadsheetData(30, 30),
|
74
|
-
rowHeaders: true,
|
75
|
-
colHeaders: true,
|
76
|
-
manualRowMove: true,
|
77
|
-
beforeRowMove: function beforeRowMove(rows, target) {
|
78
|
-
targetParameterInsideCallback = target;
|
79
|
-
}
|
80
|
-
});
|
81
|
-
var $fistHeader = this.$container.find('tbody tr:eq(0) th:eq(0)');
|
77
|
+
var $headerTH = spec().$container.find('tbody tr:eq(0) th:eq(0)');
|
82
78
|
|
83
|
-
|
84
|
-
|
85
|
-
|
79
|
+
$headerTH.simulate('mousedown');
|
80
|
+
$headerTH.simulate('mouseup');
|
81
|
+
$headerTH.simulate('mousedown');
|
86
82
|
|
87
|
-
|
88
|
-
$fistHeader.simulate('mousemove', {
|
89
|
-
clientY: $fistHeader.offset().bottom - $fistHeader.height() - 50
|
83
|
+
expect(spec().$container.find('.ht__manualRowMove--backlight')[0].offsetLeft).toBe(50);
|
90
84
|
});
|
91
|
-
$fistHeader.simulate('mouseup');
|
92
85
|
|
93
|
-
|
94
|
-
|
86
|
+
it('should set proper left position of element when colWidths is defined', function () {
|
87
|
+
handsontable({
|
88
|
+
data: Handsontable.helper.createSpreadsheetData(10, 10),
|
89
|
+
rowHeaders: true,
|
90
|
+
manualRowMove: true,
|
91
|
+
colWidths: 100
|
92
|
+
});
|
95
93
|
|
96
|
-
|
97
|
-
var targetParameterInsideCallback = void 0;
|
94
|
+
var $headerTH = spec().$container.find('tbody tr:eq(0) th:eq(0)');
|
98
95
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
manualRowMove: true,
|
103
|
-
colHeaders: true,
|
104
|
-
beforeRowMove: function beforeRowMove(rows, target) {
|
105
|
-
targetParameterInsideCallback = target;
|
106
|
-
}
|
107
|
-
});
|
108
|
-
var $fistHeader = this.$container.find('tbody tr:eq(0) th:eq(0)');
|
96
|
+
$headerTH.simulate('mousedown');
|
97
|
+
$headerTH.simulate('mouseup');
|
98
|
+
$headerTH.simulate('mousedown');
|
109
99
|
|
110
|
-
|
111
|
-
this.$container.find('tbody tr:eq(1) th:eq(0)').simulate('mouseup');
|
112
|
-
this.$container.find('tbody tr:eq(1) th:eq(0)').simulate('mousedown');
|
113
|
-
|
114
|
-
$fistHeader.simulate('mouseover');
|
115
|
-
$fistHeader.simulate('mousemove', {
|
116
|
-
clientY: $fistHeader.offset().bottom - $fistHeader.height()
|
117
|
-
});
|
118
|
-
$fistHeader.simulate('mouseup');
|
119
|
-
|
120
|
-
expect(targetParameterInsideCallback).toEqual(0);
|
121
|
-
});
|
122
|
-
|
123
|
-
it('should run `beforeRowMove` with proper `target` parameter (moving row to the middle of the table)', function () {
|
124
|
-
var targetParameterInsideCallback = void 0;
|
125
|
-
|
126
|
-
handsontable({
|
127
|
-
data: Handsontable.helper.createSpreadsheetData(30, 30),
|
128
|
-
rowHeaders: true,
|
129
|
-
manualRowMove: true,
|
130
|
-
beforeRowMove: function beforeRowMove(rows, target) {
|
131
|
-
targetParameterInsideCallback = target;
|
132
|
-
}
|
100
|
+
expect(spec().$container.find('.ht__manualRowMove--backlight')[0].offsetLeft).toBe(50);
|
133
101
|
});
|
134
|
-
|
135
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
136
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mouseup');
|
137
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
138
|
-
|
139
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mouseover');
|
140
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mousemove');
|
141
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mouseup');
|
142
|
-
|
143
|
-
expect(targetParameterInsideCallback).toEqual(2);
|
144
102
|
});
|
145
103
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
targetParameterInsideCallback = target;
|
155
|
-
}
|
156
|
-
});
|
104
|
+
describe('guideline', function () {
|
105
|
+
it('should set proper top position of element when target is first row and column headers are disabled', function () {
|
106
|
+
handsontable({
|
107
|
+
data: Handsontable.helper.createSpreadsheetData(10, 10),
|
108
|
+
rowHeaders: true,
|
109
|
+
colHeaders: false,
|
110
|
+
manualRowMove: true
|
111
|
+
});
|
157
112
|
|
158
|
-
|
159
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mouseup');
|
160
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
113
|
+
var $headers = [spec().$container.find('tbody tr:eq(0) th:eq(0)'), spec().$container.find('tbody tr:eq(1) th:eq(0)')];
|
161
114
|
|
162
|
-
|
163
|
-
|
164
|
-
|
115
|
+
$headers[1].simulate('mousedown');
|
116
|
+
$headers[1].simulate('mouseup');
|
117
|
+
$headers[1].simulate('mousedown');
|
118
|
+
$headers[0].simulate('mouseover');
|
119
|
+
$headers[0].simulate('mousemove');
|
165
120
|
|
166
|
-
|
167
|
-
});
|
168
|
-
|
169
|
-
it('should run `beforeRowMove` with proper `target` parameter (moving row to the bottom of last header)', function () {
|
170
|
-
var targetParameterInsideCallback = void 0;
|
171
|
-
|
172
|
-
handsontable({
|
173
|
-
data: Handsontable.helper.createSpreadsheetData(30, 30),
|
174
|
-
rowHeaders: true,
|
175
|
-
manualRowMove: true,
|
176
|
-
beforeRowMove: function beforeRowMove(rows, target) {
|
177
|
-
targetParameterInsideCallback = target;
|
178
|
-
}
|
121
|
+
expect(spec().$container.find('.ht__manualRowMove--guideline')[0].offsetTop).toBe(-1);
|
179
122
|
});
|
180
|
-
var $lastHeader = this.$container.find('tbody tr:eq(29) th:eq(0)');
|
181
|
-
|
182
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
183
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mouseup');
|
184
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
185
|
-
|
186
|
-
$lastHeader.simulate('mouseover');
|
187
|
-
$lastHeader.simulate('mousemove', {
|
188
|
-
clientY: $lastHeader.offset().top + $lastHeader.height()
|
189
|
-
});
|
190
|
-
$lastHeader.simulate('mouseup');
|
191
|
-
|
192
|
-
expect(targetParameterInsideCallback).toEqual(30);
|
193
|
-
});
|
194
|
-
|
195
|
-
it('should run `beforeRowMove` with proper `target` parameter (moving row below last header)', function () {
|
196
|
-
var targetParameterInsideCallback = void 0;
|
197
|
-
|
198
|
-
handsontable({
|
199
|
-
data: Handsontable.helper.createSpreadsheetData(30, 30),
|
200
|
-
rowHeaders: true,
|
201
|
-
manualRowMove: true,
|
202
|
-
beforeRowMove: function beforeRowMove(rows, target) {
|
203
|
-
targetParameterInsideCallback = target;
|
204
|
-
}
|
205
|
-
});
|
206
|
-
var $lastHeader = this.$container.find('tbody tr:eq(29) th:eq(0)');
|
207
|
-
|
208
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
209
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mouseup');
|
210
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
211
|
-
|
212
|
-
$lastHeader.simulate('mouseover');
|
213
|
-
$lastHeader.simulate('mousemove', {
|
214
|
-
clientY: $lastHeader.offset().top + $lastHeader.height() + 200
|
215
|
-
});
|
216
|
-
$lastHeader.simulate('mouseup');
|
217
|
-
|
218
|
-
expect(targetParameterInsideCallback).toEqual(30);
|
219
|
-
});
|
220
|
-
|
221
|
-
it('should run `beforeRowMove` with proper visual `target` parameter', function () {
|
222
|
-
var targetParameterInsideCallback = void 0;
|
223
|
-
|
224
|
-
handsontable({
|
225
|
-
data: Handsontable.helper.createSpreadsheetData(30, 30),
|
226
|
-
rowHeaders: true,
|
227
|
-
manualRowMove: [1, 2, 0],
|
228
|
-
beforeRowMove: function beforeRowMove(rows, target) {
|
229
|
-
targetParameterInsideCallback = target;
|
230
|
-
}
|
231
|
-
});
|
232
|
-
|
233
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
234
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mouseup');
|
235
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
236
|
-
|
237
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mouseover');
|
238
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mousemove');
|
239
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mouseup');
|
240
|
-
|
241
|
-
expect(targetParameterInsideCallback).toEqual(2);
|
242
|
-
});
|
243
|
-
|
244
|
-
it('should run `afterRowMove` with proper visual `target` parameter', function () {
|
245
|
-
var targetParameterInsideCallback = void 0;
|
246
|
-
|
247
|
-
handsontable({
|
248
|
-
data: Handsontable.helper.createSpreadsheetData(30, 30),
|
249
|
-
rowHeaders: true,
|
250
|
-
manualRowMove: [1, 2, 0],
|
251
|
-
afterRowMove: function afterRowMove(rows, target) {
|
252
|
-
targetParameterInsideCallback = target;
|
253
|
-
}
|
254
|
-
});
|
255
|
-
|
256
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
257
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mouseup');
|
258
|
-
this.$container.find('tbody tr:eq(0) th:eq(0)').simulate('mousedown');
|
259
|
-
|
260
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mouseover');
|
261
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mousemove');
|
262
|
-
this.$container.find('tbody tr:eq(2) th:eq(0)').simulate('mouseup');
|
263
|
-
|
264
|
-
expect(targetParameterInsideCallback).toEqual(2);
|
265
123
|
});
|
266
124
|
});
|
267
125
|
});
|
@@ -112,10 +112,10 @@ var BaseUI = function () {
|
|
112
112
|
}, {
|
113
113
|
key: 'setPosition',
|
114
114
|
value: function setPosition(top, left) {
|
115
|
-
if (top) {
|
115
|
+
if (top !== void 0) {
|
116
116
|
this._element.style.top = top + UNIT;
|
117
117
|
}
|
118
|
-
if (left) {
|
118
|
+
if (left !== void 0) {
|
119
119
|
this._element.style.left = left + UNIT;
|
120
120
|
}
|
121
121
|
}
|
package/es/tableView.js
CHANGED
package/handsontable.jquery.json
CHANGED
package/hot.config.js
CHANGED
package/package.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"url": "https://github.com/handsontable/handsontable/issues"
|
11
11
|
},
|
12
12
|
"author": "Handsoncode <hello@handsontable.com>",
|
13
|
-
"version": "0.34.
|
13
|
+
"version": "0.34.5",
|
14
14
|
"browser": "dist/handsontable.js",
|
15
15
|
"main": "commonjs/index.js",
|
16
16
|
"module": "es/index.js",
|
@@ -81,17 +81,17 @@
|
|
81
81
|
"eslint": "^4.3.0",
|
82
82
|
"eslint-config-airbnb-base": "^11.3.1",
|
83
83
|
"eslint-plugin-import": "^2.7.0",
|
84
|
-
"extract-text-webpack-plugin": "^
|
84
|
+
"extract-text-webpack-plugin": "^3.0.0",
|
85
85
|
"glob": "^7.1.2",
|
86
86
|
"grunt": "^1.0.1",
|
87
87
|
"grunt-lib-phantomjs": "^1.1.0",
|
88
|
-
"html-webpack-plugin": "^2.
|
88
|
+
"html-webpack-plugin": "^2.30.1",
|
89
89
|
"jasmine-co": "^1.2.2",
|
90
90
|
"jasmine-core": "2.5.2",
|
91
91
|
"jasmine-terminal-reporter": "^1.0.3",
|
92
92
|
"jest": "^19.0.0",
|
93
93
|
"loader-utils": "^1.1.0",
|
94
|
-
"optimize-css-assets-webpack-plugin": "^1.
|
94
|
+
"optimize-css-assets-webpack-plugin": "^3.1.1",
|
95
95
|
"progress-bar-webpack-plugin": "^1.10.0",
|
96
96
|
"request": "^2.81.0",
|
97
97
|
"rimraf": "^2.5.4",
|
@@ -100,7 +100,7 @@
|
|
100
100
|
"supports-color": "^4.2.1",
|
101
101
|
"tree-kill": "^1.1.0",
|
102
102
|
"typescript": "^2.4.2",
|
103
|
-
"webpack": "^
|
103
|
+
"webpack": "^3.5.6"
|
104
104
|
},
|
105
105
|
"license": "MIT",
|
106
106
|
"jest": {
|