@jetbrains/ring-ui 5.1.5 → 5.1.7

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.
@@ -243,7 +243,7 @@ export default class QueryAssist extends Component {
243
243
  }
244
244
  if (typeof query === 'string' && queryChanged && query !== this.immediateState.query) {
245
245
  this.immediateState.query = query;
246
- if (prevProps.autoOpen && query?.length > 0) {
246
+ if (query && (this.props.autoOpen === 'force' || prevProps.autoOpen && query.length > 0)) {
247
247
  this.requestData?.();
248
248
  }
249
249
  else if (query) {
@@ -453,7 +453,7 @@ export default class QueryAssist extends Component {
453
453
  this.requestData?.();
454
454
  }
455
455
  }
456
- if (this.immediateState.query.length < 1) {
456
+ if (this.props.autoOpen !== 'force' && this.immediateState.query.length < 1) {
457
457
  this.setState({ showPopup: false });
458
458
  }
459
459
  };
@@ -472,7 +472,7 @@ export default class QueryAssist extends Component {
472
472
  placeholderEnabled: !query,
473
473
  query,
474
474
  suggestions,
475
- showPopup: !!suggestions.length && !afterCompletion
475
+ showPopup: !!suggestions.length && (this.props.autoOpen === 'force' || !afterCompletion)
476
476
  };
477
477
  this.immediateState.suggestionsQuery = query;
478
478
  // Do not update deep equal styleRanges to simplify shouldComponentUpdate check
@@ -866,7 +866,7 @@ export default class Select extends Component {
866
866
  onClick: this._clickHandler,
867
867
  disabled: this.props.disabled,
868
868
  children: this._getPlaceholder(),
869
- 'data-test': 'ring-select_focus'
869
+ 'data-test': 'ring-select__focus'
870
870
  },
871
871
  popup: this._renderPopup()
872
872
  })}
@@ -12,11 +12,11 @@ var MAJOR_VERSION_INDEX = 0;
12
12
  /**
13
13
  * SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
14
14
  */
