@mongodb-js/compass-aggregations 9.3.0 → 9.5.0
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 +27 -21
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +2 -14
- package/dist/index.css +7 -595
- package/dist/index.js +1 -22
- package/dist/index.js.LICENSE.txt +2 -14
- package/dist/src/components/add-stage/add-stage.d.ts +7 -16
- package/dist/src/components/add-stage/add-stage.d.ts.map +1 -1
- package/dist/src/components/aggregations/aggregations.d.ts +12 -1
- package/dist/src/components/aggregations/aggregations.d.ts.map +1 -1
- package/dist/src/components/create-view-modal/create-view-modal.d.ts +21 -31
- 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 +19 -28
- 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 +13 -0
- package/dist/src/components/focus-mode/focus-mode.d.ts.map +1 -0
- package/dist/src/components/loading-overlay/index.d.ts +1 -1
- package/dist/src/components/loading-overlay/loading-overlay.d.ts +6 -12
- package/dist/src/components/loading-overlay/loading-overlay.d.ts.map +1 -1
- package/dist/src/components/pipeline/pipeline.d.ts +4 -13
- package/dist/src/components/pipeline/pipeline.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-input-documents.d.ts +17 -0
- package/dist/src/components/pipeline-builder-input-documents.d.ts.map +1 -0
- package/dist/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/index.d.ts +4 -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 +5 -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 +9 -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-as-text-workspace/pipeline-stages-preview.d.ts +17 -0
- package/dist/src/components/pipeline-builder-workspace/pipeline-as-text-workspace/pipeline-stages-preview.d.ts.map +1 -0
- package/dist/src/components/pipeline-builder-workspace/pipeline-builder-ui-workspace.d.ts +12 -19
- package/dist/src/components/pipeline-builder-workspace/pipeline-builder-ui-workspace.d.ts.map +1 -1
- package/dist/src/components/pipeline-builder-workspace/pipeline-builder-workspace.d.ts +4 -1
- package/dist/src/components/pipeline-builder-workspace/pipeline-builder-workspace.d.ts.map +1 -1
- package/dist/src/components/pipeline-confirm-modal/pipeline-confirm-modal.d.ts +13 -0
- package/dist/src/components/pipeline-confirm-modal/pipeline-confirm-modal.d.ts.map +1 -0
- 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-explain/index.d.ts +4 -1
- package/dist/src/components/pipeline-explain/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-output-options-menu.d.ts +8 -0
- package/dist/src/components/pipeline-output-options-menu.d.ts.map +1 -0
- package/dist/src/components/pipeline-results-workspace/index.d.ts +6 -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 +5 -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 +4 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-pagination.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-results-header.d.ts +9 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-results-header.d.ts.map +1 -1
- package/dist/src/components/pipeline-results-workspace/pipeline-results-list.d.ts +1 -0
- package/dist/src/components/pipeline-results-workspace/pipeline-results-list.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 +12 -2
- package/dist/src/components/pipeline-toolbar/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-header/index.d.ts +9 -6
- package/dist/src/components/pipeline-toolbar/pipeline-header/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-header/pipeline-actions.d.ts +10 -1
- package/dist/src/components/pipeline-toolbar/pipeline-header/pipeline-actions.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-header/pipeline-stages.d.ts +4 -1
- package/dist/src/components/pipeline-toolbar/pipeline-header/pipeline-stages.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-options/pipeline-collation.d.ts +4 -11
- package/dist/src/components/pipeline-toolbar/pipeline-options/pipeline-collation.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-settings/index.d.ts +7 -3
- package/dist/src/components/pipeline-toolbar/pipeline-settings/index.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-settings/pipeline-extra-settings.d.ts +4 -1
- package/dist/src/components/pipeline-toolbar/pipeline-settings/pipeline-extra-settings.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-settings/pipeline-menus.d.ts +5 -7
- package/dist/src/components/pipeline-toolbar/pipeline-settings/pipeline-menus.d.ts.map +1 -1
- package/dist/src/components/pipeline-toolbar/pipeline-settings/pipeline-name.d.ts +4 -1
- package/dist/src/components/pipeline-toolbar/pipeline-settings/pipeline-name.d.ts.map +1 -1
- package/dist/src/components/resize-handle.d.ts +4 -0
- package/dist/src/components/resize-handle.d.ts.map +1 -0
- package/dist/src/components/saved-pipelines/saved-pipeline-card.d.ts +4 -4
- package/dist/src/components/saved-pipelines/saved-pipeline-card.d.ts.map +1 -1
- package/dist/src/components/saved-pipelines/saved-pipeline-confirmation-modals.d.ts +12 -0
- package/dist/src/components/saved-pipelines/saved-pipeline-confirmation-modals.d.ts.map +1 -0
- package/dist/src/components/saved-pipelines/saved-pipelines.d.ts +10 -3
- 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 +26 -46
- package/dist/src/components/stage-editor/stage-editor.d.ts.map +1 -1
- package/dist/src/components/stage-preview/atlas-stage-preview.d.ts +5 -0
- package/dist/src/components/stage-preview/atlas-stage-preview.d.ts.map +1 -0
- package/dist/src/components/stage-preview/index.d.ts +18 -2
- package/dist/src/components/stage-preview/index.d.ts.map +1 -1
- 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-toolbar/index.d.ts +18 -0
- 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-toolbar/stage-operator-select.d.ts +36 -0
- 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 +18 -0
- package/dist/src/components/stage.d.ts.map +1 -0
- 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 +30 -0
- package/dist/src/modules/focus-mode.d.ts.map +1 -0
- package/dist/src/modules/id.d.ts.map +1 -1
- package/dist/src/modules/index.d.ts +26 -7
- 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 +15 -4
- 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 +4 -1
- package/dist/src/modules/pipeline-builder/builder-helpers.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/index.d.ts +8 -1
- package/dist/src/modules/pipeline-builder/index.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-builder.d.ts +22 -12
- package/dist/src/modules/pipeline-builder/pipeline-builder.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 +3 -2
- package/dist/src/modules/pipeline-builder/pipeline-parser/pipeline-parser.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-parser/stage-parser.d.ts +12 -2
- package/dist/src/modules/pipeline-builder/pipeline-parser/stage-parser.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/pipeline-parser/utils.d.ts +7 -6
- 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 +2 -0
- package/dist/src/modules/pipeline-builder/pipeline-preview-manager.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/stage-editor.d.ts +7 -1
- package/dist/src/modules/pipeline-builder/stage-editor.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/stage.d.ts +2 -2
- package/dist/src/modules/pipeline-builder/stage.d.ts.map +1 -1
- package/dist/src/modules/pipeline-builder/text-editor-output-stage.d.ts +13 -0
- package/dist/src/modules/pipeline-builder/text-editor-output-stage.d.ts.map +1 -0
- package/dist/src/modules/pipeline-builder/{text-editor.d.ts → text-editor-pipeline.d.ts} +16 -10
- package/dist/src/modules/pipeline-builder/text-editor-pipeline.d.ts.map +1 -0
- package/dist/src/modules/saved-pipeline.d.ts +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 +11 -2
- package/dist/src/utils/stage.d.ts.map +1 -1
- package/package.json +43 -42
- package/dist/src/components/input/index.d.ts +0 -3
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/input/input.d.ts +0 -25
- package/dist/src/components/input/input.d.ts.map +0 -1
- package/dist/src/components/input-builder/index.d.ts +0 -3
- package/dist/src/components/input-builder/index.d.ts.map +0 -1
- package/dist/src/components/input-builder/input-builder.d.ts +0 -9
- package/dist/src/components/input-builder/input-builder.d.ts.map +0 -1
- package/dist/src/components/input-builder-toolbar/index.d.ts +0 -3
- package/dist/src/components/input-builder-toolbar/index.d.ts.map +0 -1
- package/dist/src/components/input-builder-toolbar/input-builder-toolbar.d.ts +0 -16
- package/dist/src/components/input-builder-toolbar/input-builder-toolbar.d.ts.map +0 -1
- package/dist/src/components/input-collapser/index.d.ts +0 -3
- package/dist/src/components/input-collapser/index.d.ts.map +0 -1
- package/dist/src/components/input-collapser/input-collapser.d.ts +0 -14
- package/dist/src/components/input-collapser/input-collapser.d.ts.map +0 -1
- package/dist/src/components/input-documents-count/index.d.ts +0 -3
- package/dist/src/components/input-documents-count/index.d.ts.map +0 -1
- package/dist/src/components/input-documents-count/input-documents-count.d.ts +0 -13
- package/dist/src/components/input-documents-count/input-documents-count.d.ts.map +0 -1
- package/dist/src/components/input-preview/index.d.ts +0 -3
- package/dist/src/components/input-preview/index.d.ts.map +0 -1
- package/dist/src/components/input-preview/input-preview.d.ts +0 -15
- package/dist/src/components/input-preview/input-preview.d.ts.map +0 -1
- package/dist/src/components/input-preview-toolbar/index.d.ts +0 -3
- package/dist/src/components/input-preview-toolbar/index.d.ts.map +0 -1
- package/dist/src/components/input-preview-toolbar/input-preview-toolbar.d.ts +0 -7
- package/dist/src/components/input-preview-toolbar/input-preview-toolbar.d.ts.map +0 -1
- package/dist/src/components/input-refresh/index.d.ts +0 -3
- package/dist/src/components/input-refresh/index.d.ts.map +0 -1
- package/dist/src/components/input-refresh/input-refresh.d.ts +0 -13
- package/dist/src/components/input-refresh/input-refresh.d.ts.map +0 -1
- package/dist/src/components/input-toolbar/index.d.ts +0 -3
- package/dist/src/components/input-toolbar/index.d.ts.map +0 -1
- package/dist/src/components/input-toolbar/input-toolbar.d.ts +0 -16
- package/dist/src/components/input-toolbar/input-toolbar.d.ts.map +0 -1
- package/dist/src/components/input-workspace/index.d.ts +0 -3
- package/dist/src/components/input-workspace/index.d.ts.map +0 -1
- package/dist/src/components/input-workspace/input-workspace.d.ts +0 -16
- package/dist/src/components/input-workspace/input-workspace.d.ts.map +0 -1
- package/dist/src/components/pipeline/modals/confirm-import-pipeline.d.ts +0 -17
- package/dist/src/components/pipeline/modals/confirm-import-pipeline.d.ts.map +0 -1
- package/dist/src/components/pipeline/modals/confirm-new-pipeline.d.ts +0 -17
- package/dist/src/components/pipeline/modals/confirm-new-pipeline.d.ts.map +0 -1
- package/dist/src/components/pipeline/modals/import-pipeline.d.ts +0 -33
- package/dist/src/components/pipeline/modals/import-pipeline.d.ts.map +0 -1
- package/dist/src/components/resize-handle/resize-handle.d.ts +0 -7
- package/dist/src/components/resize-handle/resize-handle.d.ts.map +0 -1
- package/dist/src/components/stage/index.d.ts +0 -3
- package/dist/src/components/stage/index.d.ts.map +0 -1
- package/dist/src/components/stage/stage.d.ts +0 -29
- package/dist/src/components/stage/stage.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/add-after-stage.d.ts +0 -18
- package/dist/src/components/stage-editor-toolbar/add-after-stage.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/delete-stage.d.ts +0 -18
- 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/select-option-with-tooltip/select-option-with-tooltip.d.ts +0 -14
- package/dist/src/components/stage-editor-toolbar/select-option-with-tooltip/select-option-with-tooltip.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/stage-collapser.d.ts +0 -20
- 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 +0 -21
- package/dist/src/components/stage-editor-toolbar/stage-editor-toolbar.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/stage-grabber.d.ts +0 -9
- package/dist/src/components/stage-editor-toolbar/stage-grabber.d.ts.map +0 -1
- package/dist/src/components/stage-editor-toolbar/stage-operator-select.d.ts +0 -24
- 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 -20
- package/dist/src/components/stage-editor-toolbar/toggle-stage.d.ts.map +0 -1
- package/dist/src/components/stage-preview/stage-preview.d.ts +0 -49
- package/dist/src/components/stage-preview/stage-preview.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 -25
- package/dist/src/components/stage-preview-toolbar/stage-preview-toolbar.d.ts.map +0 -1
- package/dist/src/modules/import-pipeline.d.ts +0 -20
- package/dist/src/modules/import-pipeline.d.ts.map +0 -1
- package/dist/src/modules/link.d.ts +0 -2
- package/dist/src/modules/link.d.ts.map +0 -1
- package/dist/src/modules/pipeline-builder/text-editor.d.ts.map +0 -1
- package/dist/src/utils/cancellable-promise.d.ts +0 -10
- package/dist/src/utils/cancellable-promise.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`
|
@@ -49,8 +49,7 @@ If you're interested in helping with the Aggregation Builder plugin, we'd be ove
|
|
49
49
|
- [`<ExportToLanguage />`](https://github.com/mongodb-js/compass-export-to-language) Modal plugin that connects `<Aggregation />` to `bson-transpilers` [for actual compiling to another language](https://github.com/mongodb-js/bson-transpilers)
|
50
50
|
- [`mongodb-js/stage-validator`](https://github.com/mongodb-js/stage-validator) Aggregation Pipeline Stage grammar.
|
51
51
|
- [`bson-transpilers`](https://github.com/mongodb-js/bson-transpilers) Read the amazing: [Compiler in JavaScript using ANTLR](https://medium.com/dailyjs/compiler-in-javascript-using-antlr-9ec53fd2780f)
|
52
|
-
- [
|
53
|
-
- [`mongodb-js/ace-autocompleter`](https://github.com/mongodb-js/ace-autocompleter) Makes ACE autocompletion aware of MongoDB Aggregation Pipeline [operators, expressions, and fields](https://github.com/mongodb-js/ace-autocompleter/tree/master/lib/constants).
|
52
|
+
- [`@mongodb-js/compass-editor`](https://github.com/mongodb-js/compass/tree/main/packages/compass-editor) Reusable Compass editor component based on ace-editor with MongoDB-specific ace modes, themes, and autocompleters.
|
54
53
|
|
55
54
|
## Usage
|
56
55
|
|
@@ -60,8 +59,9 @@ to initialise the store instance, which decorates it with various methods to
|
|
60
59
|
conveniently set any values it uses.
|
61
60
|
|
62
61
|
This is for:
|
63
|
-
|
64
|
-
|
62
|
+
|
63
|
+
- `@mongodb-js/compass-aggregations 4.0.0-beta.11`
|
64
|
+
- `@mongodb-js/compass-export-to-language 4.0.2`
|
65
65
|
|
66
66
|
### Browser
|
67
67
|
|
@@ -120,15 +120,15 @@ const store = configureStore({
|
|
120
120
|
localAppRegistry: localAppRegistry,
|
121
121
|
dataProvider: {
|
122
122
|
error: null,
|
123
|
-
dataProvider: dataProvider
|
123
|
+
dataProvider: dataProvider,
|
124
124
|
},
|
125
125
|
env: 'on-prem',
|
126
126
|
namespace: 'db.coll',
|
127
127
|
serverVersion: '4.2.0',
|
128
|
-
fields: []
|
128
|
+
fields: [],
|
129
129
|
});
|
130
130
|
|
131
|
-
<Plugin store={store}
|
131
|
+
<Plugin store={store} />;
|
132
132
|
```
|
133
133
|
|
134
134
|
### Fields
|
@@ -166,36 +166,38 @@ provider.aggregate(namespace, pipeline, options, callback);
|
|
166
166
|
```
|
167
167
|
|
168
168
|
### App Registry Events Emmitted
|
169
|
+
|
169
170
|
Various actions within this plugin will emit events for other parts of the
|
170
171
|
application can be listened to via [hadron-app-registry][hadron-app-registry].
|
171
172
|
`Local` events are scoped to a `Tab`.
|
172
173
|
`Global` events are scoped to the whole Compass application.
|
173
174
|
|
174
175
|
#### Global
|
176
|
+
|
175
177
|
- **'open-create-view'**: Indicated `Create View` is to be opened.
|
176
178
|
- **'compass:export-to-language:opened', source**: Indicates
|
177
179
|
`export-to-language` was opened. `source` refers to the module it is opened
|
178
|
-
from, in this case `Aggregations`.
|
180
|
+
from, in this case `Aggregations`.
|
179
181
|
- **'compass:aggregations:pipeline-imported'**: Indicates a pipeline ws
|
180
182
|
imported, either from pasting the pipeline in, or from using the import
|
181
|
-
functionality. Sends data to metrics.
|
183
|
+
functionality. Sends data to metrics.
|
182
184
|
- **'compass:aggregations:create-view', numOfStages**: Indicates `Create View` was
|
183
185
|
successful. `numOfStages` refers to pipeline length. Sends data to metrics.
|
184
186
|
- **'compass:aggregations:pipeline-opened'**: Indicates a saved pipeline was
|
185
187
|
opened. Sends pipeline data to metrics.
|
186
188
|
- **'open-namespace-in-new-tab'**: Indicates current pipeline's namespace is to
|
187
189
|
be opened in a new tab. Called when `Create View` is successful, when
|
188
|
-
`$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.
|
189
191
|
- **'compass:aggregations:update-view', numOfStages**: Indicates a pipeline view
|
190
192
|
was updated. `numOfStages` refers to the length of the pipeline. Sends data to
|
191
|
-
metrics.
|
193
|
+
metrics.
|
192
194
|
- **'compass:aggregations:settings-applied', settings**: Indicates pipeline
|
193
195
|
settings are to be applied. `settings` include: `isExpanded`, `isCommentMode`,
|
194
|
-
`isDirty`, `sampleSize`, `maxTimeMS`, `limit`.
|
196
|
+
`isDirty`, `sampleSize`, `maxTimeMS`, `limit`.
|
195
197
|
- **'refresh-data'**: Indicates a data refresh is required within Compass.
|
196
198
|
- **'select-namespace', metadata**: Indicates a namespace is being selected.
|
197
199
|
Emitted when updating a collection. `metadata` refers to information about the
|
198
|
-
pipeline.
|
200
|
+
pipeline.
|
199
201
|
- **'agg-pipeline-deleted'**: Indicates a pipeline was deleted. Sends pipeline
|
200
202
|
data to metrics.
|
201
203
|
- **'agg-pipeline-saved', pipelineName**: Indicates a pipeline was saved
|
@@ -206,28 +208,31 @@ pipeline.
|
|
206
208
|
with a `$out`. Sends pipeline data to metrics.
|
207
209
|
|
208
210
|
#### Local
|
211
|
+
|
209
212
|
- **'open-aggregation-export-to-language', pipeline**: Indicates
|
210
213
|
`export-to-language` plugin is to opened. `pipeline` refers to the pipeline to
|
211
|
-
be exported.
|
212
|
-
- **'open-create-view', { meta: { source, pipeline }}**: Indicates `Create
|
213
|
-
View` is being opened.
|
214
|
+
be exported.
|
215
|
+
- **'open-create-view', { meta: { source, pipeline }}**: Indicates `Create View` is being opened.
|
214
216
|
|
215
217
|
### App Registry Events Received
|
218
|
+
|
216
219
|
#### Local
|
220
|
+
|
217
221
|
- **'import-finished'**: When import data was successful, refresh plugin's input
|
218
222
|
data.
|
219
223
|
- **'fields-changed', fields**: Received when schema fields change. Updates
|
220
224
|
plugin's fields.
|
221
225
|
- **'refresh-data'**: Received when Compass data was refreshed. Refreshes input
|
222
226
|
data in the plugin.
|
223
|
-
- **'open-create-view', { meta: { source, pipeline }}**: Received when `Create
|
224
|
-
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.
|
225
228
|
|
226
229
|
#### Global
|
230
|
+
|
227
231
|
- **'refresh-data'**: Received when Input data is to be refreshed on Compass
|
228
232
|
level. Refreshes plugin's input.
|
229
233
|
|
230
234
|
### Metrics Events
|
235
|
+
|
231
236
|
- `refresh-data`
|
232
237
|
- `open-create-view`
|
233
238
|
- `agg-pipeline-saved`
|
@@ -261,6 +266,7 @@ npm run analyze
|
|
261
266
|
```
|
262
267
|
|
263
268
|
## Install
|
269
|
+
|
264
270
|
```shell
|
265
271
|
npm i -S @mongodb-js/compass-aggregations
|
266
272
|
```
|