@gitlab/ui 52.9.0 → 52.9.2
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [52.9.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v52.9.1...v52.9.2) (2023-01-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlTabs:** set a query parameter for the first tab ([f2f4827](https://gitlab.com/gitlab-org/gitlab-ui/commit/f2f4827a5d9d1d1cd3f98c1c06f9bd7ed7a63abc))
|
|
7
|
+
|
|
8
|
+
## [52.9.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v52.9.0...v52.9.1) (2023-01-09)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update dependency dompurify to ^2.4.2 ([c1b1212](https://gitlab.com/gitlab-org/gitlab-ui/commit/c1b12126057ba5e9a03236c16f9e7ff3b373ed80))
|
|
14
|
+
|
|
1
15
|
# [52.9.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v52.8.0...v52.9.0) (2023-01-04)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -160,11 +160,7 @@ var script = {
|
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
const searchParams = new URLSearchParams(window.location.search);
|
|
163
|
-
|
|
164
|
-
searchParams.delete(this.queryParamName);
|
|
165
|
-
} else {
|
|
166
|
-
searchParams.set(this.queryParamName, newQueryParamValue);
|
|
167
|
-
}
|
|
163
|
+
searchParams.set(this.queryParamName, newQueryParamValue);
|
|
168
164
|
window.history.pushState({}, '', `${window.location.pathname}?${searchParams.toString()}`);
|
|
169
165
|
},
|
|
170
166
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "52.9.
|
|
3
|
+
"version": "52.9.2",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@popperjs/core": "^2.11.2",
|
|
64
64
|
"bootstrap-vue": "2.20.1",
|
|
65
|
-
"dompurify": "^2.4.
|
|
65
|
+
"dompurify": "^2.4.2",
|
|
66
66
|
"echarts": "^5.3.2",
|
|
67
67
|
"iframe-resizer": "^4.3.2",
|
|
68
68
|
"lodash": "^4.17.20",
|
|
@@ -269,27 +269,6 @@ describe('tabs component', () => {
|
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
);
|
|
272
|
-
|
|
273
|
-
describe('when tab is changed back to initial active tab', () => {
|
|
274
|
-
it('removes query string', async () => {
|
|
275
|
-
buildTabs({
|
|
276
|
-
props: { syncActiveTabWithQueryParams: true },
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
await nextTick();
|
|
280
|
-
await findTabByText('Second').trigger('click');
|
|
281
|
-
|
|
282
|
-
expect(window.history.pushState).toHaveBeenCalledWith({}, '', '/?tab=1');
|
|
283
|
-
|
|
284
|
-
// Manually set `window.location.search` since
|
|
285
|
-
// `window.history.pushState` doesn't update the query string in JSDOM.
|
|
286
|
-
window.location.search = '?tab=1';
|
|
287
|
-
|
|
288
|
-
await findTabByText('First').trigger('click');
|
|
289
|
-
|
|
290
|
-
expect(window.history.pushState).toHaveBeenCalledWith({}, '', '/?');
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
272
|
});
|
|
294
273
|
|
|
295
274
|
describe('when `popstate` event is fired', () => {
|
|
@@ -172,12 +172,7 @@ export default {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
const searchParams = new URLSearchParams(window.location.search);
|
|
175
|
-
|
|
176
|
-
if (tabIndex === 0) {
|
|
177
|
-
searchParams.delete(this.queryParamName);
|
|
178
|
-
} else {
|
|
179
|
-
searchParams.set(this.queryParamName, newQueryParamValue);
|
|
180
|
-
}
|
|
175
|
+
searchParams.set(this.queryParamName, newQueryParamValue);
|
|
181
176
|
|
|
182
177
|
window.history.pushState({}, '', `${window.location.pathname}?${searchParams.toString()}`);
|
|
183
178
|
},
|