Skip to content

Commit 3cd7ee6

Browse files
Merge remote-tracking branch 'origin/main' into beta-releases
2 parents 6064c8c + f54bb15 commit 3cd7ee6

File tree

165 files changed

+3970
-2574
lines changed

Some content is hidden

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

165 files changed

+3970
-2574
lines changed

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **Mongodb Compass**.
2-
This document was automatically generated on Sun Nov 26 2023.
2+
This document was automatically generated on Wed Nov 29 2023.
33

44
## List of dependencies
55

package-lock.json

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

packages/atlas-service/src/renderer.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ export class AtlasService {
101101
this.emitter.off(evt, listener);
102102
return this;
103103
}
104+
removeListener<T extends keyof AtlasServiceEvents>(
105+
evt: T,
106+
listener: (...args: AtlasServiceEvents[T]) => void
107+
): this;
108+
removeListener(evt: string, listener: (...args: any[]) => void): this {
109+
this.emitter.off(evt, listener);
110+
return this;
111+
}
104112

105113
emit<T extends keyof AtlasServiceEvents>(
106114
evt: T,

packages/compass-aggregations/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"@dnd-kit/core": "^6.0.7",
6565
"@dnd-kit/sortable": "^7.0.2",
6666
"@dnd-kit/utilities": "^3.2.1",
67+
"@mongodb-js/compass-collection": "^4.19.1",
6768
"@mongodb-js/eslint-config-compass": "^1.0.11",
6869
"@mongodb-js/mocha-config-compass": "^1.3.2",
6970
"@mongodb-js/prettier-config-compass": "^1.0.1",
File renamed without changes.

packages/compass-aggregations/src/components/aggregations/aggregations.module.less

Lines changed: 0 additions & 11 deletions
This file was deleted.

packages/compass-aggregations/src/components/aggregations/aggregations.spec.jsx renamed to packages/compass-aggregations/src/components/aggregations/aggregations.spec.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ import React from 'react';
22
import { mount } from 'enzyme';
33
import { expect } from 'chai';
44

5-
import Aggregations from '../aggregations';
5+
import Aggregations from '.';
66
import configureStore from '../../../test/configure-store';
7-
import styles from './aggregations.module.less';
87
import { Provider } from 'react-redux';
98

109
describe('Aggregations [Component]', function () {
11-
let component;
10+
let component: ReturnType<typeof mount> | null;
1211

1312
beforeEach(function () {
1413
component = mount(
@@ -23,11 +22,11 @@ describe('Aggregations [Component]', function () {
2322
});
2423

2524
afterEach(function () {
26-
component.unmount();
25+
component?.unmount();
2726
component = null;
2827
});
2928

3029
it('renders the correct root classname', function () {
31-
expect(component.find(`.${styles.aggregations}`)).to.be.present();
30+
expect(component?.find(`[data-testid="compass-aggregations"]`)).exist;
3231
});
3332
});

packages/compass-aggregations/src/components/aggregations/aggregations.jsx renamed to packages/compass-aggregations/src/components/aggregations/aggregations.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,35 @@ import {
1414
savingPipelineNameChanged,
1515
savingPipelineApply,
1616
savingPipelineCancel,
17-
savingPipelineOpen,
1817
} from '../../modules/saving-pipeline';
1918
import { dismissViewError } from '../../modules/update-view';
2019

21-
import styles from './aggregations.module.less';
20+
import type { RootState } from '../../modules';
21+
import type { PipelineProps } from '../pipeline/pipeline';
22+
import { css, palette } from '@mongodb-js/compass-components';
23+
24+
const aggregationsStyles = css({
25+
display: 'flex',
26+
alignItems: 'flex-start',
27+
backgroundColor: palette.gray.light3,
28+
position: 'relative',
29+
width: '100%',
30+
zIndex: 0,
31+
height: '100%',
32+
});
2233

2334
/**
2435
* The core aggregations component.
2536
*/
26-
class Aggregations extends Component {
37+
class Aggregations extends Component<PipelineProps> {
2738
static displayName = 'AggregationsComponent';
2839

2940
/**
3041
* Render Aggregations component.
31-
*
32-
* @returns {React.Component} The rendered component.
3342
*/
3443
render() {
3544
return (
36-
<div className={styles.aggregations}>
45+
<div className={aggregationsStyles} data-testid="compass-aggregations">
3746
<Pipeline {...this.props} />
3847
</div>
3948
);
@@ -47,7 +56,7 @@ class Aggregations extends Component {
4756
*
4857
* @returns {Object} The mapped properties.
4958
*/
50-
const mapStateToProps = (state) => ({
59+
const mapStateToProps = (state: RootState) => ({
5160
namespace: state.namespace,
5261
name: state.name,
5362
collationString: state.collationString,
@@ -77,7 +86,6 @@ const MappedAggregations = connect(mapStateToProps, {
7786
savingPipelineNameChanged,
7887
savingPipelineApply,
7988
savingPipelineCancel,
80-
savingPipelineOpen,
8189
dismissViewError,
8290
})(Aggregations);
8391

File renamed without changes.

packages/compass-aggregations/src/components/focus-mode/focus-mode.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ const renderFocusMode = () => {
2222
describe('FocusMode', function () {
2323
it('does not show modal when closed', function () {
2424
const store = renderFocusMode();
25-
store.dispatch(disableFocusMode());
25+
store.dispatch(disableFocusMode() as any);
2626
expect(() => {
2727
screen.getByTestId('focus-mode-modal');
2828
}).to.throw;
2929
});
3030

3131
it('shows modal when open', function () {
3232
const store = renderFocusMode();
33-
store.dispatch(enableFocusMode(0));
33+
store.dispatch(enableFocusMode(0) as any);
3434
expect(screen.getByTestId('focus-mode-modal')).to.exist;
3535
});
3636

3737
it('hides modal when close button is clicked', function () {
3838
const store = renderFocusMode();
39-
store.dispatch(enableFocusMode(0));
39+
store.dispatch(enableFocusMode(0) as any);
4040
screen.getByLabelText(/close modal/i).click();
4141

4242
expect(() => {

0 commit comments

Comments
 (0)