@jetbrains/ring-ui 4.0.51 → 4.0.52

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.
@@ -203,7 +203,8 @@ describe('Auth', () => {
203
203
  redirectUri: 'http://localhost:8080/hub',
204
204
  clientId: '1-1-1-1-1',
205
205
  scope: ['0-0-0-0-0', 'youtrack'],
206
- optionalScopes: ['youtrack']
206
+ optionalScopes: ['youtrack'],
207
+ waitForRedirectTimeout: 0
207
208
  });
208
209
  try {
209
210
  await auth.init();
@@ -226,7 +227,8 @@ describe('Auth', () => {
226
227
  auth = new Auth({
227
228
  serverUri: '',
228
229
  redirect: true,
229
- cleanHash: true
230
+ cleanHash: true,
231
+ waitForRedirectTimeout: 0
230
232
  });
231
233
 
232
234
  try {
@@ -245,7 +247,8 @@ describe('Auth', () => {
245
247
  auth = new Auth({
246
248
  serverUri: '',
247
249
  redirect: true,
248
- cleanHash: true
250
+ cleanHash: true,
251
+ waitForRedirectTimeout: 0
249
252
  });
250
253
 
251
254
  try {
@@ -265,7 +268,8 @@ describe('Auth', () => {
265
268
  auth = new Auth({
266
269
  serverUri: '',
267
270
  redirect: true,
268
- cleanHash: false
271
+ cleanHash: false,
272
+ waitForRedirectTimeout: 0
269
273
  });
270
274
 
271
275
  try {
@@ -284,7 +288,8 @@ describe('Auth', () => {
284
288
  serverUri: '',
285
289
  redirect: true,
286
290
  redirectUri: 'http://localhost:8080/hub',
287
- requestCredentials: 'skip'
291
+ requestCredentials: 'skip',
292
+ waitForRedirectTimeout: 0
288
293
  });
289
294
  try {
290
295
  await auth.init();
@@ -313,7 +318,8 @@ describe('Auth', () => {
313
318
  redirectUri: 'http://localhost:8080/hub',
314
319
  clientId: '1-1-1-1-1',
315
320
  scope: ['0-0-0-0-0', 'youtrack'],
316
- optionalScopes: ['youtrack']
321
+ optionalScopes: ['youtrack'],
322
+ waitForRedirectTimeout: 0
317
323
  });
318
324
 
319
325
  auth._storage._tokenStorage = auth._storage._stateStorage =
@@ -330,7 +336,8 @@ describe('Auth', () => {
330
336
  auth._storage.saveToken({
331
337
  accessToken: 'token',
332
338
  expires: TokenValidator._epoch() + HOUR,
333
- scopes: ['0-0-0-0-0']
339
+ scopes: ['0-0-0-0-0'],
340
+ waitForRedirectTimeout: 0
334
341
  });
335
342
  });
336
343
 
@@ -14,6 +14,7 @@ export const DEFAULT_EXPIRES_TIMEOUT = 40 * 60;
14
14
  export const DEFAULT_BACKGROUND_TIMEOUT = 10 * 1000;
15
15
  const DEFAULT_BACKEND_CHECK_TIMEOUT = 10 * 1000;
16
16
  const BACKGROUND_REDIRECT_TIMEOUT = 20 * 1000;
17
+ const DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT = 5 * 1000;
17
18
  /* eslint-enable no-magic-numbers */
18
19
 
19
20
  export const USER_CHANGED_EVENT = 'userChange';
@@ -46,6 +47,7 @@ const DEFAULT_CONFIG = {
46
47
  onBackendDown: () => {},
47
48
 
48
49
  defaultExpiresIn: DEFAULT_EXPIRES_TIMEOUT,
50
+ waitForRedirectTimeout: DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT,
49
51
  translations: {
50
52
  login: 'Log in',
51
53
  loginTo: 'Log in to %serviceName%',
@@ -311,6 +313,11 @@ export default class Auth {
311
313
  const authRequest = await this._requestBuilder.prepareAuthRequest();
312
314
  this._redirectCurrentPage(authRequest.url);
313
315
 
316
+ // HUB-10867 Since we already redirecting the page, there is no actual need to throw an error
317
+ // and scare user with flashing error
318
+ // But let's keep it just in case redirect was not successful
319
+ await new Promise(resolve => setTimeout(resolve, this.config.waitForRedirectTimeout));
320
+
314
321
  throw error;
315
322
  }
316
323
 
@@ -93,7 +93,6 @@ const DropdownMenu = React.forwardRef(function DropdownMenu(
93
93
  id={listId}
94
94
  ariaLabel={ariaLabel || defaultAriaLabel}
95
95
  closeOnSelect
96
- activateFirstItem
97
96
  data={data}
98
97
  onSelect={onSelect}
99
98
  {...menuProps}
@@ -66,7 +66,8 @@ describe('Dropdown Menu', () => {
66
66
  it('should add accessibility attributes to anchor', async () => {
67
67
  const wrapper = await mountAndWaitForMenuContent({
68
68
  anchor: 'Anchor text',
69
- data: [{key: 'key1'}, {key: 'key2'}]
69
+ data: [{key: 'key1'}, {key: 'key2'}],
70
+ menuProps: {activateFirstItem: true}
70
71
  });
71
72
 
72
73
  const anchorProps = wrapper.update().find(Anchor).props();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "4.0.51",
3
+ "version": "4.0.52",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -66,27 +66,27 @@
66
66
  "readmeFilename": "README.md",
67
67
  "devDependencies": {
68
68
  "@babel/cli": "^7.15.7",
69
- "@babel/eslint-parser": "^7.15.7",
69
+ "@babel/eslint-parser": "^7.15.8",
70
70
  "@jetbrains/eslint-config": "^5.3.1",
71
- "@jetbrains/generator-ring-ui": "^4.0.39",
71
+ "@jetbrains/generator-ring-ui": "^4.0.40",
72
72
  "@jetbrains/stylelint-config": "^2.0.1",
73
73
  "@primer/octicons": "^16.0.0",
74
- "@storybook/addon-a11y": "6.3.9",
75
- "@storybook/addon-docs": "6.3.9",
76
- "@storybook/addon-essentials": "6.3.9",
74
+ "@storybook/addon-a11y": "6.3.11",
75
+ "@storybook/addon-docs": "6.3.10",
76
+ "@storybook/addon-essentials": "6.3.11",
77
77
  "@storybook/addon-storyshots": "6.3.2",
78
78
  "@storybook/addon-storyshots-puppeteer": "6.3.2",
79
- "@storybook/addon-storysource": "6.3.8",
80
- "@storybook/addons": "6.3.9",
81
- "@storybook/builder-webpack5": "6.3.9",
82
- "@storybook/client-api": "6.3.8",
83
- "@storybook/core": "6.3.8",
84
- "@storybook/html": "6.3.8",
85
- "@storybook/manager-webpack5": "^6.3.8",
86
- "@storybook/source-loader": "6.3.9",
87
- "@storybook/theming": "6.3.9",
79
+ "@storybook/addon-storysource": "6.3.11",
80
+ "@storybook/addons": "6.3.10",
81
+ "@storybook/builder-webpack5": "6.3.10",
82
+ "@storybook/client-api": "6.3.10",
83
+ "@storybook/core": "6.3.11",
84
+ "@storybook/html": "6.3.10",
85
+ "@storybook/manager-webpack5": "^6.3.10",
86
+ "@storybook/source-loader": "6.3.10",
87
+ "@storybook/theming": "6.3.10",
88
88
  "@testing-library/react": "^12.1.2",
89
- "@testing-library/user-event": "^13.2.1",
89
+ "@testing-library/user-event": "^13.3.0",
90
90
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
91
91
  "angular": "^1.8.2",
92
92
  "angular-mocks": "^1.8.2",
@@ -98,13 +98,13 @@
98
98
  "chai-dom": "^1.10.0",
99
99
  "chai-enzyme": "1.0.0-beta.1",
100
100
  "cheerio": "^0.22.0",
101
- "core-js": "^3.18.1",
101
+ "core-js": "^3.18.2",
102
102
  "enzyme": "^3.11.0",
103
103
  "eslint": "^7.32.0",
104
104
  "eslint-import-resolver-webpack": "^0.13.1",
105
105
  "eslint-plugin-angular": "^4.1.0",
106
106
  "eslint-plugin-bdd": "^2.1.1",
107
- "eslint-plugin-import": "^2.24.2",
107
+ "eslint-plugin-import": "^2.25.1",
108
108
  "eslint-plugin-jsx-a11y": "^6.4.1",
109
109
  "eslint-plugin-react": "^7.26.1",
110
110
  "events": "^3.3.0",
@@ -112,7 +112,7 @@
112
112
  "husky": "^7.0.2",
113
113
  "identity-obj-proxy": "^3.0.0",
114
114
  "imports-loader": "^3.0.0",
115
- "jest": "~27.2.4",
115
+ "jest": "~27.2.5",
116
116
  "jest-teamcity": "^1.10.0",
117
117
  "karma": "^6.3.4",
118
118
  "karma-chrome-launcher": "3.1.0",
@@ -121,7 +121,7 @@
121
121
  "karma-teamcity-reporter": "^2.0.0",
122
122
  "karma-webpack": "^5.0.0",
123
123
  "lerna": "^4.0.0",
124
- "lint-staged": "^11.1.2",
124
+ "lint-staged": "^11.2.3",
125
125
  "merge-options": "^3.0.4",
126
126
  "mocha": "^9.1.2",
127
127
  "pinst": "^2.1.6",
@@ -139,8 +139,8 @@
139
139
  "teamcity-service-messages": "^0.1.11",
140
140
  "terser-webpack-plugin": "^5.2.4",
141
141
  "wallaby-webpack": "^3.9.16",
142
- "webpack": "^5.55.1",
143
- "webpack-cli": "^4.8.0",
142
+ "webpack": "^5.58.2",
143
+ "webpack-cli": "^4.9.0",
144
144
  "xmlappend": "^1.0.4",
145
145
  "yo": "^4.3.0"
146
146
  },
@@ -148,10 +148,10 @@
148
148
  "core-js": ">=3.0.0",
149
149
  "react": ">=16.8.0",
150
150
  "react-dom": ">=16.8.0",
151
- "webpack": "^5.55.1"
151
+ "webpack": "^5.58.2"
152
152
  },
153
153
  "dependencies": {
154
- "@babel/core": "^7.15.5",
154
+ "@babel/core": "^7.15.8",
155
155
  "@jetbrains/angular-elastic": "^2.5.1",
156
156
  "@jetbrains/babel-preset-jetbrains": "^2.3.1",
157
157
  "@jetbrains/icons": "^3.17.1",
@@ -166,7 +166,7 @@
166
166
  "combokeys": "^3.0.1",
167
167
  "compile-code-loader": "^1.0.0",
168
168
  "conic-gradient": "^1.0.0",
169
- "css-loader": "^6.3.0",
169
+ "css-loader": "^6.4.0",
170
170
  "date-fns": "^2.25.0",
171
171
  "deep-equal": "^2.0.4",
172
172
  "element-resize-detector": "^1.2.3",
@@ -207,5 +207,5 @@
207
207
  "node": ">=7.4",
208
208
  "npm": ">=6.0.0"
209
209
  },
210
- "gitHead": "61c8bec13d32695011f20d8e17eb3d641828c0d2"
210
+ "gitHead": "081813df7cd0a278be5c00c10286f34540409715"
211
211
  }