Skip to content

Commit

Permalink
Merge branch 'release/0.34.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
jansiegel committed Sep 12, 2017
2 parents aa74d2a + 7adde55 commit aa835fa
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 47 deletions.
6 changes: 3 additions & 3 deletions dist/handsontable.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/handsontable.full.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Version: 0.34.2
* Release date: 12/09/2017 (built at 11/09/2017 14:53:17)
* Version: 0.34.3
* Release date: 12/09/2017 (built at 12/09/2017 13:23:01)
*/
/**
* Fix for bootstrap styles
Expand Down Expand Up @@ -267,7 +267,7 @@
color: #000;
}

.handsontable + .display-license-info {
#hot-display-license-info {
font-size: 9px;
color: #323232 ;
padding: 5px 0 3px 0;
Expand Down
20 changes: 11 additions & 9 deletions dist/handsontable.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Version: 0.34.2
* Release date: 12/09/2017 (built at 11/09/2017 14:53:17)
* Version: 0.34.3
* Release date: 12/09/2017 (built at 12/09/2017 13:23:01)
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
Expand Down Expand Up @@ -5627,7 +5627,7 @@ function _injectProductInfo(key, element) {
if (showDomMessage && element.parentNode) {
var message = document.createElement('div');

(0, _element.addClass)(message, 'display-license-info');
message.id = 'hot-display-license-info';
message.appendChild(document.createTextNode('Evaluation version of Handsontable Pro.'));
message.appendChild(document.createElement('br'));
message.appendChild(document.createTextNode('Not licensed for production use.'));
Expand Down Expand Up @@ -16034,7 +16034,7 @@ function Core(rootElement, userSettings) {
if (result === false && cellProperties.allowInvalid === false) {
changes.splice(i, 1); // cancel the change
cellProperties.valid = true; // we cancelled the change, so cell value is still valid
var cell = instance.getCell(cellProperties.row, cellProperties.col);
var cell = instance.getCell(cellProperties.visualRow, cellProperties.visualCol);
(0, _element.removeClass)(cell, instance.getSettings().invalidCellClassName);
--i;
}
Expand Down Expand Up @@ -18139,10 +18139,12 @@ function Core(rootElement, userSettings) {
}
dataSource = null;

var nextSibling = instance.rootElement.nextSibling;
if (false) {
var licenseInfo = document.querySelector('#hot-display-license-info');

if ((0, _rootInstance.isRootInstance)(instance) && nextSibling) {
instance.rootElement.parentNode.removeChild(nextSibling);
if (licenseInfo) {
licenseInfo.parentNode.removeChild(licenseInfo);
}
}
(0, _element.empty)(instance.rootElement);
eventManager.destroy();
Expand Down Expand Up @@ -32289,9 +32291,9 @@ Handsontable.DefaultSettings = _defaultSettings2.default;
Handsontable.EventManager = _eventManager2.default;
Handsontable._getListenersCounter = _eventManager.getListenersCounter; // For MemoryLeak tests

Handsontable.buildDate = '11/09/2017 14:53:17';
Handsontable.buildDate = '12/09/2017 13:23:01';
Handsontable.packageName = 'handsontable';
Handsontable.version = '0.34.2';
Handsontable.version = '0.34.3';

var baseVersion = '';

Expand Down
6 changes: 3 additions & 3 deletions dist/handsontable.full.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/handsontable.full.min.js

Large diffs are not rendered by default.

20 changes: 11 additions & 9 deletions dist/handsontable.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Version: 0.34.2
* Release date: 12/09/2017 (built at 11/09/2017 14:53:17)
* Version: 0.34.3
* Release date: 12/09/2017 (built at 12/09/2017 13:23:01)
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
Expand Down Expand Up @@ -5627,7 +5627,7 @@ function _injectProductInfo(key, element) {
if (showDomMessage && element.parentNode) {
var message = document.createElement('div');

(0, _element.addClass)(message, 'display-license-info');
message.id = 'hot-display-license-info';
message.appendChild(document.createTextNode('Evaluation version of Handsontable Pro.'));
message.appendChild(document.createElement('br'));
message.appendChild(document.createTextNode('Not licensed for production use.'));
Expand Down Expand Up @@ -10270,7 +10270,7 @@ function Core(rootElement, userSettings) {
if (result === false && cellProperties.allowInvalid === false) {
changes.splice(i, 1); // cancel the change
cellProperties.valid = true; // we cancelled the change, so cell value is still valid
var cell = instance.getCell(cellProperties.row, cellProperties.col);
var cell = instance.getCell(cellProperties.visualRow, cellProperties.visualCol);
(0, _element.removeClass)(cell, instance.getSettings().invalidCellClassName);
--i;
}
Expand Down Expand Up @@ -12375,10 +12375,12 @@ function Core(rootElement, userSettings) {
}
dataSource = null;

var nextSibling = instance.rootElement.nextSibling;
if (false) {
var licenseInfo = document.querySelector('#hot-display-license-info');

if ((0, _rootInstance.isRootInstance)(instance) && nextSibling) {
instance.rootElement.parentNode.removeChild(nextSibling);
if (licenseInfo) {
licenseInfo.parentNode.removeChild(licenseInfo);
}
}
(0, _element.empty)(instance.rootElement);
eventManager.destroy();
Expand Down Expand Up @@ -25835,9 +25837,9 @@ Handsontable.DefaultSettings = _defaultSettings2.default;
Handsontable.EventManager = _eventManager2.default;
Handsontable._getListenersCounter = _eventManager.getListenersCounter; // For MemoryLeak tests

Handsontable.buildDate = '11/09/2017 14:53:17';
Handsontable.buildDate = '12/09/2017 13:23:01';
Handsontable.packageName = 'handsontable';
Handsontable.version = '0.34.2';
Handsontable.version = '0.34.3';

var baseVersion = '';

Expand Down
2 changes: 1 addition & 1 deletion dist/handsontable.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/handsontable.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/handsontable.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion handsontable.jquery.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "handsontable",
"title": "Handsontable",
"version": "0.34.2",
"version": "0.34.3",
"author": {
"name": "Handsoncode",
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "https://github.com/handsontable/handsontable/issues"
},
"author": "Handsoncode <[email protected]>",
"version": "0.34.2",
"version": "0.34.3",
"browser": "dist/handsontable.js",
"main": "commonjs/index.js",
"module": "es/index.js",
Expand Down
10 changes: 6 additions & 4 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ export default function Core(rootElement, userSettings, rootInstanceSymbol = fal
if (result === false && cellProperties.allowInvalid === false) {
changes.splice(i, 1); // cancel the change
cellProperties.valid = true; // we cancelled the change, so cell value is still valid
const cell = instance.getCell(cellProperties.row, cellProperties.col);
const cell = instance.getCell(cellProperties.visualRow, cellProperties.visualCol);
removeClass(cell, instance.getSettings().invalidCellClassName);
--i;
}
Expand Down Expand Up @@ -3155,10 +3155,12 @@ export default function Core(rootElement, userSettings, rootInstanceSymbol = fal
}
dataSource = null;

const nextSibling = instance.rootElement.nextSibling;
if (process.env.HOT_PACKAGE_TYPE !== '\x63\x65' && isRootInstance(instance)) {
const licenseInfo = document.querySelector('#hot-display-license-info');

if (isRootInstance(instance) && nextSibling) {
instance.rootElement.parentNode.removeChild(nextSibling);
if (licenseInfo) {
licenseInfo.parentNode.removeChild(licenseInfo);
}
}
empty(instance.rootElement);
eventManager.destroy();
Expand Down
2 changes: 1 addition & 1 deletion src/css/handsontable.css
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
color: #000;
}

.handsontable + .display-license-info {
#hot-display-license-info {
font-size: 9px;
color: #323232 ;
padding: 5px 0 3px 0;
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/mixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export function _injectProductInfo(key, element) {
if (showDomMessage && element.parentNode) {
const message = document.createElement('div');

addClass(message, 'display-license-info');
message.id = 'hot-display-license-info';
message.appendChild(document.createTextNode('Evaluation version of Handsontable Pro.'));
message.appendChild(document.createElement('br'));
message.appendChild(document.createTextNode('Not licensed for production use.'));
Expand Down
29 changes: 29 additions & 0 deletions test/e2e/Core_validate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,35 @@ describe('Core_validate', () => {
}, 200);
});

it('should remove htInvalid class properly after cancelling change, when physical indexes are not equal to visual indexes', (done) => {
handsontable({
data: Handsontable.helper.createSpreadsheetData(5, 2),
columnSorting: {
column: 0,
sortOrder: false
},
allowInvalid: false,
validator(value, callback) {
setTimeout(() => {
callback(value.length === 2);
}, 100);
}
});

selectCell(0, 0);
keyDown('enter');

document.activeElement.value = 'Ted';

keyDown('enter');

setTimeout(() => {
const $cell = $(getCell(0, 0));
expect($cell.hasClass('htInvalid')).toEqual(false);
done();
}, 200);
});

it('should close the editor and save the new value if validation fails and allowInvalid is set to "true"', (done) => {
var validated = false;
var validationResult;
Expand Down

0 comments on commit aa835fa

Please sign in to comment.