15
- if (!["and_chr 116", "and_uc 15.5", "chrome 116", "chrome 115", "chrome 114", "chrome 109", "edge 116", "edge 115", "firefox 116", "ios_saf 16.6", "ios_saf 16.5", "ios_saf 15.6-15.7", "op_mini all", "safari 16.6", "safari 16.5"]) {
15
+ if (!["and_chr 117", "and_uc 15.5", "chrome 116", "chrome 115", "chrome 114", "chrome 109", "edge 116", "edge 115", "firefox 116", "ios_saf 16.6", "ios_saf 16.5", "ios_saf 15.6-15.7", "op_mini all", "safari 16.6", "safari 16.5"]) {
16
16
  // eslint-disable-next-line no-console
17
17
  console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
18
18
  }
19
- var SUPPORTED = ["and_chr 116", "and_uc 15.5", "chrome 116", "chrome 115", "chrome 114", "chrome 109", "edge 116", "edge 115", "firefox 116", "ios_saf 16.6", "ios_saf 16.5", "ios_saf 15.6-15.7", "op_mini all", "safari 16.6", "safari 16.5"] || [];
19
+ var SUPPORTED = ["and_chr 117", "and_uc 15.5", "chrome 116", "chrome 115", "chrome 114", "chrome 109", "edge 116", "edge 115", "firefox 116", "ios_saf 16.6", "ios_saf 16.5", "ios_saf 15.6-15.7", "op_mini all", "safari 16.6", "safari 16.5"] || [];
20
20
  var WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
21
21
  var WHITE_LIST = SUPPORTED.reduce(function (acc, item) {
22
22
  var _item$match;
@@ -349,7 +349,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
349
349
  (_this$requestData2 = (_this3 = _this).requestData) === null || _this$requestData2 === void 0 ? void 0 : _this$requestData2.call(_this3);
350
350
  }
351
351
  }
352
- if (_this.immediateState.query.length < 1) {
352
+ if (_this.props.autoOpen !== 'force' && _this.immediateState.query.length < 1) {
353
353
  _this.setState({
354
354
  showPopup: false
355
355
  });
@@ -382,7 +382,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
382
382
  placeholderEnabled: !query,
383
383
  query: query,
384
384
  suggestions: suggestions,
385
- showPopup: !!suggestions.length && !afterCompletion
385
+ showPopup: !!suggestions.length && (_this.props.autoOpen === 'force' || !afterCompletion)
386
386
  };
387
387
  _this.immediateState.suggestionsQuery = query;
388
388
  // Do not update deep equal styleRanges to simplify shouldComponentUpdate check
@@ -612,7 +612,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
612
612
  }
613
613
  if (typeof query === 'string' && queryChanged && query !== this.immediateState.query) {
614
614
  this.immediateState.query = query;
615
- if (prevProps.autoOpen && (query === null || query === void 0 ? void 0 : query.length) > 0) {
615
+ if (query && (this.props.autoOpen === 'force' || prevProps.autoOpen && query.length > 0)) {
616
616
  var _this$requestData5;
617
617
  (_this$requestData5 = this.requestData) === null || _this$requestData5 === void 0 ? void 0 : _this$requestData5.call(this);
618
618
  } else if (query) {
@@ -1090,7 +1090,7 @@ var Select = /*#__PURE__*/function (_Component) {
1090
1090
  onClick: this._clickHandler,
1091
1091
  disabled: this.props.disabled,
1092
1092
  children: this._getPlaceholder(),
1093
- 'data-test': 'ring-select_focus'
1093
+ 'data-test': 'ring-select__focus'
1094
1094
  }),
1095
1095
  popup: this._renderPopup()
1096
1096
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.1.5",
3
+ "version": "5.1.7",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -75,42 +75,42 @@
75
75
  },
76
76
  "readmeFilename": "README.md",
77
77
  "devDependencies": {
78
- "@babel/cli": "^7.22.15",
78
+ "@babel/cli": "^7.23.0",
79
79
  "@babel/eslint-parser": "^7.22.15",
80
80
  "@csstools/stylelint-no-at-nest-rule": "^1.0.0",
81
81
  "@jetbrains/eslint-config": "^5.4.1",
82
82
  "@jetbrains/stylelint-config": "^4.0.1",
83
- "@primer/octicons": "^19.7.0",
83
+ "@primer/octicons": "^19.8.0",
84
84
  "@rollup/plugin-babel": "^6.0.3",
85
85
  "@rollup/plugin-json": "^6.0.0",
86
86
  "@rollup/plugin-node-resolve": "^15.2.1",
87
87
  "@rollup/plugin-replace": "^5.0.2",
88
- "@storybook/addon-a11y": "7.4.2",
89
- "@storybook/addon-docs": "7.4.2",
90
- "@storybook/addon-essentials": "7.4.2",
91
- "@storybook/addon-storyshots": "7.4.0",
92
- "@storybook/addon-storyshots-puppeteer": "7.4.2",
93
- "@storybook/addon-storysource": "7.4.2",
94
- "@storybook/addons": "7.4.2",
95
- "@storybook/html": "7.4.0",
96
- "@storybook/html-webpack5": "^7.4.2",
97
- "@storybook/preview-api": "7.4.0",
98
- "@storybook/react": "7.4.2",
99
- "@storybook/source-loader": "7.4.2",
100
- "@storybook/theming": "7.4.2",
88
+ "@storybook/addon-a11y": "7.4.5",
89
+ "@storybook/addon-docs": "7.4.5",
90
+ "@storybook/addon-essentials": "7.4.5",
91
+ "@storybook/addon-storyshots": "7.4.5",
92
+ "@storybook/addon-storyshots-puppeteer": "7.4.5",
93
+ "@storybook/addon-storysource": "7.4.5",
94
+ "@storybook/addons": "7.4.5",
95
+ "@storybook/html": "7.4.5",
96
+ "@storybook/html-webpack5": "^7.4.5",
97
+ "@storybook/preview-api": "7.4.5",
98
+ "@storybook/react": "7.4.5",
99
+ "@storybook/source-loader": "7.4.5",
100
+ "@storybook/theming": "7.4.5",
101
101
  "@testing-library/react": "^14.0.0",
102
102
  "@testing-library/user-event": "^14.5.1",
103
103
  "@types/chai": "^4.3.6",
104
104
  "@types/chai-as-promised": "^7.1.6",
105
105
  "@types/chai-dom": "0.0.10",
106
106
  "@types/chai-enzyme": "^0.6.11",
107
- "@types/enzyme": "^3.10.13",
107
+ "@types/enzyme": "^3.10.14",
108
108
  "@types/react": "^18.2.21",
109
- "@types/react-dom": "^18.2.7",
110
- "@types/sinon": "^10.0.16",
111
- "@types/sinon-chai": "^3.2.9",
112
- "@typescript-eslint/eslint-plugin": "^6.7.0",
113
- "@typescript-eslint/parser": "^6.7.0",
109
+ "@types/react-dom": "^18.2.8",
110
+ "@types/sinon": "^10.0.17",
111
+ "@types/sinon-chai": "^3.2.10",
112
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
113
+ "@typescript-eslint/parser": "^6.7.3",
114
114
  "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
115
115
  "acorn": "^8.10.0",
116
116
  "angular": "^1.8.3",
@@ -118,7 +118,7 @@
118
118
  "angular-route": "^1.8.3",
119
119
  "babel-plugin-react-docgen": "^4.2.1",
120
120
  "babel-plugin-require-context-hook": "^1.0.0",
121
- "caniuse-lite": "^1.0.30001534",
121
+ "caniuse-lite": "^1.0.30001540",
122
122
  "chai": "^4.3.8",
123
123
  "chai-as-promised": "^7.1.1",
124
124
  "chai-dom": "^1.10.0",
@@ -127,16 +127,16 @@
127
127
  "core-js": "^3.32.2",
128
128
  "cpy-cli": "^3.1.1",
129
129
  "enzyme": "^3.11.0",
130
- "eslint": "^8.49.0",
130
+ "eslint": "^8.50.0",
131
131
  "eslint-import-resolver-webpack": "^0.13.7",
132
132
  "eslint-plugin-angular": "^4.1.0",
133
133
  "eslint-plugin-bdd": "^2.1.1",
134
134
  "eslint-plugin-import": "^2.28.1",
135
135
  "eslint-plugin-jsx-a11y": "^6.7.1",
136
136
  "eslint-plugin-react": "^7.33.2",
137
- "eslint-plugin-storybook": "^0.6.13",
137
+ "eslint-plugin-storybook": "^0.6.14",
138
138
  "events": "^3.3.0",
139
- "glob": "^10.3.4",
139
+ "glob": "^10.3.10",
140
140
  "html-webpack-plugin": "^5.5.3",
141
141
  "husky": "^8.0.3",
142
142
  "identity-obj-proxy": "^3.0.0",
@@ -161,14 +161,14 @@
161
161
  "react-dom": "^18.2.0",
162
162
  "react-test-renderer": "^18.2.0",
163
163
  "regenerator-runtime": "^0.14.0",
164
- "rimraf": "^5.0.1",
165
- "rollup": "^3.29.1",
164
+ "rimraf": "^5.0.5",
165
+ "rollup": "^3.29.3",
166
166
  "rollup-plugin-clear": "^2.0.7",
167
167
  "rollup-plugin-styles": "^4.0.0",
168
168
  "sinon": "^16.0.0",
169
169
  "sinon-chai": "^3.7.0",
170
170
  "storage-mock": "^2.1.0",
171
- "storybook": "^7.4.2",
171
+ "storybook": "^7.4.5",
172
172
  "storybook-addon-themes": "^6.1.0",
173
173
  "storybook-zeplin": "^2.0.2",
174
174
  "stylelint": "^15.10.3",
@@ -201,23 +201,23 @@
201
201
  }
202
202
  },
203
203
  "dependencies": {
204
- "@babel/core": "^7.22.20",
205
- "@babel/preset-typescript": "^7.22.15",
204
+ "@babel/core": "^7.23.0",
205
+ "@babel/preset-typescript": "^7.23.0",
206
206
  "@jetbrains/babel-preset-jetbrains": "^2.3.2",
207
207
  "@jetbrains/icons": "^3.21.0",
208
- "@jetbrains/logos": "^2.2.18",
208
+ "@jetbrains/logos": "^2.2.21",
209
209
  "@jetbrains/postcss-require-hover": "^0.1.2",
210
210
  "@types/combokeys": "^2.4.7",
211
- "@types/deep-equal": "^1.0.1",
212
- "@types/element-resize-detector": "^1.1.3",
213
- "@types/google.analytics": "0.0.42",
211
+ "@types/deep-equal": "^1.0.2",
212
+ "@types/element-resize-detector": "^1.1.4",
213
+ "@types/google.analytics": "0.0.43",
214
214
  "@types/prop-types": "^15.7.5",
215
- "@types/react-virtualized": "9.21.22",
215
+ "@types/react-virtualized": "9.21.23",
216
216
  "@types/util-deprecate": "^1.0.0",
217
217
  "@ungap/url-search-params": "^0.2.2",
218
218
  "babel-loader": "9.1.3",
219
- "babel-plugin-transform-define": "^2.1.3",
220
- "browserslist": "^4.21.10",
219
+ "babel-plugin-transform-define": "^2.1.4",
220
+ "browserslist": "^4.22.0",
221
221
  "change-case": "^4.1.1",
222
222
  "classnames": "^2.3.2",
223
223
  "combokeys": "^3.0.1",
@@ -232,25 +232,25 @@
232
232
  "extricate-loader": "^3.0.0",
233
233
  "fastdom": "^1.0.11",
234
234
  "file-loader": "^6.2.0",
235
- "focus-trap": "^7.5.2",
235
+ "focus-trap": "^7.5.3",
236
236
  "highlight.js": "^10.7.2",
237
237
  "html-loader": "^4.2.0",
238
238
  "interpolate-loader": "^2.0.1",
239
239
  "just-debounce-it": "^3.2.0",
240
240
  "memoize-one": "^6.0.0",
241
- "postcss": "^8.4.29",
241
+ "postcss": "^8.4.30",
242
242
  "postcss-calc": "^9.0.1",
243
243
  "postcss-flexbugs-fixes": "^5.0.2",
244
244
  "postcss-font-family-system-ui": "^5.0.0",
245
245
  "postcss-loader": "^7.3.3",
246
246
  "postcss-modules-values-replace": "^4.1.0",
247
- "postcss-preset-env": "^9.1.3",
247
+ "postcss-preset-env": "^9.1.4",
248
248
  "prop-types": "^15.8.1",
249
249
  "react-markdown": "^8.0.7",
250
250
  "react-movable": "^3.0.4",
251
251
  "react-virtualized": "^9.22.5",
252
252
  "react-waypoint": "^10.3.0",
253
- "remark-breaks": "^3.0.3",
253
+ "remark-breaks": "^4.0.0",
254
254
  "remark-gfm": "^3.0.1",
255
255
  "scrollbar-width": "^3.1.1",
256
256
  "simply-uuid": "^1.0.1",