@mongodb-js/compass-aggregations 0.0.0-next-d09be9dbbff785d6692110b819e06b0186bd3ac7 → 0.0.0-next-6e4c984eb458cbfc675ec138ae979303ef32bcb5
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/.eslintrc.js +3 -3
- package/.prettierignore +3 -0
- package/.prettierrc.json +1 -0
- package/README.md +26 -19
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/src/components/add-stage/add-stage.d.ts +1 -1
- package/dist/src/components/add-stage/add-stage.d.ts.map +1 -1
- package/dist/src/components/aggregations/aggregations.d.ts.map +1 -1
- package/dist/src/components/create-view-modal/create-view-modal.d.ts.map +1 -1
- package/dist/src/components/create-view-plugin.d.ts.map +1 -1
- package/dist/src/components/duplicate-view-modal/duplicate-view-modal.d.ts.map +1 -1
- package/dist/src/components/focus-mode/focus-mode-modal-header.d.ts +16 -0
- package/dist/src/components/focus-mode/focus-mode-modal-header.d.ts.map +1 -0
- package/dist/src/components/focus-mode/focus-mode-stage-editor.d.ts +14 -0
- package/dist/src/components/focus-mode/focus-mode-stage-editor.d.ts.map +1 -0
- package/dist/src/components/focus-mode/focus-mode-stage-preview.d.ts +23 -0
- package/dist/src/components/focus-mode/focus-mode-stage-preview.d.ts.map +1 -0
- package/dist/src/components/focus-mode/focus-mode.d.ts +1 -2
- package/dist/src/components/focus-mode/focus-mode.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-input-documents.d.ts +1 -1
- package/dist/src/components/pipeline-builder-input-documents.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/pipeline-editor.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/pipeline-preview.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-workspace/pipeline-builder-ui-workspace.d.ts.map +1 -1
- package/dist/src/components/pipeline-confirm-modal/pipeline-confirm-modal.d.ts.map +1 -1
- package/dist/src/components/pipeline-explain/explain-query-performance.d.ts.map +1 -1
- package/dist/src/components/pipeline-explain/explain-results.d.ts.map +1 -1
- package/dist/src/components/pipeline-output-options-menu.d.ts +1 -0
- package/dist/src/components/pipeline-output-options-menu.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-empty-results.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-pagination-count.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-pagination.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-results-view-controls.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-header/pipeline-actions.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-options/pipeline-collation.d.ts.map +1 -1
- package/dist/src/components/resize-handle.d.ts.map +1 -1
- package/dist/src/components/saved-pipelines/saved-pipeline-card.d.ts.map +1 -1
- package/dist/src/components/saved-pipelines/saved-pipelines.d.ts.map +1 -1
- package/dist/src/components/saving-pipeline-modal/saving-pipeline-modal.d.ts.map +1 -1
- package/dist/src/components/settings/settings.d.ts.map +1 -1
- package/dist/src/components/stage-editor/stage-editor.d.ts.map +1 -1
- package/dist/src/components/{atlas-stage-preview.d.ts → stage-preview/atlas-stage-preview.d.ts} +0 -0
- package/dist/src/components/stage-preview/atlas-stage-preview.d.ts.map +1 -0
- package/dist/src/components/{stage-preview.d.ts → stage-preview/index.d.ts} +5 -12
- package/dist/src/components/stage-preview/index.d.ts.map +1 -0
- package/dist/src/components/stage-preview/output-stage-preview.d.ts +19 -0
- package/dist/src/components/stage-preview/output-stage-preview.d.ts.map +1 -0
- package/dist/src/components/stage-preview/stage-preview-header.d.ts +17 -0
- package/dist/src/components/stage-preview/stage-preview-header.d.ts.map +1 -0
- package/dist/src/components/{stage-editor-toolbar/stage-editor-toolbar.d.ts → stage-toolbar/index.d.ts} +6 -5
- package/dist/src/components/stage-toolbar/index.d.ts.map +1 -0
- package/dist/src/components/stage-toolbar/option-menu.d.ts +17 -0
- package/dist/src/components/stage-toolbar/option-menu.d.ts.map +1 -0
- package/dist/src/components/stage-toolbar/stage-collapser.d.ts +12 -0
- package/dist/src/components/stage-toolbar/stage-collapser.d.ts.map +1 -0
- package/dist/src/components/{stage-editor-toolbar → stage-toolbar}/stage-operator-select.d.ts +3 -2
- package/dist/src/components/stage-toolbar/stage-operator-select.d.ts.map +1 -0
- package/dist/src/components/stage-toolbar/toggle-stage.d.ts +12 -0
- package/dist/src/components/stage-toolbar/toggle-stage.d.ts.map +1 -0
- package/dist/src/components/stage.d.ts +1 -1
- package/dist/src/components/stage.d.ts.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/modules/aggregation.d.ts.map +1 -1
- package/dist/src/modules/auto-preview.d.ts +2 -2
- package/dist/src/modules/auto-preview.d.ts.map +1 -1
- package/dist/src/modules/collation-string.d.ts.map +1 -1
- package/dist/src/modules/count-documents.d.ts.map +1 -1
- package/dist/src/modules/create-view/index.d.ts.map +1 -1
- package/dist/src/modules/create-view/is-duplicating.d.ts.map +1 -1
- package/dist/src/modules/create-view/is-running.d.ts.map +1 -1
- package/dist/src/modules/data-service.d.ts +2 -2
- package/dist/src/modules/data-service.d.ts.map +1 -1
- package/dist/src/modules/explain.d.ts.map +1 -1
- package/dist/src/modules/export-to-language.d.ts.map +1 -1
- package/dist/src/modules/focus-mode.d.ts +12 -4
- package/dist/src/modules/focus-mode.d.ts.map +1 -1
- package/dist/src/modules/index.d.ts +13 -4
- package/dist/src/modules/index.d.ts.map +1 -1
- package/dist/src/modules/input-documents.d.ts +38 -14
- package/dist/src/modules/input-documents.d.ts.map +1 -1
- package/dist/src/modules/is-new-pipeline-confirm.d.ts.map +1 -1
- package/dist/src/modules/large-limit.d.ts.map +1 -1
- package/dist/src/modules/max-time-ms.d.ts.map +1 -1
- package/dist/src/modules/out-results-fn.d.ts +1 -0
- package/dist/src/modules/out-results-fn.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/builder-helpers.d.ts +2 -3
- package/dist/src/modules/pipeline-builder/builder-helpers.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-mode.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-parser/pipeline-parser.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-parser/utils.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-preview-manager.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/stage-editor.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/text-editor-output-stage.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/text-editor-pipeline.d.ts.map +1 -1
- package/dist/src/modules/saved-pipeline.d.ts.map +1 -1
- package/dist/src/modules/saving-pipeline.d.ts.map +1 -1
- package/dist/src/modules/settings.d.ts.map +1 -1
- package/dist/src/modules/update-view.d.ts.map +1 -1
- package/dist/src/modules/workspace.d.ts.map +1 -1
- package/dist/src/stores/duplicate-view.d.ts.map +1 -1
- package/dist/src/stores/store.d.ts.map +1 -1
- package/dist/src/utils/cancellable-aggregation.d.ts +1 -1
- package/dist/src/utils/cancellable-aggregation.d.ts.map +1 -1
- package/dist/src/utils/pipeline-storage.d.ts.map +1 -1
- package/dist/src/utils/stage.d.ts +4 -2
- package/dist/src/utils/stage.d.ts.map +1 -1
- package/package.json +35 -33
- package/dist/src/components/atlas-stage-preview.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/delete-stage.d.ts +0 -22
- package/dist/src/components/stage-editor-toolbar/delete-stage.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/index.d.ts +0 -3
- package/dist/src/components/stage-editor-toolbar/index.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/stage-collapser.d.ts +0 -23
- package/dist/src/components/stage-editor-toolbar/stage-collapser.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/stage-editor-toolbar.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/stage-operator-select.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/toggle-stage.d.ts +0 -23
- package/dist/src/components/stage-editor-toolbar/toggle-stage.d.ts.map +0 -1
- package/dist/src/components/stage-preview-toolbar/index.d.ts +0 -3
- package/dist/src/components/stage-preview-toolbar/index.d.ts.map +0 -1
- package/dist/src/components/stage-preview-toolbar/stage-preview-toolbar.d.ts +0 -22
- package/dist/src/components/stage-preview-toolbar/stage-preview-toolbar.d.ts.map +0 -1
- package/dist/src/components/stage-preview.d.ts.map +0 -1
package/.eslintrc.js
CHANGED
@@ -3,10 +3,10 @@ module.exports = {
|
|
3
3
|
extends: ['@mongodb-js/eslint-config-compass'],
|
4
4
|
parserOptions: {
|
5
5
|
tsconfigRootDir: __dirname,
|
6
|
-
project: ['./tsconfig-lint.json']
|
6
|
+
project: ['./tsconfig-lint.json'],
|
7
7
|
},
|
8
8
|
env: {
|
9
9
|
node: true,
|
10
|
-
browser: true
|
11
|
-
}
|
10
|
+
browser: true,
|
11
|
+
},
|
12
12
|
};
|
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"@mongodb-js/prettier-config-compass"
|
package/README.md
CHANGED
@@ -8,9 +8,9 @@
|
|
8
8
|
|
9
9
|
- `src/components/aggregations` The primary export is connected component
|
10
10
|
- `src/modules/` is where action happens
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
- action creators components call
|
12
|
+
- reducers that call dataService, window.open, emit to other plugins, etc.
|
13
|
+
- follows the `ducks` pattern
|
14
14
|
- `src/stores/store` is where plugin listens+responds to events of interest from other plugins
|
15
15
|
- store is global state instantiated via `configureStore()`
|
16
16
|
- All tests are local to their module e.g. `src/*/<module>.spec.js`
|
@@ -59,8 +59,9 @@ to initialise the store instance, which decorates it with various methods to
|
|
59
59
|
conveniently set any values it uses.
|
60
60
|
|
61
61
|
This is for:
|
62
|
-
|
63
|
-
|
62
|
+
|
63
|
+
- `@mongodb-js/compass-aggregations 4.0.0-beta.11`
|
64
|
+
- `@mongodb-js/compass-export-to-language 4.0.2`
|
64
65
|
|
65
66
|
### Browser
|
66
67
|
|
@@ -119,15 +120,15 @@ const store = configureStore({
|
|
119
120
|
localAppRegistry: localAppRegistry,
|
120
121
|
dataProvider: {
|
121
122
|
error: null,
|
122
|
-
dataProvider: dataProvider
|
123
|
+
dataProvider: dataProvider,
|
123
124
|
},
|
124
125
|
env: 'on-prem',
|
125
126
|
namespace: 'db.coll',
|
126
127
|
serverVersion: '4.2.0',
|
127
|
-
fields: []
|
128
|
+
fields: [],
|
128
129
|
});
|
129
130
|
|
130
|
-
<Plugin store={store}
|
131
|
+
<Plugin store={store} />;
|
131
132
|
```
|
132
133
|
|
133
134
|
### Fields
|
@@ -165,36 +166,38 @@ provider.aggregate(namespace, pipeline, options, callback);
|
|
165
166
|
```
|
166
167
|
|
167
168
|
### App Registry Events Emmitted
|
169
|
+
|
168
170
|
Various actions within this plugin will emit events for other parts of the
|
169
171
|
application can be listened to via [hadron-app-registry][hadron-app-registry].
|
170
172
|
`Local` events are scoped to a `Tab`.
|
171
173
|
`Global` events are scoped to the whole Compass application.
|
172
174
|
|
173
175
|
#### Global
|
176
|
+
|
174
177
|
- **'open-create-view'**: Indicated `Create View` is to be opened.
|
175
178
|
- **'compass:export-to-language:opened', source**: Indicates
|
176
179
|
`export-to-language` was opened. `source` refers to the module it is opened
|
177
|
-
from, in this case `Aggregations`.
|
180
|
+
from, in this case `Aggregations`.
|
178
181
|
- **'compass:aggregations:pipeline-imported'**: Indicates a pipeline ws
|
179
182
|
imported, either from pasting the pipeline in, or from using the import
|
180
|
-
functionality. Sends data to metrics.
|
183
|
+
functionality. Sends data to metrics.
|
181
184
|
- **'compass:aggregations:create-view', numOfStages**: Indicates `Create View` was
|
182
185
|
successful. `numOfStages` refers to pipeline length. Sends data to metrics.
|
183
186
|
- **'compass:aggregations:pipeline-opened'**: Indicates a saved pipeline was
|
184
187
|
opened. Sends pipeline data to metrics.
|
185
188
|
- **'open-namespace-in-new-tab'**: Indicates current pipeline's namespace is to
|
186
189
|
be opened in a new tab. Called when `Create View` is successful, when
|
187
|
-
`$merge` are to be shown, when `$out` results are to be shown.
|
190
|
+
`$merge` are to be shown, when `$out` results are to be shown.
|
188
191
|
- **'compass:aggregations:update-view', numOfStages**: Indicates a pipeline view
|
189
192
|
was updated. `numOfStages` refers to the length of the pipeline. Sends data to
|
190
|
-
metrics.
|
193
|
+
metrics.
|
191
194
|
- **'compass:aggregations:settings-applied', settings**: Indicates pipeline
|
192
195
|
settings are to be applied. `settings` include: `isExpanded`, `isCommentMode`,
|
193
|
-
`isDirty`, `sampleSize`, `maxTimeMS`, `limit`.
|
196
|
+
`isDirty`, `sampleSize`, `maxTimeMS`, `limit`.
|
194
197
|
- **'refresh-data'**: Indicates a data refresh is required within Compass.
|
195
198
|
- **'select-namespace', metadata**: Indicates a namespace is being selected.
|
196
199
|
Emitted when updating a collection. `metadata` refers to information about the
|
197
|
-
pipeline.
|
200
|
+
pipeline.
|
198
201
|
- **'agg-pipeline-deleted'**: Indicates a pipeline was deleted. Sends pipeline
|
199
202
|
data to metrics.
|
200
203
|
- **'agg-pipeline-saved', pipelineName**: Indicates a pipeline was saved
|
@@ -205,28 +208,31 @@ pipeline.
|
|
205
208
|
with a `$out`. Sends pipeline data to metrics.
|
206
209
|
|
207
210
|
#### Local
|
211
|
+
|
208
212
|
- **'open-aggregation-export-to-language', pipeline**: Indicates
|
209
213
|
`export-to-language` plugin is to opened. `pipeline` refers to the pipeline to
|
210
|
-
be exported.
|
211
|
-
- **'open-create-view', { meta: { source, pipeline }}**: Indicates `Create
|
212
|
-
View` is being opened.
|
214
|
+
be exported.
|
215
|
+
- **'open-create-view', { meta: { source, pipeline }}**: Indicates `Create View` is being opened.
|
213
216
|
|
214
217
|
### App Registry Events Received
|
218
|
+
|
215
219
|
#### Local
|
220
|
+
|
216
221
|
- **'import-finished'**: When import data was successful, refresh plugin's input
|
217
222
|
data.
|
218
223
|
- **'fields-changed', fields**: Received when schema fields change. Updates
|
219
224
|
plugin's fields.
|
220
225
|
- **'refresh-data'**: Received when Compass data was refreshed. Refreshes input
|
221
226
|
data in the plugin.
|
222
|
-
- **'open-create-view', { meta: { source, pipeline }}**: Received when `Create
|
223
|
-
View` is to be opened. Opens a Create View modal.
|
227
|
+
- **'open-create-view', { meta: { source, pipeline }}**: Received when `Create View` is to be opened. Opens a Create View modal.
|
224
228
|
|
225
229
|
#### Global
|
230
|
+
|
226
231
|
- **'refresh-data'**: Received when Input data is to be refreshed on Compass
|
227
232
|
level. Refreshes plugin's input.
|
228
233
|
|
229
234
|
### Metrics Events
|
235
|
+
|
230
236
|
- `refresh-data`
|
231
237
|
- `open-create-view`
|
232
238
|
- `agg-pipeline-saved`
|
@@ -260,6 +266,7 @@ npm run analyze
|
|
260
266
|
```
|
261
267
|
|
262
268
|
## Install
|
269
|
+
|
263
270
|
```shell
|
264
271
|
npm i -S @mongodb-js/compass-aggregations
|
265
272
|
```
|