Skip to content

Commit 18ce14b

Browse files
v4.10.3
1 parent b3bde77 commit 18ce14b

File tree

153 files changed

+325
-253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+325
-253
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.10.3](https://github.com/angular-ui/ui-grid/compare/v4.10.2...v4.10.3) (2021-08-01)
7+
8+
9+
### Bug Fixes
10+
11+
* 🐛 address linting issues and unit test failures ([a9cf59f](https://github.com/angular-ui/ui-grid/commit/a9cf59f6ff31f065332bdd20b0931dba0b982183))
12+
* export filter with time part ('date:"MM-dd-YYYY HH:mm'). ([29d4803](https://github.com/angular-ui/ui-grid/commit/29d4803d702409bffafc30b33cbbdeda53992776))
13+
* error when entering *+ combination in the column filter ([1201ad2](https://github.com/angular-ui/ui-grid/commit/1201ad2678f7b54d8351f8aa876405c97beb6d05))
14+
* Missing german translation for selection and validate ([3ff57e0](https://github.com/angular-ui/ui-grid/commit/3ff57e00893890b3be73ec3c350d30b3b2a91cdf))
15+
* canvas now has a minimum height of 1px, which renders it even if it has no data ([07c26d5](https://github.com/angular-ui/ui-grid/commit/07c26d576fe6e012730fead14c9e9139d606ed13))
16+
* adjustColumns now calculates the colIndex instead of guessing it scrollpercentage ([ed76f02](https://github.com/angular-ui/ui-grid/commit/ed76f02090f3510d555cacdae03f1edad849d27a))
17+
18+
19+
20+
621
## [4.10.2](https://github.com/angular-ui/ui-grid/compare/v4.10.1...v4.10.2) (2021-06-14)
722

823

css/ui-grid.core.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.10.2 - 2021-06-14
2+
* ui-grid - v4.10.3 - 2021-08-01
33
* Copyright (c) 2021 ; License: MIT
44
*/
55
.ui-grid {
@@ -355,6 +355,7 @@ select.ui-grid-filter-select:hover {
355355
.ui-grid-canvas {
356356
position: relative;
357357
padding-top: 1px;
358+
min-height: 1px;
358359
}
359360
.ui-grid-row {
360361
clear: both;

css/ui-grid.core.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

i18n/ui-grid.auto-resize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.10.2 - 2021-06-14
2+
* ui-grid - v4.10.3 - 2021-08-01
33
* Copyright (c) 2021 ; License: MIT
44
*/
55

i18n/ui-grid.auto-resize.min.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.10.2 - 2021-06-14
2+
* ui-grid - v4.10.3 - 2021-08-01
33
* Copyright (c) 2021 ; License: MIT
44
*/
55

i18n/ui-grid.cellnav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.10.2 - 2021-06-14
2+
* ui-grid - v4.10.3 - 2021-08-01
33
* Copyright (c) 2021 ; License: MIT
44
*/
55

i18n/ui-grid.cellnav.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

i18n/ui-grid.core.js

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.10.2 - 2021-06-14
2+
* ui-grid - v4.10.3 - 2021-08-01
33
* Copyright (c) 2021 ; License: MIT
44
*/
55

@@ -6088,13 +6088,12 @@ angular.module('ui.grid')
60886088
var container = self.renderContainers[i],
60896089
prevScrollTop = getPrevScrollValue(rowsAdded, container.prevScrollTop),
60906090
prevScrollLeft = getPrevScrollValue(rowsAdded, container.prevScrollLeft),
6091-
prevScrolltopPercentage = rowsAdded || prevScrollTop > 0 ? null : container.prevScrolltopPercentage,
6092-
prevScrollleftPercentage = rowsAdded || prevScrollLeft > 0 ? null : container.prevScrollleftPercentage;
6091+
prevScrolltopPercentage = rowsAdded || prevScrollTop > 0 ? null : container.prevScrolltopPercentage;
60936092

60946093
// gridUtil.logDebug('redrawing container', i);
60956094

60966095
container.adjustRows(prevScrollTop, prevScrolltopPercentage);
6097-
container.adjustColumns(prevScrollLeft, prevScrollleftPercentage);
6096+
container.adjustColumns(prevScrollLeft);
60986097
}
60996098
};
61006099

@@ -8796,7 +8795,7 @@ angular.module('ui.grid')
87968795
scrollLeft = (this.getCanvasWidth() - this.getViewportWidth()) * scrollPercentage;
87978796
}
87988797

8799-
this.adjustColumns(scrollLeft, scrollPercentage);
8798+
this.adjustColumns(scrollLeft);
88008799

88018800
this.prevScrollLeft = scrollLeft;
88028801
this.prevScrollleftPercentage = scrollPercentage;
@@ -8853,25 +8852,15 @@ angular.module('ui.grid')
88538852
self.prevRowScrollIndex = rowIndex;
88548853
};
88558854

8856-
GridRenderContainer.prototype.adjustColumns = function adjustColumns(scrollLeft, scrollPercentage) {
8855+
GridRenderContainer.prototype.adjustColumns = function adjustColumns(scrollLeft) {
88578856
var self = this;
88588857

88598858
var minCols = self.minColumnsToRender();
88608859

88618860
var columnCache = self.visibleColumnCache;
88628861
var maxColumnIndex = columnCache.length - minCols;
88638862

8864-
// Calculate the scroll percentage according to the scrollLeft ___location, if no percentage was provided
8865-
if ((typeof(scrollPercentage) === 'undefined' || scrollPercentage === null) && scrollLeft) {
8866-
scrollPercentage = scrollLeft / self.getHorizontalScrollLength();
8867-
}
8868-
8869-
var colIndex = Math.ceil(Math.min(maxColumnIndex, maxColumnIndex * scrollPercentage));
8870-
8871-
// Define a max row index that we can't scroll past
8872-
if (colIndex > maxColumnIndex) {
8873-
colIndex = maxColumnIndex;
8874-
}
8863+
var colIndex = Math.min(maxColumnIndex, self.getLeftIndex(scrollLeft));
88758864

88768865
var newRange = [];
88778866
if (columnCache.length > self.grid.options.columnVirtualizationThreshold && self.getCanvasWidth() > self.getViewportWidth()) {
@@ -8891,6 +8880,21 @@ angular.module('ui.grid')
88918880
self.prevColumnScrollIndex = colIndex;
88928881
};
88938882

8883+
GridRenderContainer.prototype.getLeftIndex = function getLeftIndex(scrollLeft) {
8884+
var wholeLeftWidth = 0;
8885+
var index = 0
8886+
for (index; index < this.visibleColumnCache.length; index++) {
8887+
if (this.visibleColumnCache[index] && this.visibleColumnCache[index].visible) {
8888+
// accumulate the whole width of columns on the left side, till the point of visibility is surpassed, this is our wanted index
8889+
wholeLeftWidth += this.visibleColumnCache[index].drawnWidth;
8890+
if (wholeLeftWidth >= scrollLeft) {
8891+
break;
8892+
}
8893+
}
8894+
}
8895+
return index;
8896+
}
8897+
88948898
// Method for updating the visible rows
88958899
GridRenderContainer.prototype.updateViewableRowRange = function updateViewableRowRange(renderedRange) {
88968900
// Slice out the range of rows from the data
@@ -9892,7 +9896,10 @@ angular.module('ui.grid')
98929896
var module = angular.module('ui.grid');
98939897

98949898
function escapeRegExp(str) {
9895-
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
9899+
// based on https://github.com/sindresorhus/escape-string-regexp
9900+
// Escape characters with special meaning either inside or outside character sets.
9901+
// Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
9902+
return str.replace(/[|\\{}()[\]^$+?*.]/g, '\\$&').replace(/-/g, '\\x2d');
98969903
}
98979904

98989905

@@ -9967,13 +9974,10 @@ module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil
99679974

99689975
var term = rowSearcher.getTerm(filter);
99699976

9970-
if (/\*/.test(term)) {
9971-
var regexpFlags = '';
9972-
if (!filter.flags || !filter.flags.caseSensitive) {
9973-
regexpFlags += 'i';
9974-
}
9975-
9976-
var reText = term.replace(/(\\)?\*/g, function ($0, $1) { return $1 ? $0 : '[\\s\\S]*?'; });
9977+
if (/\*/.test(term)) {// this would check only start and end -> /^\*|\*$/
9978+
var regexpFlags = (!filter.flags || !filter.flags.caseSensitive) ? 'i' : '';
9979+
term = escapeRegExp(term);
9980+
var reText = term.replace(/\\\*/g, '.*?');// this would check only start and end -> /^\\\*|\\\*$/g
99779981
return new RegExp('^' + reText + '$', regexpFlags);
99789982
}
99799983
// Otherwise default to default condition

i18n/ui-grid.core.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

i18n/ui-grid.edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* ui-grid - v4.10.2 - 2021-06-14
2+
* ui-grid - v4.10.3 - 2021-08-01
33
* Copyright (c) 2021 ; License: MIT
44
*/
55

0 commit comments

Comments
 (0)