@jetbrains/ring-ui-built 6.0.43 → 6.0.44

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.
@@ -208,8 +208,8 @@ function _objectWithoutProperties(e, t) {
208
208
  r,
209
209
  i = _objectWithoutPropertiesLoose(e, t);
210
210
  if (Object.getOwnPropertySymbols) {
211
- var n = Object.getOwnPropertySymbols(e);
212
- for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
211
+ var s = Object.getOwnPropertySymbols(e);
212
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
213
213
  }
214
214
  return i;
215
215
  }
@@ -217,7 +217,7 @@ function _objectWithoutPropertiesLoose(r, e) {
217
217
  if (null == r) return {};
218
218
  var t = {};
219
219
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
220
- if (e.indexOf(n) >= 0) continue;
220
+ if (e.includes(n)) continue;
221
221
  t[n] = r[n];
222
222
  }
223
223
  return t;
@@ -53,7 +53,9 @@ var ContentLayout = /*#__PURE__*/function (_Component) {
53
53
  var contentChildren = childrenArray.filter(function (child) {
54
54
  return child !== sidebarChild;
55
55
  });
56
- return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
56
+ return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({
57
+ "data-test": "content-layout"
58
+ }, restProps), {}, {
57
59
  className: classes,
58
60
  children: [sidebar, /*#__PURE__*/jsx("main", {
59
61
  className: contentClasses,
@@ -28,6 +28,7 @@ export interface PagerProps {
28
28
  onPageChange?: ((prevPage: number, event?: React.MouseEvent) => void) | null | undefined;
29
29
  className?: string | null | undefined;
30
30
  hrefFunc?: ((page: number, pageSize: number | undefined) => string) | undefined;
31
+ disableLastPageButton?: boolean;
31
32
  }
32
33
  interface PagerSizeItem {
33
34
  key: number;
@@ -343,7 +343,7 @@ var Pager = /*#__PURE__*/function (_PureComponent) {
343
343
  for (var i = start; i <= end; i++) {
344
344
  buttons.push(this.getButton(i, i, i, i === currentPage));
345
345
  }
346
- var lastPageButtonAvailable = end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
346
+ var lastPageButtonAvailable = !this.props.disableLastPageButton && end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
347
347
  return /*#__PURE__*/jsxs("div", {
348
348
  children: [this.getPagerLinks(), /*#__PURE__*/jsxs(ButtonToolbar, {
349
349
  children: [start > 1 && this.getButton(1, (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.firstPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('firstPage')), /*#__PURE__*/jsxs(ButtonGroup, {
@@ -654,7 +654,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
654
654
  key: "_pushHistory",
655
655
  value: function _pushHistory(state) {
656
656
  var _this$historyStack$;
657
- var queryIsSet = ('query' in state);
657
+ var queryIsSet = 'query' in state;
658
658
  var queryIsSame = ((_this$historyStack$ = this.historyStack[0]) === null || _this$historyStack$ === void 0 ? void 0 : _this$historyStack$.query) === state.query;
659
659
  if (queryIsSet && !queryIsSame) {
660
660
  var _this$caret$getPositi, _this$caret9;
@@ -51,8 +51,10 @@ var Shortcuts = /*#__PURE__*/function () {
51
51
  if (element === document || !(element instanceof HTMLElement) || key == null || element.matches(_this.ALLOW_SHORTCUTS_SELECTOR) || (element.dataset.enabledShortcuts != null ? element.dataset.enabledShortcuts.split(',').includes(key) : element.closest(_this.ALLOW_SHORTCUTS_SELECTOR) != null)) {
52
52
  return false;
53
53
  }
54
- // stop for input, select, and textarea
55
- return element.matches('input:not([type=checkbox]),select,textarea') || element.contentEditable === 'true';
54
+ var elementContentEditableAttribute = element.contentEditable;
55
+ var isElementContentEditable = elementContentEditableAttribute === 'true' || elementContentEditableAttribute === 'plaintext-only';
56
+ // stop for input, select, textarea and content-editable elements
57
+ return element.matches('input:not([type=checkbox]),select,textarea') || isElementContentEditable;
56
58
  });
57
59
  this.setFilter();
58
60
  this.setScope();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui-built",
3
- "version": "6.0.43",
3
+ "version": "6.0.44",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",